I have some pages on the web which echo results like:  [{"id":"1","company":"Gaurishankar","bus_no":"JHA 12 KH 1230"}, {"id":"2","company":"Gaurishankar","bus_no":"BA 2 KH 2270"}]   I want to use this json_encode data to be used in Javascript array like:  var data = http://api.mywebsite.com/get_data.php; for (i = 0; i&lt;data.length; i++){ //Do something here }   How is this possible. I know its easy but I cant make this. I am a new learner. Plz help
I need to do an  request in JavaScript. What's the best way to do that?  I need to do this in a Mac OS X dashcode widget.
From what I can gather, there are three categories:   Never use GET and use POST Never use POST and use GET It doesn't matter which one you use.   Am I correct in assuming those three cases? If so, what are some examples from each case? How to design partitions for SSHD? Are there any rules relevant to involuntary movement and effects other than Opportunity Attacks? PHB p. 195 states that involuntary movement does not provoke :     You also don't provoke an opportunity attack when you teleport or when someone or something moves you without using your movement, action, or reaction.   Is there a general rule somewhere about involuntary movement and how it interacts with other effects?  The question arose at our table about what happens if a creature is dragged via the Thorn Whip spell across an area of Spike Growth.  Does the involuntarily moving creature take the damage from the spikes as if he'd voluntarily moved through them?    Logically, yes, if you're being dragged through spikes, you take damage from them as if you'd walked through them. But logically, if I drag you past my ally, my ally would be able to make an Opportunity Attack, likely more easily than if you were moving under your own power.  Presumably that is not allowed for balance reasons rather than versimilitude reasons, so I wonder if the same should apply to other effects? Have the Linux kernel bugs that caused data loss when using a Samsung 850 Pro SSD been resolved? I just got a brand new Samsung 850 Pro SSD, and I would like to install Ubuntu 14.04 onto it.  I have read some pretty ugly stories of data loss with the 850 series SSDs when using Linux due to bugs in the kernel, as well as bugs in the TRIM operation.  I have done my research, but most of what I'm finding is very outdated. For example, see , and , as well as .  My question is, what is the current status? Have all major the bugs been worked out yet? How to ensure OpenVPN connection uses specific DNS? I'm using OpenVPN through Tunnelblick on MacOS X Lion.  I need to set specific DNS (with local IP, which works only when VPN is up) for the duration of this VPN session only.  I do not have access to the OpenVPN server configuration. Only client config. Also, DNS from the server doesn't work.  So it works like this: I connect to VPN, go the Network preferences and manually set DNS. After VPN is disconnected, I switch back to default. It works, but it needs to be automatic.  After some exploration I found that OpenVPN up- and down- scripts might help me with that. Unfortunately, I haven't found any specific documentation about how exactly it can be done.  How it can or can't be done? Any advice would be appreciated! Claim: If $(x_\alpha)_{\alpha\in A}$ is a collection of real numbers $x_\alpha\in [0,\infty]$ such that $\sum_{\alpha\in A}x_\alpha&lt;\infty$, then $x_\alpha=0$ for all but at most countably many $\alpha\in A$ ($A$ need not be countable).  Proof: Let $\sum_{\alpha\in A}x_\alpha=M&lt;\infty$. Consider $S_n=\{\alpha\in A \mid x_\alpha&gt;1/n\}$.  Then $M\geq\sum_{\alpha\in S_n}x_\alpha&gt;\sum_{\alpha\in S_n}1/n=\frac{N}{n}$, where $N\in\mathbb{N}\cup\{\infty\}$ is the number of elements in $S_n$.  Thus $S_n$ has at most $Mn$ elements.   Hence $\{\alpha\in A \mid x_\alpha&gt;0\}=\bigcup_{n\in\mathbb{N}}S_n$ is countable as the countable union of finite sets. $\square$  First, is my proof correct? Second, are there more concise/elegant proofs? Blender 2.8 - AWS EC2 command line EEVEE render I have been trying to get this to work for a couple days now. I have an EC2 P2 instance with NVIDIA CUDA configured by default, its a Deep learning Ubuntu AMI. This OS does not have a GUI so everything is via terminal.  I downloaded Blender's 2.8 TAR file for Linux and set it up on the EC2 instance. And ran the following command from the directory where the TAR file is extracted:   ./blender -b -noaudio /home/ubuntu/file.blend --render-output . --engine BLENDER_EEVEE --render-format PNG --verbose 4   All I see in the output is this:  Blender 2.80 (sub 75) (hash f6cb5f54494e built 2019-07-29 17:17:04) found bundled python: /mnt/blender/blender-2.80-linux-glibc217-  x86_64/2.80/python Read blend: /home/ubuntu/file.blend  Blender quit   Don't know why its quitting but I am unable to debug this any further. Any help would be appreciated.  UPDATE: As per @rjg's recommendation, ran the following command:  ./blender -b -noaudio /home/ubuntu/file.blend --render-output . --engine BLENDER_EEVEE --render-format PNG -f 1 --verbose 4   Got the following error:  Blender 2.80 (sub 75) (hash f6cb5f54494e built 2019-07-29 17:17:04) found bundled python: /home/ubuntu/blender/blender-2.80-linux-glibc217-  x86_64/2.80/python Read blend: /home/ubuntu/file.blend Unable to open a display Aborted (core dumped) Is the set of polynomials of degree less than or equal to $n$ closed? This question is in relation to the space $C(I)$, $I = [a, b]$. Define $P_n =\{ a_0+\dots+a_nx^n \mid a_i \in \mathbb{R}\}$ (any or all $a_i$ could be zero); clearly $P_n \subset C(I)$. The norm I'm using is $\lVert f\rVert_I = \sup_I |f(x)|$. Is $P_n$ closed under $\lVert\cdot\rVert_I$?   I am almost sure the answer is "yes", but I can't seem to prove it. My first instinct was to biject  $P_n$ to $\mathbb{R}^{n+1}$, using coefficients as coordinates, and prove that sequences of degree-$n$ polynomials converge to degree-$n$ polynomials, but I can't prove that the metric $\lVert\cdot\rVert_I$ is equivalent to the standard metric on $\mathbb{R}^{n+1}$. Next, intuitively given a function $f \in C(I), \notin P_n$ I should be able to find some $\epsilon &gt; 0$ such that there are no low-degree polynomials "nearby", then that function was not a limit point of $P_n$ so $P_n$ is closed. Again I have no idea how to prove this. What should I do? Why rationalize the denominator? What canonical momenta are the "right" ones? I'm doing some classical field theory exercises with the Lagrangian $$\mathscr{L} = -\frac{1}{4}F_{\mu \nu}F^{\mu \nu}$$ where $F_{\mu \nu} = \partial_\mu A_\nu - \partial_\nu A_\mu$. To find the conjugate momenta $\pi^\mu_{\ \ \ \nu} = \partial \mathscr{L} / \partial(\partial_\mu A^\nu)$, I can use two methods.  First method: directly apply this to $\mathscr{L}$. We get a a factor of $2$ since there are two $F$'s, and another factor of $2$ since each $F$ contains two $\partial_\mu A_\nu$ terms, giving $$\pi^\mu_{\ \ \ \nu} = -F^\mu_{\ \ \ \nu}.$$  Second method: get $\mathscr{L}$ in terms of $A$ by expanding and integrating by parts, yielding $$\mathscr{L} = \frac{1}{2}(\partial_\mu A^\mu)^2 - \frac{1}{2}(\partial_\mu A^\nu)^2.$$ Differentiating this gets factors of $2$ and gives $$\pi^\mu_{\ \ \ \nu} = \partial_\rho A^\rho \delta^\mu_\nu - \partial^\mu A_\nu.$$  These two answers are different! (They do give the same equations of motion, at least.) I guess that means doing the integration by parts changed the canonical momenta.  Is this something I should be worried about? In particular, I have another exercise that wants me to show that one of the canonical momenta vanishes -- this isn't true for the ones I get from the second method! Plus, my stress-energy tensor is changed too. When a problem asks for "the" canonical momenta, am I forbidden from integrating by parts? Where can I get Blender test builds? I know that  provides downloads for official releases. I see on forums that people use newer versions of Blender. Where can I get newer version of Blender (nightly builds, alpha versions... etc). How to change the numbering of \part, \chapter, \section, ... to alphabetical, Roman numbers, etc "is a field and used like a type" error Experimental observation of matter/antimatter in the universe Ordinary matter and antimatter have the same physical properties when it comes to, for example, spectroscopy. Hydrogen and antihydrogen atoms produce the same spectroscopy when excited, and adsorb the same frequencies. The charge does not make a difference in the potential (regardless if it's generated by a proton or an antiproton) nor in how the positron behaves in this potential (being its mass equal to the mass of an electron)  How can astronomy evaluate if a far galaxy is made of matter or antimatter, given that from the spectroscopy point of view, they behave in the same way? In other words, how do we know that an asymmetry exists between matter and antimatter in the universe? How to search for all questions with bounties across the network? I wanted to search for questions on all SE sites that had a bounty. I am not sure if it is possible, and if it is how can I?   I have seen other questions that show how to find questions on each individual site, but how can I find all of them in one search from the homepage stackexchange.com? If this has been asked already, please let me know.  It has been suggested that the question was already asked (click  for the question), but that question only showed how to find those questions on each separate site or some complex way to search. I am hoping to find a way to search for bountied questions easily or for someone to create a way to do this. Prevent windows from going into sleep when my program is running? I was playing around with some integrals and noticed that some integrals of the form:  $$I(a,b,c)=\int_a^\infty \frac{\arctan(x+b)}{x^2+c}dx$$ Does have a closed form. I am trying to find for what constant $c$ will this work. In case you wonder why only $c$ is problematic, I will try to show by an example.  $$I=I(1,3,16)=\int_1^\infty \frac{\arctan(x+3)}{x^2+16}dx$$ Let's start by letting $x-1=t\,$ thus: $$I=\int_0^\infty \frac{{\arctan(\color{blue}{t+4})}}{t^2+2t+17}dt$$ With $\displaystyle{t=\frac{17}{y}\rightarrow dt=-\frac{17}{y^2}dy}$ $$I=\int_0^\infty \frac{{\arctan\left(\color{red}{\frac{17}{y}+4}\right)}}{\left(\frac{17}{y}\right)^2 +\frac{34}{y}+17 }\frac{17}{y^2}dy\overset{y=t}=\int_0^\infty \frac{{\arctan\left(\color{red}{\frac{17}{t}+4}\right)}}{t^2+2t+17}dt$$ $$2I=\int_0^\infty \frac{{\arctan(\color{blue}{t+4})+{\arctan\left(\color{red}{\frac{17}{t}+4}\right)}}}{t^2+2t+17}dt$$ $${\arctan(\color{blue}{t+4})+{\arctan\left(\color{red}{\frac{17}{t}+4}\right)}}=\arctan\left(\frac{\color{blue}{t+4}+\color{red}{\frac{17}{t}+4}}{1-(\color{blue}{t+4})\left(\color{red}{\frac{17}{t}+4}\right)}\right)$$ $$=\arctan\left(\frac{x^2+8x+17}{x}\frac{x}{-4(x^2+8x+17}\right)=\pi-\arctan\left(\frac14\right)$$ Above follows since the original integral is positive so we take $\arctan(-x)$ as $\pi-\arctan x $ and therefore getting a negative answer will not be an issue. $$I=\frac12 \left(\pi -\arctan\left(\frac14\right)\right)\int_0^\infty \frac{1}{t^2+2t+17}dt$$ Well, now the inner integral is not hard to compute and the final answer happens to be: $$I=\frac12 \left(\pi -\arctan\left(\frac14\right)\right)\frac14\arctan\left(\frac{t+1}{4}\right)\bigg|_0^\infty =\frac{\pi^2}{16}-\frac{3\pi}{16}\arctan\left(\frac14\right)+\frac18\arctan^2\left(\frac14\right) $$ There are more examples that I found by checking and try such as:  $$I(1,2,9)=\int_1^\infty \frac{\arctan(x+2)}{x^2+9}dx$$ $$I(2,1,6)=\int_2^\infty \frac{\arctan(x+1)}{x^2+6}dx$$ $$I(2,2,13)=\int_2^\infty \frac{\arctan(x+2)}{x^2+13}dx$$ And so on... All those can be solved by the same method: First substitute $x-a=t$, then let $t=\frac{\alpha}{y}$, where $\alpha$ is the "free of x" coefficient from the denominator.   The problem is that I tried more than $100$ combinations to get those integrals which is not that nice. How can we "smartly" find $c$ so that $I(a,b,c)$ is evaluable by symmetry? Or put in other word what should be $c$ if one wants to compute by symmetry $I(7,13,c)$? How can I prevent 'grep' from showing up in ps results? When I  search for some process that doesn't exist, e.g.  $ ps aux | grep fnord                           wayne    15745  0.0  0.0  13580   928 pts/6    S+   03:58   0:00 grep fnord   Obviously I don't care about grep - that makes as much sense as searching for the ps process!  How can I prevent grep from showing up in the results? Is it possible to have a pair of Gaussian random variables for which the joint distribution is not Gaussian? Somebody asked me this question in a job interview and I replied that their joint distribution is always Gaussian. I thought that I can always write a bivariate Gaussian with their means and variance and covariances. I am wondering if there can be a case for which the joint probability of two Gaussians is not Gaussian? As a result of  myself, the need arose to track other Stack Overflow-based research. The following is an attempt to list the academic papers mentioning Stack Overflow/Exchange or using Stack Exchange data. This also includes the works mentioned in  that started the trend, as well as two other questions on meta, , and . If you know of papers that are not listed, please edit the answer directly. I realised it might be useful to have all the BibTeX entries in a single file, so I started .