Can an object assigned to a constructor property be deep cloned?
What is the most efficient way to deep clone an object in JavaScript?
can CakePHP automatically create tables from models? How do I get Pokémon Go to detect my phone's orientation? When initiating a battle it starts off in AR mode, but then warns me saying my phone's orientation is not detected. I am then forced to turn off AR mode. Has anybody experienced this? If so, what are the solutions?    Per comments, I am unsure this is a permissions issue. I have everything turned on. I tried to install Ubuntu 12.10 with the Wubi installer while running Windows, because my PC does not accept my BootCD as a bootable medium.  But Wubi showed me this error:  Ubuntu-Installationsprogramm (X) Ein Fehler ist aufgetreten: Could not retrieve the required disk image files Weiter Informationen finden Sie in der Protokolldatei: c:\users\username\appdata\local\temp\wubi-12.10-rev273.log   What can I do, because I want to get rid of my Windows 7 and use the way better Ubuntu 12.10?  Thanks for your huge answer, now my next problem after trying to install wubi with the .iso is, that the same error shows up again and i am not shure which part of the errorreport you need.  Can you tell me? Because i'm not that good at linux. Is is possible to move all windows (or all not minimized windows) form one workspace to another?   I know I can move one window to other workspace with Shift+Ctrl+Alt+arrow, but it will move only that one focused window. Why teach linear algebra before abstract algebra? Is there a reason why most undergraduate curriculums put linear algebra before abstract algebra?  I'm asking this because personally it seems to be much easier to understand the architecture behind linear algebra as supposed to simply solving problems after a course in abstract algebra. How can I add a PPA from a previous release? How do I correctly clone a JavaScript object? I have an object x. I'd like to copy it as object y, such that changes to y do not modify x. I realized that copying objects derived from built-in JavaScript objects will result in extra, unwanted properties. This isn't a problem, since I'm copying one of my own literal-constructed objects.  How do I correctly clone a JavaScript object? How to set systemd for automatically force fsck disks after crash (hard poweroff)?  When I used sysvinit (in Arch Linux) as /sbin/init I used the hack: in the rc.local I create /forcefsck file; in the rc.local.shutdown I remove it. At boot-up rc.sysinit enable force fsck if /forcefsck exists.  How to do same in systemd? Maybe it has built-in facilities for automatic fsck after crush? Globally disable "include online search results" I would like to know if there is a word or phrase for a systematic campaign to annihilate every descendant of a particular ancestor.   We have the word 'genocide' for killing off an entire race, and plenty of words for killing people based on how they are related to you (fratricide, filicide, et. al.), but looking over the  and the , I couldn't find a term for systematically killing an entire bloodline.   My question is prompted by a US news story about the horrific murder of 8 members of the same family, but those murders are not an example of what I'm thinking of because the children of the victims were left alive, so the motive for the killings was not to kill off the bloodline. The sense that some group had coordinated an attack against just one family is what made me wonder what the "not an entire race, just one bloodline" version of 'genocide' would be called.   Searching the Internet for "kill off" and bloodline sends me straight into the land of vampires, Illuminati, reptilian overlords, and, naturally, Priory of Sion nonsense so I haven't had much luck finding a thread to pull.   It may be that there is no word for it in the sense of murdering a human bloodline, because we just don't attempt kill off our royals down to the last heir often enough to coin a term for it. Maybe there is a scientific term for culling a line from a test population as part of biological research? Drush installed and running; No Drupal site found even with uri specified After much trial and tribulation, I thought I had drush all ready to roar. Much excitement. But then, no joy...  Drush is working. The sites operate fine via MAMP. Regardless, a "drush cc all" command returns:   No Drupal site found, only 'drush' cache was cleared.                                          [warning] 'all' cache was cleared.                                                                       [success]   This question has stumped drupalcon attendees and very experienced developers. Any ideas?  I am on Mac OS 10.9.3 using MAMP (free) Version 3.0.5  Here is my drush status:   Drupal version         :  7.29-dev                                 Site URI               :  http://default                           Database driver        :  mysql                                    Database hostname      :  localhost                                Database username      :  db_user                             Database name          :  db_name                        PHP executable         :  /usr/bin/php                             PHP configuration      :                                           PHP OS                 :  Darwin                                   Drush version          :  7.0-dev                                  Drush temp directory   :  /tmp                                     Drush configuration    :                                           Drush alias files      :                                           Drupal root            :  /Applications/MAMP/htdocs/mysite.dev   Site path              :  sites/default       Have tried executing drush from /Applications/MAMP/htdocs/mysite.dev; from /Applications/MAMP/htdocs/mysite.dev/sites/default; and using drush cc all --uri=http://localhost/mysite.dev  Tried running drush from sites/default. Same result. Gauge fields and strings: Loop equations If I change the ISO settings on my camera, obviously the gain of the system is increased, amplifying the signal from the sensor. What's not clear to me is where the amplification takes place. I see several possibilities:   In the sensor, by increasing voltage or some other mechanism Via an analog amplifier outside of the sensor Digitally, after the signal has been digitized, but before storing data in the RAW file As a parameter applied solely in creating an image from RAW   If #4 is true, then you could take a 4-stop overexposed RAW picture at ISO 1600, and then in post processing produce a JPEG at ISO 100 that would be the same as if the original photo had been shot at ISO 100.  If #1 or #2 is true, then a RAW file shot at ISO 1600 would actually contain more information about shadows, and an ISO 100 RAW would contain more information about highlights. Applying for a UK Tourist Visa from outside country of origin Why not to extend the set of natural numbers to make it closed under division by zero? We add negative numbers and zero to natural sequence to make it closed under subtraction, the same thing happens with division (rational numbers) and root of -1 (complex numbers).  Why this trick isn't performed with division by zero? Javascript Date: next month I've been using Javascript's Date for a project, but noticed today that my code that previously worked is no longer working correctly. Instead of producing Feb as expected, the code below produces March.   My code looks something like this:   current = new Date(); current.setMonth(current.getMonth()+1); //If today is Jan, expect it to be Feb now   This code worked everyday up until today. Is this a Javascript bug or am I going about this the wrong way? Is it possible to instantiate an object at runtime if I only have the DLL name and the class name, without adding a reference to the assembly in the project? The class implements a interface, so once I instantiate the class, I will then cast it to the interface.  Assembly name:     library.dll    Type name:      Company.Project.Classname     EDIT: I dont have the absolute path of the DLL, so Assembly.LoadFile won't work. The DLL might be in the application root, system32, or even loaded in the GAC. How to do something to each file in a directory with a batch script How do you iterate over each file in a directory with a .bat or .cmd file?  For simplicity please provide an answer that just echoes the filename or file path. I have often wondered at the practice on Stack&nbsp;Overflow, Server&nbsp;Fault, and the other sites where someone will ask a question and an answer will come in that says Look here: http://link elsewhere. Rarely will the link have exactly the answer necessary -- often it's an entire article -- yet these answers get voted up.  Why is that, exactly? I realize this is subjective, but my own thoughts are that one should try and give the answer (even if the answer is 'no, it can't be done' or 'no, I don't think it can be done' -- very different answers) and then if you have a link that explains it, go ahead and post it within the answer.  What does the community think about this?     For more information, see  in the . I'm reading a lot of documentation on sed, and am still stumped on my particular use case.  I want to replace this line in a conf file with my own line:  Replace this line: #maxmemory &lt;bytes&gt; with: maxmemory 26gb  This is what I tried:  sed s/maxmemory.*bytes.*/maxmemory 26gb/ /etc/redis/redis.conf  I get the error: sed: -e expression #1, char 30: unterminated `s' command  Which stumps me because I don't know what that means. So my question is:  How can I accomplish what I want? What does that error mean? (so I can learn from it)