Consider a sequence $\{p_n\}_{n \in \mathbb{N}}$ s.t. $p_n \in [0,1)$ and $\sum_{n=1}^{\infty} p_n < \infty$. Prove $\prod_{n=1}^{\infty} (1-p_n) > 0$.   I think there's a way to do this without probability eg  or . I mean there's no probability here originally. But I would like to try a probabilistic proof. Kinda like  or   What I tried (I'm not sure if my lim, inf and sup statements are right): Let $(\Omega, \mathscr{F}, \mathbb{P})$ be a probability space, and let $X_n$ be iid Bernoulli random variables with parameter $p_n$ and in $(\Omega, \mathscr{F}, \mathbb{P})$. Then, $$\sum_{n=1}^\infty p_n<\infty \iff \sum_{n=1}^\infty P(X_n = 1) <\infty$$ By Borel-Cantelli Lemma 1 we have, $$P(\limsup(X_n = 1))=0$$ which is equivalent to $$P(\liminf(X_n = 0)) = 1$$ $$ \ $$ $$\to 1 =P(\bigcup_{N \ge 1} \bigcap_{n \ge N} (X_n=0))$$ By continuity of measure $\color{red}{\text{(I think?)}}$ $$= \lim_{N \to \infty}P(\bigcap_{n \ge N} (X_n=0))$$ By monotone convergence theorem $\color{red}{\text{(I think?)}}$ $$= \sup_{N \ge 1}P(\bigcap_{n \ge N} (X_n=0))$$ By independence, $$ = \sup_{N \ge 1} \prod_{n=N}^{\infty} P(X_n=0)$$ $$= \sup_{N \ge 1} \prod_{n=N}^{\infty} (1-p_n)$$ $$\to \sup_{N \ge 1} \prod_{n=N}^{\infty} (1-p_n) = 1$$ $$\to \forall \epsilon > 0, \exists m \ge 1 \text{s.t.} \prod_{n=m}^{\infty} (1-p_n) \in (1-\epsilon, 1] \ \color{red}{\text{(I think?)}}$$ Since $p_n < 1 \ \forall n \in \mathbb{N}$, $$\forall \epsilon \in (0,1), \exists m \ge 1 \text{s.t.} \prod_{n=m}^{\infty} (1-p_n) \in (1-\epsilon, 1] \ \color{red}{\text{(I think?)}}$$ Hence $\forall \epsilon \in (0,1), \exists m \ge 1 \text{s.t.}$ $$\prod_{n=1}^\infty(1-p_n)=\prod_{n=1}^{m-1}(1-p_n)\prod_{n=m}^{\infty}(1-p_n) > 0 \ \because$$  $\prod_{n=1}^{m-1}(1-p_n) > 0 \because p_n < 1 \ \forall n \ge 1$  $\prod_{n=m}^{\infty}(1-p_n) > 0 \because \prod_{n=m}^{\infty} (1-p_n) \in (1-\epsilon, 1]$ QED   Any mistakes? Again, I'm not sure if my lim, inf and sup statements are right.

Prove $S \doteq \sum_{n=1}^{\infty} p_n < \infty \to \prod_{n=1}^{\infty} (1-p_n) > 0$ assuming $0 \leq p_n < 1$.  : Show that $S < 1 \to \prod_{n=1}^{\infty} (1-p_n) \geq 1 - S$.    Assuming the hint is true:  If $S \geq 1$ but $S < \infty$, then $\exists k \in \mathbb{N}$ s.t. $\sum_{n=k}^{\infty} p_n < 1$.  Define $T \doteq \sum_{m=1}^{\infty} q_m = \sum_{n=k}^{\infty} p_n < 1$ where $q_1 = p_k, q_2 = p_{k+1}, ...$  By hint, $T \doteq \sum_{m=1}^{\infty} q_m < 1 \to \prod_{m=1}^{\infty} (1-q_m) > 0 \to \prod_{n=k}^{\infty} (1 - p_n) > 0 \to \prod_{n=1}^{\infty} (1 - p_n) > 0$ (a reason why $p_n < 1$, I guess)  QED  Is that right?


Consider the following command:  sudo -i bash -c 'A=2; echo "|${A}|"; echo "|$A|";'   When I run this on Debian Linux with bash 4.2.37 and sudo 1.8.5p2 it prints:  |2| |2|   But when I run it on MacOS High Sierra with bash 3.2.57 and sudo 1.8.17p1 it prints:  |2| ||   Why doesn't $A show without the curly braces?  This doesn't happen if the -i option is omitted -- both 2 are printed. And it doesn't happen if I just run bash without going through sudo.  Ran into this behavior in  to a SO question. The answerer there is running Linux with bash 4.3.48 and sudo 1.8.16 and getting the missing output. So it looks like it's related to the sudo version (or maybe something in /etc/sudoers that his Linux and my Mac have in common).

What can explain the examples below and how do I fix this, preferably without heavy quoting acrobatics? I am using the $n to simulate multiple line command strings, just in case it distracts you from the real question.  ~$ n=$'\n'; sudo -i echo "line1${n}line2${n}" line1line2 ~$   but  ~$ n=$'\n'; sudo echo "line1${n}line2${n}" line1 line2  ~$


I have written about this issue on msdn forum and I was asked to use some adware cleaner tools to deal with this problem.  Well I scanned my PC with multiple adware cleaners and that lead to some Wifi issues which I resolved afterwards. I also had to uninstall many of my softwares.  umm right now, the ads are still there and they appear more frequently on my browser "Chrome".   Yeah, there is a small written thing at the bottom of every ad 'powered by cloudget'. I am not allowed to post  snapshot.  I'd appreciate any sort of help in this regard.

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


We all know that under a red sun - like Krypton's - , and a yellow sun - like ours - .    What about other colors?  Which colors has he encountered, and what did each of these stars do to him?

With the Superman lore, we know that light from a yellow star gives him his powers, light from blue stars makes him stronger, and light from red stars weakens him.  However, what happens if he is near a white dwarf, or a neutron star?  Has there been any evidence of Superman visiting a star system that wasn't red/yellow/blue?


I'm making an application that need to crop the image to another image. i want to crop the source Image ( like green rectangle) to destination image ( like white rectangle). I can get the size of source and destination image and the offset x and y . How can i got that crop image and save it to library? You can see the image attach here:    How can I crop to that image? and if you can please give me an example source code so much thanks for that

I've got some code that resizes an image so I can get a scaled chunk of the center of the image - I use this to take a UIImage and return a small, square representation of an image, similar to what's seen in the album view of the Photos app. (I know I could use a UIImageView and adjust the crop mode to achieve the same results, but these images are sometimes displayed in UIWebViews).  I've started to notice some crashes in this code and I'm a bit stumped. I've got two different theories and I'm wondering if either is on-base.  Theory 1) I achieve the cropping by drawing into an offscreen image context of my target size. Since I want the center portion of the image, I set the CGRect argument passed to drawInRect to something that's larger than the bounds of my image context. I was hoping this was Kosher, but am I instead attempting to draw over other memory that I shouldn't be touching?  Theory 2) I'm doing all of this in a background thread. I know there are portions of UIKit that are restricted to the main thread. I was assuming / hoping that drawing to an offscreen view wasn't one of these. Am I wrong?  (Oh, how I miss NSImage's drawInRect:fromRect:operation:fraction: method.)


I have the following ODE  $$y' = 2 - \sin(xy), \qquad 1 \le x \le 3$$   with initial condition $y(1)=-\frac 12$. I have to prove that $|y''(x)| \le 40$ over the domain $[1,3]$.   I thought perhaps just do partial differentiation on y' and then draw it on a graph using the x domain and show its always under 40, but that doesn't seem to work... any help? If it helps, the question is in the context of an Euler question. Cheers.

$$y' = 2 - \sin(xy), \qquad\quad 1 \leq x \leq 3, \qquad\quad y(1) = -\frac{1}{2}$$  Attempt:=  $$|y''(x)| = |-\cos(xy)(y + xy')| \leq |y + xy'|$$  Not sure what to do next.


