I was trying to load pages changing the last value of the url. It seems to work only with the last number (j=19). I don't undestand why it seems to skip the other pages.  &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script&gt; function newIP(n) {     window.location.replace("@@@@@:"+n)  } &lt;/script&gt; &lt;/head&gt; &lt;body&gt;  &lt;script&gt; var j; for (j=0; j&lt;20; j++) {     window.setInterval(newIP(j), 1000); } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt;
How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.
Problem with TP-Link TL-WN823N Recently I installed Ubuntu 16.04 but cant get the usb wifi adapter to work properly , can anyone help me?  When wifi adpater is plugged , the lsusb output:  Bus 001 Device 003: ID 2357:0109 Bus 001 Device 002: ID 0e0f:000b VMware, Inc.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  Bus 002 Device 004: ID 0e0f:0008 VMware, Inc.  Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub   When wifi adapter is unplugged , the lsusb output:  Bus 001 Device 002: ID 0e0f:000b VMware, Inc.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 004: ID 0e0f:0008 VMware, Inc.  Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Should reputation from SO carry over to Meta? How to customize the Ubuntu Live CD? Prove that $\gcd(a^n - 1, a^m - 1) = a^{\gcd(n, m)} - 1$ Is there a way to calculate the improper integral $\int_0^\infty \big(\frac{\ln x}{x - 1}\big)^2 dx$? Is there a way to calculate the improper integral $\int_0^\infty \big(\frac{\ln x}{x - 1}\big)^2 dx$?  What have I tried:  $$\int_0^\infty \Big(\frac{\ln x}{x - 1}\Big)^2 dx = \int_0^1 \Big(\frac{\ln x}{x - 1}\Big)^2 dx + \int_1^\infty \Big(\frac{\ln x}{x - 1}\Big)^2 dx = \int_1^\infty \Big(\frac{\ln x}{x - 1}\Big)^2dx + \int_1^\infty\Big(\frac{\ln t}{\big(\frac{1}{t} - 1\big)t}\Big)^2dt = 2\int_1^\infty \Big(\frac{\ln x}{x - 1}\Big)^2dx$$  From the above statement we can conclude, that the integral does indeed converge, as $0 \leq (\frac{\ln x}{x - 1})^2 \leq \frac{C}{(x - 1)^{\frac{3}{2}}}$, for some constant $C$. However, this new form of the integral is not much helpful in finding its exact value.  I also tried substituting $z = \ln x$ , then $dz = \frac{dx}{x}$. Then the integral becomes reduced to $2\int_{0}^{\infty} \frac{z^2}{e^z(e^z - 1)^2}dz$, which, unfortunately, also does not seem to be any easier. Trying to install ubuntu on a laptop. The "bios/uefi" has no uefi boot options &amp; the windows boot manager just kicks in. The only "option" is "boot from hard disk". So we tried to use efibootmgr to put grub to boot first.  When we run an efibootmgr -o xxxx,xxxx,xxxx command it seems like the order gets fixed but on reboot the windows boot manager still has control, then when we re-opened the live usb &amp; checked the boot order it remains unaffected.  What are other ways to change the efi boot order? Maybe by mounting the efi partition (in mnt) and doing what? Finding the asymptotic of an integral I came across the following exercise on asymptotic behavior of integrals: $$I(a) = \int_0^\infty\frac{\cos x}{x^a} \, dx, \text{ where } a\to0^+.$$ I have tried integrating by parts or replacing $\cos x$ with the first summands of its Taylor series, but I end up with something equal to infinity (independent of $a$ and that is not what we want).  I just thought about the substitution $x \leftrightarrow\frac{1}{1+x^2}$ and I get the  following result:  $$I(a) = \frac{\cos(1/2)}{2^{2-a}} + \int_0^1\frac{2x^3 \cos\left(\frac{1}{1+x^2}\right)}{(1+x^2)^{3-a}} \, dx - \int_0^1 \frac{2x^3\sin\left(\frac{1}{1+x^2}\right)}{(1+x^2)^{2-2a}}\,dx$$ If I could prove that the last summands are $o(I(a))$ then it would be OK, but I think, in general my strategy won't work. Apparently this is supposed to be an easy exercise, but I can't come up with anything right now. Doubling the tails in two-sample permutation test Suppose we have two samples and we wish to determine if they are drawn from the same distribution, the samples A,B being composed of some integers say.  If we test this using a two-sample permutation test, specifically by looking at permutations where the differences in the means of the samples are as extreme as the difference observed: is there any reason to think that we can calculate the two-tailed p-value by looking at one tail and doubling the probability?  This is what it appears to say in my lecture notes, but I don't understand why we could assume that the tails are symmetrical (or why it doesn't entail that assumption). Explanations were not forthcoming. Reactjs convert html string to jsx I thought of this a while ago, but can't make up a proof or a counterexample. Does anyone know more about this?  $$\sqrt{a+b}  \le \sqrt a + \sqrt b , \forall a,b \in \mathbb R_+$$  Moreover, what happens with more variables? Say:  $$\sqrt{x_1+x_2+...+x_n} \le \sqrt x_1 +\sqrt x_2 + ... + \sqrt x_n $$  with $ x_i \in\mathbb R_+ \forall i \in \{1,2,...,n\} $  Or when $i = \mathbb N$  PS: I tried looking on the internet for this but I don't know how I would call this. I'm trying to show that a finite sum of eigenspaces (with distinct eigenvalues) is a direct sum.   I have $ \alpha : V \to V $. The eigenspaces are $ V_{\lambda_i} = \ker(\alpha - \lambda_i id_V )$ for $ 1 \leq i \leq n $. My attempt at a proof:  $ A + B $ is a direct sum iff $ A \cap B = \{0\} $. If $ v \neq 0 \in V_{\lambda_i} \cap V_{\lambda_j} $ for some $i,j, i \neq j $, then $ \alpha(v) = \lambda_i v $ and $ \alpha(v) = \lambda_j v $. So $(\lambda_i - \lambda_j)v = 0 $, and so $ \lambda_i = \lambda_j $. This is a contradiction, so any pair of the eigenspaces have trivial intersection. Therefore $ \cap_{i=1}^n V_{\lambda_i} = \{0\} $, and so we have a direct sum.  Is this ok?  Thanks Dual Canadian and British citizen - healthcare coverage in the UK? I want to know if I am entitled to medical assistance in the UK while visiting for 3 weeks in June. I am travelling on my Canadian passport since my UK one is outdated. A beginner's guide to SQL database design Do you know a good source to learn how to design SQL solutions?  Beyond the basic language syntax, I'm looking for something to help me understand:   What tables to build and how to link them How to design for different scales (small client APP to a huge distributed website) How to write effective / efficient  / elegant SQL queries Quick-and-dirty way to ensure only one instance of a shell script is running at a time What's a quick-and-dirty way to make sure that only one instance of a shell script is running at a given time? I currently have an ec2 &quot;t2.nano&quot; instance up and running. I would like to switch to a &quot;t2.micro&quot;. In order to do that, I need to stop the instance. But I would lose my IPv4 address in the process. And I do not want that (because I have several ssh tunnels up and running from rasps in the wild that are currently hard coded to connect to this IPv4 address). I decided to create an Elastic IP address. But I understand that by creating an Elastic IP address and assigning it to my current ec2 instance, I would lose my current IPv4 address too. Is it possible to create an Elastic IP address from the current IPv4 address of my ec2 instance? If so, how can I do this operation? Vim inoremap for specific filetypes What do solid/striped lines on a wire indicate? What do solid or dashed lines on a wire indicate?  Is there a difference between the solid and dashed indicators? Securely erasing all data from a hard drive I am about to sell my old desktop PC and I am cautious about some of my sensitive information being available to the purchaser, even after reformatting the hard-drive, using data recovery software.  How can I securely wipe the hard drive so that the data on it cannot be recovered?  Although I specifically want help with my Windows PC, it wouldn't hurt if there were suggestions for Macs as well. Analytic solution for $x=\ln(x+1)$ A linear operator commuting with all such operators is a scalar multiple of the identity.