I have an object, which i search the keys and modify the values if a key match is found:  var myData = // some http.get which returns a JSON object.   Imagine myData is:  myData : {     "suffix" : "mr",     "fname" : "jullian",     "lname" : "exor",     "dobGmt" : 145754294700000     "addressLine1" : "xxx",     "street" : "xxx",     "rentStartedGmt" : 145754294700000,     "deposit" : "50.00",     "occupation" : "math teacher",     "profession" : {          "careerStartedGmt": 1458755224800000,          "careerEndGmt": 1459854224800000,      } }  $scope.viewData = function() {     var objClone = _.clone(myData);     objClone = myFactory.ProcessData(objClone);     $scope.view = objClone; };  $scope.viewProducts = function() {  };   MyFactory:  myModule.factory('myFactory', function() {     return {         ProcessData: function(data) {             var tmp = data;              function findGmt(tmp) {                 for (var key in tmp) {                     var v = tmp[key];                         if (key.indexOf("Gmt") !== -1) {                             tmp[key] = tmp[key].format('DD-MM-YY HH:mm');                             }                         }                 }              findGmt(tmp);              return tmp;         }     } });   User can click on viewData button which calls $scope.viewData which displays the formatted JSON in a modal on the same page. User then clicks on viewProducts which calls $scope.viewProducts which displays a list of products in a modal on the same page.  However, after clicking viewProducts, if i go back to click viewData again, on debugging, i can see var objClone is already formatted, rather than taking a new clone of _.clone(myData);  Have a missed how to clone/not modifiy original objects?
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.
Why: a relative adverb, a conjunction ... or both? I am not familiar with the idea that an adverb can function as a conjunction at the same time. Here are a couple of sentences that are confusing me.     This is the reason why she left him.   ...and     He was transferred to New York, where he was promoted to a higher level.   The  why, where, when, and how seem to introduce a clause. Therefore, can they also be called conjunctions? If yes, would I be right in assuming that relative adverbs can function as conjunctions at the same time? How to remove "onclick" with JQuery? Is the electric force a vector or a vector field? Is it possible to get back your deleted Terraria character? Computing the inverse of a permutation I didn't understand the permutation and of course, I got this question wrong.     Compute the inverse of the following permutation:   $$ \begin{pmatrix}  1&amp;2&amp;3&amp;4&amp;5&amp;6\\ 2&amp;5&amp;4&amp;1&amp;6&amp;3 \end{pmatrix} $$   Could you please help me with this question and provide an explanation?  Furthermore, is it possible to compute the direct permutation, not the inverse one? If yes, how?  Thank you in advance! I am developing my first 2D game in Unity and I have come across what seems an important question.  How do I handle data between scenes?  There seems to be different answers to this:   Someone mention using , while other people told me this should be used to store other things like screen brightness and so on. Someone told me that the best way was to make sure to write everything into a savegame everytime that I changed scenes, and to make sure that when the new scene loads, get the info from the savegame again. This seemed to me wasteful in performance. Was I wrong? The other solution, which is the one I have implemented so far is to have a global game object that isn't destroyed between scenes, handling all the data between scenes. So when the game starts, I load a Start Scene where this object is loaded. After this ends, it loads the first real game scene, usually a main menu.   This is my implementation:  using UnityEngine; using UnityEngine.UI; using System.Collections;  public class GameController : MonoBehaviour {      // Make global     public static GameController Instance {         get;         set;     }      void Awake () {         DontDestroyOnLoad (transform.gameObject);         Instance = this;     }      void Start() {         //Load first game scene (probably main menu)         Application.LoadLevel(2);     }      // Data persisted between scenes     public int exp = 0;     public int armor = 0;     public int weapon = 0;     //... }   This object can be handled on my other classes like this:  private GameController gameController = GameController.Instance;   While this has worked so far, it presents me with one big problem: If I want to load directly a scene, let's say for instance the final level of the game, I can't load it directly, since that scene does not contain this global game object.  Am I handling this problem the wrong way? Are there better practices for this kind of challenge? I would love to hear your opinions, thoughts and suggestions on this issue.  Thanks Hot questions no longer work on iPad (ok on iPhone) I've been working with Corel Draw previously and now i use Illustrator more.Still getting used to some of their features though. I want to insert an image into a circle I've drawn but i don't know how to go about it.It is called power clipping in Corel. Any answers would be appreciated. Top bar search doesn't pick up subdomains I wanted to switch to  in the handy dandy site switcher in the new top bar. Entering "cook" brings up nothing:     ... so I have to remember that the boutique title of the site is "Seasoned Advice":     ... in which case the site switcher also thinks that maybe I was thinking of heading over to  to see what's up. So the site switcher searches site names and descriptions, but not subdomains. This is unexpected behavior - I believe it should search all three. Reprojected MODIS NDVI has range from -32768 to 32767, expected -1 to 1 Removing file / folder link after using "Save As..." then "Web Page, complete" When you right-click save-as a web page in FF, the page is saved along with a folder containing any associated media that page needs (images, js, etc).  My problem is that I want to reorganise the associated media folder, but wherever I move this folder, the saved .html file is moved as well. ARGH!   I can rename each folder, which breaks the "link" between html file and media folder, but there must be a cleaner way to do it. Does anyone else know? How to search text throughout entire file system? Show every nonempty compact Hausdorff space is not the countable union of nowhere dense sets I know this proof is somewhat similar, or related to the Baire's Category Theorem but I can't seem to figure out how to do it.  The Baire Category theorem asserts that if X is a complete metric space or a locally compact Hausdorff space (my case), then the complement of a countable union of nowhere dense sets is always nonempty.  How can I use this on the proof? I have an older iPod touch which which supports up to iOS 6.1.6 and nothing newer.  This device is equipped with a Linea Pro barcode scanner and previously had an application called "" installed.  Recently I was attempting to do some work on a web application I wrote and realized that I needed to update to a newer version of Web Barcode - but unfortunately the Apple ID saved on my device was deactivated a few years ago.  So I went to settings and updated it with my current Apple ID.  Then again tried to update the App from the Apple store.  Still no dice - it was asking me for the password on the old account.  So then I figured I'd just remove it and reinstall from scratch.  Deleted the app and went to the store but now I am met with a message that the new version requires at least iOS 8.0.  I feel I followed a very logical series of steps to update this application and while I can understand that I won't be able to install the newest version, how can I get the old version back?  The device is completely useless without the barcode scanning application and the Apple store is now refusing to install any version at all on my device.  What can I do to get the original version of this application reinstalled? How can one predict whether an individual infected with the SARS-CoV-2 virus will be asymptomatic? According to  , half of the   virus carriers show no symptoms.   What are the biological factors that determine whether an infected individual will be asymptomatic or not? What is the Big-O of a nested loop, where number of iterations in the inner loop is determined by the current iteration of the outer loop? What is the Big-O time complexity of the following nested loops: for (int i = 0; i &lt; N; i++) {     for (int j = i + 1; j &lt; N; j++) {         System.out.println(&quot;i = &quot; + i + &quot; j = &quot; + j);     } }  Would it be O(N^2) still? Today I came across an OBVIOUSLY good answer in /review. It had 7 upvotes, contained lists, paragraphs of explanation, and well-applied sample code. It was also moderately long. How does a question like this get flagged for review? I don't really know how the algorithm works.   If this is low-quality then I feel bad about all of my answers.  Here's a  if you care to see it in context. It's not really a huge problem (as Bart's comment emphasizes), but this seems like an extreme outlier in every measurable aspect. Where can I send feature requests? Where is the Task Manager? Show that $A_n=\sum\limits_{k=1}^n \sin k $ is bounded?