I have downloaded some samples for Google maps API 3 and I can see some code like bellow:   (function (i, marker) {     google.maps.event.addListener(marker, 'click', function () {         if (!infowindow) {             infowindow = new google.maps.InfoWindow();         }         infowindow.setContent("Message" + i);         infowindow.open(map, marker);     }); })(i, marker);   Could some one explain me what this means?  Or can we re-write the above code in different ways? I am bit new to JavaScript and don't know what exactly the above code does?  here  is the full script  function markicons() {      InitializeMap();      var ltlng = [];      ltlng.push(new google.maps.LatLng(17.22, 78.28));     ltlng.push(new google.maps.LatLng(13.5, 79.2));     ltlng.push(new google.maps.LatLng(15.24, 77.16));      map.setCenter(ltlng[0]);        for (var i = 0; i &lt;= ltlng.length; i++) {         marker = new google.maps.Marker({             map: map,             position: ltlng[i]         });          (function (i, marker) {              google.maps.event.addListener(marker, 'click', function () {                  if (!infowindow) {                     infowindow = new google.maps.InfoWindow();                 }                  infowindow.setContent("Message" + i);                  infowindow.open(map, marker);              });          })(i, marker);      }  }
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.
Is there an easy way to calculate the total cost of tolls for a trip within the United States? Suppose $53$ percent of the population prefer red socks to green. If $100$ random people are asked, what is the probability that most (at least $50$) will say prefer GREEN:  So I set \begin{align*} N &amp; = 49.5\\   n &amp; = 100\\   p &amp; = 0.47 \end{align*}  Then.. \begin{align*}    P(N \geq 49.5) &amp; = P\left(\frac{N - np}{\sqrt{npq}}\right)\\                &amp; \geq \frac{49.5 - 47}{\sqrt{100*.47*.53}}\\                   &amp; = \varphi(0.50)\\                   &amp; = 0.3085   \end{align*} Except, that's not the right answer. What did I do wrong in my calculations? Server login attempts NOT blocked after configuring fail2ban So, I installed (and configured) fail2ban on three Ubuntu VPS servers. I configured (imo) a maximum of 3 failed login attempts (via Putty as root) within 2 minutes. Then I restarted the fail2ban service (according to ).    But when I look at my auth.log files in /var/log/ I still see 4, 5 or more failed attempts from certain IP's. So obviously I did something wrong as the IP is not blocked after 3 failed attempts.   It might have to do something with iptables, but that's where it gets a bit "foggy" for me..   Not sure how to setup a max-three-failed-login-attempts rule..  Additional: I see that the login attempts mostly have different ports for every attempt. Does that influence the count to max-three?  Because I see a port being "poked" twice and then no more attempts. Then the IP tries a different port (again 2 times). (all bots of course) Adding more than 15 digits in Excel I want to add more than 20 digits in an Excel cell.  The current format of the cell is general, it converts the number to an exponential format. I tried with a number format and accounting, but when I enter more than 15 digits it gets converted to 0's.  What are the recommended steps for stopping Excel from converting data to exponential Format for 20 digits when in the general format?     Example: 12345678901234567890   Excel converts it to 1.23457E+19 in general format.  Without using ' before the value, is there any other way to keep value same? How does the Commander interact with Banishing Light or Oblivion Ring? What happens if a commander is sent to the command zone via  and then enchantment is destroyed? Can the commander return to the battlefield from the command zone?.  I think that  would not allow that to happen. The full problem is as stated in the title. I am here to check if this is a valid proof. I thought it would be easiest using Linear Algebra.     Recall that an infinite cyclic group is isomorphic to $\mathbb{Z}$. We wish to show that we do not have an isomorphism between $\mathbb{ZxZ\;and\;Z}$. Note that $\mathbb{ZxZ}$ is an infinite group (under addition of course). Now, in order for there to even be potential for an isomorphism, two spaces must have equal dimension. Since the $\mathbb{dim(\mathbb{ZxZ})}=2&gt;\mathbb{dim(\mathbb{Z})}=1$, we know that $\nexists$ an isomorphism between our spaces. Hence, $\mathbb{ZxZ}$ is not a cyclic group.   My question (besides a validity check): was there a better way to prove this? I just found this to be the easiest way.  EDIT Totally wrong with this one. Back to the cutting board. What is $\gcd(0,a)$, where $a$ is a positive integer? I have tried $\gcd(0,8)$ in a lot of online  gcd (or hcf) calculators, but some say $\gcd(0,8)=0$, some other gives $\gcd(0,8)=8$ and some others give $\gcd(0,8)=1$. So really which one of these is correct and why there are different conventions? Are mounts proficient in armour (barding)? Can someone help me figure out the big-O for the recurrence relation $T(n) = T(n^{1/2}) + 1$?  I didn't think the master theorem would work since it requires $T(n) = T(n/b)$... to have $b$ as a constant. I was wondering if anyone could shed some light on a method to approach this problem? (not looking for a solution) In the sentence     What’s funny is Cat’s dry humour.   Wouldn’t it be better to put a comma after “funny”:     What’s funny, is Cat’s dry humour.   This question entails a (at the time of writing) heated discussion in the . Can't learn the third Word of Power from Wulfgar What do "watched tags" and "ignored tags" do? Are there idioms or expressions in English that describe going from one bad situation to one that's even worse?  I heard "between a rock and hard place" but this describes a dilemma not really a transition. I am looking for an expression that describes someone trying to get out of a bad situation but after much effort, the situation only got worse. The company I work for makes hardware that communicates to the computer though a serial port. Third party companies write software that communicates with our hardware.   There are times when I need to diagnose our hardware. However, a third party software app connects to the serial port when Windows starts up, blocking any other connection. I don't know the name of this application/service and it's not always the same one.  Is there any way to either:   Find the name/pid of the app/service that is currently using a given serial port or Steal the serial port connection from another app.   vb.net preferably, but I'll take a language agnostic answer as well. Energy-Momentum Tensor in QFT vs. GR Journey Builder: Error binding data bound member Is $\mathbb{R}$ a subset of $\mathbb{R}^2$? Is it correct to say that $\mathbb{R}$ is a subset of $\mathbb{R}^2$? Or, put more generally, given $n,m\in\mathbb{N}$, $n&lt;m$, is $\mathbb{R}^n$ a subset of $\mathbb{R}^m$?  Also, strictly related to that: what is then the "relationship" between the set $\{(x,0)\in\mathbb{R}^2,x\in\mathbb{R}\}\subset\mathbb{R}^2$ and $\mathbb{R}$? Do they coincide (I would say no)? As vector spaces, do they have the same dimension (I would say yes)?  If you could give me a reference book for this kind of stuff, I would really appreciate it.  Thank you very much in advance.  (Please correct the tags if they are not appropriate) How to duplicate a div in JavaScript Using the expression "the same" for a previously mentioned item I frequently use &quot;the same&quot; as in the following sentence.  I need the details of XYZ project. Could you please send me the same as soon as possible?  Is this grammatically correct? I have not been corrected till now, but I have not seen the usage from native speakers very much either. Update: Seems like my example sentence was ambiguous. Hope the following sentence is better.  I need the documents for the meeting. Could you please send me the same as soon as possible? Dimension of Dirac $\gamma$ matrices While studying the Dirac equation, I came across this enigmatic passage on p. 551 in From Classical to Quantum Mechanics by G. Esposito, G. Marmo, G. Sudarshan regarding the $\gamma$ matrices:     $$\tag{16.1.2} (\gamma^0)^2 = I , (\gamma^j)^2 = -I \ (j=1,2,3) $$    $$\tag{16.1.3}  \gamma^0\gamma^j + \gamma^j \gamma^0 = 0 $$   $$\tag{16.1.4}  \gamma^j \gamma^k + \gamma^k \gamma^j = 0, \ j\neq k$$    In looking for solutions of these equations in terms of matrices, one finds that they must have as order a multiple of 4, and that there exists a solution of order 4.   Obviously the word order here means dimension. In my QM classes the lecturer referenced chapter 5 from Advanced Quantum Mechanics by F. Schwabl, especially as regards the dimension of Dirac $\gamma$ matrices. However there it is stated only that, since the number of positive and negative eigenvalues of $\alpha$ and $\beta^k$ must be equal, $n$ is even. Moreover, $n=2$ is not sufficient, so $n=4$ is the smallest possible dimension in which it is possible to realize the desired algebraic structure.  While I got that the smallest dimension is 4, I fail to find any argument to reject the possibility that $n=6$ could be a solution. I also checked  Phys.SE post, but I didn't find it helpful at all.  Can anyone help me?