I want to use the property of "caller" for a function which is defined   It works fine for this style of function declaration      function g() {       alert(g.caller.name) // f }     function f() {       alert(f.caller.name) // undefined       g() }  f()     But then my function declaration is something like       g = function() {       alert(g.caller.name) // expected f, getting undefined     }      f = function() {      alert("calling f")      alert(f.caller.name) // undefined      g()    }   f()   and I am getting undefined (basically not getting anything)     Is there any way that I can use the caller property without having to rewrite my code? Also, I hope I have not made any mistakes in usage and function declaration since I am quite new to using JS.
I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?
Under what conditions does loot despawn? I have found that when my bags get full and I need to vendor loot I can sometimes leave loot on the ground and return to it.  Other times it seems to disappear almost instantly once I leave the area.  Is the loot despawn time based, based on my distance from the dropped loot, or some other factor(s)? Find all number $n\in \mathbb N$ such that $\varphi (n)=14$ How to create svg symbols that have modifiable fill color, stroke color and stroke width? I want to create some svg symbols for Qgis using Inkscape, those symbols must have attributes as described in the question. For the last two days, I have been experimenting as instructed by  and mimicked some symbols came bundled with qgis that have desired attributes without any success.  Finally I experimented with the simplest form of symbol: I created an svg that contains only a circle in Inkscape and tried to modify it.  The original file () have this line:  &lt;path    sodipodi:type="arc"    style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.01988637;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"   I modified it into:  &lt;path    sodipodi:type="arc"    style="fill:param(fill) #ffffff;fill-opacity:1;stroke:param(outline) #000000;stroke-width:param(stroke-width) 1.01988637;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"   Saved as  and selected it as point symbol, but Qgis couldn't change all three parameters at the same time.  What did I do wrong or should do differently?  My system: Qgis 1.8.0 on Ubuntu 12.04 64 bit, Inkscape 0.48, Gedit 3.4.1 text editor. How many roots have modulus less than $1$? If roots of the equation   $$x^7 - 4x^3 + x + 1=0$$        are plotted on the Argand plane, how many of them have distance from the origin less than $1$?     I found, by plotting the rough curve of $y= x^7 - 4x^3 + x + 1$ that it has three real roots, out of which two of them have modulus greater than $1$ and one has modulus less than $1$. But I don't know how to do the same for non - real roots. The answer given in my book is that $3$ roots have modulus less than $1$. Direct proof that nilpotent matrix has zero trace How can I sanitize user input with PHP? Is there a catchall function somewhere that works well for sanitizing user input for SQL injection and XSS attacks, while still allowing certain types of HTML tags? How can I install a Nautilus script? Prove that if $X$ and it's closure $\overline X$ are connected and if $X\subset Y \subset \overline X$, show that Y is also connected. Can anyone give me a proof of the statement that if $X$ and its closure $\overline X$ are connected and if $X\subset Y \subset \overline X$, show that Y is also connected?  Thank you. Ignore Pulses Less than a Given Width in a Pulse Train Let's say I have a 5V pulse train that varies between 0 and 75000 pulses per second. Pulse width, let's say, is 5 microseconds. How could I calculate or determine the best way to filter out all pulses less than 4 microseconds in width? Double orthogonal complement is equal to topological closure I've seen many of the solutions on the topic, all posted in this site. But I haven't seen any of them mentioning Apple's adapter,   I have that, which was used to connect to my old MacBook Pro 2013.   Now, I'm assuming that all I need is to connect the Mini DisplayPort to an adapter, such as  (as mentioned in one of the posts) and the USB cable to a USB-C adaptor.   Is this correct? I have a generic class in my project with derived classes.  public class GenericClass&lt;T&gt; : GenericInterface&lt;T&gt; { }  public class Test : GenericClass&lt;SomeType&gt; { }   Is there any way to find out if a Type object is derived from GenericClass?  t.IsSubclassOf(typeof(GenericClass&lt;&gt;))   does not work. How do I do a SELECT * INTO [temp table] FROM [stored procedure]? Not FROM [Table] and without defining [temp table]?  Select all data from BusinessLine into tmpBusLine works fine.  select * into tmpBusLine from BusinessLine   I am trying the same, but using a stored procedure that returns data, is not quite the same.  select * into tmpBusLine from exec getBusinessLineHistory '16 Mar 2009'   Output message:     Msg 156, Level 15, State 1, Line 2   Incorrect syntax near the keyword   'exec'.   I have read several examples of creating a temporary table with the same structure as the output stored procedure, which works fine, but it would be nice to not supply any columns. Is it (theoretically) physically possible to project an image into thin air? For an affine connection $\nabla$, prove the curvature R  $R(X,Y,Z,\alpha)=\alpha(\nabla_X \nabla_Y Z - \nabla_Y \nabla_X Z -\nabla_{[X,Y]}Z)$  with $X,Y,Z$ vector fields and $\alpha$ a co-vector, is a tensor.  So I realise the aim is probably to show that each of the three terms in the expression for $R$ are tensors themselves as then the result will obviously follow. However, I'm not too sure how to show each of these terms are tensors. Do I need to expand out each covariant derivate to get a bunch of connection coefficients and then see some cancellations? Still though, I'm not too sure what I'll want to see after all of this so that I can say "…therefore $R$ is a tensor".  Also, very much related to the question, I'm a bit confused with the difference between  $\nabla_Y Z$ $\space \space $ and $\space \space $  $\nabla_{\mu}\omega$.  The second one I know as the covariant derivative of a 1-form, but what is meant by the covariant derivate of a vector $\textit{field}$? As in, what's the difference between the $\nabla_Y$ and $\nabla_{\mu}$?  Edit: In answering this last question, I have realised that $\nabla_YZ=Y^{\mu}\nabla_{\mu}Z^{\nu}$ and $\nabla_{\mu}\omega=\nabla_{\mu}\omega_{\nu}$. What did Ken Thompson mean when he said, "I'd spell creat with an 'e'."? What is Ken referring to? Is there a "creat" command? I would like to sell my Macbook Pro, but I want to make sure that there is no way to retrieve the deleted data from my SSD. Is there a way to completely delete all files on a hard drive so that even a forensic expert cannot recover anything? Can I list the resources in a given package? It's using Euclidian inverse. Can you show it step by step?   $$N=7, q=11, a = 3+2X^2 -3X^4 +X^6$$  the inverse of $a \pmod {11}$ is  $$A=-2+4X+2X^2 +4X^3 -4X^4 +2X^5 -2X^6$$  How do we compute $A$? Why is negative times negative = positive? Someone recently asked me why a negative $\times$ a negative is positive, and why a negative $\times$ a positive is negative, etc.  I went ahead and gave them a proof by contradiction like so:  Assume $(-x) \cdot (-y) = -xy$  Then divide both sides by $(-x)$ and you get $(-y) = y$  Since we have a contradiction, then our first assumption must be incorrect.  I'm guessing I did something wrong here. Since the conclusion of $(-x) \cdot (-y) = (xy)$ is hard to derive from what I wrote.  Is there a better way to explain this?  Is my proof incorrect?  Also, what would be an intuitive way to explain the negation concept, if there is one?