Variable in JavaScript callback functions always gets last value in loop?
JavaScript closure inside loops – simple practical example
Finding places to play Magic the Gathering games A friend of mine recently got MTG for the XBox and is talking us into getting real cards.  I'm all up for starting but I dread the idea of playing the same two people over and over with no change epically since one of them is over competitive and exploits every loophole he can to win.  Does anyone know of any a reliable (not just google it) way to find places where people play MTG? Prove existence of disjoint open sets containing disjoint closed sets in a topology induced by a metric. Question: Let $(X, d)$ be a metric space. Let $A$ and $B$ be disjoint subsets of $X$ that are closed in the topology induced by $d$. Prove that there exist disjoint open sets $U$ and $V$ such that $A\subset U$ and $B\subset V$.   Is this proof correct? : By assumption, $A\cap B=\emptyset$, so there is no pair like $(x_A,x_B)$ (i.e., $x_A\in A$ and $x_B\in B$), such that $x_A=x_B$. Because every metric space is Hausdorff, so for every pair $(x_A,x_B)$ there are two disjoint open sets $U_A\ni x_A$ and $V_B\ni x_B$; and thus union of all $U_A$s (which is an open set containing A) are disjoint from union of all $V_B$s (which is an open set containing A).   Thanks a lot for any help.    PS In special case of standard metric topology on $\mathbb{R}$, if $[a,b]$ and $[c,d]$ are disjoint (say $c&gt;b$), intuitively it is apparent that there is a 'space' between $c$ and $b$ so we can have two disjoint open sets, each of them containing $[a,b]$ or $[c,d]$. Is there a destructor for Java? While I've done quite a bit of travel now and back myself to handle situations when it comes to border guards, sorting accommodation and / or transportation, one thing I still struggle to come to terms with is haggling in the markets, be it for food, clothing or other.    Image © Peter Morgan, 2014   What is the best way to go about this? I'm generally either worried I'll offend them, or that they're trying to rip me off anyway, so it's a weird combination of awkwardness inside my head ;) Where are executables for programs stored in Ubuntu?  An application (Komodo Edit) is asking me to identify an application to be used as a web browser. I've become used to just entering the application name as a command for situations such as these, but this scenario got me thinking.   I know in Windows it would just be the relevant application folder in the 'program files' folder, but I'm assuming things are a bit different on Linux?  I thought somewhere like bin would be logical but this appears to standard Linux/Unix applications. Where would I find the binary executable for applications stored on my system? There is a restriction on setting your birthday:     Oops! There was a problem updating your profile:   - Birthday must be after 1920/01/01   I realize the number of 90 year old users is small, but shouldn't the restriction be a bit more relaxed, such as larger than any ?  Either 120 or 150 seems appropriate.  For example, my grandfather turns 90 next year (and just barely misses the current cutoff), but I can't imagine he's the only one around that age who is computer literate and still active enough to be interested in (the increasingly broad range of) SE sites.  I don't think he has contributed yet (mostly because of the comment restriction, I'd see him commenting before asking or answering), but I have emailed him with links that I know he's read.  Incidentally, the error message is wrong: birthday must be after 1919/12/31 and using the next day is accepted. Get name of caller function in PHP? How to split a large file into two parts, at a pattern?  Given an example file.txt:  ABC EFG XYZ HIJ KNL   I want to split this file at XYZ such that file1 contains lines up-to XYZ and rest of the lines in file2. How many combinations can I make? let $n \gt 1$ be an integer, and consider $n$ people; $P_1, P_2,..., P_n$ let $A_n$ be the number of ways these $n$ people can be divided into groups, such that each group have either one or two people  determine $A_1, A_2, A_3$  So I have  $A_1 = 1$ way $A_2 = 4$ way $A_3 = 12$ way  But I am not sure if this is right... Can anyone confirm?  edit:  My way of getting this is  $A_1 = 1 $ because {P1} only has 1 way to sort  $A_2 = 4$ because {P1,P2} = {P1,P2},{P2,P1},{P1P2},{P2P1}  etc. Using the Fitch system, how do I prove $((p \implies q) \implies p)\implies p$? I started with the hypotheses $(p \implies q) \implies p$ and $\sim p$. However, from these hypotheses I did not get the desired contradiction to solve the question.  Thanks sb45 How do I change the command that a launcher item launches? Why can't we initialize members inside a structure? Why does ('0' ? 'a' : 'b') behave different than ('0' == true ? 'a' : 'b') XP Activation and Dual Booting "'Hello', says he. 'Hello', says I" — is this correct? I'm reading a novel in which once in a while a character says something like "I are", "He do", and similar stuff. I understand the author is just reproducing the way people talk on the streets.  However I've found a piece of text of which I'm not sure if it's proper English. One of the characters, who almost always speaks proper English, is reproducing a conversation that happened many years ago using the present tense in the following manner:     I was with this guy and "Hi", says he, "how are you", says I...   and so on.  My question is if the "says I" is proper English (a special case in which "I" is treated as a third person because we are relating in present tense something that happened in the past) or it's just kind of slang.  I was also a bit surprised by how the usual order is switched ("says he" instead of "he says") but to me it's secondary to the "says I" issue. I want to show that for $S,T\in B(H)$ bounded operators on Hilbertspace with $S\geq 0,T\geq 0$ and $ST=TS$,  we have $S+T\geq 0$, and $ST\geq 0$.  $T\geq 0$ means $(Tx,x)\geq 0$.    To me it seems that $((S+T)x,x) = (Sx,x)+(Tx,x)\geq 0$. But for $ST$ i like some help.   There is a theorem in Rudin (12.32) that says that for every $T\in B(H)$ we have an equivalence:   $T$ is positive $\Leftrightarrow$ $T$ is self adjoint, i.e. $T=T^*$ and $\sigma(T)\subset [0,\infty)$.   Since $S, T$ are self adjoint we know that $ST=TS = S^*T^* = T^*S^*$ ($ST$ is selfadjoint since $S,T$ commute). Also I read somewhere that if $S,T $ commute then $\sigma(ST)\subset \sigma(S)\sigma(T)$, but I am not sure if this is true. Clearly I cant prove it, but if it were true by this ''Theorem'' it would follow that $ST \geq 0$.   Is there a more straightforward way? What's the shelf life on crushed specialty grains? How to append the contents of a list at the end of the other list? How do I append the contents of one list at the end of another list? Error when clipping raster in QGIS: "'ascii' codec can't encode character"? I have done it many times (clipping a raster with a polygon layer or by extension) but today I got an error for the first time and I don't know how to solve it. I am always using the same type of raster layers. When running the clipping tool I got the following message:  gdal_translate -of GTiff -ot Byte -projwin 410282.185971 4694950.41162 410783.882475 4694524.96815 -co COMPRESS=DEFLATE -co PREDICTOR=1 -co ZLEVEL=6 -co TFW=YES "C:/Users/FERRAN ALA/Desktop/Justificació Fontanals/QGIS/Topo 1_5000/bt5mv20sd0f283077st1r031.sid" "C:/Users/FERRAN ALA/Desktop/Justificació Fontanals/QGIS/background/image.tif"   GDAL command output:     'ascii' codec can't encode character u'\xf3' in position 201: ordinal not in range(128) See log for more details   Does anybody know what that is? How can I close a terminal without killing its children (without running `screen` first)?