I have following function:  self.aFunction = function(otherAll, all){     for(var i = 0; i &lt; all.length; i++){         ...     }     for(var i = 0; i &lt; otherAll.length; i++){         ...     }     return someResult; };   I have two for loops and they both use the variable "i". They have nothing common and used for each loops separately.  However, i take the following error from jshint:  'i' is already defined.   What is wrong with this? Why is that important to use other variables for each loops in the same function? Is it an issue i should care about in this case?
What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?
If I wave around a bar magnet, the magnetic field in the space around it changes. Is this enough to go through the whole speed of light derivation implying that the motion creates an electromagnetic wave? If so how do I determine the wavelength and direction of the resulting wave? I was looking for alternate proofs of the theorem that "a vector space $V$ of dimension greater than $1$ over an infinite field $\mathbf{F}$ is not a union of fewer than $|\mathbf{F}|$ proper subspaces" and possible generalizations.  A simple measure-theoretic proof over $\mathbb{R}$ is as follows: By countable additivity the sum of the measures of any collection of subspaces is zero since the measure of each subspace is zero, which is a contradiction.  I would like to look at proofs over arbitrary infinite fields and would like to know if similar statements hold for say modules (finitely generated or otherwise) over infinite rings. Series $\frac{x^{3n}}{(3n)!} $ find sum using differentiation I'm having trouble with \includegraphics I'm using MacTeX Solving $(z+1)^5 = z^5$ Cheat-proof online die roller? I am looking for an online die roller that works similarly to the following:   The GM provides a string identifier to the player. E.g., "gandalf attacks balrog #12"   The player enters the id on the roller site, which checks it for uniqueness vs the DB, then generates the results, lined to that id.   The GM can check the results by id.     An alternative implementation would be for the GM to request a range of pre-generated ids from the site and hand them out to the players for rolls. E.g., "please roll 5d8 with id #314159265"  Is there anything similar?  Notes and Clarifications:  As Thales Sarczuk inferred, this is indeed for "play by forum/email" games.  The idea is to have "verifiable" rolls, preventing "roll until you you get a good result" scenarios. However, it will be used on forums that are not gaming-specific so using plugins is not an option.  Thank you! How is canonicity of derivative works determined for Star Wars? For all types of derivative works, namely:   Movies Novels Comic books Other written works (including RPG materials) Cartoons Video games Derivative movies (such as the infamous Ewok movies and even more infamous )   According to what rules does something become "canon" and who is responsible for the evaluation of a published work? Stepping up 3V to 5V How can I reduce the file size of a scanned PDF file? I have a 72.9MB PDF file that I need to shrink into under 500KB.  The file was a JPEG image that I had scanned, and then converted to pdf. I was editing my mesh and I wanted to only see a part of my mesh, so I pressed alt+B to only show a selected area. However, I did ctrl+B and created a red rectangle on my screen (I don't know what it does). Does anybody know how to get it off? Can I safely connect the power-only-end of a USB-Y cable to an other power source? If the host computer for an USB device doesn't provide enough power for a device which has no dedicated power port, can I connect the power-only-plug of a Y-USB-cable to an other computer, an USB-charger or even a regular mobile charger? I'm afraid this could damage some of the devices.  Edit: The device in question is a USB Hard drive (Samsung S2 Portable 640GB (but on the back it's written to use 0.85A)) which is supposed to work whit just a single USB port. It did so well on a other laptop and whit some cables even on my actual net book back in Europe. But now in Malaysia it works only some times (I still try to figure out what the conditions are) and then it stops working after a while (maybe when it goes to power save mode). I heard from others their hard drives need one more power plug here in Malaysia to but can't imagine why... Center of $D_6$ is $\mathbb{Z}_2$ The center of $D_6$ is isomorphic to $\mathbb{Z}_2$.   I have that $$D_6=\left&lt; a,b \mid a^6=b^2=e,\, ba=a^{-1}b\right&gt;$$ $$\Rightarrow D_6=\{e,a,a^2,a^3,a^4,a^5,b,ab,a^2b,a^3b,a^4b,a^5b\}.$$ My method for trying to do this has been just checking elements that could be candidates. I've widdled it down to that the only elements that commute with all of $D_6$ must be $\{e,a^3\}$ but I got there by finding a pair of elements that didn't commute for all other elements and I still haven't even shown that $a^3$ commutes with everything. For example, I have been trying to show now that $$a^3b=ba^3$$ and haven't gotten too far yet but if I had to answer a question like this on the exam, I feel it would be difficult, is there any kind of trick or hints other than brute force using the relations to get that $a^3$ commutes with everything?  For the solution once I have that the center of $D_6$ is what I think then as there is only one group of order $2$ up to isomorphism, it must be isomorphic to $\mathbb{Z}_2$.  Ideally a way that doesn't appeal to $D_6$ as symmetries of the hexagon if that seems possible. Why does the area of a bar in a histogram represent the frequency of that particular class In a bar-graph, the height of the bars represent the frequency of a particular category but it is counter-intuitive that in a histogram, instead of the height of the bar(which represents the frequency density), the area of the bar represents the frequency of the particular class. Why is this so? How to ignore deprecation warnings in Python What, exactly, is transferred along supply lines? In January, some additional whitespace  below h1, h2 and h3 headings,  more whitespace below the headers than above them.  Could we have the whitespace above the headings be more than the whitespace below them?  I find some posts a bit hard to read, like the current rendering on the left:   &nbsp; &nbsp; &nbsp; I'm self-studying Guillemin and Pollack, but I'm stuck on Problem 3 of section 2. It says that if $V$ is a vector subspace of $\mathbb{R}^N$, then $T_x(V)=V$ if $x\in V$.  If $x\in V$, then since $V$ is a manifold, there is a local parametrization $\phi: U\to V$ where $U$ is open in $\mathbb{R}^k$. Without loss of generality, we can require $\phi(0)=x$. Then $T_x(V)$ is defined to be the image of $d\phi_0$ on $\mathbb{R}^k$.   An arbitrary element of $T_x(V)$ looks like $$ d\phi_0(v)=\lim_{t\to 0}\frac{\phi(0+tv)-\phi(0)}{t}=\lim_{t\to 0}\frac{\phi(tv)-x}{t} $$  but this doesn't seem very useful to show $T_x(V)=V$. What is the right approach? I have located where the error message originates from it is in  line number 221. As I have only a single nvidia driver installed I suspect it is is the same issue. I am not a developer but looking at the code preceding this line I can see the statement.  const char *glob_pattern = "/usr/lib/nvidia-[1-9][0-9][0-9]"  this will pick up nvidia-352/ nvidia-361/ and nvidia-361-prime/ ? on my PC. Can we use curved spacetime to measure the one-way speed of light? This is related to  and  The idea is to shine a beam of light from a clock towards a heavy mass, like a black hole, in some manner such that the curvature of spacetime around the mass is sufficient to &quot;bend&quot; the light directly back to the clock. That is, to send the light along a self-intersecting geodesic using a sufficiently curved spacetime. Note that in this case the source and the detector are the same object, so no clock synchronization is required. Hypothetically, this should measure the one-way speed of light. None of the given refutations from the similar posts on this site are convincing. Here are some of the main refutations, as I understand them, and my counter to them: (1) In being curved by spacetime, the light is actually changing direction, hence this is not the one-way speed. To my understanding of General Relativity, the light travels along a geodesic; that is, a curve such that, ignoring technicalities of Differential Geometry, its tangent direction is constant. There is no reflection or acceleration. So in this sense, how can the light with a constant tangent direction be said to change direction? One might say that the path deviates from a straight line in Euclidean space, but given that spacetime is not Euclidean, has no , and has no global notion of direction, this is the only definition of straight or &quot;one direction&quot; that makes sense. Thus, either the light does not change direction and is &quot;one-way,&quot; or we need to be clearer about what exactly we mean by &quot;one-way&quot; in the context of General Relativity. (2) Such an experiment would be impossible or impractical. I think some posters were saying this because the original questions implied that the clock would have to be at the event horizon of a black hole, which is of course impossible or impractical; however, I don't think such an extreme closeness to the black hole is required. Given that the  of a black hole, where light orbits in a circle, is outside of the event horizon, shining the light at some distance outside of the photon sphere should be sufficient to curve the light back to the clock, regardless of the distance of the clock from the black hole (see my rough illustration). At the extreme, we could place the clock directly on the photon sphere, which should be theoretically possible. Regardless, the question is not about practicality, but whether the one-way speed is theoretically measurable.  Update: Essentially what this argument boils down to, I think, is that the average speed of light along a single self-intersecting geodesic may differ from the average speed of light along a non-geodesic self-intersecting path, which is always c. Put that way, however, it does seem a little ridiculous. It is hard to see how the anisotropy of the speed could be defined in such a way as to be consistent with this pathological case. Presumably, we could approximate a single self-intersecting geodesic with a non-geodesic path arbitrarily closely, so, logically, the average speeds over each path should be approximately the same, i.e., c. Furthermore, how would the &quot;preferred direction&quot; of the speed of light behave around a black hole, for instance? Regardless, I still think this experiment does actually solve the problem for the given notion of &quot;direction&quot;. Though the problem is usually posed in the flat spacetime of Special Relativity, with a global notion of direction, so the apparent unanswerability of this question should be seen as a limitation of Special Relativity only, which is then solved by General Relativity. Why was River Song so slow?