let response = {     data1: {        names: [&quot;John&quot;, &quot;jim&quot;]     },     data2: {        ages: [34, 24]     } }  I want: data: {    names: [&quot;John&quot;, &quot;jim&quot;],    ages: [34,24] }  Is there a way to merge these into 1 object without referencing response.data1 and response.data2?  I know I can do const newObj = {...response.data1, ...response.data2} or Object.assign({}, response.data1, response.data1)...  Can I do via a for in loop?
I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.
I wanted to send a single email to different users. I save an email to drafts and send the email to a user and it goes to the sent box instead of staying in the drafts box. Is there a way I can send an email repeatedly from the drafts box? What is the meaning of double pound symbol (number sign, hash character) ##1 in an argument? Lemma vs. Theorem I've been using Spivak's book for a while now and I'd like to know what is the formal difference between a Theorem and a Lemma in mathematics, since he uses the names in his book. I'd like to know a little about the ethymology but mainly about why we choose Lemma for some findings, and Theorem for others (not personally, but mathematically, i.e. why should one classify a finding as lemma and not as theorem). It seems that Lemmas are rather minor findings that serve as a keystone to proving a Theorem, by that is as far as I can go.  NOTE: This  doesn't address my concern, so please avoid citing it as a duplicate. Mathematical precise definition of a PDE being elliptic, parabolic or hyperbolic what is the general definition for some partial differential equation being called elliptic, parabolic or hyperbolic - in particular, if the PDE is nonlinear and above second-order.  So far, I have not found any precise definition in literature. What are these dark spots in my pictures? I've been seeing these dark spots in my pictures. They appear a lot more on some pictures than others, but they are in the same place in the image and independent of the lens being used. Is this dust? I've also heard that you can get oil spots on the sensor.  The image is from a Nikon D7000. Circular Dependencies? How do I install gfortran? I am trying to install gfortran in my computer with Ubuntu 12.04 by using these commands,  sudo -i apt-get update apt-get install gfortran   but I found the program saying "unable to locate package gfortran". Then on a Ubuntu page I found some question regarding the same problem and I went through the solution from them but again I couldn't install the gfortran package.  Can anybody tell me how to install it? I'm using a custom class file.  My main file looks like this:  \documentclass[12pt,a4paper]{thesis} \begin{document} \frontmatter     \pagenumbering{alph}      \pagenumbering{roman}     \clearpage      \cleardoublepage     \tableofcontents     \clearpage     \listoffigures     \clearpage     \listoftables   \mainmatter        \part{test}       \input{test} \end{document}   If I put this in my test.tex it does work:  \chapter{test} \label{chapter:test} test    When it becomes more text (lets say 40x the word "test") I get the error stated in my question title.  To test it I brought my class file down to this:  \ProvidesClass{thesis} \NeedsTeXFormat{LaTeX2e}  % Based on the memoir class \DeclareOption*{\PassOptionsToClass{\CurrentOption}{memoir}} \ProcessOptions \LoadClass{memoir}   I'm totally confused what is causing my error now.  This is the complete error:  ! pdfTeX error (font expansion): auto expansion is only possible with scalable  fonts. \AtBegShi@Output ...ipout \box \AtBeginShipoutBox                                                    \fi \fi How to increase body height? I am an adult, and I want to be taller. I know about many medicines which claim to treat stunted height.  Is there any truth behind these? If string is stretched just by weight, where does the gravitational potential energy goes if only half is converted to elastic potential energy? If a spring is stretched by a weight of mass m, (so the extension is $\Delta x$) then $ k = \frac W{\Delta x} = \frac {mg}{\Delta x}$. So $ k\Delta x= mg $.  When the Spring is stretched by distance $\Delta x$ (by the weight) then it looses gravitational potential enegry. ($ \Delta GPE= mg\Delta x$)  But, when we calculate the change in elastic potential energy, We get  $ U = \frac 12 k(\Delta x)^2 $. Since $ k\Delta x = mg$, $U=\frac 12 mg\Delta x$  At, equilibrium we have no kinetic energy $E_k = 0$  Doesn't that violate Energy Conservation?  Where does the rest of lost GPE goes?  Here's a illustration How to prevent mail from our website going into spam mail of users? I work for an educational services company based in India. We've around one million students enrolled as users. We're frequently facing the problem of our bulk mailers regarding upcoming exams, new product launches and promotions going into spam mail folders of the students. Is the problem in the headlines? Or where else? what can we do to reduce this number?   This is killing us, we cannot have an impossibly large precentage of mails not being opened..Please help. Pointing the camera in a particular direction programmatically I'm trying to use Python to place a camera. I know the camera's location, and the forward and up vectors for the camera (i.e. the direction it's pointing and its orientation). How do I do this?  I know that it's possible to calculate a raw world matrix from the above information, which I can then apply to the camera, but I was rather hoping not to have to. Is there an easier way? Install Nvidia driver instead of nouveau I've installed Ubuntu 14.04 and I'm experiencing a fuzzy/blurry screen and bad support for multiple screens.  I realized that Ubuntu installs nouveau as default, but I need to install nvidia drivers, so I tried this:   sudo apt-add-repository ppa:ubuntu-x-swat/x-updates apt-get update apt-get install nvidia-current apt-get upgrade       Now that nvidia is installed, you need to blacklist the nouveau driver   so it don’t pop out when you will reboot. Create or edit the following   file:  nano /etc/modprobe.d/blacklist-nouveau.conf       …and add these lines at the end:  blacklist nouveau blacklist lbm-nouveau options nouveau modeset=0 alias nouveau off alias lbm-nouveau off    I checked via the software &amp; updates if nvidia driver got installed successfully, and it says the driver installed is nvidia 304.117  I then tried to run:  lshw -c video | grep 'configuration'   and the result is that the driver is still nouveau:  configuration: driver=nouveau latency=0   So how do I install and use the nvidia drivers? Sql Server Indexes Include Primary Key? Compute the mean of $(1 + X)^{-1}$ where $X$ is Poisson$(\lambda)$ Question  Let $X$ be Poisson with parameter $\lambda$.  Compute the mean of $(1 + X)^{-1}$. (Introduction to Probability Theory, Hoel, pp. 104)  Answer Key  The answer key shows that the mean is $\lambda^{-1}(1 - e^{-\lambda})$  My Solution  $$E(1 + X)^{-1} = \sum\limits_{j = 1}^\infty (1 + j)^{-1} \dfrac{\lambda^{(1 + j)^{-1}}e^{-\lambda}}{(1 + j)^{-1}!}$$ $$= e^{-\lambda} \sum\limits_{j = 1}^\infty \dfrac{\lambda^{(1 + j)^{-1}}}{((1 + j)^{-1} - 1)!}$$ $$= \lambda^{-1} e^{-\lambda} \sum\limits_{j = 1}^\infty \dfrac{\lambda^{(1 + j)^{-1} - 1}}{((1 + j)^{-1} - 1)!}$$ $$= \lambda^{-1} e^{-\lambda}(e^{\lambda} - 1)$$ $$= \lambda^{-1}(1 - e^{-\lambda})$$  EDIT: I found why I got the answer incorrect.  Thanks for those who answer the question! :) How do you copy the contents of an array to a std::vector in C++ without looping? How to exclude some files from filename expansion mechanism in bash? Key to get help about current function Can the notion of vector space or algebra over a field be meaningfully extended to fractional dimensions, so that for example $\mathbb{R}^{-2/3}$ makes sense? Has this been explored somewhere?  I know that super vector spaces can be thought of as one way of generalizing vector spaces to negative integer dimensions. Is there a similar concept for dimensions that are rational numbers? I'm not talking about Hausdorff dimension, because it doesn't allow for negative rationals, and I'm rather looking for extensions from a more algebraic point of view (dimension as the trace of the identity map), without recurring to a given metric. Story about main character with regeneration powers I read a book 10+ years ago where the world was ruled by various factions, each one had a special ability of some sort. The main characters faction had regenerative ability. Another faction had the ability to speed up or slow down time. I am not sure of the plot, but I know at one point he is injured so badly he starts growing a clone which he attempts to kill, but comes back later in the story.    Any ideas?