function F (v) {     var v = v;     this.fun = function f () {             console.log(v);     }; };  var i = new F(1);   i.fun();    Just to clarify, I don't this my question is solved by a knowledge of closures. To my understanding, i is just: {fun: function f () {console.log(v)}}. So how is i.fun() able to access v - one of the variables in a constructor function that only helped to make i?
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.
Can we add Markdown support for tables? What is the probability that when you place 8 towers on a chess-board, none of them can beat the other. What is the probability that when you place 8 towers on a chess-board, none of them can beat the other.  Attempt: ${64 \choose 8}^{-1} \approx1$ in $4\ 400\ 000\ 000$  Correct answer: ${64 \choose 8}^{-1} \cdot 8! \approx 1$ in $9\ 000\ 000$.  I disagree with the $8!$. If there's combinations (binomial coefficient) in the denominator, why would there be permutations i.e. the order counts, in the numerator? Running a script during booting/startup; init.d vs cron @reboot I am currently trying to understand the difference between init.d and cron @reboot for running a script at startup/booting of the system.   The use of @reboot (this method was mentioned in  by hs.chandra) is some what simpler, by simply going into crontab -e and creating a @reboot /some_directory/to_your/script/your_script.txt and then your_script.txt shall be executed every time the system is rebooted. An in depth explanation of @reboot is   Alternatively by embedding /etc/init.d/your_script.txt into the second line of your script ie:  #!/bin/bash # /etc/init.d/your_script.txt  You can run chmod +x /etc/init.d/your_script.txt and that should also result for your_script.txt to run every time the system is booted.  Q1: What are the key differences between the two? Q2: Which is more robust? Q3: Is there a better one out of the two? Q4: Is this the correct way of embedding a script to run during booting?  I will be incorporating a bash .sh file to run during startup. The interval [0,1] andd [3,5] are equivalent. Is my proof correct? Access network share from within VBScript eg FileSystemObject Should I keep 32bit or 64 bit Windows 10 on my x64 based Intel Atom Z3735F cpu on 2gb ram non-upgradable laptop I have an Acer Aspire Switch 10 SW5-012 detachable notebook which has 2GB of RAM based on an x64 based processor. I got it with a 32 bit version of windows 8 but upgraded to windows 10 recently. But before I do anything else, I was considering if I'd be having Better performance with the 64 bit version of windows 10. Would it make my notebook perform better since it's based on an x64 based Intel Atom Z3735F? Or should I just stick to the 32 bit version of windows 10? Why are the rooting apps not working anymore? A couple years ago, it was easy to root any device: Install KingRoot, KingoRoot, or a similar app, hit the large ROOT button, and let it do the rest. After 5 minutes or so, a green "Root Succeeded!" prompt will pop up, and we can choose to keep the root app, or uninstall it and install a clean root manager app like SuperSU/Superuser.  How do they work? Why aren't they working anymore? And if they work, should I use them or not? I just installed a new version of Ubuntu and I want to roll it back to the previous version.  How can I do that? Is that even possible? How can I reduce screen brightness below the minimum without an app? I have an Optimus Elite, and it has a minimum brightness setting. In certain apps, I can reduce the brightness below the safe minimum, but when I leave the app, the brightness is increased to the system-wide minimum.  Using , I can permanently set the brightness below the safe amount, and it will stay even after going to other apps. Or using , I can accomplish almost the same thing even without needing root (it displays a translucent 'filter' over the whole screen, reducing brightness/contrast but not actually changing the backlighting power amount).  What I want to know is where the minimum screen brightness is stored. I have a rooted phone with CyanogenMod 9, so I have permissions to edit anything and could change a config or sqlite entry, but I don't know where this value is stored. What I would like to do is use the status bar brightness slider to be able to slide to the actual minimum of the screen, rather than the OS-controlled minimum. Having an app is useful, but having the functionality without the app seems to be within reach, if only I knew where the OS is getting it's safe minimum setting.  Where is this "safe minimum brightness" setting stored? If I can change it, I can remove my apps and use native controls. Train passport control from London to Paris I'm a non-EU citizen, I will be travelling from London to Paris next month, so I was wondering since most countries track entry and leave dates, if I use the train to switch these countries and they don't control it, my UK visa will seem like entry YES but no leaving. Same for the Schengen, I wouldn't have an entry date but I'll be leaving,  Will it be trouble later? Are they controlling this on trains? If not is there anything I should do before? Fourier transform of the indicator of the unit ball How do I boot to a command line interface instead of a GUI? Hi I have ubuntu server 10.04 installed and I also installed the following:  su aptitude install xorg xfce4 aptitude install &lt;name of GUI browser, I use firefox&gt; aptitude install gedit aptitude install gnome-terminal   Now when I restart the system it goes to the GUI login, what I am really after is a system that loads the CLI by default and then I can use startx to load the GUI when really necessary. I am trying to learn CLI but I would like to retain access to the GUI for now. And, how can I switch between CLI and GUI anytime? Coefficient growth in the power series $\sum u_n z^n = e^{1/(1-z)}$? A photon emitted from a receding source (Doppler redshift) has less energy when detected at an observer's location. Please explain the energy loss from the perspective of energy conservation. Evaluating $\lim\limits_{n\to\infty}(a_1^n+\dots+a_k^n)^{1\over n}$ where $a_1 \ge \cdots\ge a_k \ge 0$ Need to find $\lim\limits_{n\to\infty}(a_1^n+\dots+a_k^n)^{1\over n}$ Where $a_1\ge\dots\ge a_k\ge 0$  I thought about Cauchy Theorem on limit $\lim\limits_{n\to\infty}\dfrac{a_1+\dots+a_n}{n}=\lim a_n$ and something like what happen if all $a_i=0$ or $a_1=\dots=a_k$, but may be something I am thinking wrong?  Maybe it is too simple but I am not getting it; please help. Why Dumbledore kept mum until the very end of the "Deathly Hallows"? Deleting my own question When does HashSet 'add' method calls equals? I'm looking for a short story from about 50 years ago about a robot who escapes after being slated to be melted down and discovers while in hiding that it has evolved to have some supernatural powers. How can I use "." as the delimiter with String.split() in java