i make stack2[0].matrix refer to stack1[0].matrix, but after i change stack2[0].matrix, the stack1[0].matrix is changed too. why is this happen? and how can i keep stack1[0].matrix value?  thank you     let Number = function(){     this.matrix = [         [1, 2, 3],         [4, 5, 6]     ] }  stack1 = []; stack2 = [];  stack1.push(new Number); stack2.push(new Number); stack2[0].matrix = stack1[0].matrix; stack2[0].matrix[0][0] = 5;  console.log(stack1[0].matrix); console.log(stack2[0].matrix);
The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?
History substitution fails when implemented in shell script The below command works in command line  rsync -avh -r /Source/09_03_2016/ /Destination/ echo $(basename !:3)      Output 09_03_2016   But when I do this in shell script it does not work  #! /bin/bash  /usr/bin/rsync -avh -r /Source/09_03_2016 /Destination/; echo $(basename !:3)      Output  !:3 What is the minimum value of $(1 + a_1)(1 + a_2). . .(1 + a_n)$? Suppose $a_1, a_2,\dots , a_n$ are $n$ positive real numbers with $a_1a_2 \dots a_n = 1$.   Then what is the minimum value of $(1 + a_1)(1 + a_2). . .(1 + a_n)$ ?    I think $(1 + a_1)(1 + a_2). . .(1 + a_n)$ takes its minimum value when $a_1=a_2=\dots=a_n=1$ and thus the minimum value is $2^n$.  I don't know how to prove it. Please help. Proof of a limit for a recursively-defined sequence I have a sequence defined by $$ a_1=1,\quad a_2=1,\quad a_n=\frac{1}{a_{n-1}}+\frac{1}{a_{n-2}}\text{ for } n\ge2. $$ Now, if $\lim_{n\to \infty}a_n=g$ then $\lim_{n\to \infty}a_n=\lim_{n\to \infty}\Bigl(\frac{1}{a_{n-1}}+\frac{1}{a_{n-2}}\Bigr)=\frac{2}{g}$ so $g=\sqrt{2}$ or $g=-\sqrt{2}$ but $a_n&gt;0$ so $g=\sqrt{2}$.  Now, how do I prove that it has an actual  limit? Also, it can be proven that $1\le a_n\le2$, and it's not monotonic because $a_4 \gt a_5 \lt a_6$. Also, it's not monotonic after some $N\in\mathbb N$ Do parts of a hash carry the properties of the entire hash? When I need to generate unique id's based on some information hashing is typical choice. However, sometimes that id needs to be of a particular size.  I've seen a lot of schemes (HMAC-MD5-96 in SSH, CGA in SeND for IPv6) that use a portion of a hash, so I'm thinking it might be alright to use it that way.    Which properties of a hash are preserved and which do not apply anymore?  Obviously, with less bits, the chance of collision goes up, but can I still rely on the partial hash for uniform character distribution?  What about the ?  I'm guessing that if a hash modifies the entire hash upon the smallest change to the input, that would imply that a portion of that hash would be equally well changed.  Am I thinking about this correctly?  Also, would these behaviors be different for different hashing algorithms? Recovering Crashed Flash drive? So my friend has a USB flash drive that isn't working. I don't know a whole lot about "recovery" software so I figured I'd ask you guys.  What steps can I try (I have access to a Linux machine as well) to see....if I can get ANYTHING off the flash drive?  I've google'd around, but most of the stuff seems for windows. How did this question get a 'linked' question that isn't mentioned in comments or answers? Looking at  which has been closed as a duplicate (quite right), we see three 'linked' questions in the sidebar; however, only two of those questions are given as duplicate-close-targets.  which to my mind is the actual 'exact duplicate', isn't mentioned anywhere else except in the 'linked questions' sidebar itself! The  says:  The Linked sidebar... gathers up any links to this question provided by the community via comments, answers, or questions  So how did  get into the linked questions sidebar of ? (There's no explicit link in the other direction, in case you were wondering.) Proving surjectivity of $\cos(z)$ and $\sin(z)$ and find all $z : \cos(z) \in \mathbb R$ and all $z: \sin(z) \in \mathbb R$ When flagging, there are two special case options: spam and rude or abusive.   What is spam, and when should I flag content as such? What is considered offensive, rude or abusive content? How does the spam flag differ from the rude or abusive flag? What is the effect of these special flags? When are these flags removed? Combining two covariance matrices I'm calculating the covariance of a distribution in parallel and I need to combine the distributed results into on singular Gaussian. How do I combine the two?  Linearly interpolating between the two almost works, if they are similarly distributed and sized.   provides a forumla at the bottom for combination but it doesn't seem right; two identically distributed distributions should have the same covariance, but the formula at the bottom of the page doubles the covariance.  Is there a way to combine two matrices? "as much as you and I" vs. "as much as you and me" How to send form input values and invoke a method in JSF bean iOS 7 Locked Bug via Ubuntu 13.10 I wanted to bring up an issue with the latest Ubuntu release that I hope can be solved. Although I will agree with the community that iOS 7 is not the most open platform release, it still is my desire to be able to grab Photos, Music, and Files off my Phone similar to what I would do to any other device.  Every time I connect my device to Ubuntu, I receive the following notification:  The device "Justin's iPhone" is locked. Enter the passcode on the device and click "Try again".   On my iPhone, I select the following   Unfortunately, this is where problems start to arise. It appears that Ubuntu either does not recognize the permissions from my iPhone or the iPhone is not allowing itself to truly be unlocked. As we can see the permissions are   Browsing askubuntu, I encountered the following   After running the code, I receive the following error:  justin@justin-CT15:~$ idevicepair unpair &amp;&amp; idevicepair pairERROR: Device d1fea2c56e51199f901eb34020a1581ea31a2a50 is not paired with this host   If I call the command again, i receive another error:  justin@justin-CT15:~$ idevicepair pair ERROR: Could not pair with the device because a passcode is set. Please enter the passcode on the device and retry.   Ultimately, I am stuck to experiment with solutions that end up not working. I am troubled by the lack of information and support for the iOS 7 platform on Ubuntu's latest release. If anyone has a workable solution or experiment for a workaround, I am happy to try  Thanks for reading and have a wonderful day! What's the main difference between int.Parse() and Convert.ToInt32 What is the main difference between int.Parse() and Convert.ToInt32()? Which one is to be preferred Lie Algebra of U(N) and SO(N) Work done in adiabatic process Particle speed and density I am using a Particle system to simulate falling dust / debris. The particle start and end fairly quickly. They should look like a short burst of falling dust.  I cant figure out how to get the particles to fall at slightly different speeds.  The particles should be falling downwards with very little Brownian motion.  The fact that the particles are falling at the same speed makes them look odd / too uniform (almost like a static image of some particles which is moving down rather than individual particles.  Also the particles end at a set frame so I get a uniform trailing edge (as below).   A bit of air drag helps a bit but not much.  Question 1. how to vary the downward speed of the particles?  Question2. Can the density of particles be animated so I can brake up the distribution?  Thanks Oliver I have understood how ridge regression shrinks coefficients towards zero geometrically. Moreover I know how to prove that in the special "Orthonormal Case," but I am confused how that works in the general case via "Spectral decomposition." So this is something I just found out about that I find odd:   Opportunity attacks—trigger off of movement that uses the creatures movement (action, move action, bonus action, reaction.)  Sentinel—Whenever a creature within 5 ft of you makes an attack at a creature other than you.   Booming blade—If the target willingly moves.   Mental Prison spell—if it moves, attacks through it, or reaches any part of body out of it.   So the “willingly” is different than other rulings for how effects related to movement works. However what exactly fits willing?   Cause fear—nope magic is having them move. Dissonant whispers—same thing. They have to immediately move.   So the creature has to want to move completely of its own accord.   Crown of Madness—Humanoid creature you choose must make a wisdom saving throw. On a fail it is charmed by you. (Next is flavor text so skipping.) While charmed in this way the target must make an attack on a creature other than itself that you mentally choose on each of its turns before moving.  It can act normally if you choose no creature or if none are within reach.   Crown of madness isn't making them move but doesnt specifically say willing.  And if the ruling for willing is movement not caused by magic what about magic causing situations where you take damage if you don't move. Would a creature shimmering with evocation energy be spared because he moved out of the magical blender that is cloud of daggers? If no, then what is the go-to rule for willing movement that I should be using?  In short, what movement counts as willing, and where can it be found? Is moving out of obvious danger caused by magic, willing? Is moving away from an ally so you don't hit them, willing?   If there isn't any actual ruling on willing, that's fine; I'll go back to running it with my interpretation, so that it has same wording as AOO. If there is an actual 5e term or explanation for willing (that isn't Sage Advice), please let me know. I just don't see why it was necessary to put a term in the spell that isn't used anywhere else. I understand it could have been overlooked since it was in a splatbook or has just been ignored since most people probably assume that there is "Forced " and "Willing" movement, with the willing being defined as: any movement from an action, move action, bonus action, or reaction. In same way AOO work. t-test for partially paired and partially unpaired data Why do shadows from the sun join each other when near enough? I was laying on my bed, reading a book when the sun shone through the windows on my left. I happened to look at the wall on my right and noticed this very strange effect. The shadow of my elbow, when near the pages of the book, joined up with the shadow of the book even though I wasn't physically touching it.   I have posted :The video seems to be the wrong way up, but you still get the idea of what is happening.  What is causing this? Some sort of optical illusion where the light gets bent?  Coincidentally, I have been wondering about a similar effect recently where if you focus your eye on a nearby object, say, your finger, objects behind it in the distance seem to get curved/distorted around the edge of your finger. It seems awfully related...  EDIT: I could see the bulge with my bare eyes to the same extent as in the video! The room was well light and the wall was indeed quite bright.