Display entirety of a JSON object in the console.log in Chrome without using JSON.stringify()
What is the most efficient way to deep clone an object in JavaScript?
16.04 LTS upgrade alert- How to handle it? I am running Ubuntu 14.04 LTS. Today when I logged into my computer I got an update alert saying that I could upgrade to Ubuntu 16.04 LTS. The other options were not now or do not upgrade. If I chose to upgrade will it delete my /home directories and the installed software under /opt and /usr/local ? I had recently faced a problem:     Solve the Diophantine Equation $x^2 - y! = 2001$.   Solving it was quite easy. You show how $\forall y \ge 6$, $9|y!$ and since $3$ divides the RHS, it must divide the LHS and if $3|x^2 \implies 9|x^2$ and so the LHS is divisible by $9$ and the RHS is not. Contradiction. Hence, the only solution is $(45, 4)$.  That made me wonder, how we can solve the Diophantine Equation $x^2 - y! = 2016$. We cannot apply the same logic here. $2016$ is a multiple of $9$ and it is clear that $3|x$ and $9 \nmid x$. How do I proceed from here? How to concatenate a variable number of csv, removing their header rows? Apparent Violation of Newton's $3^{\text{rd}}$ Law and the Conservation of Momentum (and Angular Momentum) For a Pair of Charged Particles Consider a system of the two identical positive point charges situated in free space (isolated from the influence of any other external fields) as shown in the attached diagram. Particle $1$ is at $(a,a,0)$ and particle $2$ is at $(0,a,0)$. Their velocities, at the considered instant of time, are as shown in the diagram ($\mathbf{v}_1$ along the $+x$ axis, $\mathbf{v}_2$ along the $+z$ axis).    Now, by applying the Biot-Savart law, we find that the magnetic field due to particle $2$ at the position of particle $1$ is along $+y$ axis, which means that the force acting on particle $1$ is along $+z$ axis according to Fleming’s left-hand rule. A similar analysis shows that there is no magnetic force on particle $2$ as the magnetic field of particle $1$ should vanish at positions (relative to particle $1$) located along its velocity vector.  Now, if we observe the net torque on the system of two particles about the $y$ axis then it is non-zero and is directed along the $-y$ axis. Here, there are no external forces or torques acting on the isolated two-particle system, and yet the net torque, as well as the net force on the particles, are nonzero. Why? Also, Newton's third law of motion seems to be broken in this scenario. Why?    Edit $1$  I have come to know from the responses that the electromagnetic field itself takes away some momentum and angular momentum about the considered axis. However, I think that if I consider only two charged particles as my system then the Abraham-Lorentz force can be assumed to be acting upon the system, and that is sufficient to make sure that we have considered the momentum being carried away by the electromagnetic field itself.   Even after considering the action of the Abraham-Lorentz force for the two-particle system, the scenario breaks both Newton's third law and the conservation of linear and angular momentum. This is because the Abraham Lorentz forces do not exactly counterbalance the force and the torques, on the two-particle system under consideration, due to the magnetic field.    Edit $2$  The previous edit was a result of confusion and misunderstanding on my part. The force associated with the momentum carried away by the electromagnetic field as a result of the electromagnetic interaction described in the question is the Lorentz force itself which simply doesn't obey the third law of motion. The Abraham-Lorentz force is a different story. It is associated with the momentum carried away by the radiation emitted by the accelerated charged particles. This is an additional force apart from the Lorentz force and corresponds to an additional carriage of momentum by the electromagnetic field. The momentum carried away by the electromagnetic field in correspondence with the Lorentz force doesn't correspond to radiation. Repeating something with (1/n)th chance of success n times Is there anything that can be said about how many attempts it will take to correctly guess a random number out of 1000 numbers? If the number wouldn't change the probability would just increase every guess, giving in the end a probability of 1.  If the number changes every guess tough, you just have a 1/1000th chance everytime. Can it be calculated how many attempts it would probably take, on average?  (I'm sorry, i'm not very skilled in probability maths) Convex function as supremum of countably many affine functions Let $f:\mathbb{R}^n\to \mathbb{R}$ be a convex function. It is well-known that (see e.g.~) that there exists a set $A$ such that  $$ f(x)=\sup_{a\in A}A(a)x+b(a), \quad \forall x\in \mathbb{R}^n, $$ where $A(a)\in\mathbb{R}^{n\times n}$ and $b(a)\in \mathbb{R}^n$.  I was wondering, is there any reference saying we can choose $A$ as a countable set? By considering:  $$\lim_{n\to\infty}\frac{\sum_{k=1}^n k^1}{n^{2}} = \frac 1 2$$ $$\lim_{n\to\infty}\frac{\sum_{k=1}^n k^2}{n^{3}} = \frac 1 3$$ $$\lim_{n\to\infty}\frac{\sum_{k=1}^n k^3}{n^{4}} = \frac 1 4$$  Determine if this is true: $$\lim_{n\to\infty}\frac{\sum_{k=1}^n k^m}{n^{m+1}} = \frac 1 {{m+1}}$$  If it is, prove it.  If it is not, evaluate $\lim\limits_{n\to\infty}\frac{\sum_{k=1}^n k^m}{{m+1}}$. I am getting my feet wet with Git and have the following issue:  My project source tree:  / | +--src/ +----refs/ +----... | +--vendor/ +----...   I have code (currently MEF) in my vendor branch that I will compile there and then move the references into /src/refs which is where the project picks them up from.  My issue is that I have my .gitignore set to ignore *.dll and *.pdb.  I can do a git add -f bar.dll to force the addition of the ignored file which is ok, the problem is I can not figure out to list what files exist that are ignored.  I want to list the ignored files to make sure that I don't forget to add them.  I have read the man page on git ls-files and can not make it work. It seems to me that git ls-files --exclude-standard -i should do what I want.  What am I missing? How would you prove the following limit?  $$\lim_{(x,y) \to (0,0)} \frac{x^3y}{x^4+y^2} = 0$$  I think the best way is using the squeeze theorem but I can't find left expression.  $$0 \le \frac{x^3y}{x^4 + y^2} \le \frac{x^3y}{x^4} \le \frac{x^3y}{x^3} \le y = 0.$$  But I'm not sure I'm right (especially at $\frac{x^3y}{x^4} \le \frac{x^3y}{x^3}).$  If I'm right - I'd glad if you can accept it.  If I'm wrong - can you please correct me?  Thanks in advance! apt-get update fails to fetch files, “Temporary failure resolving …” error Err http://archive.canonical.com natty InRelease     Err http://security.ubuntu.com oneiric-security InRelease                Err http://extras.ubuntu.com natty InRelease                             Err http://security.ubuntu.com oneiric-security Release.gpg   Temporary failure resolving ‘security.ubuntu.com’ Err http://archive.canonical.com natty Release.gpg   Temporary failure resolving ‘archive.canonical.com’ Err http://extras.ubuntu.com natty Release.gpg   Temporary failure resolving ‘extras.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric InRelease Err http://gb.archive.ubuntu.com oneiric-updates InRelease Err http://gb.archive.ubuntu.com natty-backports InRelease Err http://gb.archive.ubuntu.com oneiric Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com oneiric-updates Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’ Err http://gb.archive.ubuntu.com natty-backports Release.gpg   Temporary failure resolving ‘gb.archive.ubuntu.com’  Reading package lists... Done W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/InRelease       W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/InRelease   W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/InRelease   W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/InRelease   W: Failed to fetch http://archive.canonical.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘archive.canonical.com’ W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/oneiric-security/Release.gpg  Temporary failure resolving ‘security.ubuntu.com’ W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/natty/Release.gpg  Temporary failure resolving ‘extras.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/oneiric-updates/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/natty-backports/Release.gpg  Temporary failure resolving ‘gb.archive.ubuntu.com’ W: Some index files failed to download. They have been ignored, or old ones used instead.   This is what I'm seeing when I try to run sudo apt-get update. I did an update on my instance yesterday and am now experiencing this. Conditional expectation in AR(1) process Suppose we have a stationary AR(1) process: $Y_{t+1}=a+ \rho Y_{t} + \epsilon_{t+1}$ where $\epsilon_{t+1}$ is white noise with probability density function $\phi(.)$.   Now say we have a equation $P_{t+1}=u\cdot (A_{m}-Y_{t+1})^{+}$ where $(Y_{m}-Y_{t+1})^{+}$ = $ \max \{(A_{m}-Y_{t+1}),0\}$ and $u$ is a constant.  So $P_{t+1}=u\cdot(A_{m}-a-\rho Y_{t}-\epsilon_{t+1})^{+}$.   Can we write $E[P_{t+1} \mid Y_{t}]= u\cdot \int_{-\infty}^{(A_{m}-a - \rho Y_{t})}(A_{m}-a-\rho Y_{t}-\epsilon_{t+1})\phi(\epsilon_{t+1})d\epsilon_{t+1}$ ? Lines appear on the texture in render I am trying to learn Blender. While trying to render a subdivided plane with an image texture applied to it, the subdivision edges are not removed in the rendered result.  Kindly, advise, why these edges appear in the render. Product of an exponential function of IDD variables if $x_i$ are IID  continuous random variables, with $E[x_i]=μ$, is the following correct?   $E\left[\prod_{i=1}^n(1+⍺\space x_i)^i\right] = \prod_{i=1}^nE\left[(1+⍺\space x_i)^i\right] =  \prod_{i=1}^n(1+⍺\space E\left[x_i\right])^i = (1+⍺\space μ)^n$  thanks! What are the different endings in Dishonored? I was trying to solve a question of an entrance exam. I am completely stuck in the problem. I am not able to find idea how to proceed. Please help me.     Let $A$ be the set of twice continuously differentiable functions on the interval $[0, 1]$ and let $B = \{f \in A : f(0) = f(1) = 0, f'(0) = 2\}$. Find the value of $$\text{min}_{f\in B} \displaystyle \int_0^1 (f''(x))^2dx.$$    I am really sorry for not showing some effort from my side but I can not find ant way to proceed.  Please help me. Thnx in advance. XeTeX: What happened to \mathcal and \mathscr? Recently I switched from pdflatex to xelatex to be able to use OpenType fonts. I like to use variables highlighted using \mathcal for specific variables, while I used to use \mathscr-typeset variables for matrices. But when I compile with XeLaTeX they look exaclty the same.  Old code  \documentclass{standalone} \usepackage{mathrsfs} \begin{document} $\mathcal{C} = \mathscr{C}$ \end{document}   Output        New code  \documentclass{standalone} \usepackage{unicode-math} \begin{document} $\mathcal{C} = \mathscr{C}$ \end{document}   Output        Broken code  I tried to get back the glyphs from mathrsfs, but it failed this way.  \documentclass{standalone} \usepackage{unicode-math} \usepackage{mathrsfs} \begin{document} $\mathcal{C} = \mathscr{C}$ \end{document}   Output        Question: How can I get back the behaviour? In principle I'd like to have the old \mathcal letters from the pdflatex-version of Computer/Latin Modern.    Alternate solutions (Addendum 2016/05/11) Dispose or Recycle Hard Drive I have 3 old 3.5" internal hard drives sitting gathering dust at the moment. 2 are SATA, and one IDE. I want to either start putting them to use, or dispose of them to clear up some space.  What is the best approach towards disposing of the drives in terms of thoroughly cleaning the contents before throwing away or selling? Are there any recommendations for good software to use to do this?   Are there any 100% successful methods which result in having a usable drive at the end? Question list on Stack Overflow is not showing new question Is there an alternative to Cantor's cardinalities that makes proper subsets smaller than their sets? Cantor defined an infinite set as a set whose subset can be placed in a one-to-one correspondence with its subset. That is, take the set of all natural numbers: {0, 1, 2, 3, 4,...}. From that set, you can form a subset of all even numbers: {0, 2, 4, 6,...}. There is a one-to-one correspondence between both these sets. After all, you can multiply each member in the set of all natural numbers by 2, and you’ll get the set of all even numbers. Because of this one-to-one correspondence, the two sets have the same cardinality, despite the set of even numbers being a subset of the set of natural numbers. This is counter-intuitive to me. How can a subset of a set be as big as the set itself? To make the intuition more concrete, consider the set of multiples of 1,000,000: {0, 1,000,000, 2,000,000,...}. There is a one-to-one correspondence between this set and the set of all natural numbers. So they have the same cardinality. This is really counter-intuitive.  From as far as I can tell, there are basically two axioms at play here:  A1: If all members of set A can be placed in a one-to-one correspondence with all the members of set B, then both sets have the same cardinality.  A2: If set A is a proper subset of set B, then A has a smaller cardinality than set B.  How Cantor defined infinite sets is that he accepted A1 and rejected A2. That is counter-intuitive to me. But mathematicians might say that my intuition is just wrong. So my question is whether we can define infinite sets in another way, i.e. accept A2 but reject A1. That is, the set of even numbers is smaller than the set of all natural numbers, even though both sets have a one-to-one correspondence. If you think this is counter-intuitive because sets with one-to-one correspondence with each other should have the same cardinality, and thus think this is wrong, why can’t I say the same when Cantor accepted A1 and rejected A2? Either way, there is something counter-intuitive and paradoxical.   So, my questions are:   Can we accept A2 and reject A1 for the definition of an infinite set? What arguments, if any, are given for accepting A1 and rejecting A2? What is the proper etiquette at Japanese onsen? Japan is a volcanically active country which means it has a plethora of onsen (hot springs) all around the country.  Visiting these onsen is supposed to be a popular vacation destination for the work-weary Japanese.    I've been told that, as with other things in Japan, there is a rather strict etiquette surrounding the use of the onsen.  In particular, the two things I've read about so far are   Swimming Suits are not allowed. It is very important that one bathe immediately before entering the onsen.   Are these true?  Are there any other taboos that a naive American should be aware of?