I am trying to call a javascript function from php. The function takes one argument. This is the call:  &lt;?php  function welcomeBackMessage($user, $password){   echo "&lt;h1&gt;BACK: " . $user . "pwd " . $password . "&lt;/h1&gt;";   echo "&lt;script&gt; welcomeBack({$user})&lt;/script&gt;";  } ?&gt;   This is the JS function; declared before the php functions calls it:  &lt;script&gt;     //Called form php to welcome back a guest function welcomeBack(user){    print("JS WELCOME BACK CALLED");   var  login = document.getElementById(loginbutton);   login.parentNode.removeChild(login); }     The JS function never executes, and debuting the console I get the following:  &lt;h1&gt;BACK: guest2pwd 1234&lt;/h1&gt;&lt;script&gt; welcomeBack(guest2)&lt;/script&gt; Can't find variable: guest1.   The idea is to pass the variable to a JS function so I get update a DOM element with  variable.   Any input appreciated.
What is the easiest way to encode a PHP string for output to a JavaScript variable?  I have a PHP string which includes quotes and newlines.  I need the contents of this string to be put into a JavaScript variable.  Normally, I would just construct my JavaScript in a PHP file, à la:  &lt;script&gt;   var myvar = "&lt;?php echo $myVarValue;?&gt;"; &lt;/script&gt;   However, this doesn't work when $myVarValue contains quotes or newlines.
How can I remove fonts that I never use, from libreoffice and linux in general? There are a lot of extra fonts that all seem to look alike and just annoy me in the drop down list. Is there anyway I can erase them from the system? Correct way of declaring pointer variables in C/C++ How do you convert LPCWSTR to const char *? What does "Package  has no installation candidate" mean? What would happen to a teaspoon of neutron star material if released on Earth? I've read on NASA's page on neutron star that one teaspoonful of that star would weigh over 20 billion tonnes on Earth. If it was somehow possible to bring it to earth would it:   Burn and disappear during Earth atmosphere entry? Assuming we have 20 billion tonnes of mass occupying the volume of a teaspoon here on Earth, would it fall through the ground under its own weight? show all my unanswered questions from SE Any way how to get    my all un-answered questions  from across all SE sites? Did the date of Frodo's rescue out of the fire of Mordor have any particular meaning in The Lord of the Rings? Can an observer B move in such a way that his clock will run faster than that of a fixed observer A? My understanding of Special and General Relativity comes from books which attempt to explain them to non-experts in these fields.   Let A and B be observers, which at some time t(0), are together at some location P fixed to the earth's surface. A and B are provided with "clocks", which at time t(0), are identical lumps of the same radioactive element-that has a very long half-life. A and A's "clock" remain fixed to the earth's surface. B and B's "clock" leave A and stay together, but eventually return to A after some interval of time T (as measured by A's "clock"). If, during this time T, B's velocity relative to A is sufficiently close to the velocity of light or B remains close to a sufficiently massive body, it seems that time can "pass more slowly" for B than for A. So that when B rejoins A, B's "clock" will contain more of the radioactive element than A's "clock"   My question is: Are there any scenarios that B together with B"s "clock" can undergo (during the time T) which will cause time to "pass more quickly" for B than for A? So that when B rejoins A, B's "clock" will contain less of the radioactive element than A's "clock". If there are no such scenarios, is there any fact or law in Relativity theory which rules them out? If $G$ has no proper subgroup, prove that $G$ is cyclic of order $p$, where $p$ is a prime number.     I know that since $G $is a group with no proper subgroups, $g \in G$ is not just the identity. I don't know where to go from there. Ever since I upgraded to 13.10, the software updater does not show all the available updates. Some will appear and can be installed just fine, but once it claims that all software is up to date, using sudo apt-get upgrade shows that there are still more packages waiting to be updated. I can update them via the command line, but that only solves things temporarily. I'm not sure why some show up and others don't. How can I make Update Manager update all packages?  Update-manager shows this:    But apt-get shows this:   Thanks! How to get a drive formatted with exfat working? In Ubuntu 13.04 there was an option to use the PPA by Relan in order to get ExFat functionality. Seeing that in Ubuntu this functionality is now available from the repositories without the PPA I tried this but failed to make it work.  So my question is how do I enable exfat support? Find the general solution of $xy''-(1+x)y'+y=x^2$ knowing that the homogeneous equation has the following solution: $e^{ax}$, where $a$ is a parameter you have to find.  I have found that $a=1$ or $a=1/x$. "within 1 to 2 weeks" vs "in 1 or 2 weeks" Prove that a finite union of closed sets is also closed An irreducible $f\in \mathbb{Z}[x]$, whose image in every $(\mathbb{Z}/p\mathbb{Z})[x]$ has a root? Problem: Is there an irreducible $f\in \mathbb{Z}[x]$, whose image in every $(\mathbb{Z}/p\mathbb{Z})[x]$ has a root for $p$ prime? If there is, what is the minimal degree possible?   I can only prove that $x^2-c$ is impossible, by quadratic reciprocity and Chinese remainder theorem. Even the case of $a x^2 - c$ is unknown to me.  Meanwhile, if $f$ is not required  to be irreducible, but only have no root in $\mathbb{Z}$, then $(x^2-a)(x^2-b)(x^2-ab)$ is a solution for non-sqaure $a,b,ab$, since if both $a,b$ are not squares in $\mathbb{Z}/p\mathbb{Z}$, then $ab$ is a square. Yet I still don't know if this is of minimal degree.  Also, it is natural to pose generalizations   When $p$ is not necessarily prime (equivalently for all prime powers). When $p$ is odd prime. When $p$ represents sufficiently large primes (equivalently all but a finite number left). Calculation of $\int_0^{\pi} \frac{\sin^2 x}{a^2+b^2-2ab \cos x}\mathrm dx$ Calculate the definite integral      $$ I=\int_0^{\pi} \frac{\sin^2 x}{a^2+b^2-2ab \cos x}\;\mathrm dx $$      given that $a&gt;b&gt;0$.   My Attempt:  If we replace $x$ by $C$, then  $$ I = \int_{0}^{\pi}\frac{\sin^2 C}{a^2+b^2-2ab\cos C}\;\mathrm dC $$  Now we can use the Cosine Formula ($A+B+C=\pi$). Applying the formula gives  $$ \begin{align} \cos C &amp;= \frac{a^2+b^2-c^2}{2ab}\\ a^2+b^2-2ab\cos C &amp;= c^2 \end{align} $$  From here we can use the formula $\dfrac{\sin A}{a} = \dfrac{\sin B}{b} = \dfrac{\sin C}{c}$ to transform the integral to  $$ \begin{align} I &amp;= \int_{0}^{\pi}\frac{\sin^2 C}{c^2}\;\mathrm dC\\ &amp;= \int_{0}^{\pi}\frac{\sin^2A}{a^2}\;\mathrm dC\\ &amp;= \int_{0}^{\pi}\frac{\sin^2 B}{b^2}\;\mathrm dC \end{align} $$  Is my process right? If not, how can I calculate the above integral? Is the neutral wire considered safe? Is it possible to see the history of changes to a particular line of code in a Subversion repository?  I'd like, for instance, to be able to see when a particular statement was added or when that statement was changed, even if its line number is not the same any more. I have an object with two solidify modifiers added, but the modifiers are not visible in the view pane. How can I see the applied modifiers. This is in Blender 2.91 How Are Galaxies Receding Faster Than Light Visible To Observers?