I found some weird things about Javascript. For instance when I run in a node Shell (by just typing node) there are some statements that I do not understand.      &gt; [] + []     ''                           (because [] is converted to an empty string ?)     &gt; {} + []     0                            (why 0 ?)     &gt; x = ['10', '10', '10']     (this is ok)     ['10', '10', '10']     &gt; x.map(parseInt)     [ 10, NaN, 2 ]               (really weird)   I would like to know how Javascript works under the hood to understand why I get those results (especially the last one)
From the :  [1,4,9].map(Math.sqrt)   will yield:  [1,2,3]   Why then does this:  ['1','2','3'].map(parseInt)   yield this:  [1, NaN, NaN]   I have tested in Firefox 3.0.1 and Chrome 0.3 and just as a disclaimer, I know this is not cross-browser functionality (no IE).  I found out that the following will accomplish the desired effect. However, it still doesn’t explain the errant behavior of parseInt.  ['1','2','3'].map(function(i){return +i;}) // returns [1,2,3]
Winter 18  does not get values from a parent record "'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. What can an app do with the "USE ACCOUNTS ON THE DEVICE" permission? Can such an app freely read my emails/calendar/message/docs/etc.?  The "USE ACCOUNTS ON THE DEVICE" permission is also known for developers as .  Example of such apps: , . In a simple battery + resistor circuit, what form of energy is lost from the electrons upon exiting the resistor? I will give this question a little context. Firstly, as I understand it, as soon as I "close the switch" on a circuit, electric current pretty quickly establishes a steady state where, at any given cross section along a wire, the average kinetic energy of that slice is both constant and equal anywhere along the wire. (Please correct me if I am misunderstanding).   If the average kinetic energy is constant anywhere throughout the wire in the circuit (which confuses me, as I would think that the electrons should all accelerate after exiting the resistor since they are no longer being impeded as much), that means that the average velocity is constant. So, in the example of a simple circuit with a battery of v Volts and a resistor of o Ohms, my question is the following:  Because a 'voltage drop' is known to occur across the resistor, what type energy is being "traded" to generate the heat that radiates from the resistor? I would think that the reflexive answer is "electrical energy"...hence the VOLTAGE drop (the sacrificed energy is clearly not kinetic, as the velocity is constant everywhere). However, I find this confusing. Does this mean that if I had a positive test charge, it would be easier for me to bring it to the beginning of the resistor as compared to bringing it to the end of the resister?     Further, if the correct answer IS "electrical energy", why exactly DOES electrical energy get "dissipated" as the electrons pass through the resistor? I always here the comment Oh! It's because all the electrons are running into densely packed crap which impedes their flow but that to me sounds like a reason for their KINETIC energy to be reduced. However, clearly that's not the case. So, ultimately, I guess the real question is:  **What goes on in the resistor that is literally removing electrical energy **. I am sure that this is a quantum mechanics question, but my quantum mechanics knowledge is not terribly strong. If I could get an answer that is devoid of crazy wave function equations, I would greatly appreciate it. Thanks! What does the big intersection or union sign of a set mean? In some cases, we will have to consider the union or the intersection of several, even infinitely many sets, defined in the obvious way. For example, if for every positive integer $n$, we are given a set $S_n$, then   $$\bbox[border:1px solid red]{\bigcup_{n=1}^\infty S_n}=S_1\cup S_2\cup\cdots=\{x\mid x\in S_n\text{ for some }n\},$$   and   $$\bigcap_{n=1}^\infty S_n=S_1\cap S_2\cap\cdots=\{x\mid x\in S_n\text{ for all }n\}.$$   Two sets are said to be disjoint if their intersection is empty. More generally, several sets are said to be disjoint if no two of them have a common element. A collection of sets is said to be a partition of a set $S$ if the sets in the collection are disjoint and their union is $S$.   Normally what I know is that you can make a union or an intersection between only two sets. In this expression, there is a big union of sets. I'm asking about the meaning of this expression – what does it mean? What does the infinity sign do at the top?  Things are even more complicated with De Morgan's laws, which use the same expression:     Two particularly useful properties are given by De Morgan's laws which state that   $$\left(\bigcup_nS_n\right)^c=\bigcap_nS_n^c,\quad\quad\quad\quad\left(\bigcap_nS_n\right)^c=\bigcup_nS_n^c.$$   Anyone who can explain to me the expression or De Morgan's laws would be much appreciated. After trying to delete apache and tomcat, and now trying to reinstall apache 2, I am missing the init.d/apache2 file to start/stop my server.  I am not sure if the new install actualy worked, and my apt-get purge apache2 didn't remove everything in the first place!  How can I get the init.d/apache2 file to test if server starts / is installed properly (I had removed files and directories manually)? Dates and times: "on", "in", "at"? I’m often confused when I speak about times and dates. What is the rule for using on, in, and at in the following sentences?   I will do it ___ Tuesday. We married ___ March. He returned ___ the same day. Every day ___ the same time, I walk the dog. Frequent Write to Non-volatile Memory Can I sell starting gear in Adventurers League play? I'm starting a new AL game (as a player) and I have a question that's not addressed in the AL material.  According to Adventurers League Player's Guide (page 4)     When you create your D&amp;D Adventurers League character for the current season, take starting equipment as determined by your class and background. You cannot roll for your starting wealth.   Meaning I can't start with whatever I want. However, I am playing a ranged-focused fighter, so the second gear option is of no use to me:   (a) a martial weapon and a shield or (b) two  martial weapons   Can I choose any two martial weapons and sell them for half price to use for purchasing other gear before play? And is there a restriction on how much gold I can get?  For example, two hand crossbows (martial ranged weapons) can net me 75 gp when sold, or two greatswords nets me 50 gp when sold. Sci-Fi Movie/Show Where a Soul is Captured in a Glass Vessel I remember very little of this, I was quite young -  It was on television in the mid 90's, but seemed older. My wife was telling me about the 21 grams experiment and the memory clicked into place. Setting Inside of a mad scientist sort of lab, with the plasma balls and everything else, a character (Who in my mind resembles Gene Wilder in Young Frankenstein) is conducting an experiment. The room is hazy, lots of hues of purple and red. He has an assistant present. They were conducting some sort of experiment to try to figure out the secrets of immortality (or possibly reanimation). I remember them &quot;trapping&quot; a human soul in a glass vessel to see what it weighed or what kind of volume it took up - I believe they shot someone in this vessel, and because their soul could not &quot;escape&quot;, they did not die. Why is there one P in "hoping" and two P's in "hopping"? Hoping is the present participle of hope. hopping is the present participle of hop. Hoping has only one p while hopping has two. What difference does it make? Why is hoping not hopping?  Edit: I changed mop to hop because of a comment by Kat.  Kat: Why would you compare hope to mop instead of hope to hop (in which case I think your answer will become obvious)? MWE:  \documentclass{minimal} \usepackage{commath, tikz} \begin{document} \begin{tikzpicture} \node {$:$}; \end{tikzpicture} \end{document}   When I compile this, pdfTeX enters an infinite loop. Why? Sending file of custom python script with all parameters for popup interface already defined? I have a python script in ArcGIS 10 that when clicked, has a popup for a user to choose parameters. I would like to send this file to someone else. While I could send them the python code and have them setup the parameters - this method repeats work I have already done.   I would like to send someone one file that contains all of this information so they can just recieve my file, add it to a toolbox, and then have it all work. I am wondering where the file resides that has both the python code and parameters / what is the export process/ file type I should be looking at? (All the searches I do for "export script" seem to refer to exporting a model to python code...) Is it "5–6 weeks are a lot of time" or "5–6 weeks is a lot of time"? I was just copyediting  and my native English speaker Sprachgefühl told me I had to correct the grammar of one sentence:     ... 5–6 weeks are a lot of time ...   by changing the are to is. But as I was doing so I started wondering why is it that in this case it seems that I have to make the verb disagree with the plural subject?  So is my feeling for English going bad or if I did the right thing, how could I explain this to somebody who's learning English for instance? Object has no method 'live' - jQuery solving third-order nonlinear ordinary differential equation I haven't been writing C for very long, and so I'm not sure about how I should go about doing these sorts of recursive things... I would like each cell to contain another cell, but I get an error along the lines of "field 'child' has incomplete type". What's up?  typedef struct Cell {   int isParent;   Cell child; } Cell; Proving $\sum_{k=0}^n\binom{2n}{2k} = 2^{2n-1}$ I'm undergraduate student of mathematics.  I need to prove: $$\sum_{k=0}^{n} \binom{2n}{2k}= 2^{2n-1}$$ Can you please help me \phantom causes a spacing issue between paragraghs Find the equation of the plane knowing that it passes through 3 points