How to Do full copy from Slice? I an array like this  @observable data = [{a: 1}, {b: 1}, {c:1}];  @observable sampleData = [];   I want to do a slice   this.sampleData = this.data .slice(0, 1);  this.sampleData[0].a = 2;    I want "2" to effect the the record in "sampleData" not in the "data" array what is happening now.
What is the most efficient way to deep clone an object in JavaScript? What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.
Let moderators navigate the review queues at will This post is an expansion of  For many graduated sites (eg Physics), moderators do not want to apply the unilateral close vote in all cases--it is better to let some community votes pile on first.  We only use the unilateral in obvious cases then. This renders the CV queue useless to us. If we &quot;skip&quot; something, we can't get back to it. If we say &quot;do not close&quot;, it's removed from the queue and our community can't see it. If we use &quot;close&quot;, we are using a unilateral mod vote--we don't want to do that. What I propose is a set of &quot;next/previous&quot; buttons, that let us navigate the queues, looking for closeable questions, and coming back to the others later. Thoughts? Update and bounty reason Due to the recent Great Flag Overhaul, mods no longer see close flags in the flag queue. Which means that the only way to get to them is via the review queue 1 Shog's solution is ideal in this case; let mods view the close queue as a list. (In fact, a list similar to the old flag queue -- which shows a list of mods who have seen the post and what mod actions have already been taken -- would be great) On Physics, the majority of the flags that we get are VTC flags. And the community isn't always able to close things on their own, so we have to step in. However, powering through the close queue isn't an option; because &quot;skip&quot;ing a post2 leads to it being dumped into the void (I can't get back to it unless I have a link). Extremely inconvenient. Could the workflow here be improved? 1. The /tools listing for posts with outstanding close votes doesn't work because it doesn't list posts which have been flagged but not VTCd 2. which I may want to take a closer look at later; gotta be careful with the binding votes. I only have access to the server via a terminal and I can't use graphical tools such as GParted! I want to create a new partition from a part of the root (about 768mb) for swap.  # df -h Filesystem      Size  Used Avail Use% Mounted on /dev/vda         20G  1.3G   18G   7% / udev             10M     0   10M   0% /dev tmpfs           199M  4.9M  194M   3% /run tmpfs           100M   12K  100M   1% /run/user tmpfs           5.0M  4.0K  5.0M   1% /run/lock What is the Java string pool and how is "s" different from new String("s")? How do I "parent" objects? Extending a Homotopy from $X \times [0,1]$ to $X \times \mathbb{R}$ How can I check if a single character appears in a string? single email limit exceeded salesforce very frequently..? In the King James version of the Bible there is a verse like this:     The Lord is my strength, and my fortress, and my song. And He is become my salvation.   Is it still feasible to use "is become" instead of "has become" and what is the semantic difference? How to fake a package version installed? Being an early adopter and using 11.04 daily builds I sometimes meet a situation when some packages require earlier versions of other packages than those I have installed. Usually newer (but refused) versions of needed packages provide all the functionality of their older versions.  If I use dpkg -i --force-depends-version to install dependent packages everything works fine, I've never seen a problem.  Instead of manually downloading and installing every package, can I just make the system pretend there is a specific package version installed when there is a newer? Or is there a --force-depends-version key equivalent for apt-get? This is a  about setting up .     I have an office with many computers that share a single external ip (I'm unsure if the address is static or dynamic). Each computer connects to our mail server via IMAP using outlook. Email is sent and received by those computers, and some users send and receive email on their mobile phones as well.  I am using  to generate an SPF record and I'm unsure about some of the fields in the wizard, specifically:   Enter any other domains who may send or relay mail for this domain Enter any IP addresses in CIDR format for netblocks that originate or relay mail for this domain Enter any other hosts which can send or relay mail for this domain How stringent should SPF-aware MTA's treat this?   the first few questions i'm fairly certain about... hope i have given enough info. In the definition of a field one of the required properties is that  every element other than zero has a multiplicative inverse.  It's vague whether the zero is forced not to have an inverse or not, as in is the property  every element other than zero has a multiplicative inverse and zero does not  or  every element other than zero has a multiplicative inverse and zero may or may not?  Regardless, what differences would occur if we adopted one definition as opposed to the other? Sort arrays of primitive types in descending order Isometry from Manhattan plane to Euclidean plane? Does there exist an isometry from a Manhattan plane $A$ to a Euclidean plane $B$? I.e. a function $\varphi:A \to B$ that suffices $\|\varphi(a)\|_B = \|a\|_A$ for all $a \in A$, where  $\| \cdot \|_A$ is the Manhattan norm and $\| \cdot \|_B$ the Euclidean norm. From the  on the dual of a norm:  $X$ and $Y$ are normed spaces, and we associate with each $f\in L(X,Y)$ (the space of bounded linear operators from $X$ to $Y$) the number $$\|f\| = \sup\{|f(x)|:x\in X, \|x\| \leq 1\}.$$  At some point in the proof that $L(X,Y)$ is bounded, it seems like they use the inequality $$\|fx\| \leq \|f\|\cdot\|x\|,$$ where $\|x\|\leq 1$.  I can't see why this should holds.   $\|f|\|$ is the supremum of what $|f(x)|$ can be, given that $\|x\|\leq 1$. So, given that $\|x\| \leq 1$, $|fx|$ should be bounded by $\|f\|$. But why should it be bounded by $\|f\|\cdot\|x\|$? Association Reputation Bonus on preexisting sites I've been wondering, what is the general form for the integral of $\sin(\cos x)$? I tried integrating it myself and couldn't, tried with Wolfram Alpha and it couldn't either. If you think about it conceptually, it should have a general form as it's graph if just like sin and cos, which both have general forms. If it doesn't have a general form, I'd like to know why. Thanks! Passing a dictionary to a function as keyword parameters I'd like to call a function in python using a dictionary.  Here is some code:  d = dict(param='test')  def f(param):     print(param)  f(d)   This prints {'param': 'test'} but I'd like it to just print test.  I'd like it to work similarly for more parameters:  d = dict(p1=1, p2=2) def f2(p1, p2):     print(p1, p2) f2(d)   Is this possible? Escape Key in the Chat Is there a word for one side in a pair? Is there a word for one side in a pair? In a conversation it would the the interlocutor, but I'm looking for a generic term. View the change history of a file using Git versioning How can I view the change history of an individual file in Git, complete details with what has changed?  I have got as far as:   git log -- [filename]   which shows me the commit history of the file, but how do I get at the content of each of the file changes?  I'm trying to make the transition from MS SourceSafe and that used to be a simple right-click → show history.