I have a hard time understanding why I should define properties on the constructor class or its prototype object.  Here what i understand about prototype  - declaring properties in prototypes (instead of the linked parent object) saves performance since each child object will not have its own COPY of the parent's properties.   Question: But I thought you can't copy values from non-primitive types i.e. function objects only pass references... and can only copy from primitives?   **Does this mean if I inherit parent's methods like below I am copying the reference to the methods or actually copies? **  function Parent() {    this.name = "jeff"; }  var child = new Parent(); console.log(child.name); /// is copied from parent or the reference is copied??    In the following example, I am referencing the prototype... right?  Parent.prototype.age = 9; child.age // I looks at the parent class, then reference to prototype.age.   ****Question 2:** If i can change the prototype.age for a particular object, then I'm actually copied the value right? So what's the point i.e.**  child.age = 10; // changed the value for THIS object
What's the difference between  var A = function () {     this.x = function () {         //do something     }; };   and  var A = function () { }; A.prototype.x = function () {     //do something };
Looking for a scifi novel with advanced pheromone technology The website I'm working is allegedly going to have a massive hit rate soon after launch. The client is talking about the possibility  of around 2500 hits per second over a day or so.   Ignoring the fact that this hit rate is probably wild client optimism and apart from getting the largest servers possible, what is the best way that Drupal should be configured to support a large hit rate.  I've read Scaling the , ,  and many other pages, but what I'm looking for is real experience of doing this, what works, what doesn't, and what to expect. verifying an incorrect integrating factor I was doing some practice problems that my professor had sent us and I have not been able to figure out one of them. The given equation is:  $-y^2dx +x^2dy = 0$  He then asks us to verify that:  $ u(x, y) = \frac{1}{(x-y)^2}$  is an integrating factor.   I multiplied through to get:  $\frac{-y^2}{(x-y)^2}dx + \frac{x^2}{(x-y)^2}dy = 0$   However, the partial derivatives of these do not equal each other so I am a bit confused... PCA and proportion of variance explained A dollar amount $\${-}67.9{-}$ is divisible by 72. What is this number? A client buys 72 turkeys. On the receipt, 2 digits are missing, the first and the last. So, the total price is $\${-}67.9{-}$. Find a way to make the price of each turkey round at the second digit without trial-and-error method.  So, the answer is obviously $\$5.11$/turkey, so $\$367.92$ total. I found that with with 2-3 trial-and-error.  I bypassed his problem by using python and made a script that tries every combination and assures it is divisible by 0.01.   Please help me find a mathematical way of solving this problem. How to import an FBX file into Blender I am trying to import an FBX file from Unity into Blender. Does anybody know how to do that? How to send emails and avoid them being classified as spam? What is the limiting factor in lens construction when it comes to f-stop values? How to install the Boot-Repair tool in an Ubuntu live disc? When the bootloader (GRUB) is broken, I cannot access neither Ubuntu nor Windows.  I heard that an easy solution to fix this is to use the Boot-Repair tool from an Ubuntu liveCD (or liveUSB).  What are the steps to do this? Infectious chicken pox My 21 year old son has chicken pox and has been home for a few days now. The spots are just starting to crust over.  I work with elderly people but have had chicken pox as a child - should I carry on working while he is here (hes usually away at Uni) and infectious? Prove $3(x^2y+y^2z+z^2x)(xy^2+yz^2+zx^2)\ge xyz(x+y+z)^3$ if $x,y,z$ are positive real numbers,Prove:$$3(x^2y+y^2z+z^2x)(xy^2+yz^2+zx^2)\ge xyz(x+y+z)^3$$ Additional info:$\sum_{cyc}$ denotes sums over cyclic permutations of the symbols $x,y,z$. I'm looking for solutions and hint that using Cauchy-Schwarz and AM-GM because I have background in them.  Things I have done: Writing Left hand side in expanded form:$$LHS=3(\sum_{cyc}x^3y^3+\sum_{cyc}xy^4z+3x^2y^2z^2)$$ Right now I don't have good idea were to start(Is expanding and looking for AM-GM is good?).So any hint is appreciated. Source : This inequality can be found as Problem 42, page 13, in the book &quot;Old and New inequalities&quot; by Titu Andreescu, where it is attributed to Manlio Marangelli. barchart with pgfplot - missing bar I am using PGFplot to make a barchart. There are 4 entries in my csv file and unfortunately I have only 3 bars in my figure.   my LaTeX code:  \begin{figure}     \centering     \begin{tikzpicture}          \begin{axis}[             x tick label style={/pgf/number format/1000 sep=},                 xlabel=Sequence,             ylabel=Heigth,                 ymin=0.7,             enlargelimits=0.05,             legend style={at={(0.5,-0.15)},                 anchor=north,legend columns=-1},             ybar interval=0.7,             width=\textwidth,             ]             \addplot table [col sep=comma,trim cells=true,y=height] {numericaltests/data/test.csv};              \addplot[red,sharp plot,update limits=false]                 coordinates {(-1,1.00) (34,1.00)}                 node[above] at (axis cs:15,1.00) {};             \legend{Ca2Fe2As2}         \end{axis}     \end{tikzpicture}     \caption{Sequence}     \label{fig:sequenceHeight} \end{figure}   my test.csv file:  sequence,height 1,2.0 2,1.5 3,1.8 4,2.4   Barchart: I am having issues with input in VMware Workstation Player 12 in windowed mode or on multiple screens. When typing something in the VM and moving mouse cursor out of the VM without clicking on anything (for example on the second screen with host OS), the typing in that VM stops until I move the cursor back into VM.  Can this feature be disabled somehow so I am able to type in the virtual machine even when cursor is outside of it?  Both guest and host are Win10 x64 OS. It's a really simple question. However I didn't see it in books and I tried to find the answer on the web but failed.  If I have two independent random variables, $X_1$ and $X_2$, then I define two other random variables $Y_1$ and $Y_2$, where $Y_1$ = $f_1(X_1)$ and $Y_2$ = $f_2(X_2)$.  Intuitively, $Y_1$ and $Y_2$ should be independent, and I can't find a counter example, but I am not sure. Could anyone tell me whether they are independent? Does it depend on some properties of $f_1$ and $f_2$?  Thank you. I want to show the IP address like below  lo : 127.0.0.1  eth0 : 192.168.5.123 eth1 : 192.172.0.212 wlan0 : 10.1.0.124   I'm able to print all IP address by ifconfig | awk '/inet addr/{print substr($2,6)}'. But it is only printing the IPs. Every system have their own interface names and addresses. So my script has to show their interfaces with respect to IP addresses. Can you ready an action for "immediately before my next turn"? What is the name of this castle part? Health decreasing for no apparent reason I am playing Dragonborn DLC. I am currently going through one of the black books quests and even though I am not fighting my health bar keeps going down. I can heal back up to full again but it keeps disappearing. If I do not heal I will die in about 30 seconds.  I have no disease or nothing is visible anyway, no clue as to what's wrong. I can leave the black book quest or fast travel to a different location or rest for 24 hours but still the health disappears. Why is it important to override GetHashCode when Equals method is overridden? If a function $f(x)$ is Riemann integrable on $[a,b]$, is $f(x)$ bounded on $[a,b]$?