Reference to a Variable in List
Is Java "pass-by-reference" or "pass-by-value"?
One of my coworkers has provided me with a Bash syntax that I am unfamiliar with.  My Google foo has failed me on figuring out what it does and why/when I should use it.    The command that he sent me was of this form:  someVariable=something command   Initially, I thought that this was equivalent to the following:   someVariable=something ; command   Or  someVariable=something  command   But this doesn't appear to the be case.  Examples:   [Jan-03 11:26][~]$ # Look at the environment variable BAZ. It is currently empty [Jan-03 11:26][~]$ echo $BAZ  [Jan-03 11:27][~]$ # Try running a command of the same format     [Jan-03 11:27][~]$ BAZ=jake echo $BAZ  [Jan-03 11:27][~]$     [Jan-03 11:27][~]$ # Now, echo BAZ again. It is still empty:     [Jan-03 11:27][~]$ echo $BAZ  [Jan-03 11:27][~]$     [Jan-03 11:28][~]$     [Jan-03 11:28][~]$ # If we add a semi-colon to the command, we get dramatically different results: [Jan-03 11:28][~]$ BAZ=jake ; echo $BAZ jake [Jan-03 11:28][~]$ [Jan-03 11:28][~]$ # And we can see that the variable is actually set: [Jan-03 11:29][~]$ echo $BAZ jake [Jan-03 11:29][~]$   What does this syntax do?  What happens to the variable that has been set?  Why does this work? Simple question about the definition of Brownian motion I have a question concerning the definiton of Brownian motion. Usually (e.g. on Wikipdia) one demands a brownian motion $\lbrace B_t\rbrace_{t\in[0,\infty)}$ to satisfy the following condition:  $\forall 0\leq t_0&lt;t_1&lt;...&lt;t_m: B_{t_1}-B_{t_0},...,B_{t_m}-B_{t_{m-1}}$ are independent random variables.   But today I come across with formally another definition of Brownian motion! Instead of the above condition the book demands the following property:  $\forall t,h\geq 0$, $B_{t+h}-B_t$ is independent of $\lbrace B_u : 0\leq u\leq t \rbrace$.  Now I'm wondering whether both properties are indeed equivalent or not?! Hopefully someone can help me. How do I root my Android device? This is a common question asked by those who want to root their phones. How exactly do I root my Android device? Are there risks involved? How can I install the most used plugins like flash player and mp3 in Ubuntu? How can I use a variable in the replacement side of the Perl substitution operator? Let $(a_k)$ be a sequence of real numbers and let $b_k=\frac{a_1+a_2+\dots a_k}{k}$ for each $k\in \mathbb{N}$.  Prove that if $(a_k)$ converges to $\alpha\in \mathbb{R}$, then the sequence $(b_k)$ also converges to $\alpha$.  My answer: Let $\epsilon &gt; 0$. Since ($a_k$) converges to $\alpha$, then there exists a $N_{\epsilon1}\in\mathbb{N}$ such that $|a_k - \alpha | &lt; \frac{\epsilon}{2}$ for all $k \geq N_{\epsilon1}$. Notice that $\frac{a_1+...+a_n - n\alpha}{k}$ converges to $0$ as $k$ approaches infinity. Thus, there exists $N_{\epsilon2}\in\mathbb{N}$ such that $|\frac{a_1+...+a_n - n\alpha}{k}|&lt;\frac{\epsilon}{2}$ for all $k&gt;N_{\epsilon2}$. Now, let $N= $max$ (N_{\epsilon1},N_{\epsilon2})$. Then for any $k&gt;N$ we get,  $$\begin{array}{rcll} |b_k-\alpha| &amp;=&amp; |b_k - \alpha*1|&amp;\\ &amp;=&amp; |\frac{a_1+...+a_k}{k} - \frac{k\alpha}{k}|&amp;\\ &amp;=&amp; |\frac{a_1+...+a_n}{k} + \frac{[a(n+1)+...+a_k]}{k} - \frac{(k-n)\alpha}{k} - \frac{n\alpha}{k}|&amp; \text{(notice that $N_{\epsilon1}\leq N&lt;k$)}\\ &amp;=&amp; |\frac{a_1+...+a_n - n\alpha}{k} + \frac{[a(n+1)+...+a_k - (k-n)\alpha]}{k}|&amp;\\ &amp;=&amp; |\frac{a_1+...+a_n - n\alpha}{k} + \frac{[(a(n+1) -\alpha) + ... + (a_k - \alpha)]}{k}|&amp;\\ &amp;=&amp; |\frac{a_1+...+a_n - n\alpha}{k} + \frac{(a(n+1) -\alpha)}{k} + ... + \frac{(a_k - \alpha)}{k}|&amp;\\ &amp;\leq&amp; |\frac{a_1+...+a_n - n\alpha}{k}| + |\frac{(a(n+1) - \alpha)}{k}| + ... + |\frac{(a_k - \alpha)}{k}|&amp; \text{(by the triangle inequality)}\\ &amp;=&amp;|\frac{a_1+...+a_n - n\alpha}{k}| + \frac{|(n+1) - \alpha|}{k} + ... + \frac{|a_k - \alpha|}{k}&amp;\\ &amp;&lt;&amp; \frac{\epsilon}{2} + [\frac{\epsilon}{2}/k + ... + \frac{\epsilon}{2}/k]&amp; \\ &amp;=&amp; \frac{\epsilon}{2} + \frac{\epsilon}{2}*\frac{(k-n)}{k}&amp;\\ &amp;&lt;&amp; \frac{\epsilon}{2} + \frac{\epsilon}{2}&amp; \text{(since $k-n&lt;k$)}\\ &amp;=&amp; \epsilon&amp; \end{array}$$ And since we found such an $N$ for arbitrary $\alpha$, then $(b_k)$ converges to $\alpha$ by definition.  I'm not sure i kept all my variables straightened out. How does this look and if you have a better idea let me know! Thomson et al. provide a proof that $\lim_{n\rightarrow \infty} \sqrt[n]{n}=1$ in . It has to do with using an inequality that relies on the binomial theorem:  I have an alternative proof that I know (from elsewhere) as follows.  Proof. \begin{align} \lim_{n\rightarrow \infty} \frac{ \log n}{n} = 0 \end{align} Then using this, I can instead prove: \begin{align} \lim_{n\rightarrow \infty} \sqrt[n]{n} &amp;= \lim_{n\rightarrow \infty} \exp{\frac{ \log n}{n}} \newline &amp; = \exp{0} \newline &amp; = 1 \end{align}  On the one hand, it seems like a valid proof to me. On the other hand, I know I should be careful with infinite sequences. The step I'm most unsure of is: \begin{align} \lim_{n\rightarrow \infty} \sqrt[n]{n} = \lim_{n\rightarrow \infty} \exp{\frac{ \log n}{n}} \end{align} I know such an identity would hold for bounded $n$ but I'm not sure I can use this identity when $n\rightarrow \infty$. Question: If I am correct, then would there be any cases where I would be wrong? Specifically, given any sequence $x_n$, can I always assume: \begin{align} \lim_{n\rightarrow \infty} x_n = \lim_{n\rightarrow \infty} \exp(\log x_n) \end{align} Or are there sequences that invalidate that identity?  (Edited to expand the last question) given any sequence $x_n$, can I always assume: \begin{align} \lim_{n\rightarrow \infty} x_n &amp;=  \exp(\log \lim_{n\rightarrow \infty} x_n) \newline &amp;=  \exp(\lim_{n\rightarrow \infty} \log x_n) \newline &amp;=  \lim_{n\rightarrow \infty} \exp( \log x_n) \end{align} Or are there sequences that invalidate any of the above identities? (Edited to repurpose this question). Please also feel free to add different proofs of $\lim_{n\rightarrow \infty} \sqrt[n]{n}=1$. Removing Ubuntu from UEFI Bios Menu Another Question in Hatcher I accidentally changed /var owner/group to my username and then changed it back to root, but not all the /var folders' owners are root, so is there anyway to change back owner/group of files/folders to default state?  Or at least those files/folders that are created by packages? A question of Euclidean domain I have cobbled together a command to return the process ID of a running daemon:  ps aux | grep daemon_name | awk "{ print \$2 }"   It works perfectly and returns the PID, but it also returns a second PID which is presumably the process I'm running now. Is there a way I can exclude my command from the list of returned PIDs?  I've tested it a few times and it appears my command is always the second PID in the list, but I don't want to grab just the first PID in case it's inaccurate. I'm tutoring high school students. I've always taught them that:     A charged particle moving without acceleration produces an electric as well as a magnetic field.   It produces an electric field because it's a charge particle. But when it is at rest, it doesn't produce a magnetic field. All of a sudden when it starts moving, it starts producing a magnetic field. Why? What happens to it when it starts moving? What makes it produce a magnetic field when it starts moving? I'm studying measure theory and two question came to my mind:        If $f:\mathbb{R}\to\mathbb{R}$ is monotone and $B\subseteq\mathbb{R}$ is borel, is the image $f(B)$ borel?   If $f:\mathbb{R}\to\mathbb{R}$ is a monotone function (say, non-decreasing), does there exist a sequence of continuous functions $f_n:\mathbb{R}\to\mathbb{R}$ converging pointwise to $f$?      Here's the motivation for those questions: Let $(X,M)$ and $(Y,N)$ be measure spaces.   It's known that if $\mu$ is a measure on $(X,M)$ and $f:X\to Y$ is measure, then we have the pushforward measure $f_*\mu(A)=\mu(f^{-1}(A))$ on $(Y,N)$. What if we were to define a "pullback measure"? Given a function $f:X\to Y$ such that $f(M)\subseteq N$ (i.e. $f$ maps measurable sets to measurable sets) and a measure $\nu$ on $N$, the natural formula would be $f^*\nu(A)=\nu(f(A))$. So we ask if is there a good amount of functions which map measurable sets to measurable sets in $\mathbb{R}$, and monotone functions seem like good candidates (for strictly monotone, continuous functions, the result is valid and there are several answers on the web). If this were true, maybe we could use some convergence argument to solve the problem above. How do I merge two dictionaries in a single expression (taking union of dictionaries)? I have two Python dictionaries, and I want to write a single expression that returns these two dictionaries, merged (i.e. taking the union).  The update() method would be what I need, if it returned its result instead of modifying a dictionary in-place. &gt;&gt;&gt; x = {'a': 1, 'b': 2} &gt;&gt;&gt; y = {'b': 10, 'c': 11} &gt;&gt;&gt; z = x.update(y) &gt;&gt;&gt; print(z) None &gt;&gt;&gt; x {'a': 1, 'b': 10, 'c': 11}  How can I get that final merged dictionary in z, not x? (To be extra-clear, the last-one-wins conflict-handling of dict.update() is what I'm looking for as well.) Error-Handling in Swift-Language Is "do something by date X" inclusive? How do you subtract Dates in Java? Is it possible to experimentally show that observable universe is much larger than ~93B ly? How do I read from /proc/$pid/mem under Linux? The  tells me that /proc/$pid/mem “can be used to access the pages of a process's memory”. But a straightforward attempt to use it only gives me  $ cat /proc/$$/mem /proc/self/mem cat: /proc/3065/mem: No such process cat: /proc/self/mem: Input/output error   Why isn't cat able to print its own memory (/proc/self/mem)? And what is this strange “no such process” error when I try to print the shell's memory (/proc/$$/mem, obviously the process exists)? How can I read from /proc/$pid/mem, then?