By making the substitution $x=\pi -t$ show that; $$\int_{0}^{\pi} xf(\sin x)dx = \frac{1}{2}\pi \int_{0}^{\pi} f(\sin x)dx$$ where $f(\sin x) $ is a given function of $\sin x$.  I get $dx = -dt$ and that $\sin (\pi -t) = \sin t$ which gives me;  $$\int_{0}^{\pi} xf(\sin x)dx =\int_{0}^{\pi} tf(\sin t)dt - \pi \int_{0}^{\pi} f(\sin t)dt$$  Clearly I am missing a minus sign somewhere so where have I gone wrong?(note; the integral in t is equal to the integral in x, they're just variables)

Let $f(\sin x)$ be a given function of $\sin x$.   How would I show that $\int_0^\pi xf(\sin x)dx=\frac{1}{2}\pi\int_0^\pi f(\sin x)dx$?


xiaojie@ubuntu:~/.ssh$ cat ~/.ssh/id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDiRDV1OlNoxzLaJI0Z2kWtrfD4FINaU3uwuH5e0VmkbkkG/tbD61R5pFHw2z3ZlPPYNP0NbWIzWUIA4gpCkMUgSg/lFsO6Ti3ppKBOEHy/uoEWvDgIbHu/Z8M+gNwii8mCnDdDvg+fcmLv90J4xCq3au4fTDjRQMe0FJkZxgIFFziDNoFKnwi8ES3Joaxmz9+vOxAEL+sAqzLRdJ7OuJ4qYHLoeXv7ok27yB5qCI+3ENrXBom6AkR2350CYZ4sDMBF1J2QorzCneJKqBJ9i8Ijh3dtZoXThinZlsh5SgAJtlpPMSAqbx5rvTSQdbpm2+hun9b54cHOYyfcrYFqusIwPj/TPNGxFQ0WKOpCDtKB1XLmkrOhvjCa+bvrzbB/eK1+lBUZdmO28W0G7USsHxmRJytz4NjF3H3DcRVbziMia6TftmFlfgbRMetqVfd0qMWioQbjzi/2m2IesNdgSc/al2hrZgpMd2uyRtYfXl11HFe8FS5pSt5p756U2+G6RpUCW11tu5hsbKI0NZ/FPTDARLsiz5V7fd20EtaYs77YucfG2yHJy4kWPxDoWM5cePf/T5mLMVUReU3T65r03xbjFGn+oSeDJhvGhAFD82cFmlBZssm2pQH2J+m/CeeaVkUXL9YDt7ysicAHSkRHpRijotzBV4ZKgdLQGe5o6QZGrQ== xiaojie@ubuntu xiaojie@ubuntu:~/.ssh$ ssh-keygen -lf ~/.ssh/id_rsa 4096 SHA256:ovjUzYquVMajDQv8AXlbXU+X+zucgrulucC8aQqbD8g xiaojie@ubuntu (RSA) xiaojie@ubuntu:~/.ssh$ ssh-keygen -lf ~/.ssh/id_rsa.pub 4096 SHA256:ovjUzYquVMajDQv8AXlbXU+X+zucgrulucC8aQqbD8g xiaojie@ubuntu (RSA)  xiaojie@ubuntu:~/.ssh$ ssh xiaojie@ubuntu  The authenticity of host 'ubuntu (127.0.1.1)' can't be established. ECDSA key fingerprint is SHA256:f2TduTCqvnPtV0X4NjJuGWTCTvv1zrZ6o02pR7l91PE. Are you sure you want to continue connecting (yes/no)?   why the fingerprint from ssh localhost and the result of ssh-keygen -lf ~/.ssh/id_rsa.pub is different?

I'm trying to ssh to my iPhone from my mac and I got the following message:  The authenticity of host '192.168.1.253 (192.168.1.253)' can't be established. RSA key fingerprint is SHA256:P8yscqMVDOPOQ24i3qJjcm4hUMeeuxDy7JkRegtV20Q. Are you sure you want to continue connecting (yes/no)?   On my iPhone I typed ssh-keygen -lf /var/mobile/.ssh/id_rsa.pub to check my fingerprint and the fingerprint displayed didn't match the fingerprint displayed on my mac.  Why wouldn't the fingerprints match and how can I fix it without compromising the connection, e.g to a man in the middle?  I have have really no clue what's going on, I've just been searching for a solution so I was hoping someone could help me    Update  I ran ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub instead, and this indeed matched. Am I on the clear to connect?


Note: My english isn't that good. My native english is german. I don't know the correct definition of german wissenschaftliche Ausarbeitung, which I called here as academic writing, german Kurzbeleg, which is the short reference in a citation in a continuous text, which I called here as partial citation and german Langbeleg, which is the full entry in the bibliography at the end of the written work, which I called here as full reference. I also couldn't find a correct translation of this definitions. So I someone has the experience with it, so please edit this question in the correct manner. Sorry for the inconvenience and thank you!  For my academic writing I have to set the names of the authors like this example:   Partial citation: (Surname, Name 2000, S. 1) Full reference: SURNAME, NAME, 2000. Title...   Code for above example:  \documentclass[ngerman]{scrartcl}  \usepackage[T1]{fontenc} \usepackage{             babel,             csquotes            } \usepackage[             backend = biber,             sortlocale = auto,             sorting = nty,             style = authoryear-comp            ]{biblatex}  \begin{filecontents}{\jobname.bib}   @book{         Sur,         author = {Surname, Name},         title  = {Title},         year   = {2000},        } \end{filecontents}  \addbibresource{\jobname.bib}  \begin{document}    Test \autocite[1]{Sur}.   \printbibliography  \end{document}   How can I solve this task?  Thank you for your help and effort in advance!

I am trying to achieve a biblatex style that would do the following:  in the case of \parencite{} I would get ...like that (Smith 2010).   in the case of \textcite{} I would get Smith (2010) says that...  but in References I would get SMITH, J. Bookname.  How can I achieve this?  I use \usepackage[style=authoryear, firstinits=true]{biblatex}  I tried \renewcommand*{\mkbibnamelast}[1]{\MakeUppercase{#1}} but that makes the name uppercase even in the text, which is undesirable especially with \textcite{}


So they say the remote observer will never see anything fallen to the black hole, because any object will slow down as it gets closer to the event horizon and eventually stop to stay there forever. Am I getting it right so far? With this said, it turns out nothing has fallen to the black hole up till now. That is for us, as remote observers, anything that ever tried to reach the black hole got stuck at its event horizon. So we can go and see it right away - it must be still there. At the same time they say that the black hole keeps sucking matter. So question is, to a remote observer, how does all this matter fit the event horizon provided it will never fall through it?

The event horizon of a black hole is where gravity is such that not even light can escape. This is also the point I understand that according to Einstein time dilation will be infinite for a far-away-observer.  If this is the case how can anything ever fall into a black hole.  In my thought experiment I am in a spaceship with a powerful telescope that can detect light at a wide range of wavelengths.  I have it focused on the black hole and watch as a large rock approaches the event horizon.  Am I correct in saying that from my far-away-position the rock would freeze outside the event horizon and would never pass it? If this is the case how can a black hole ever consume any material, let alone grow to millions of solar masses.  If I was able to train the telescope onto the black hole for millions of years would I still see the rock at the edge of the event horizon?  I am getting ready for the response of the object would slowly fade.  Why would it slowly fade and if it would how long would this fading take?  If it is going to red shift at some point would the red shifting not slow down to a standstill? This question has been bugging me for years!  OK - just an edit based on responses so far.  Again, please keep thinking from an observers point of view.  If observers see objects slowly fade and slowly disappear as they approach the event horizon would that mean that over time the event horizon would be "lumpy" with objects invisible, but not passed through?  We should be able to detect the "lumpiness" should we not through?


A per the Community Wiki ,      The original author keeps the reputation gained (or lost) before their   post entered community mode.      The original author can flag the post to moderator attention for   re-convert the C.W to normal post, the moderators will take action on   that.   If the Community Wiki status of a post is reversed, what will happen to the reputation of votes (Up/down) gained by the post at during its time as a Community Wiki?

If votes were cast on a post while it was community wiki, and a moderator removes wiki from that post, the votes should count towards reputation again. However, while this is visible in a reputation audit, , and the reputation score needs to be recalculated to reflect the change.  Can someone fix this?


Till yesterday, I had 56 reputation, and right now, I have 46 (This is for StackOverflow).  It's a change of -10.  Now,  1. When I logged in, the reputation change log showed "-8" in blue on my profile. 2. When I checked the log, it showed no Negative Reputation anywhere (as you might see in my log).  What exactly happened, and where I lost reputation?  I tried to lookup other similar questions, but couldn't find an answer to this type of scenario. If there's a duplicate, do let me know. :)  Thanks  EDIT:  From another Community Wiki Answer:     Why would an event disappear from my reputation history?      This should only occur for upvotes, downvotes, and accepts. Whenever   one of these actions gets reversed during the same day, the event is   just completely removed from your history rather than creating a   separate unupvote, undownvote, or unaccept event in the list. This was   done to prevent users clicking a vote on/off repeatedly to fill up a   user's history with useless events.   I got my answer. Someone who had upvoted, again downvoted to make no net change in my reputation. Now I have another question: So, now, how do I know which post was affected, so that I could update my answer if there was something wrong?

When I visit the reputation tab of my profile, I see a lot of stuff. I can make out some of it, but not all.   What do all the event types mean? Why do some events show an odd reputation gain or not show any reputation change at all? Why are some events sometimes highlighted in yellow? My reputation suddenly dropped, but I don't see anything. What happened? Why do some events disappear from my reputation history?


I'm currently running ubuntu 17 on my flashdrive. It's the first time I use linux and I have no idea what`s going on. I followed  but when the computer boots it shows a few options, like install ubuntu or try it. I always choose the second one. If I choose install, can it be done in the flashdrive with the ISO?

If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.


Prove that $$\lim_{n\rightarrow \infty}nx^n = 0$$ for $|x| < 1$.  I can tell that $\lim_{n\rightarrow \infty}x^n = 0$, and it's going to zero much faster than $n$ goes to $\infty$. But how do I take it from here? And how do I also prove it for negative x's?

If $-1<x<1$ show that $\lim\limits_{n \to \infty}{n\,x^n} = 0$. I don't have idea. I only prove that $n\,x^n$ is decreasing.


I am new and using Ubuntu 18.04.1 LTS. I want to protect a particular folder with a password. so that no one can access the folder without the password. Is there any software or process to do so? I tired cryptkeeper but I failed to install with following error:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package cryptkeeper

I had installed Cryptkeeper in Ubuntu 16.04 lts. I have upgraded Ubuntu 16.04 to 18.04. After I upgraded to Ubuntu 18.04 , I completely lost my file which were encrypted through Cryptkeeper in Ubuntu 16.04. There are only folders where I kept my files. Now when I try to install Cryptkeeper in Ubuntu 18.04 through terminal it says  E: Package 'cryptkeeper' has no installation candidate   Does anyone know how to bring back my files without degrading Ubuntu to 16.04 LTS? Or, does anyone know of another file encryption program, as easy to install and use as Cryptkeeper, that will work reliably on Ubuntu 18.04 ?


I'm studying algebraic topology and got stuck.  a. $X_n\in \mathbb{R}^3$ is the union of $n$ distinct lines through the origin. Find $\pi_1(\mathbb{R}^3-X_n)$ for each $n$.  b. Let $X$ be the sum of two tori $S_1\times S_1$ by identifying a circle $S_1\times x_0$ in a torus with $S_1\times x_0$ of the other torus. Find $\pi_1(X)$.  For (a), $\pi_1(\mathbb{R}^3-X_1)=\mathbb{Z}.$ But I cannot compute $n\ge 2$ cases.. for (b), I guess the group is $<a,b,c|ab=ba,bc=cb>$ from Van Kampen. Is it correct?

Compute the fundamental group of the space obtained from two tori $S^1✕S^1$ by identifying a circle $S^1✕${$x_0$} in one torus with the corresponding circle $S^1✕${$x_0$} in the other.  Using van Kampen's theorem, I can fairly quickly show that if $T_1$ is one torus and $T_2$ is the other, then the group has to be isomorphic to $((π_1(T_1) ∗ π_1(T_2)))/N ≅ (\mathbb{Z} ✕ \mathbb{Z})∗ (\mathbb{Z} ✕ \mathbb{Z})/N$, where N is generated by elements of the form $i_{12}(w)i_{21}(w)^{-1}$, w is in $\pi_1(S^1✕${$x_0$}$) ≅ \mathbb{Z}$ and $i_{12}$, $i_{21}$ are the maps from $\pi_1(S^1✕${$x_0$}$)$ to $π_1(T_1)$, $π_1(T_2)$ respectively determined by inclusion. My problem is, as it seems to always be with van Kampen-related problems, figuring out what the elements of N look like. My attempt to do this in a pure-algebra way, as far as I can tell, failed me: I tried examining the case where w represents a loop that goes n (some integer) times around the circle, but then it seems like $i_{12}(w)$ "$=$" $(n, 0)$ in $T_1$ and $i_{21}(w)$ "$=$" $(n, 0)$ in $T_2$, which says to me that $i_{12}(w)i_{21}(w)^{-1} $"$=$"$ (n, 0) + (-n, 0) = 0$. The notation here isn't right, since $(n, 0)$ in $T_1$ is not the same as $(n, 0)$ in $T_2$ and their addition (composition?) shouldn't be written quite that way, hence my quotes around the equals signs, but certainly no loop in $S^1✕${$x_0$} is going to magically include anything but the 0 loop in either torus's second component, right? But this doesn't seem right to me, since if a, b are the generators of the circles in $T_1$ and d, e are the generators of the circles in $T_2$, and c is the constant path then the identification of the circle should make, say, $a = d$, so for example $(a, b)*(d, e)$ $ = (a^2,b)*(c, e)$ $ = (c, b)*(d^2,e)$. This doesn't match with what I just worked out N might be, but I also can't figure out what N should look like to make this equivalence make sense. My attempt to understand this geometrically has gone even worse. What I know for sure is that the resulting figure isn't the "2-torus", 2 tori glued together at a disc. What I don't know for sure is whether this identification should actually create the hypertorus $S^1✕S^1✕S^1$ or something completely different.


Why?  I need to share some files (copy over) from my Laptop (running Ubuntu 17.04) to my Desktop (running windows 10). As the summed amount of files come to over 800GB and not wanting to do multiple trips with a 16GB flash drive I thought the next best course of action would be to connect the two devices together somehow. I chose to do it via ethernet cable as transfer should be reliable and the throughput should be decent.   The problem  After connecting the 2 devices together and sharing all the relevant folders on BOTH systems they still don't seem to recognise each other nor do I seem to be able to find any simple solution to what I assumed might be a common occurence.  Extra (but not necessary)  Tips on speeding up the transfer. I was thinking of potentially adding all the folders to a 7z archive (only because I've had good results with it in the past) and save that archive on windows so that you transfer the archive (which would surely be smaller).

I have a desktop (Ubuntu 13.04 & Win 7 Home Premium) and a Laptop (Ubuntu 12.04), both having WiFi adapters. I also have a WiFi router connected to internet which both my computers can access.  I want to share files between my desktop and my laptop using WiFi (similar to Homegroup on Windows 7 but without using Ethernet cables).  How do I set-up that?  I want to share files using both OSs, if anyone have have information about sharing files with any of the OS please answer!


Why would the metadata show a date of 1998 if it was taken in 2018?  Profile Name:          Photoshop ICC profile  Profile Cmm Type:      Lino  Profile Version:       2.1.0  Profile Class: Display Device Profile  Color Space Data       RGB  Profile Connection     Space: XYZ  Profile Date Time:     1998:02:09 06:49:00

I am trying to determine when a photo was taken with a smart phone. It was sent to me, not taken from facebook. I've viewed the exif data but the only field that even references a date is the ICC profile date. What is this date? is this the date it was taken? if not, how can I view the date it was taken?


The other day, I decided that, in addition to Ubuntu, I'd like to try ElementaryOS. So, I made another partition, and installed on that partition (sda5). In the installer, there was a box that said to choose the bootloader installation drive. So, I picked sda6 (my Ubuntu partition) so that it would merge with my existing grub. Now, I had no idea if this would work, but it seemed like it would make sense.  Anyways, it didn't work, and that's why I'm here. My computer default boots to Windows (that is, if I don't do anything when I press the power button, it'll boot to Windows). I want to keep this functionality. Normally, I would go and select the boot device, and then grub would come up and I could boot Ubuntu. So, I want to also be able to select ElementaryOS instead of Ubuntu. However, when I select the boot device that used to give me grub, it says error: file '/boot/grub/i386-pc/normal.mod' not found and shows me the grub rescue prompt (an image is below). Now, I figured out how to boot back into ubuntu. I have to type this:  set root=(hd0,gpt6) set prefix=(hd0,gpt6)/boot/grub insmod normal normal   and it takes me back to my grub screen where I can pick Ubuntu. How can I make it so that I don't have to go through the grub rescue prompt, and put ElementaryOS on the grub menu. Furthermore, I DO NOT want grub to replace the default bootloader that boots Windows if I don't press anything.  Thanks, and sorry if this is badly explained. I'll be happy to clarify. The image of the grub prompt is below:    EDIT: Link to boot-repair summary report

error: file '/grub/i386-pc/normal.mod' not found. grub rescue>   What can I do? I just sit and stare at it.   I found my old netbook (Dell Inspiron 1010) which I have not used for about four years. I replaced Windows XP with Ubuntu 12.10. I used my bootable USB drive. I installed and rebooted. I got the message that normal.mod is not found.   What should I do? Type exit, reboot, or quit? Should I re-install?


I have a website which is only reachable under .... The http:// is 301 redirected to https:// and the https:// without www is 301 redirected to .... In Google Webmaster Tools I have added the website twice, one with www and one without www. Is it necessary to add the http:// as well?  Thanks for advice.

In my site I'm redirecting everything (http://, http://www., https://) to https://www.example.com.  Google webmaster tools says: Make sure you add both "www" and "non-www" versions for your site. Also, if you use the HTTPS protocol, add those variations as well.  So I've added all the FOUR versions to google webmaster tools. Is this a correct process?


What is the difference between the two sentences below     A: He learned about good design from the house where his family lived.      An architect called John had built it.      B: He learned about good design from the house where his family lived.      An architect called John built it.

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


It's a bit of a stretch, I know, but there are a few clues.    First, the point of "Destination Void" is to create AI, which turns out to be       somewhat godlike   AI has been outlawed in the "Dune" universe after the Butlerian Jihad, probably for this very reason.  Second, one of the characters in "Destination Void" has an experience of enhanced consciousness in which her mind acts like a supercomputer, a clear parallel with the Mentats from Dune.  Third, there are several references to the "axlotl" tanks in which clones are grown, a term which is also used in various places in the "Dune" series in reference to the Bene Tleilax who also grow clones.  It's possibly that Herbert just likes reusing these concepts, but it seemed strongly suggestive that he meant these to be on the same timeline, albeit Dune happens many thousands of years later.  (Side note: I've never read -- nor do I intend to read -- the "Dune"-related books written by Herbert's son, and don't consider them canon)

There are similar aspects between Dune, and the technology in The Lazarus Effect.   Noticeable similarities:   Lasguns - this weapon exists in both of the books, and has similar architecture in both books.   Merman and Ixians - are both technologically sophisticated in similar ways. Rely on mechanical technology as opposed to organics or similar.   Is this merely Herbert sticking to his original style?


I'm reading Effective C# and I came across the following pattern to improve event-calling behavior and make it thread-safe:      public class EventSource {         private EventHandler<int> Updated;         private int counter;           public void RaiseUpdates(){           counter++;           var handler = Updated;           if (handler != null){               handler(this, counter);         }   The book claims that since there a "shallow copy" in the assignment to handler, the call handler(this, counter) will call all registered clients even if moments before one of them unsubscribed. But aren't delegates in C# reference types? Wouldn't this assignment just create a new reference for the underlying delegate object?

Something that confuses me, but has never caused any problems... the recommended way to dispatch an event is as follows:  public event EventHandler SomeEvent; ... {     ....     if(SomeEvent!=null)SomeEvent(); }   In a multi-threaded environment, how does this code guarantee that another thread will not alter the invocation list of SomeEvent between the check for null and the invocation of the event?


$$\lim_{n \to \infty} \int_{0}^{1} e^{x^2} \sin(nx) dx$$ I am trying to find above limit without using the concept of Lebesgue integration. I know that $e^{x^2} sin(nx)$ is not a uniformly convergent sequence of functions so i can not take limit inside integration. So give me any idea that is it really possible to evaluate the limit without using the concept of lebesgue integration. Thank you

Let $f:\left[a,b\right]\to\mathbb{R}$ be a function that is derivative so that $f'$ is continuous then $$ \lim_{n\to\infty}\int\limits _{a}^{b}\sin\left(nt\right)f\left(t\right)dt=0 $$   My attempt: I want to show that $\forall\epsilon>0 \ \exists \ n_0 \in  \mathbb{N}$ so that $\forall n>n_0 \ \ \ \left|\int\limits _{a}^{b}\sin\left(nt\right)f\left(t\right)dt\right|<\epsilon$. Let there be $\epsilon>0$  because $f$ and $\sin$ are derivative and $f'$ is continuous we can use integration by parts so that $$ \left|\int\limits _{a}^{b}f'\left(t\right)\sin\left(nt\right)dt\right|=\left|\left[f\left(t\right)\sin\left(nt\right)\right]_{a}^{b}-n\int\limits _{a}^{b}f\left(t\right)\cos\left(nt\right)\right|\leq\left|\left[f\left(t\right)\sin\left(nt\right)\right]_{a}^{b}\right|+\left|n\int\limits _{a}^{b}f\left(t\right)\cos\left(nt\right)\right| $$  That is my main idea. any suggestions?


There is a story on  that  . I don't understand why they are doing so.  Can someone explain why it makes sense to buy CIBC bonds with negative return? Why would that be preferable to holding the amount in cash?

The only reason that I can think of is because I expect the bond to appreciate in price thus offsetting the loss in yield. I could still end up with less money than I started with, if I hold the bond until maturity. Ultimately, the only scenario where I would want to buy a bond with a negative yield is because I anticipate deflation and even lower rates in the future. Is this correct, or is there another reason?  Currently, a lot of the global government bond market is trading on negative yield, and there are even some corporate bonds that are too.


Given infinite cardinal numbers $\mathfrak{m<n}$, is it true that $2^\mathfrak{m}<2^\mathfrak{n}$?

Possible Duplicate:          Let $X$ and $Y$ be sets, and suppose that $|\mathscr{P}(X)| = |\mathscr{P}(Y)|$ (where $\mathscr{P}$ denotes the power set).  Does it follow that $|X|=|Y|$?  Remark: It's obviously true for finite sets, as $2^m=2^n$ implies $m=n$.


I am traveling past earth near the speed of light, I see an 80kg (rest mass) man standing on a scale and it reads 80 kg. However, due to special relativity I see the mass of the earth and the man are both doubled and hence the gravitational force between them should be 4 times and the scale should read 320kg. The reading on the scale display can't be both 80kg and 320kg.  What is the explanation?  I did search both the web and stack exchange and could not find an answer. I saw the "duplicate post" before posting and it refers to a moving mass on a stationary surface whereas this case is 2 masses that are stationary relative to each other and a observer moving relative to both, I see this as a different case and look forward to any solutions.

If an object was sliding on an infinitely long friction-less floor on Earth with relativistic speeds (ignoring air resistance), would it exert more vertical weight force on the floor than when it's at rest?


I'm considering exchanging my laptop battery, but figured that it makes sense to know which capacity it had initially.  I don't have the /proc/acpi/battery/ directory and sudo acpi -i only prints the charging state. sudo lshw-gtk doesn't contain any information other then "Unknown".  I'm using Ubuntu 17.04.

I would like a command that displays the battery status in the terminal.


I am installing a 60 amp outdoor sub-panel 600+ feet away from the 200 amp main service panel.  Here is what I am doing based on my requirements:   Run a 2-2-2-4 Aluminum underground feeder to this 60 AMP panel and breaking this distance with two Quazite (Underground junction) boxes.     I have 24 light post, 12 on each side of the driveway, and 6 outlets, 3 on each side of the driveway. The Quazite boxes will help to run wires to each light and electrical outlets.  I will have 3 120V pumps (8 amps each), Gate opener, Lights and outlets hooked to this sub panel.   My questions:    Is the 2-2-2-4 Aluminum underground feeder good enough for the distance of 600 feet? Should I run one straight feeder or break it in the Quazite boxes?

I have to add an outdoor sub panel rated 60 AMPs and I need at least 8 spaces for breakers.  I am not finding this anywhere unless I buy a 125 AMP rated breaker box.  Is it acceptable to install a 125 AMP rated panel when the need is only 60 AMPs.  I have 200 AMPS service in the house and have space for a 60 AMP breaker in my main panel


How can I create a link from a PDF-Reference to another external PDF? I want to reference a source and when you click on it, the document should jump to the bibliography like normal. An then i want to put all sources from the bibliography to a seperate folder as PDF-Files.  Then when I click to a source itself in the bibliography I want that my PDF opens the book or what ever is referenced and the correct page with the marked text. Does somebody know if that is possible in latex in some way? Maybe with a kind of hyperlink to the PDF and some parameters to directly open the correct page? Thank you !

It's possible to  file using Adobe Acrobat using the following LaTeX code:  \href{run:target.pdf}{Click me!}   If this is placed in source.pdf, then you can click on the hyperlink to open up target.pdf on the front page.  Is there any chance of hyperlinking to a different section in another PDF, similar to second.html#target in HTML?


There's this daemon with, for ex. 5 types in one script. Now, i want to be able to start/stop it by specifying the number of the daemon(to start one by one), OR specify "all" (to start in bulk).   The format: (runscript) (commandName) (daemon # or "all")   Need to satisfy two conditions, when the user inputs:  (1) correctly (either by number or "all) OR  (2) incorrectly (either inputted num is greater than $count or all other string than "all"). All conditions are already achieved except for one, if the user inputs other string than "all"   Sample code:  case 'startDaemon': #commandName set count = 5  if ($#argv == 2 && $2 == all) then     echo "correct, do this" else if ($#argv == 2 && $2 < $count) then     echo "correct too, do this" else if ($#argv == 2 && ($2 != all || $2 >= $count)) then     echo "Incorrect parameter: specify daemon # less than $count or 'all' to start all." else      echo "Please use: $0(runscript) $1(commandname) (daemon # or all)"   whenever I type: (runscript) startDaemon hello, for example, error shows:  if: Expression syntax   When it should have gone to the 3rd condition.   PS. Im using csh. The script given to me is in csh.

Need to apply it on csh.  to check if the inputted $2 is not number nor the word "all"  if ($#argv == 2 && ($2 != all && $2 != **any number**)) then    echo "wrong parameter"


if ${S_n}$ is a sequence of real numbers and if  $$\lim_{2m \to \infty} S_{2m} = L$$  $$\lim_{2m-1 \to \infty} S_{2m-1} = L$$  then prove $$\lim_{n \to \infty} S_{n} = L$$   This is how I began: let $\epsilon>0$ There exists $N_1\in\mathbb{N}$ s.t $|S_{2m}-L|<\epsilon$ for all $m\ge N_1$ and  There exists $N_2\in \mathbb{N}$ s.t $|S_{2m-1}-L|<\epsilon$ for all $m\ge N_2$   Now let $n=\text{max} \{N_1 , N_2\} $ ( my curly brackets do not show. sorry about that ) Now I guess I have to prove that  $|S_n-L|<\epsilon$ for all $n \ge m$ But I am not sure how to do that. or even have I been correct in the beginning? I will appreciate your help with this question .

Given a sequence $x_1<x_2<x_3<x_4<\ldots,$ I found both subsequences $\{x_{2m}\}$ and $\{x_{2m-1}\}$ converge to $\lambda^*$. In this case, can I say $\{x_m\}$ also converge to $\lambda^*$? (i.e. a sequence $\{x_m\}$ is divided into two subsequences $\{x_{2m}\}$ and $\{x_{2m-1}\}$)  If so, if the rate of convergence is superlinear for both subsequences $\{x_{2m}\}$ and $\{x_{2m-1}\}$, can I also say that $\{ x_m\}$ converge superlinearly?   What is more curious to me is the case where two subsequnces converge at different rates of convergence. For example, if $\{x_{2m}\}$ converges linearly to $\lambda^*$ and $\{x_{2m-1}\}$ converges superlinearly to $\lambda^*$, what is the rate of convergence of $\{x_m\}$?


How can I clean /boot or what can I remove considering it's almost full and I keep getting a message that says there is only 5.1 MB left. Because if I go to disk usage analyzer, like it says to there is no open to clean.  Here are the content of the partition:  username@hostname:~$ ls -l /boot/ total 423041 -rw-r--r-- 1 root root  1443719 Aug  9 07:08 abi-4.10.0-32-generic -rw-r--r-- 1 root root  1443962 Aug 11 13:59 abi-4.10.0-33-generic -rw-r--r-- 1 root root  1443962 Sep 13 07:16 abi-4.10.0-35-generic -rw-r--r-- 1 root root  1407843 Feb  5  2017 abi-4.8.0-36-generic -rw-r--r-- 1 root root  1408375 Mar 31 14:01 abi-4.8.0-46-generic -rw-r--r-- 1 root root  1408671 Apr 20 09:07 abi-4.8.0-49-generic -rw-r--r-- 1 root root  1408813 Jun 14 11:17 abi-4.8.0-56-generic -rw-r--r-- 1 root root  1408813 Jun 26 17:31 abi-4.8.0-58-generic -rw-r--r-- 1 root root   204970 Aug  9 07:08 config-4.10.0-32-generic -rw-r--r-- 1 root root   204970 Aug 11 13:59 config-4.10.0-33-generic -rw-r--r-- 1 root root   204970 Sep 13 07:16 config-4.10.0-35-generic -rw-r--r-- 1 root root   199575 Feb  5  2017 config-4.8.0-36-generic -rw-r--r-- 1 root root   199564 Mar 31 14:01 config-4.8.0-46-generic -rw-r--r-- 1 root root   199588 Apr 20 09:07 config-4.8.0-49-generic -rw-r--r-- 1 root root   199564 Jun 14 11:17 config-4.8.0-56-generic -rw-r--r-- 1 root root   199564 Jun 26 17:31 config-4.8.0-58-generic drwxr-xr-x 3 root root     1024 Apr  9 12:00 efi drwxr-xr-x 5 root root     1024 Sep 20 05:03 grub -rw-r--r-- 1 root root 42058341 Aug 28 10:57 initrd.img-4.10.0-32-generic -rw-r--r-- 1 root root 42056847 Aug 29 02:58 initrd.img-4.10.0-33-generic -rw-r--r-- 1 root root 42056820 Sep 20 05:03 initrd.img-4.10.0-35-generic -rw-r--r-- 1 root root 40647942 Aug 28 10:56 initrd.img-4.8.0-36-generic -rw-r--r-- 1 root root 40638652 Aug 28 10:55 initrd.img-4.8.0-46-generic -rw-r--r-- 1 root root 40637975 Aug 28 10:55 initrd.img-4.8.0-49-generic -rw-r--r-- 1 root root 40644972 Aug 28 10:55 initrd.img-4.8.0-56-generic -rw-r--r-- 1 root root 40643997 Aug 28 10:55 initrd.img-4.8.0-58-generic drwx------ 2 root root    12288 Apr  9 12:00 lost+found -rw-r--r-- 1 root root   182704 Jan 28  2016 memtest86+.bin -rw-r--r-- 1 root root   184380 Jan 28  2016 memtest86+.elf -rw-r--r-- 1 root root   184840 Jan 28  2016 memtest86+_multiboot.bin -rw------- 1 root root  3718993 Aug  9 07:08 System.map-4.10.0-32-generic -rw------- 1 root root  3721812 Aug 11 13:59 System.map-4.10.0-33-generic -rw------- 1 root root  3721891 Sep 13 07:16 System.map-4.10.0-35-generic -rw------- 1 root root  4060748 Feb  5  2017 System.map-4.8.0-36-generic -rw------- 1 root root  4066103 Mar 31 14:01 System.map-4.8.0-46-generic -rw------- 1 root root  4066773 Apr 20 09:07 System.map-4.8.0-49-generic -rw------- 1 root root  4068016 Jun 14 11:17 System.map-4.8.0-56-generic -rw------- 1 root root  4068043 Jun 26 17:32 System.map-4.8.0-58-generic -rw------- 1 root root  7398816 Aug  9 07:08 vmlinuz-4.10.0-32-generic -rw------- 1 root root  7404416 Aug 11 13:59 vmlinuz-4.10.0-33-generic -rw------- 1 root root  7405152 Sep 13 07:16 vmlinuz-4.10.0-35-generic -rw-r--r-- 1 root root  7297312 Apr  9 12:08 vmlinuz-4.8.0-36-generic -rw------- 1 root root  7305856 Mar 31 14:01 vmlinuz-4.8.0-46-generic -rw------- 1 root root  7305856 Apr 20 09:07 vmlinuz-4.8.0-49-generic -rw------- 1 root root  7309536 Jun 14 11:17 vmlinuz-4.8.0-56-generic -rw------- 1 root root  7310848 Jun 26 17:31 vmlinuz-4.8.0-58-generic username@hostname:~$

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel.


I have a daughter who is in the grips of a social media encouraged self identity crisis.  For the past 15 years nothing has ever made me, her mother, or herself double think her gender identity.  However, recently social media and a club at school have caused her to be socially engaged into dabbling in a gender identity that doesn't match her biological sexual identity.  This has historically never been an issue and I fully believe this is not an internal situation but rather a social situation. As a concerned and caring father how can I address this and bring my daughter back to the identity I truly believe she has and truly believe she herself holds internally despite temporary social influence which is pushing her away from that? Please do not frame challenge me.  That is against the rules of this site.

My daughter, 13, has said she wants to be a boy. A little background: we moved to a new state a year and a half ago. In her new school, she felt isolated among her peers until she met a girl in art, and became good friends. She joined the drama club, and made  friends with some 8th graders. They joined “the diversity club”. This club is a LGBT club. The kids put on a play they wrote and starred in, which had homosexual connotations. “Romeo and Juliet”, but script  rewritten to include  2 females as the couple, for instance.   My daughter got so wrapped up in it, that her life was as if she was copying the play. She’s no longer friends with the friend from art, but remains close with the 8th grade crowd. They all labeled themselves. One week, my daughter said she was gay, then, changed to bi, then onto pan. (I had to google that one). Now she is emphatic about being disgusted with her body and wants to be a boy. She wants to donate all the “girly” clothes she picked out last year, and tossed out all the makeup she bought a few months ago.   All her life, she was the classic girly girl. She had crushes on boys, and she and this boy were inseparable since first grade. She was sad when it came time to move away. When we settled here, she became sullen and angry, putting herself down. She now sees a therapist who she really likes. We’ve been working on her self esteem issues. She’s wanting us to call her “he” and by a male name. I can’t do that. She’s my daughter. She is female. Had we seen this coming, maybe I could come to accepting. But it happened out of the blue.  Sometimes the old her comes back-I got a makeup sample and she was interested in trying it, looked at me, then quickly put it down and said “ewww, makeup”—just a few months ago, she bought a bunch. She’s now wanting to wear boys clothes and talks of wearing a suit to her prom. She is very impressionable, and seems affected by viral YouTube videos about kids coming coming out to their mothers, and the mothers gleefully embrace with happy tears. She has told me when she’s 18, she’s having her breasts removed.    Nothing seems normal to me anymore-in terms of how she always was-this new situation just doesn’t fit.  My gut tells me this is a phase.  I’m hoping it’s a phase. But with all I’m seeing in the media about this, I’m not sure. I love her; this is too much for me to process. I’m a stay at home mom; we were inseparable. I knew her. Until now.:(  She cut off all her beautiful hair, and wears boys shorts, baggy tee shirts, and bought this awful men’s deodorant spray. Please help me sort this out. I’m at my wits end.  Do you think this is a phase? Is this common?


I'm developing static library for matrix operations using templates wherein we can perform basic matrix operations on various datatypes(short, int, long, long long, float, double, long double). But as far as I know when using templates, class declaration and definition can't be kept in separate files(.h and .cpp files). If this is the case how do I create the library without exposing my implementation code(only class syntax declaration and library has to be provided to an other user). This is what I've written so far  MatrixClass.h  #ifndef __MATRIXCLASS_H__ #define __MATRIXCLASS_H__  #include<iostream> #include<vector>   template<typename T> class CMatrix {  public:     CMatrix();     ~CMatrix();      unsigned long rows;     unsigned long cols;      std::vector<std::vector<T> > data;      void setMatrixSize(unsigned long rows, unsigned long cols);     void printMatrix();     void add(CMatrix<T>& A, CMatrix<T>& B);     void sub(CMatrix<T>& A, CMatrix<T>& B);     void mul(CMatrix<T>& A, CMatrix<T>& B); };   template<typename T> CMatrix<T>::CMatrix() {     this->rows = 0;     this->cols = 0;      data.clear(); }   template<typename T> CMatrix<T>::~CMatrix() {     this->rows = 0;     this->cols = 0;      data.clear(); }   template<typename T> void CMatrix<T>::setMatrixSize(unsigned long rows, unsigned long cols) {     this->rows = rows;     this->cols = cols;      data.clear();     data.resize(cols, std::vector<T>(rows, 0)); }   template<typename T> void CMatrix<T>::printMatrix() {     for(unsigned long i = 0; i < rows; i++) {         for(unsigned long j = 0; j < cols; j++) {             std::cout << data.at(i).at(j) << "\t";         }         std::cout << std::endl;     }  }   template<typename T> void CMatrix<T>::add(CMatrix<T>& A, CMatrix<T>& B) {     if((A.rows == B.rows) && (A.cols == B.cols)) {         for(unsigned long i = 0; i < rows; i++) {             for(unsigned long j = 0; j < cols; j++) {                 data.at(i).at(j) = A.data.at(i).at(j) + B.data.at(i).at(j);             }         }     } }   template<typename T> void CMatrix<T>::sub(CMatrix<T>& A, CMatrix<T>& B) {     if((A.rows == B.rows) && (A.cols == B.cols)) {         for(unsigned long i = 0; i < rows; i++) {             for(unsigned long j = 0; j < cols; j++) {                 data.at(i).at(j) = A.data.at(i).at(j) - B.data.at(i).at(j);             }         }     } }   template<typename T> void CMatrix<T>::mul(CMatrix<T>& A, CMatrix<T>& B) {     if((A.cols == B.rows) && (rows == A.rows) && (cols == B.cols)) {         for(unsigned long i = 0; i < A.rows; i++) {             for(unsigned long j = 0; j < B.cols; j++) {                 for(unsigned long k = 0; k < A.cols; k++) {                     data.at(i).at(j) += A.data.at(i).at(k) * B.data.at(k).at(j);                 }             }         }     } }  #endif

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I have a doubt related the output of ll command.  When, in my shell, I execute the ll command I obtain this output:  -rwxrwxr-x 1 andrea andrea 104215 ott 15 15:56 atmosfs*   Why I have the * next to the file name atmosfs? What does it mean?

I noticed that if I run ls -F on a directory, some of the entries have a * or a @ after them.   spuder@ubuntu:~$ ls -F /sbin acpi_available*   getpcaps*           lvmconf*                 ntfscp*        start-stop-daemon* agetty*           getty*              lvmdiskscan@             ntfslabel*     status@ alsa*             halt@               lvmdump*                 ntfsresize*    stop@ alsactl*          hdparm*             lvmsadc@      spuder@ubuntu:~$ ls -F ~ daq-0.6.1/  examples.desktop       noname-cache.lib  snort-2.9.1/   Templates/ Desktop/    jpgraph-1.27.1/        noname.sch        snortfiles/    Ubuntu One/ Documents/     According to the ls man pages   spuder@ubuntu:~$ man ls ... -F, --classify   append indicator (one of */=>@|) to entries ...   I'm guessing that @ means symbolic link,     What do these other indicators mean ( */=>@| )  ?


According to my :  "The force between two finite rigid bodies is not necessarily along the line joining their centre of mass".    If the Gravitational Force is Central then why it will not act between two finite bodies along their Centre of mass?  Please elaborate that highlighted text with some simple example.

My book says:     For most of the small objects, both are same. But for mammoth ones, they are really different ones. And in a gravity-less environment, COG is absent; COM still exists.   Ok, what's the big deal when things are small and big? How these two :  & ?


I need to update table from a certain population.  The code:  @IdentityNumbers dbo.StringList readonly  update d    set DeliveryNationalInsuranceBatchLogId = @BatchLogId,        LastUpdateDate=getdate(),        LastUpdateUserId=-999   from MortgageDetails d join MortgageReturnParticipationBase b     on b.Id = d.MortgageReturnParticipationBaseId join @IdentityNumbers newRow     on (newRow.item = b.IdentityNumber or newRow.item = b.MateIdentityNumber)  where (DATEADD(YEAR,70,BirthDate) <= getdate() or (MateBirthDate is null or DATEADD(YEAR,70,MateBirthDate) <= getdate()))    and b.CheckWithNationalInsurance=1    and d.IsActive=1    and b.MortgageReturnParticipationStatusId=1   I did it and it takes for a population of about 10,000 board size in just a few seconds to a minute, and for a population of about 500,000 it takes over an hour ...  I think the reason is that this StringList is what slows down the pace ...  Could this really be the problem? Is there a solution?

We have a number of stored procedures where we pass in a user defined table type parameter. As per the MS doc below, my understanding is that SQL Server doesn't retain statistics on these (and therefore should only estimate a single row?).    Recently, we've seen issues with plan generation where the estimated number of rows in the table is a high as 2000 (normally only 1 or 2 rows are in passed in).  This is caching a plan which is highly inefficient (wrong join order with a largish table ~160M rows) and causing some issues.  Am I wrong here about what the estimates should be? I could force the join type/order but I'd rather avoid this if at all possible.  Would really appreciate any thoughts/feedback people might have.  Thanks Dave


I wanted to find the breaker for directly wired (i.e. no plug + outlet) dishwasher by using a 'non-contact voltage tester' and it showed +ve for three different breakers. Then I hooked up a multimeter (V/AC setting) and tested. The reading for three breakers were 120V, 13.7V and 1.7V.  What could be the cause for the last two? Induction when wires run parallel? Insulation deterioration over time? Neutral is not at 0v? I suspected induction because when the last two breakers both on the voltage drops to 1.3V. However 13.7V seems too high, not that I know anything about what it should be.  The house is 37 years old, but probably it was rewired sometime later.

I am replacing a power receptacle at my apartment. It has the standard four wires, with one of the two reds going to a nearby toggle switch.  I am concerned because when the toggle switch is off, I measure 16V between one of the red wires and a white. (The other red wire always measures 0 V, so I assume it doesn't go to anything.)  I don't want to wire up the red if it's going to sit at 16 V when it's supposed to be off. Any ideas why this is happening or what I can do? Or is 16 sufficiently close to 0?


Assuming a tournament of size $n$ is a choice of orientation for each edge of $K_n$, show that there exists a tournament of size $n$ with at least $\dfrac{n!}{2^{n-1}}$ Hamiltonian paths.  This question was on my graph theory final and I wasn't quite sure how to prove this. I think it might have something to do with the out-degrees of a particular node, but I'm not quite sure. Any help is greatly appreciated!

The following theorem is from Alon&Spencer's The probabilistic method, in the beginning of chapter 2:  Theorem 2.1.1: There is a tournament $T$ with $n$ vertices and at least $\frac{n!}{2^{n-1}}$ Hamiltonian paths.  Briefly the theorem is proved by looking at $X_\sigma$ the indicator random variable for a permutation $\sigma$ giving a Hamiltonian path, that is, satisfying $(\sigma(i),\sigma(i+1))\in T$ for $1\leq i \lt n$. Then   $\sum \mathbb{E}\left[X_\sigma\right] = \frac{n!}{2^{n-1}}$.  I don't understand where did this value ($\frac{n!}{2^{n-1}}$) came from! could someone explain it please?


On the one hand, it seems like a preprint can discourage dishonest reviewers or editors (who get to see new work before anyone else) from running off with ideas since you have proof of originality with a preprint. On the other hand, a preprint puts the ideas out there to the world at large. What do you think is the safest approach, submitting to journals with or without a preprint?

First of all, this is about plagiarism in the sense of stealing ideas. Copy-and-paste plagiarism is included but not likely to happen in the cases relevant for this question.  Considering the publication of a paper prior to peer-reviewed publication on the ArXiv (or another preprint server), there are usually two main positions considering a possible theft of the idea (or somebody coming up with the same idea):   If somebody manages to publish your idea in a peer-reviewed journal before you do, you can prove that you came up with the idea first or at least independently if you have published your paper on the ArXiv. Therefore it is a good idea to publish papers on the ArXiv before they have been published in a peer-reviewed journal. If you publish your paper on ArXiv before it is published in a peer-reviewed journal, others may steal your work and publish it peer-reviewed before you do and thus take the scientific credit. It’s difficult to attack those people since the ArXiv is not peer-reviewed. Somebody could make a living of plagiarising ArXiv papers. Therefore it is a bad idea to publish papers on the ArXiv before they have been published in a peer-reviewed journal.   Are there any example cases (or even studies) supporting either of these statements? Such examples would include, but are not limited to:   Has a peer-reviewed journal ever withdrawn a paper because it plagiarised an ArXiv paper? Are there well-known cases of “unpunished” plagiarism of ArXiv papers?  Has anybody ever successfully resolved a priority dispute with a publication on ArXiv? Has anybody ever accused somebody of plagiarising an ArXiv article (with the fact that the plagiarised article was published on ArXiv affecting the outcome).   Note that it is really examples and not a theoretical analysis of the statements, I am looking for. (Neither of the two positions fully reflect my opinion and some of the soft premises¹ are debatable. However, debating about these viewpoints on a theoretical basis or attacking some of the premises is usually futile.)     ¹ e.g., that scientific credit is only decided by peer-reviewed publication


I want to know whether $0\rightarrow \mathbb{Z}_4\stackrel{f}\rightarrow \mathbb{Z}_8\oplus \mathbb{Z}_2\rightarrow \mathbb{Z}_4\rightarrow 0$ is exact wrt group homomorphism under addition.  Since $\mathbb{Z}_2^2\neq \mathbb{Z}_4$, so $$ f(1)=(x,1) $$  Since $\mathbb{Z}_4$ is cyclic of order $4$, so $$ 4x=0,\ kx\neq 0\ (1\leq k\leq 3)$$  Hence $x=2$ or $ 6$ so that $$ {\rm image}\ f = \{ (2,1),\ (4,0),\ (6,1),\ (0,0)\}$$ (That is, image of $f$ is unique)  Hence by direct computation, $$ (\mathbb{Z}_8\oplus \mathbb{Z}_2)/f(\mathbb{Z}_4) = ((1,1)) = \{ (0,0),\ (1,1),\ (2,0),\ (3,1) \} $$ Here element is a representative. That is $(1,1)$ is corresponded to $\{ (1,1),\ (3,0),\ (5,1),\ (7,0) \}$, whose order is $4$.  Hence it is exact. Here we have a question :  Question : To prove this, we must compute directly ? Does there exists more systematic way ? Thank you in anticipation.

I'm doing some exercises in :  Determine whether there is a short exact sequence $  0 \rightarrow \mathbb{Z}_4 \xrightarrow{f} \mathbb{Z}_8 \oplus \mathbb{Z}_2 \xrightarrow{g} \mathbb{Z}_4 \rightarrow 0$. More generally, which abelian groups $A$ fit into a short exact sequence $0 \rightarrow \mathbb{Z}_{p^m} \xrightarrow{f} A \xrightarrow{g} \mathbb{Z}_{p^n} \rightarrow 0 $ where $p$ prime. What about $0 \rightarrow \mathbb{Z} \xrightarrow{f} A \xrightarrow{g} \mathbb{Z}_n \rightarrow 0$.  Can you tell me if this is right:  In the first case, because $f$ injective, it has to map the generator, $1$, to an element of order $4$. There are $2$ essentially different elements of order $4$: $(2,1)$ and $(2,0)$. In both cases I get a contradiction if they are in $ker g$, so there cannot be such an exact sequence.  In the next case, $\mathbb{Z}_{p^m}$ is cyclic, let's say it's generated by $c$. Then $f(c)$ has order $p^m$. So $ker g$ has order $p^m$. Therefore $A$ has to have at least order $p^{n+m}$. Now I'm not sure how to proceed.  Can I deduce anything else about $A$?  Many thanks for your help!


In homotopy type theory, if the identity type A=B is non-empty, can we conclude that A and B are also non-empty? If not what constarints can be put on A and B in order that the above statement becomes true for them.

In homotopy type theory, if the identity type A=B is non-empty, can we conclude that A and B are also non-empty? If not what constarints can be put on the identity type or A and B in order that the above statement becomes true for them.  Update: As Andrej Bauer has mentioned in the answer below, a better variation of this question would be: if the identity type A=B is inhabited, can we conclude that A and B are also inhabited?  In other words, assume we know that A=B is inhabited. What constraint can be put on A=B in order that we can conclude A is inhabited? If there are such constraints then what will be the minimum constraint that is sufficient to draw the conclusion that A is inhabited? By constraint I mean things like A=B having at least two distinct elements or A=B being infinite and alike.


I have a large QGIS project organized with several groups in the QGIS layer panel. It happend to me a couple of times that, when the computer is operating with low resources (low free memory-high CPU usage), the exact control of the mouse is lost for some seconds and I by mistake dragged and dropped a layer into another group. Then to find where it went manually could take a long time.  Is there a way to look for layers by name in the Layers Panel?

I am trying to find the name of subgroups using pyqgis. I have been trying to use   I am however unable to traverse and get the names of the subgroup. I have tried the code on this article.      for child in root.children():   if isinstance(child, QgsLayerTreeGroup):     print "- group: " + child.name()     if child.name() == "test": #to check subgroups within test group         for child in root.children(): #which I think i am making a mistake here because the root is supposed to contain all nodes


c:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\SqlManagement folder is creating again and again in our Windows server 2008 R2. SqlManagement folder contains some files with SystemManagement.exe and SqlManagement.exe.  Looks like it is a virus. We have tried multiple antivirus but it is only able to delete the folder but It’s not detecting the program that’s re-creating. Malwarebytes antivirus is showing this virus as Trojan.BitCoinMiner Please guide me to remove this virus.

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


The basic rules state for opportunity attacks:     You can make an opportunity attack when a hostile creature that you can see moves out of your reach.   RAW seems to imply that by circling around the enemy before leaving his reach oppportunity attacks are completely prevented. That would mean that in most situations for medium sized enemies, characters could easily leave the reach of them without using the disengage action or provoking opportunity attacks - am I wrong?

"You can make an opportunity attack when a hostile creature that YOU CAN SEE moves out of your reach."   In 5E do you have to specify which way your character is facing at all times?  If an enemy who is behind him leaves melee range but his back is to him does that enemy provoke an opportunity attack?    Are enemies within five feet and 360 degrees of a character considered to be within reach?  For example... Kruska and Atone are attacking Dip.  Dip is facing or only attacking Kruska.    Then Atone moves out of Dip's reach (melee range 5 feet) to engage a silly looking wizard.    Does Atone's move provoke an opportunity attack from Dip even though he's not facing him?  Is he assumed to be able to see him?


I know there have been other questions asked that are similar, but I want to know about the specific case where a person has had a child or children, but all have passed on.  Is there an accepted word or term for a person in this situation?

Is there a word that describes a parent whose child has died?   Along the lines of "orphan", "widow", and "widower", is there a single word for a parent who has lost a child (of any age)?


I have a .batch file with switches and parameters how would i run that in a bash file?   Any help would be appreciated  @echo off title runserver "C:\Program Files\Java\jdk1.7.0_25\bin\java.exe" -Xmx815m -cp bin;lib/*; com.rs.Launcher true true false pause   How could u get a bash file to run the same way as the batch file?

I'm trying to take a .bat file and make it a .sh   This is the working .bat file   @echo off title runserver "C:\Program Files\Java\jdk1.7.0_25\bin\java.exe" -Xmx815m -cp bin;lib/*; com.rs.Launcher true true false pause   this is my .sh file so far:  #!/bin/sh java -Xmx815m -cp bin;lib/*; com.rs.Launcher true true false pause   Is this wrong? Am I far off? I don't really know what I'm doing when it comes to .sh files so any help will be appreciated! Thanks a lot!


If we change aperture..does it affect on lighting conditions? Or only shutter speed affects light..?

How does aperture affect my photographs?  Why should I care about the aperture with which a photo was taken?


When I try to query the command apt-get update, I get an error message: OK:1 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease OK:2 http://de.archive.ubuntu.com/ubuntu bionic InRelease                       OK:3 http://de.archive.ubuntu.com/ubuntu bionic-updates InRelease               OK:4 http://ppa.launchpad.net/seafile/seafile-client/ubuntu bionic InRelease    OK:5 http://de.archive.ubuntu.com/ubuntu bionic-backports InRelease             Ign:6 https://packages.sury.org/php bionic InRelease                            Fehl:7 https://packages.sury.org/php bionic Release                               404  Not Found [IP: 104.31.95.169 443] Holen:8 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB] Paketlisten werden gelesen... Fertig                  E: The archivbe "https://packages.sury.org/php bionic Release" does not have a release file. N: Updating from such a repository cannot be done in a secure way, so it is disabled by default. N: Weitere Details zur Erzeugung von Paketdepots sowie zu deren Benutzerkonfiguration finden Sie in der Handbuchseite apt-secure(8).

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


I have a dedicated server managed by WHM which has 100 websites. Bandwidth is 1 Gbps.  I found another company which offers better CPU and RAM and HDD same price but bandwidth is 0.5 Gbps.   I am not good at calculating bandwidth that needed. What should I do?

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


It seems like realpath() does not resolve symlink (not shortcut - *.lnk) in Windows. I found an open bug for python3 here:   Is there any workaround? I'm mostly interested in Python 2.

I'm trying to read the target file/directory of a shortcut (.lnk) file from Python. Is there a headache-free way to do it? The  is way over my head. I don't mind using Windows-only APIs.  My ultimate goal is to find the "(My) Videos" folder on Windows XP and Vista. On XP, by default, it's at %HOMEPATH%\My Documents\My Videos, and on Vista it's %HOMEPATH%\Videos. However, the user can relocate this folder. In the case, the %HOMEPATH%\Videos folder ceases to exists and is replaced by %HOMEPATH%\Videos.lnk which points to the new "My Videos" folder. And I want its absolute location.


I used Crouton to install Xubuntu 12.04.4 LTS with the XFCE environment on my HP Chromebook 11. I've gotten it all fully installed and everything; the only thing I'm doing now is the basic setup things, like adding codecs and other things like LibreOffice, VLC, Firefox, Ubuntu Software Center, etc. This information I got from 2 sources:      .   I'm currently on the same step at both URLs, which is #6 on Link 1 and #8 on Link 2.  Per the articles, which both said the same thing, I typed in   sudo apt-get install xubuntu-restricted-extras libavcodec-extra and it didn't do   anything. It just kept on saying the same thing:  Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libavcodec-extra   I've spend the last hour or so scouring the internet for a solution, for a hint even at what is going on. I don't want to do a clean reinstall, for two reasons: 1) it's takes  like 1.5h just to get the croot fully installed, and 2) everything but this out of what I've done so far (up to #6 at Link 1 & up to #8 at Link 2) works except the audio. I've already installed flash, so YouTube works fine. It's just I can't hear any audio.  Please help?  Thanks in advance. I appreciate all the great help I've been getting from AskUbuntu lately. You all are great.

I have tried several askubuntu threads but yet to no avail none have all met qualifications.   I installed allvideodownloader, and found a better version an earlier version; I downloaded from software-center, so there should not have been a related programs version problem and I got this error:  The following packages have unmet dependencies:  allvideodownloader : Depends: allvideodownloader-bin (= 2.6.0-0ubuntu1)  apache2.2-bin : Depends: libaprutil1-ldap but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.   I have tried the usual suspects, in synaptic, software-center and aptitude.   apt-get autoremove --purge allvideodownloader Package allvideodownloader is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded   apt-get remove --auto-remove allvideodownloader-bin Package allvideodownloader is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded   apt-get remove --auto-remove allvideodownloader-bin E Unable to locate package allvideoinstaller-bin   sudo apt-get install allvideoinstaller-bin E Unable to locate package allvideoinstaller-bin   This is what I believe to be so; allvideodownloader changed the versions on several packages at install and didn't change them back at uninstall. These packages are somehow not reverse compatible using usual means.  I am having a headache I am growing used to from staring at this problem and that wont help matters. I've tried manner of install , purge and repair of broken packages   Please advise me on a repair.  thx,  DL


On the , an edit was made to , which I can see on the hot questions list.     This edit was made by a Moderator (note the diamond) so it should be shown in my question, but when I go to the question itself, the edit is nowhere to be found.     Where is the expected edit to my question?  I don't think this is a problem with Programmers.se specifically, because this is the same question form that all SE sites use.

just showed up on 's front page like this:    ... which makes no sense, because the question hasn't been modified since May 25th, and the person who edited it wasn't CatLord anyway:    Turns out what actually happened was that CatLord cast a fifth reopen vote to reopen the question.    So that stamp in the questions list should probably say this instead:     reopened 4m ago CatLord 10.7k   Or just:     reopened 4m ago


I have a > symbol in my LateX file. Specifically, I have the sentence: Say I have n > 1 apples.  When compile my .tex document using pdflatex, I get a pdf with an upside-down question mark in place of the > symbol. I checked this math guide for TeX and saw no special markup for >.  What is going on?

When typing < or > in LaTeX and compiling with pdflatex, the less than and greater than symbols appear at upside down exclamation points. I'm not in math mode.


Let $f : M \mapsto N$ be a continuous function on $M$. Are the following definition of continuity and its negation both correct?   $\forall x_0 \in M, \forall \epsilon > 0, \exists \delta(x_0, \epsilon) > 0$ such that $\forall x \in M$ such that $d_M(x_0, x) < \delta(x_0, \epsilon)$, we have $d_N\left( f(x_0), f( x) \right) < \epsilon$  Negation: $\exists x_0 \in M$ and $\exists \epsilon > 0$, such that $\forall \delta > 0$, $\exists y \in M$, $y \neq x_0$ such that $d_M\left(x_0, y \right) < \delta$ but $d_N\left( f(x_0), f(y) \right) \geq \epsilon$.

This should be a very easy question but it might just be that I'm confusing myself. So we have the definition of a function $f$ on $S$ being continuous at $x_0$:     For any $\epsilon$>0, there exists $\delta>0$ such that: whenever $|x-x_0|<\delta$, we have $|f(x)-f(x_0)|<\epsilon$   And I assume the negation is     There exists $\epsilon$>0 such that for all $\delta>0$, $|x-x_0|<\delta$ yet $|f(x)-f(x_0)|\ge \epsilon$.   Now I want to show that the function $f(x)=\sin(\frac{1}{x})$ together with $f(0)=0$ cannot be made into a continuous function at $x=0$. So I need to show that there exists $\epsilon>0$ such that for all $\delta>0$, $|x|<\delta$ yet $|f(x)|\ge\epsilon$.  Let $\epsilon = \frac{1}{2}$. Then no matter what $\delta$ we choose, let $|x|<\frac{1}{2}$. It is certainly possible that $|f(x)|\ge \frac{1}{2}$, because, well, $\frac{1}{x}$ can really take on arbitrarily large value as $x$ is small.  Now, what confuses me is that, as $x$ gets small, $f(x)$ can certainly be greater than $\frac{1}{2}$ for infinitely many times, but it will be less than that infinitely many times, too. But I suppose it doesn't really matter. So I think there's something wrong with my negation but I couldn't figure out where.  Update: The correct version can be found . Watch for Lemma 4.6


how to make similar polar plot to  -just using tikzp. (no pgfplots, pstricks etc)- with negative axis value, there  all example just start with axis 0.   So basically I want plot data from csv file with negative value level just using the tikz package.  similar question is , with no package restriction   thanks.

I'm having some trouble with polar plots. I have to plot negative values, but without changing direction. I tried to set the ymin value to be negative, but it doesn't work.  \documentclass[10pt,border=10pt]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{polar}  \begin{document} \begin{tikzpicture} \begin{polaraxis}[    xticklabel=$\pgfmathprintnumber{\tick}^\circ$,    ymin=-10,    xtick={0,30,...,330}] \addplot table{    0  -1     30 -2    45 -3    60 -4    75 -5    }; \end{polaraxis} \end{tikzpicture} \end{document}   Any suggestion?  For clarity, this is what I expected.


I need to prove that $n^2 < 2^n$ for all natural numbers $n$ greater than $4$.  I understand that you start by proving the base case of $n = 5$ and then prove the inequality substituting the inductive hypothesis for $n + 1$, but I am unsure about how to do this.

I am trying to prove that $n^2 \leq 2^n$ for all natural $n$ with $n \ne 3$. My steps are:    induction base case: $n=0:$ $0² \leq 2⁰$ which is okay.    inductive step: $n \rightarrow n+1:$ $(n+1)²\leq2^{n+1}$ $$(n+1)^2 = n^2 + 2n + 1 = ...help...\leq 2^{n+1}$$   I know the bernoulli inequality but don't know where to use it, if I even need to. I have problems when it comes to proving things which are based on orders..


I'm not really asking for a chunk of code to do this, but more of an algorithm I can work with myself.    For example, this is the state of Maine, obviously, and I have the points of each county stored as an individual polygon. I am looking to process all of those points in whatever way possible to end up with only the outer outline. Does having islands outside of the outline complicate things? Note: I know this is easy in QGIS but I need to be able to do it on the fly with a PHP script. Note2: Maine is just an example, I know state outlines are available elsewhere...I could have any number of counties from potentially more than one state. Any help is greatly appreciated! - Brandon  EDIT: This question differs from others in that it is absolutely necessary for it to be done in PHP code, and not in GIS editing programs. In addition, this problem is more complicated than simply generating a convex hull as concave contours are a definite possibility. I honestly have no idea where to even begin and am looking for someone with a little more experience with problems like this than I have.

I have several polygon objects and I need to "merge (or combine or dissolve)" them toghether into one polygon object. With a GIS tool like QGIS, I do this with processing option "Combine selected spatial objects" and the result is what I expect but doing programmatically with Java and GeoTools library, I'm not able to get this behaviour.   To give you an idea, I have two polygons in one layer like this:    Each square is an independent polygon in my shapefile (an independent object with its attributes).  Now I want to transform them into one object. I tried with "union" method of Geometry class in this way:      //polygon1 and polygon2 are Polygon objects (the squares in the above image)     Geometry combine = polygon1.union(polygon2);   And this is the result when I visualize the union in the GIS:    As you can see, a line is added between the two figures (although the union is made succesfully and I have only one entity as I wish) but I want this without the line connecting them.  The polygons are well formed because by doing with QGIS the operation is made right.   Anyone know if is it possible?   I'm looking for some time and I'm concluding that maybe my approach to achieve this is bad.


It can be so easy. But I can not it.  I run a http server on my EC2 server. And I can access it through localhost.    My Inbound rules:    And my http request with Public DNS (IPv4):    What is the missing?

This is a  about Connection Refused    We see a lot of questions to the effect      When I try to connect to a system I get a message      Connection refused      Why is this ?


Often I have questions about R - a statistical programming language or a statistic software. Where can I ask questions about the software or how to solve statistical problems especially with that software (e.g. "Which command do I need for histograms?")?

I've been using SO for a little over a year now, and recently I've noticed a shift of users between SO and stats.stackexchange.com.   I'm wondering if there has been any discussion on where questions about R, a statistical environment, best fits. Would you say it's better to ask R questions on SO or would it be better to ask over at stats.stackexchange.com? What, if any, determinants would you use to decide to post between the two? What about cross posting?


Sorry if this has been asked before, I can't seem to find the answer anywhere.  So I have a user input for a DNA sequence analysis program, I want to check if the input is in fact a sequence i.e. that it contains A, C, T, G or a, c, t, g.  I have thought of implementing a regular expression where the re.search would return True if the correct format was found. Then if false I can ask for the input again etc. Like so:  input = "ATGGCAAT" >>True  input = "atg" >>True  input = "AATG!4" >>False  input = "this input contains all the char but is in the wrong format" >>False   I have also considered using a negative look ahead that would match with anything other than the correct format.  But I can't seem to get it right. Any help would be so appreciated! Feel like I'm going around in circles!

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I want to print a string only if it equals to a particular string e.g. "Hello", but when I run the program in a new thread, although it exe cutes the whole code, it does not print the string "Hello" even when the condition is true. I am attaching the code below :  new Thread(new Runnable() {                 @Override                 public void run() {                     doGetRequest();                 }             }).start();     private void doGetRequest() {         OkHttpClient client = new OkHttpClient();          OkHttpClient.Builder builder = new OkHttpClient.Builder();         builder.connectTimeout(10,TimeUnit.MINUTES)                 .writeTimeout(10, TimeUnit.MINUTES)                 .readTimeout(10,TimeUnit.MINUTES);          String url = "my_url";          client = builder.build();          Request request = new Request.Builder().url(url).build();           try {             Response response = client.newCall(request).execute();             String jsonData = response.body().string();             JSONObject Jobject = new JSONObject(jsonData);             JSONArray jarray = Jobject.getJSONArray("Flights");              for(int i = 0; i<jarray.length();i++){                  JSONObject object = jarray.getJSONObject(i);                  Log.v("objectttt", String.valueOf(object));                  String adft= object.getString("Adft");                  if(adft=="Hello") {                        Log.v("hereee", adft);                  } else {                      Log.v("hereee", adft);                       //it prints Hello here                  }              }         } catch (IOException | JSONException e) {                          e.printStackTrace();         }     }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I noticed a small white rectangle over the title of the hot question displayed in the feed:        Can this please be fixed?

SE Android App Version: 1.0.84  There is a display issue in the Feed section. The Earlier today, the below sections and the post title are not visible.  There is no exact steps to reproduce. It doesn't happen when the app is initializing. But if you open the Stack Exchange app, navigate to some other apps, then come back after few minutes, I can see this issue (but not all the time).  When the issue is there, if I manually click the Feed option in the navigation sidebar, the display issue is fixed.  I have recorded the issue:


I'm hoping there is a built in .NET method to do this, but I'm not finding it.  I have two paths that I know to be on the same root drive, I want to be able to get a relative path from one to the other.  string path1 = @"c:\dir1\dir2\"; string path2 = @"c:\dir1\dir3\file1.txt"; string relPath = MysteryFunctionThatShouldExist(path1, path2);  // relPath == "..\dir3\file1.txt"   Does this function exist?  If not what would be the best way to implement it?

There's a part in my apps that displays the file path loaded by the user through OpenFileDialog. It's taking up too much space to display the whole path, but I don't want to display only the filename as it might be ambiguous. So I would prefer to show the file path relative to the assembly/exe directory.  For example, the assembly resides at C:\Program Files\Dummy Folder\MyProgram and the file at C:\Program Files\Dummy Folder\MyProgram\Data\datafile1.dat then I would like it to show .\Data\datafile1.dat. If the file is in C:\Program Files\Dummy Folder\datafile1.dat, then I would want ..\datafile1.dat. But if the file is at the root directory or 1 directory below root, then display the full path.   What solution would you recommend? Regex?  Basically I want to display useful file path info without taking too much screen space.  EDIT: Just to clarify a little bit more. The purpose of this solution is to help user or myself knowing which file did I loaded last and roughly from which directory was it from. I'm using a readonly textbox to display the path. Most of the time, the file path is much longer than the display space of the textbox. The path is supposed to be informative but not important enough as to take up more screen space.  Alex Brault comment was good, so is Jonathan Leffler. The Win32 function provided by DavidK only help with part of the problem, not the whole of it, but thanks anyway. As for James Newton-King solution, I'll give it a try later when I'm free.


i have a variable to precise the length of the tuple for expl lgt=3 i want to convert this list:  list=['Tout', 'le', 'monde', 'aime', 'le', 'chocolat', 'Le', 'est', 'une', 'source', 'agent', 'securité', 'chocolat', 'magnesium']   to :  ('Tout', 'le', 'monde') ('le', 'monde', 'aime') ('monde', 'aime', 'le') ('aime', 'le', 'chocolat') ('le', 'chocolat', 'Le') ('chocolat', 'Le', 'est') ('Le', 'est', 'une') ('est', 'une', 'source') ('une', 'source', 'agent') ('source', 'agent', 'securité') ('agent', 'securité', 'chocolat') ('securité', 'chocolat', 'magnesium') ('chocolat', 'magnesium', '')

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


Im looking for a detailed proof for $\kappa \cdot \kappa = \kappa $ with $\kappa $ beeing a infinite cardinal number. The problem is described in a book (Frank R. Drake, Set Theory: An Introduction to Large Cardinals) as a exercise but without any solution.  As far as i know i can proof that $\kappa \cdot \kappa = \kappa $ holds for the cardinal $\aleph_0$($\mathbb{N}$) wich can be proven with "Cantor's Diagonal Proof". But i need it for any infinite cardinal so it should also be valid for $\aleph_1,\aleph_2,...$  So im missing the induction part.  I know that it should be possible cause very roughly explained to show something like $| \mathbb{N} \cdot \mathbb{R}| = |\mathbb{R}|$. We can make a bijection if we put all the $\mathbb{N}$ numbers in between 0,1 of the $\mathbb{R}$ and still have enough space to adress all $\mathbb{R}$.  TL;DR im looking for the proof of $\kappa \cdot \kappa = \kappa $ and $\kappa \cdot \lambda = max(\kappa, \lambda) $

So, as the title says I'd like to give a proof of the fact that if $C$ is an infinite set then it is equipotent or equivalent to its cartesian product $C\times C$ using Zorn's Lemma (and of course some of its implications like the fact that $C$ has an infinite countable subset which I think might be very useful).   The main problem that I have is that I'm not supposed to use any theorem or result involving cardinal numbers since I'm still taking an elementary set theory course which hasn't covered that topic yet and all the proofs that I've read so far use cardinals arithmetic at some point.   Another thing that I think might be useful is a lemma which was proved via Zorn's Lemma in an answer to the question   which states that given the infinite set $C$ there exists a non-empty set $B$ such that $B\times \mathbb{N}$ is equipotent to $C$. Then it suffices to give a bijection from $(B\times \mathbb{N})$ $\times$ $(B\times \mathbb{N})$ to $B\times \mathbb{N}$  So, any suggestion on the direct proof (without cardinals, unfortuntely) via Zorn's Lemma or an actual bijection from $(B\times \mathbb{N})$ $\times$ $(B\times \mathbb{N})$ to $B\times \mathbb{N}$ would be highly appreciated. Thanks in advance.


I have a polyline feature class and a polygon feature class. I would like to clip the extent of the polyline which are NOT overlaid on the polygon.   How can I do that?  I should be looking for similar tool as intersect, but intersect clips the polyline that overlaid on the polygon. I want an opposite of that.

Is there a way to perform a 'reverse' of the clip function in ArcMap?  I am not exactly sure how to explain this so here is a diagram:


public class ReservationSystem {     static Service p;    public static void main(String[] args) {         String filename = null;    if(args.length == 0)    {       System.out.println("Improper format: filename needed");       System.exit(0);    }    filename = args[0];    File a = new File(filename);    try     {      if (a.exists())      {        System.out.println("File already exist, will proceed to Menu");        p.readfile(filename);        menu();      }      else       {        a.createNewFile();        System.out.println("New file created, will proceed to Menu");        menu();      }    }   I'm having null pointer exception when trying to pass filename into method of another class. the error is on this line p.readfile(filename);. Can someone suggest a way to fix this.I'm trying to debug this, but I don't understand why the system gave that error when I'm only trying to pass in a string, by the way, the file exist and I was able to trace it until the line of error.

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


So suppose I have the following Quantum Circuit:  A ---- |Control| -----|Hadamard|----  B ---- |xxxxxxx|------------------------  Which is a 2 input Controlled Gate (applying some gate of two choices to Qubit B, depending on the value of Qubit A) followed by a single Hadamard Gate acting on Qubit A.  Initially the Qubits are in states  $$a_0\left| 0 \right> + a_1\left| 1 \right> $$ $$b_0\left| 0 \right> + b_1\left| 1 \right> $$ Respectively. So the combined system is in state  $$ a_0 b_0 \left| 00 \right> +a_0 b_1 \left| 01 \right>  + a_1 b_0 \left| 10 \right> + a_1 b_1 \left| 11 \right>$$  At the beginning.  After the application of the controlled Gate, the combined superposition can easily be in a state that CANNOT be factored into a tensor product of two states. Any superposition of the form  $$ q_0 \left| 00 \right> +q_1 \left| 01 \right>  + q_2 \left| 10 \right> + q_3 \left| 11 \right>$$  Where $q_0/q_1 \ne q_2/q_3$ for example couldn't be factored into a tensor product.  But now when we apply that Hadamard gate, it is applied onto a single Qubit. What is it doing then? Given that the "state" of a single qubit cannot be independently factored and considered, how does the hadamard gate now affect the state of system?  How this is different than:    In the linked question, we are dealing with a factorable state, that then is given a CNOT transform. That computation is obvious since the factorable state (post Hadamard) can be expressed as:  $$a_0\left| 0 \right> + a_1\left| 1 \right> $$ $$b_0\left| 0 \right> + b_1\left| 1 \right> $$  yielding superposition state:  $$ a_0 b_0 \left| 00 \right> +a_0 b_1 \left| 01 \right>  + a_1 b_0 \left| 10 \right> + a_1 b_1 \left| 11 \right>$$  Which can now be easily computed with the $4 \times 4$ CNOT operator.  In our question we go the other way. WE start off with teh application of a $4 \times 4$ controlled operator to generate an entangled superposition  $$ q_0 \left| 00 \right> +q_1 \left| 01 \right>  + q_2 \left| 10 \right> + q_3 \left| 11 \right>$$  And now am attempting to determine how the behavior of a gate acting on a SINGLE Qubit affects the whole superposition.   The link is irrelelvant here since our system is no longer factorable as a tensor product of independent superpositions.  What I'm asking can be summarized succinctly as: How can I write a single Qubit operator $O$ (given as a $2 \times 2$ matrix) as a multiQubit operator $O'$ (given as a $2^k \times 2^k$ matrix) that acts as the identity on all inputs except the first where it acts as $O$ traditionally would.   To that end, the question offers no hint of how to go about it.  Work so far  My intuition suggests given the system:  $$ q_0 \left| 00 \right> +q_1 \left| 01 \right>  + q_2 \left| 10 \right> + q_3 \left| 11 \right>$$  We can artificially believe that the first qubit is in the state  $$ (q_0 + q_1) \left| 0 \right> + (q_2 + q_3) \left| 1 \right> $$  And that the entire superposition is in:  $$ (q_0 + q_1) \frac{q_0}{q_0 + q_1}\left| 00 \right> +(q_0 + q_1) \frac{q_1}{q_0 + q_1} \left| 01 \right>  + (q_2 + q_3) \frac{q_2}{q_2 + q_3} \left| 10 \right> + (q_2 + q_3) \frac{q_3}{q_2 + q_3} \left| 11 \right>$$  So when we apply the Hadamard to the Qubit we send:  $$ (q_0 + q_1) \left| 0 \right> + (q_2 + q_3) \left| 1 \right> $$  To  $$ \frac{q_0 + q_1+q_2 + q_3}{\sqrt{2}} \left| 0 \right> + \frac{q_0 + q_1-q_2 - q_3}{\sqrt{2}} \left| 1 \right> $$  And thus the entire system now is in:   $$ \frac{q_0 + q_1+q_2 + q_3}{\sqrt{2}} \frac{q_0}{q_0 + q_1}\left| 00 \right> +\frac{q_0 + q_1+q_2 + q_3}{\sqrt{2}} \frac{q_1}{q_0 + q_1} \left| 01 \right>  +  \frac{q_0 + q_1-q_2 - q_3}{\sqrt{2}} \frac{q_2}{q_2 + q_3} \left| 10 \right> +  \frac{q_0 + q_1-q_2 - q_3}{\sqrt{2}} \frac{q_3}{q_2 + q_3} \left| 11 \right>$$  But I'm not sure why I would rigorously believe this.  (Renormalize where necessary)

I am stuck on a few issues in . (Note: It is at the frame concerning this question.)  In it, from what I understand (which could be wrong) we first apply the Hadamard gate to a qbit in the $\lvert 0 \rangle$ state. Then on that we use a controlled not on the output value, together with another input from another qbit set at $\lvert 0 \rangle$. I don't understand how to work this out and how the $\lvert 00 \rangle + \lvert 10 \rangle$ is derived for the output of combination of the two gates.  Here is what I am thinking (neglecting the $1/\sqrt{2}$ multiplier):  $$ \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 1 \\ 1 \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \end{pmatrix} + \begin{pmatrix} 0 \\ 1 \end{pmatrix} = \lvert 0 \rangle + \lvert 1 \rangle. $$  There however is another $\lvert 0 \rangle$ coming in from the second (bottom) wire and it interacts with the output from the Hadamard gate. I don't understand how to manipulate the values - have no idea if I can do something such as the following by distribution: $$ (\lvert 0 \rangle + \lvert 1 \rangle) \lvert 0 \rangle = \lvert 0 \rangle \lvert 0 \rangle + \lvert 1 \rangle \lvert 0\rangle. $$  I have no idea why we can do this (if we can even do so), but this is the only way I can see that we could get $\lvert 0 \rangle \lvert 0 \rangle + \lvert 1\rangle \lvert 0 \rangle = \lvert 00 \rangle + \lvert 10 \rangle$, as the author of the video has on the particular time in the video.  Any clarification would be extremely appreciated.


Being a high school student, It's obvious to me that there are both an infinite number of rational and irrational numbers. However I don't really see if there is more rational than irrational, irrational than rational, or if they are of the same percentage of the reals. All I know is between two rationals there is a irrational, and between two irrational a there is a rational, along with my experience that I usually work more with rationals. How would we calculate the percentage of irrationals and the percentage of rationals to the reals. And how could some infinities be larger than others, doesn't seem to make sense to me.

Can someone point me to a proof that the set of irrational numbers is uncountable? I know how to show that the set $\mathbb{Q}$ of rational numbers is countable, but how would you show that the irrationals are uncountable?


Let $p$ be a prime number such that $p \equiv 3 \pmod 4$. Show that $x^2 \equiv -1 \pmod p$ has no solutions.   I noticed that this is equivalent to proving $x^2\equiv 2(2k+1) \pmod p$.  I also know that $x^2 \neq 2(2k+1)$. But I still can't prove it.  Any help would be greatly appreciated.

Assume: $p$ is a prime that satisfies $p \equiv 3 \pmod 4$  Show: $x^{2} \equiv -1 \pmod p$ has no solutions $\forall x \in \mathbb{Z}$.  I know this problem has something to do with Fermat's Little Theorem, that $a^{p-1} \equiv 1\pmod p$. I tried to do a proof by contradiction, assuming the conclusion and showing some contradiction but just ran into a wall. Any help would be greatly appreciated.


Im using an HP 15-D017cl notebook pc and after installing ubuntu 14.04 LTS, my touchpad stopped working. it works in windows 8.1, but in ubuntu, it has never worked since the start. after going through terminal and using the sudo apt-get command for the xorg synaptics driver, it still didnt work. when i go to terminal and use the synclient command, it reports back that the synaptics driver is not loaded. please help, i dont want to keep having to use a usb mouse.

I'm using a laptop with built-in touch-pad that works in Windows 7. But after I switched to Ubuntu 12.04 LTS, it's not working now.


How can you filter out something from a Java ArrayList like if you have:   How are you How you doing Joe Mike   And the filter is "How" it will remove Joe and Mike.

I want to filter a java.util.Collection based on a predicate.