How can I improve my program in Python for reversing words in a string
Reverse String order
Multinomial logistic regression analysis or binary logistic regression Is there a term for words that when reversed, form other words? I'm aware of what a palindrome is. What do you call words that, when reversed, form other words, such as ton (not) and part (trap)? I am watching Susskinds's lecture , in which he introduced square angular momentum operator $L^2$, which can be written as $$ L^2=L_z^2+L_-L_++L_z $$ where $$ L_\pm=L_x\pm iL_y $$  Besides, he argued that the spectrum of $L$ can only be $m,m-1,\cdots,-m+1,-m$ in which $m$ is an integer or half-integer. If we denote $|m\rangle$ the eigenvector corresponds to eigenvalue $m$, we have $$ L_\pm|l\rangle=|l\pm 1\rangle\;\text{or}\;0 $$  In the lecture he showed that $L^2|m\rangle=m(m+1)|m\rangle$ for $m$ the highest eigenvalue, by $$ \begin{align*} L^2|m\rangle&amp;=L_z^2|m\rangle+L_-L_+|m\rangle+L_z|m\rangle\\ &amp;=m^2|m\rangle+0+m|m\rangle\\ &amp;=m(m+1)|m\rangle \end{align*} $$  Then he left an exercise to show that for any $-m\leqslant l&lt; m$, we also have $|l\rangle$ is an eigenvector of $L^2$ with eigenvalue $m(m+1)$.  In the lecture, he hinted by showing that it suffices to show that $L^2$ commutes with $L_i$ for $i=x,y,z$, which gives us $$ L^2|m-1\rangle=L^2L_-|m\rangle=L_-L^2|m\rangle=L_-m(m+1)|m\rangle=m(m+1)L_-|m\rangle=m(m-1)|m-1\rangle $$  I believe it is true since I find the   online.   However, my question is that, why the following proof is wrong.  I tried to mimic the proof for $|m\rangle$ to have that  $$ \begin{align*} L^2|k\rangle&amp;=L_z^2|k\rangle+L_-L_+|k\rangle+L_z|k\rangle\\ &amp;=k^2|k\rangle+L_-L_+|k+1\rangle+k|k\rangle\\ &amp;=k^2|k\rangle+|k\rangle+k|k\rangle\\ &amp;=(k^2+k+1)|k\rangle \end{align*} $$  which shows that $|k\rangle$ does not have eigenvalue $m(m+1)$ but $k^2+k+1$ for $k&lt;m$. Variable doesn't get returned from AJAX function $|p(z)| \leq M$ for $|z| \leq 1$ Show that $|p(z)| \leq M|z|^n$ for $|z| \geq 1$ Let $p(z)= \sum_{k=0}^n a_k z^k$ ,  $a_n \neq 0$ , be a polynomial of degree $n$ such that $|p(z)| \leq M$ for $|z| \leq 1$.  Show that $|p(z)| \leq M|z|^n$ for $|z| \geq 1$  This was an exam question. Part (a) of this question asked the converse: if $|p(z)| \leq M|z|^n$ and $|z|$ is sufficiently large, then $p(z)$ is a polynomial. This question came straight out of Ahlfors' Complex Analysis, which I solved by showing, using the Cauchy Estimate,  $|p^n (z)|  \leq \frac{n!M|z|^k}{R^n} = 0$ as $R \to \infty$.   I would like to work backwards with this.   May I do this, or similar:   $p(z) = \frac{1}{2\pi i} \int_{c} \frac{f(\zeta)d\zeta}{\zeta-z}$  $\Rightarrow  |p(z)| \leq \frac{2\pi M|z|^n}{1(2\pi)}= M|z|^n$ computing the orbits for a group action Let $G$ be the Galois group of a field with nine elements over its subfield with three elements. Then the number of orbits for the action of $G$ on the fields with nine elements is   3 5 6 9   I have no idea how to compute the numbers of orbits for a group action. Anyone please help me. Thanks. How to list the tables in a SQLite database file that was opened with ATTACH? What SQL can be used to list the tables, and the rows within those tables in an SQLite database file - once I have attached it with the ATTACH command on the SQLite 3 command line tool? I was trying to solve internet problems, and seem to have made things worse: Now when I start the computer it gets stuck on "Booting system without full network configuration".   Does anyone know how to make it unstuck?   Alternatively: It got messed up when I changed the contents of /etc/network/interfaces, so presumably would work again if I changed it back. How can I edit this file during boot?   I'm using Ubuntu 12.10. Grep in couple thousands files I have directory with cca 26 000 files and I need to grep in all these files. Problem is, that I need it as fast as possible, so it's not ideal to make script where grep will take name of one file from find command and write matches to file. Before "arguments list too long" issue it took cca 2 minutes to grep in all this files. Any ideas how to do it? edit: there is a script that is making new files all the time, so it's not possible to put all files to different dirs. I've setup a plane with a particle emitter system. When I render the footage and the particles are glowing. Where do I find the settings for that? The graph of the function $f (x)$ is given.  How many different real roots does the $f (4-3x^2)=0$ equation have?  Here is possible solution:  $$\Bigg [{4-3x^2=-2 \\ 4-3x^2=4} \Longrightarrow x=\left\{0,\sqrt 2,- \sqrt 2\right\} $$  Then, here is different solution:  $$f(x)=x^2-2x-8$$ $$f(4-3x^2)=0\Longrightarrow (4-3x^2)^2-2(4-3x^2)-8=0 \Longrightarrow 9x^4-18x^2=0 \Longrightarrow x=\left\{0,\sqrt 2,- \sqrt 2\right\} $$   Problematic point. Here, I assumed the function is quadratic. But, obviously, this function may not be quadratic.  My questions:  Question $-1:$ Is the first solution completely correct?  Question $-2:$ Can we say that, the second solution is completely and definitely wrong? If so, is it possible to add something to this method and turn it into the right solution? Unreasonable RAM usage in Windows 7 I have a fresh install of Windows 7, and my RAM in normal startup goes up to 2.5GB. I looked at Task Manager, and there's at least 1.5GB missing from there and in Resource Monitor as well. There's no indication of what's using that RAM. Can someone tell me how I can find out what's consuming my memory? I believe it's a virus, but none of the free antivirus programs tracked it down.   I added the pictures below. If this is normal usage of Windows 7 as some answers imply, then I don't get this at all.   P.S. My Windows 8 Installation was running below 2.5GB, actually it was 1. something, until recently that I transferred some files from another computer which had the same problem that mine has now. I deleted Windows 8 and installed Windows 7, since I would do that anyway, and now I'm getting high memory usage in Windows 7 as well.   (Click images to enlarge) I got a UK visa for one month (restricted validity). It expires on November 4. Pakistani citizens are eligible to apply for a Turkish e visa if they have a valid UK visa. I want to visit Istanbul for a couple of days - from October 31 to November 2. Would I be eligible to still apply for an e visa?   My visa is for single entry. It's valid from October 4 to November 4. Primary decomposition of a monomial ideal Suppose $f$ is an isometric (i.e., distance preserving) function on $\mathbb{E}^2$ such that $f(0,0) = (0,0)$.  Then I want to show that $f$ is necessarily linear.  Now $f$ is linear iff $f$ is both additive and homogenous.  The following is an attempted proof for the homogeneity of f (missing the last step); still more, I have no idea how to argue for the additivity of $f$.  Any ideas?  Let $x \in \mathbb{E}^2$ and $\alpha \in \mathbb{R}$   We know that $\forall x \in \mathbb{E}^2$, $\Vert x - 0 \Vert = \Vert f(x) - f(0)\Vert = \Vert f(x) - 0 \Vert$ so that $\Vert x\Vert = \Vert f(x)\Vert$.  From this we immediately have the following facts:  $\Vert x \Vert = \Vert f(x) \Vert$  $\Vert \alpha x \Vert = \Vert f(\alpha x) \Vert$  We can then argue that since $\Vert \alpha x\Vert = |\alpha| \Vert x \Vert = |\alpha| \Vert f(x) \Vert = \Vert \alpha f(x) \Vert$, we also have that $\Vert f(\alpha x) \Vert = \Vert \alpha f(x)\Vert$.  Finally, we have that  $\Vert \alpha x - x \Vert = \Vert \alpha f(x) - f(x) \Vert$   iff $ \Vert (\alpha - 1)x \Vert = \Vert (\alpha - 1) f(x) \Vert$   iff $|\alpha - 1| \Vert x \Vert = |\alpha - 1| \Vert f(x) \Vert$  Since the last of these statements is in fact true, we now have $\Vert \alpha x - x \Vert = \Vert \alpha f(x) - f(x) \Vert$ as desired.  Now at this point it seems like I have all of the facts required to assert that $f(\alpha x) = \alpha f(x)$, but I can't figure out how to formally state why without illegally appealing to visual intuition.  Any ideas? dropping ticklabel on pgfplot axis What would be a good approach to develop the render system for an oldschool type racing game that uses a pseudo 3D scenery, like for example Outrun or Lotus Esprit Turbo Challenge? There's an endless scrolling road and scenery graphics are placed like billboard items, etc. I think you get the idea.    Are these developed in a similar way like  or is there a different technique behind it? Does the technique has a specific name I could search for on the web? I need to develop something like that in Flash. How do you delete untracked local files from your current working tree? jQuery selector regular expressions Are there critical hits for spells?