How to copy a JavaScript object?
What is the most efficient way to deep clone an object in JavaScript?
When a ball moves to the right, friction acts to oppose the motion, in other words, to the left. However, when a car travels around a bend, the friction acts in the perpendicular direction to the car's velocity and provides the centripetal force. I just cannot understand why friction would act in that direction. The new top bar layout is fine, but the black color is very visually jarring/intrusive.  Is using a lighter color an available option? "No such file or directory" when trying to remove a file, but the file exists? I am trying to remove a png image that was uploaded to my server via a PHP script. Whenever I try to delete it both through ftp and terminal, I get the error   No such file or directory   However, when I ls in the dir, the file is listed and it is also listed in my ftp client. I have tried creating a file with the same name and I end up getting two files with the same name.   I can open the file that supposedly does not exist, but I still can't remove it. I have also tried rebooting my server. Any ideas what may be the issue? I am running a 64 bit version of Ubuntu, but I don't think its a 32/64 bit issue. I should also note I have removed many other png files uploaded by the same PHP script.  Output for ls -l  total 224  -rw-r--r-- 1 www-data www-data 222838 May 13 04:14 qyxdshyikfr_fishing_timeout.png  -rw-r--r-- 1 root root 272 May 14 06:54 upload.php   Output when trying to rm  rm: cannot remove ‘qyxdshyikfr_fishing_timeout.png’: No such file or directory   upload.php: External hard disk detection issue what exactly happened:  I have a Seagate 1 TB external hard disk.It was working fine till now.The problem started when I plugged it in my android phone and then back in my pc then simply it does not showup anywhere and :  It does not appear in file explorer   It does not appear in disk management   It is not listed in Diskpart command   It only appears in Device Manager under disk drives   It does not appear in BIOS  only makes sound when plugged and unplugged.  disk spins and light is also showing.   . What I already tried:   updated usb drivers.  used new cable also.  plugged in another pc  usb mass storage is also enabled in BIOS  no issue in any usb port  Anything else i can do? What is code coverage and how do YOU measure it?  I was asked this question regarding our automating testing code coverage. It seems to be that, outside of automated tools, it is more art than science. Are there any real-world examples of how to use code coverage? Bash scripts ran from from gnome/nautilus don't have environment variables How can I use multiple overlay effects simultaneously in Photoshop? There are 3 overlay effects available in Photoshop as layer styles: Color, Gradient and Pattern. The problem: these effects come in a strictly fixed order!  Is it possible to make a translucent Gradient Overlay over a Color Overlay using only layer styles? Or a Multiply Pattern and Color Overlays? Number of ways to connect sets of $k$ dots in a perfect $n$-gon I install virtualBox on Ubuntu 16.04, but after install and create new virtual Host shows this error:     Kernel driver not installed (rc=-1908)      The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please install virtualbox-dkms package and load the kernel module by executing  modprobe vboxdrv       as root. If it is available in your distribution, you should install the     DKMS package first. This package keeps track of Linux kernel changes and   recompiles the vboxdrv kernel module if necessary.  where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.     How to address this modprobe vboxdrv error? Why does kinetic energy increase quadratically, not linearly, with speed? As  says:     [...] the kinetic energy of a non-rotating object of mass $m$ traveling at a speed $v$ is $\frac{1}{2}mv^2$.   Why does this not increase linearly with speed? Why does it take so much more energy to go from $1\ \mathrm{m/s}$ to $2\ \mathrm{m/s}$ than it does to go from $0\ \mathrm{m/s}$ to $1\ \mathrm{m/s}$?  My intuition is wrong here, please help it out! Pagination not working with custom loop I've got a custom loop that I'm using to display some Real Estate listings that will be available within 60 days. I'm calling it with the following function:   &lt;?php  $sixtydays = date('Y/m/d', strtotime('+60 days')); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $query = new PostsOrderedByMetaQuery(array(   'post_type' =&gt; array('post', 'real-estate'),   'meta_key' =&gt; 'Time Available',   'meta_compare' =&gt; '&lt;=',   'meta_value' =&gt; $sixtydays,   'paged' =&gt; $paged,   'orderby_meta_key' =&gt; 'Price',   'orderby_order'    =&gt; 'ASC' )); ?&gt; &lt;?php while ($query-&gt;have_posts()) : $query-&gt;the_post(); ?&gt;   While the loop works great, I can't get it to paginate. It shows the first 10 (my default) posts but doesn't show the pagination. The only way to display all posts is to show them on one page by adding 'posts_per_page' =&gt; -1, I have similar loops on other pages that have no problem paginating. The only difference with this one is that there are two meta keys that are filtering the posts.   I'm using WP Page Navi for this and the rest of my pages. I'm closing the loop and adding the pagination using the following code:   &lt;?php endwhile; // End the loop. Whew. ?&gt; &lt;?php wp_pagenavi(); ?&gt; &lt;?php wp_reset_query(); ?&gt;   How can I go about fixing this? I am often logged in several SSH sessions at once. To logout from several sessions, I press CTRL+d, until I am back on my local machine. However, I occasionally press it once too many, and my terminal exits. Is there a way to make CTRL+d unable to close my terminal ? I am using terminator as my terminal emulator. $T$ self-adjoint on Hilbert space $H$, $T^n=T^{n+1}$ will $T$ be an orthogonal projection operator? I have seen several answers and proofs here at MSE that a self-adjoint operator $T$ on a Hilbert space $H$ where $T^2=T$, implies $T$ being an orthogonal projection operator.   The thought struck me; what would happen if the condition $T^2=T$ is replaced by $T^3=T^2$ or instead by $T^4=T^3$ or why not more generally by $T^n=T^{n+1}$ for some $n\in\mathbb{N}$? Would this still imply $T$ to be an orthogonal projection operator?  I guess someone must have thought of this before me? In that case perhaps there is a reference in the literature for this or perhaps the proof is way simpler than I might expect? /A problem from the 2012 MIT Integration Bee is $$ \int_0^1\frac{x^7-1}{\log(x)}\mathrm dx $$ The answer is $\log(8)$. Wolfram Alpha gives an indefinite form in terms of the logarithmic integral function, but times out doing the computation. Is there a way to do it by hand? How do I set an environment variable on the command line and have it appear in commands? Whoa! What is this "Linked" thing? As per the title, what is this new feature? Where does Drupal store its content? I have been currently learning Drupal while trying to duplicate a Drupal application into CakePHP.  I have been looking at the  database tables to know where data is being stored so I can safely migrate any data or study how it is working.  I have researched and have come across questions like:     So far, I have only seen the title in my Drupal (7) installation.  What I have seen in my node revisions table for a recipe content type, which includes fields like, field_ingredients, field_instructions, field_description, field_preptime, field_cookingtime, just the title of the recipe. This is a sample record on my node_revision table.  nid   |  vid  |  title         |  log   | timestamp  | status | comment | promote  | sticky ------------------------------------------------------------------------------------------- 1     |  1    |  Awesome Sauce |        | 1369998600 | 1      | 2       | 1        | 0   As you can see I can only see the title. Where are the other field contents? Where are the images from  coming from?  Where are they being saved on my system?  Is there any way for me to point this at my own source of images? Kinematic Viscosity I found several very-close-to-duplicate questions/answers. However, I want to restate some questions and discuss the answers from these questions.  Here the questions which I found:         I find it quite unfair that super simple questions and their answers upvote give the same amount of reputation points per upvote as complex questions. I think reputation points should be much closer linked to contribution. And I think that contribution in answering/asking a simple question (both in time, value and time saved to other developers) is way less than for some more complex questions.   Why doesn't Stack&nbsp;Overflow change this?  I saw several common answers:     if you change the game, then the only result is that people will game it differently.   I agree only partly with this. Sure, people will always game the system. However, any improvement can be rejected based on this argument. I believe if there is an obvious problem, it makes sense to fix it. And it looks like this question was asked number of times (meaning that it's not only me thinking that it should be changed).     Reputation is NOTHING more than an INCENTIVE to contribute.   Again. I agree only partly. Reputation doesn't have any real value (it can't be converted to anything). However, let's be honest. People are competitive and people like to have some measurement stick and most of software developers want to have a fair game. Based on this, reputation isn't NOTHING, reputation is very important tool which makes Stack&nbsp;Overflow popular. Calculating reputation one way or another way may lure or discourage people from participating.     Esoteric questions are only of interest to people working with that item.   I believe one of the biggest values of Stack&nbsp;Overflow that it contains a lot of information which is hard to find somewhere else.  So, sure, there are some rare questions which aren't valuable to the whole community. But, I would say that a question which saves 25 people a day of work (complex question) is more valuable than a question which saves a 1000 people 3 minutes of googling (simple question).  My summary:  I believe it makes sense to change a system a little bit. The simplest way would be the ability to mark a question as trivial. If some number of people marked the question as trivial (let's say 10), all upvotes for this question/answers become less valuable (for example, 1 or 2 points, instead of 5). This will close this gap.