why window[id] === document.getElementById( id )
Is there a spec that the id of elements should be made global variable?
Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster? Does python optimize modules when they are imported multiple times? If a large module is loaded by some submodule of your code, is there any benefit to referencing the module from that namespace instead of importing it again?  For example: I have a module MyLib, which makes extensive use of ReallyBigLib. If I have code that imports MyLib, should I dig the module out like so  import MyLib ReallyBigLib = MyLib.SomeModule.ReallyBigLib   or just  import MyLib import ReallyBigLib After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Why didn't Sauron find Bilbo when he put on the ring like Frodo? derivative bounded by a constant multiple of the function $f$ is differentiable on $[a,b]$, $f&#39;(x) \leq A|f(x)|$ where $A$ is a non-negative constant.  If $f(a)=0$ show $f(x)=0, \forall x\in [a,b]$  I imagine the proof uses the Mean Value Theorem but I have not been able to get it to work.  I know $|f(x)|=|f&#39;(c)|(x-a)$ where $c \in [a,x]$, so $|f(x)| \leq A\  |f(c)|(x-a)$ where $c\leq x$ And I guess I could sort of iterate this to keep getting a smaller $c$ but I don't see why it must go all the way to zero. Permission denied, are you root? So, we know that there is no "natural" isomorphism between a finite dimensional vector space $X$ and its dual $X^{\vee}$. However, given a basis for $X$ $(e_1, \dots, e_n)$ we can always construct a (dual) basis $(e^1, \dots, e^n)$ for $X^{\vee}$ that satisfies $e^i(e_j) = \delta^i_j$. It follows that $V \approx V^{\vee}$ simply because they have the same finite dimension $n$. Now, it seems to me that we can construct an isomorphism by assigning $$ e_i \mapsto e^i $$ and extending by linearity. That is, for an arbitrary vector $v \in X$ given by $v = \sum v^ie_i$ we can specify a linear map   $$\phi:V \rightarrow V^{\vee}$$  by  $$ \phi(\sum v^ie_i) := \sum v^ie^i $$ It is a quick exercise to check that $\phi$ is an isomorphism. Now, although this construction seems correct, there is something that doesn't quite sit right with me about it. For one thing, there is no way to really make sense of the summation convention as the right side of the function will always contain two superscripts thus requiring an explicit summation sign. The other thing that feels rather off is actually taking a lower index and moving it to an upper index, i.e., $e_i \mapsto e^i$ (which, of course, is the reason that the summation convention doesn't work).  So, with this background my questions are   Is there any sense in which the above isomorphism is "favored" or "canonical"? Is there another way to construct an isomorphism between a vector space and its dual, that would "conserve indexes", for lack of a better way to state it. My guess here is that the answer is no but becomes possible if one assumes $V$ has an inner product. How do you create a daemon in Python? reveals x2 code snippets. The first result is to  which has a lot of documentation and explanation, along with some useful discussion underneath.   However, , whilst not containing so much documentation, includes sample code for passing commands such as start, stop and restart. It also creates a PID file which can be handy for checking if the daemon is already running etc.  These samples both explain how to create the daemon. Are there any additional things that need to be considered? Is one sample better than the other, and why? I've been looking for this feature in Blender, either upon the time of creation using Edge Cut and Slide or afterwards, in just editing the mesh. I'd like to know if it's possible to evenly slide two edges away from one another in Blender?  Here's a picture of what I'd like to be able to do:    Thanks upfront!! Jumping in an elevator? When a vehicle makes a turn, the two front wheels trace out two arcs as shown in the figure below. The wheel facing towards the inside of the turn has a steering angle that is greater than that of the outer wheel. This is necessary to ensure that both front wheels smoothly trace out two arcs, which have the same center, otherwise the front wheels will skid on the ground during the turn.   During a turn, do the rear wheels necessarily trace out the same arcs as the front wheels? Read two column CSV as dict with 1st column as key Using image sequence of medical scans as volume data in cycles I know it's possible to do this in BI, but I need your help to do this in cycles. For now, I have a setup to use an image sequence as volume but it only shows 1 slice/frame. I'm using generated texture coordinates for easy mapping (0-1 on each axis). The images are mapped on XY and I would like to use normalized frame# as Z coordinate to map the sequence as a volume.       Images sequence can be found  (I'm using 16-bit TIF files of MRBrain in this exemple).    Any solution is welcome but try to keep it simple and user friendly :).  Final Edit: I had a hard time choosing between Lemon's and PGmath's answers. Lemon's is more user friendly and flexible, and uses the image sequence without any change inside blender. PGmath's uses a 3rd party converter to make the sequence 1 single image, but allows GPU rendering. Well, ImageMagick's command line is : "convert +append *.tif anim.tif" from the folder where the sequence is unzipped. Not so hard. That's why I accepted PGmath's answer.      Now, i played with it, and here's the result.  The "volume" object contains the volume shader (playing with the color ramp gives funny things) and the boolean modifiers (turn them off to see the complete volume, but reduce the final density multiplier for better view). The "Slice Control" arrow empty controls the slice position/rotation. The "Texture Mapping" object controls...the mapping, if it need some tunning (position, rotation, scale, and then tiling if necessary?). Why does Google not consider dot in usernames of Gmail addresses? I am a software engineer but try to keep up with maths as I really enjoyed the subject at school. I just saw a great TED talk:   The talk states that the current largest known prime is $2^{57885161}-1$  This got me thinking - how does one actually prove whether a number this large is prime or not?  Is it just done by brute force via a computer algorithm or are there any well known mathematical techniques for doing so?  I would be really grateful for any pointers as I am eager to learn about these techniques (if they exist). Why does space expansion not expand matter? If a field $F$ is such that $\left|F\right|>n-1$ why is $V$ a vector space over $F$ not equal to the union of $n$ proper subspaces of $V$ Looking for a quick and dirty way to automate . I presume this could be done with an automation to press the mouse button from two separate pixel coordinates, with delay, so long as the browser window doesn't move -- unless there's a better way.  I tried building a Watch Me Do workflow, in Automator, but can't seem to get it to work.  I get the error "application Chrome is not running when it is expected to." It also never lists mouse clicks for some reason.  I do have accessibility set up, in system preferences > security &amp; privacy > privacy > accessibility.  Automator, Chrome and System Events are all checked within there (among other stuff of course).  I tried the markashworth workaround as detailed  -- which also doesn't seem to work. Using his method, I get this error:    UPDATE: I just downloaded "cliclick" and figured out how do both clicks as a terminal command, with the proper delays.  BUT -- I don't know code and need a way for this terminal command to repeat "x" amount of times.  Anyone know how I could do that in Script Editor?  The command line is:  cliclick c:132,286 w:100 c:132,286 w:5000 c:1100,238   I would need a few seconds of delay before the loop repeats, which I presume I could do with a final "w:" in that line.  Thanks for the help!! App keeps crashing & rendering error since update to 1.0.68 No sound (speakers/jack) + microphone's dead after spilling water