php replace multiple spaces with a single space
php Replacing multiple spaces with a single space
I just discovered an incredibly annoying "feature" of Windows 7 tonight.  If you click on your optical drive in Explorer, and there is no disc in the drive, Windows 7 is kind enough to open the tray for you.  I'm finding it hard to contain my rage over this idiotic design decision.  WTF?  According to , this behavior was apparently introduced in Vista.  The author posted a workaround, but I don't want a workaround.  I want it to stop doing this.  Like he, I have a case with a door that covers the drive bays.  If it's closed, and I accidentally click on that optical drive, it knocks on that door 10 or 12 times before giving up.  Can this behavior be turned off in Windows 7? I have seen many camera review sites illustrate the effect of using different focal lengths on the same photograph using frames. There are also similar illustrations to compare different sensors (). I find this kind of visualization to be very useful in comparing the actual effect of the longer focal length\different sensor size. Of course the ability to do a wider focal length visualization would also be equally useful, but that's not possible.  Is there any ready-made software or plugin that enables this? If not, is there any simple technique to visualize the effect of longer focal lengths on an image (one would of course have to use the zoom information in the image EXIF data to accurately represent this)? All I can think of is to use some trigonometry to do the necessary calculations for the frame sizes for cropping. Short story with competitors complaining to government about a new very popular synthetic food ASCII to Binary and Binary to ASCII conversion tools? Which is a good tool to convert ASCII to binary, and binary to ASCII?  I was hoping for something like:  $ echo --binary "This is a binary message" 01010100 01101000 01101001 01110011 00100000 01101001 01110011 00100000 01100001 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01101101 01100101 01110011 01110011 01100001 01100111 01100101   Or, more realistic:  $ echo "This is a binary message" | ascii2bin 01010100 01101000 01101001 01110011 00100000 01101001 01110011 00100000 01100001 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01101101 01100101 01110011 01110011 01100001 01100111 01100101   And also the reverse:  $ echo "01010100 01101000 01101001 01110011 00100000 01101001 01110011 00100000 01100001 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01101101 01100101 01110011 01110011 01100001 01100111 01100101" | bin2ascii This is a binary message   PS: I'm using bash  PS2: I hope I didn't get the wrong binary Electromagnetic Tensor in Cylindrical Coordinates I understand that the  is given by  $$F^{\mu\nu}\mapsto\begin{pmatrix}0 &amp; -E_{x} &amp; -E_{y} &amp; -E_{z}\\ E_{x} &amp; 0 &amp; -B_{z} &amp; B_{y}\\ E_{y} &amp; B_{z} &amp; 0 &amp; -B_{x}\\ E_{z} &amp; -B_{y} &amp; B_{x} &amp; 0 \end{pmatrix}$$  where $\mu$, $\nu$ can take the values {0,1,2,3} or {$t,x,y,z$}.  So, for example  $$F^{01}=F^{tx}=-E_x$$  My question is, what would the following expression be?  $$F^{t\rho}=?$$ or $$F^{z\rho}=?$$  where $\rho=\sqrt{x^{2}+y^{2}}$ is the radial coordinate in ?  And more generally, how can we construct the Electromagnetic Tensor in cylindrical coordinates? Where $\mu$, $\nu$ now take the values {$t,\rho,\varphi,z$}. I'm an on and off user of LaTeX so I'm not familiar with every package out there. Having said that, whenever I use LaTeX and need to accomplish a certain goal (i.e. ), I search around and find some kind of solution that involves a package that I didn't know about. I think that's great, I learn something new, and it goes in my template file.  Every now and then, though, my search comes up with a package that, after much wrangling, I find out that it's obsolete. An example of this is just recently I came across the subfigure package and wanted to try it out. Soon after I found out from here that it has become . I usually keep my TeX up-to-date because I like keeping up with new XeLaTeX features.   My question is, is there a map or timeline of what TeX packages should be avoided because there are better ways of doing things? An idea I have is some kind of list of all packages split by what they accomplish, then cancelling out packages whose features are incorporated into and improved upon by newer packages.  Edit: another example is lscape versus pdflscape. The latter implements rotating pages in the final PDF not just for pdftex but also for other drivers such as xetex. The only way I found out about this was Googling latex lscape rotate xelatex, for which the second link leads to the  (PDF).  Great answers so far. I'll check them out and see which one works best for me.  Edit 2: Turns out that my question is a bit of a dupe in the sense that a great answer came up on an unrelated question. The nag package . Gotta try it! How to prove by induction that $\frac{a^n+b^n}{2}\geq\left(\frac{a+b}{2}\right)^n$? I'm about to prove that for any $a,b&gt;0$ and $n\in\mathbb{N},$ the inequality: $\frac{a^n+b^n}{2}\geq\left(\frac{a+b}{2}\right)^n$ holds.   By induction I get: $$\left(\frac{a+b}{2}\right)\cdot\frac{a^n+b^n}{2}$$ $$=\frac{1}{2}\cdot\frac{a^{n+1}+b^{n+1}+ab^n+ba^n}{2}$$ $$=\frac{1}{2}\left(\frac{a^{n+1}+b^{n+1}}{2}+\frac{ab^n+ba^n}{2}\right).$$  Now I have to prove that $$\frac{1}{2}\left(\frac{a^{n+1}+b^{n+1}}{2}+\frac{ab^n+ba^n}{2}\right)$$ $$\leq\frac{a^{n+1}+b^{n+1}}{2}$$ $$\Leftrightarrow a^{n+1}+b^{n+1}\geq ab^n +ba^n.$$ But I don't know how to prove that one, is it possible to be proved by induction ? Thank you. If a $\{a_n\}$ diverges, so $a_n \rightarrow + \infty$, how to find sequence $\{b_n\}$ such that $\sum |b_n|<\infty$ but $\sum |a_n||b_n|$ diverges? If we are given any sequence of real numbers $\{a_n\}$ diverges, so $a_n \rightarrow + \infty$, how can we find a sequence $\{b_n\}$ such that $\sum |b_n|$ converges but $\sum |a_n||b_n|$ diverges?  I want to use this fact in another problem but don't immediately see how to prove it. How much Valyrian steel is there that is unused for link making and why aren't people making weapons out of it? I understand that they force you to implement methods and such but what I cant understand is why you would want to use them. Can anybody give me a good example or explanation on why I would want to implement this. I don't have a minecraft folder. I've looked through forums and videos, followed all the steps. I just don't have one. I have windows 7, and I have "view hidden files" turned on. I have look in the roaming folder of my app data folder, with hidden files turned on. I want to find my folder so I can install a mod, could someone please tell me why my folder isn't showing up? Fuzzy string search library in Java ubuntu 18.04 how do I install drivers for my NVIDIA GeForce GTX 1050? Find rational points on $x^2 + y^2 = 3$ and on $x^2 + y^2 = 17$ $(a)$ Find all rational points on the circle $x^2 + y^2 = 3$, if there are any. If there is none, prove so.  $(b)$ Find all rational points on the circle $x^2 + y^2 = 17$, if there are any. If there is none, prove so.  I'm not sure how proceed with finding a general formula (if there is one)  I know that for $(a)$ there is no rational points but I don't know how to explain that there are none.   whereas for $(b)$ there are such points, $(1,4)$ for example. I think that we can find the intersection between the line $y=m(x-1)+4$ and $x^2 + y^2 = 17$  Any help is appreciated! How does one restrict number of allowed types in Java generic type I only have access to the server via a terminal and I can't use graphical tools such as GParted! I want to create a new partition from a part of the root (about 768mb) for swap.  # df -h Filesystem      Size  Used Avail Use% Mounted on /dev/vda         20G  1.3G   18G   7% / udev             10M     0   10M   0% /dev tmpfs           199M  4.9M  194M   3% /run tmpfs           100M   12K  100M   1% /run/user tmpfs           5.0M  4.0K  5.0M   1% /run/lock Is it feasible to transform each variable differently while doing multiple regression Is a DNA molecule a single strand of polynucleotide or two of them linked together? Our molecular biology teacher told us that a double helix of DNA was composed of two DNA molecules linked together by hydrogen bonds. The thing is, until now, I always thought a DNA molecule was composed of two strands, those being polynucleotides, both of them being linked together. I can't find a link which is saying the same as my teacher, even if it seems technically correct to call a double helix a dimer of two DNA molecules.  I was curious to know what was the exact terminology. As you can see, objects are falling down when I run the game. Ground is unable to stop those obstacles. Obstacles are rapidly traveling through y axis. I tried by freezing y axis. And, unchecked Use Gravity. I tried by checking Is Kinematic also. But, if I freeze y axis. Than, obstacles completely freeze through y. If there was no ground than the objects don't fall. Same thing happen when I unchecked Use Gravity. I want those obstacles to move if Player hit them. How to stop those obstacles from falling down?   Info : How to create a SQL Server function to "join" multiple rows from a subquery into a single delimited field?