How do i convert this string using PHP &gt; 48512885 to &gt; $485,128.85 I tried this  But the output is 48,512,885.00
How do you convert a number to a string showing dollars and cents?  eg: 123.45    =&gt; '$123.45' 123.456   =&gt; '$123.46' 123       =&gt; '$123.00' .13       =&gt; '$0.13' .1        =&gt; '$0.10' 0         =&gt; '$0.00'
If the sum of $n$ cubes is zero, then the sum must be no larger than $\frac n3$. I have really no idea about this:  Problem: Show that there exists a function $f:[0,1]\rightarrow\mathbb{R}$ such that:  $f$ is discontinuous in all $x\in \mathbb Q$. $f$ is increasing in $[0,1]$. $f$ is integrable.   EDIT: Sorry, it is not discontinuous in all $x\in \mathbb R \setminus \mathbb Q$, just in $\mathbb Q$. How to prove the following expression does not depend on x? I'm not sure how to approach this question, but I know it has something to do with taking the derivative of this. Can anyone please help me out?  Let x > 0. Prove that the value of the following expression does not depend on x: $$\int_{0}^{x}\frac{1}{1+t^4} dt + \frac{1}{3}\int_{0}^\frac{1}{x^3} \frac{1}{1+t^\frac{4}{3}} dt$$ My friend and I are planning a vacation to Ireland later this year. We'll be there for a week, flying into Dublin and then renting a car and driving around the country.  Both of us are 23. Are there any age restrictions on renting cars in Ireland? What would be the cheapest/best option for us? Evaluate $$\sum\limits_{k=1}^{n} \frac{k}{2^k}$$ I'm using the Apache Commons EqualsBuilder to build the equals method for a non-static Java inner class. For example:  import org.apache.commons.lang.builder.EqualsBuilder;  public class Foo {     public class Bar {         private Bar() {}          public Foo getMyFoo() {             return Foo.this         }          private int myInt = 0;          public boolean equals(Object o) {             if (o == null || o.getClass() != getClass) return false;              Bar other = (Bar) o;             return new EqualsBuilder()                 .append(getMyFoo(), other.getMyFoo())                 .append(myInt, other.myInt)                 .isEquals();         }     }      public Bar createBar(...) {         //sensible implementation     }      public Bar createOtherBar(...) {         //another implementation     }      public boolean equals(Object o) {         //sensible equals implementation     } }   Is there syntax by which I can refer to other's Foo reference apart from declaring the getMyFoo() method? Something like other.Foo.this (which doesn't work)? Shannon confusion and diffusion concept I read the document(not the whole document) from Shannon where he speaks about the concepts of confusion and diffusion. I read in many places(not in the document but around the internet) that confusion is enforced using substitution. Diffusion is enforced using permutation/transposition. Ciphers must use both of them because either confusion or diffusion alone are not enough. I read that a substitution cipher can apply by itself confusion(only). Permutation/Transposition applies by itself diffusion(only). It's precisely the last case that bothers me: Can a permutation/transposition cipher by itself apply diffusion?  Shannon explains diffusion as a property that spreads statistic properties of text all over the text preventing statistic analysis. It's frequently translated to: an alteration to a plaintext symbol affects many cipher text symbols. Assuming permutation of bits or characters, how can diffusion be achieved by simple permutation? I mean, if you permute bits, there will be no other bits affected. But if you consider a symbol a character and you permute bits, a change in a character will affect many other characters. It's a question of what is a symbol.  I also read versions of this diffusion concept where the point was just changing bits order just to avoid pattern analysis of the text. But, where is the avalanche effect in simple permutation?  So, what is the correct definition and the implications of diffusion?  I hope you understand what is troubling me.  Thank you once more Creating lots of random cuts on a surface Here's an image of a cube with lots of edges added. It was created using knife tool and lots of clicking:    What would be the best way to randomly generate such cuts with less effort...? Confidence bands in case of fitting ARIMA in R? Computing the Galois group of polynomials $x^n-a \in \mathbb{Q}[x]$ 1) a ten years old boy is sitting on the couch.      2) a ten year old boy is sitting on the couch.      3) a ten-years old boy is sitting on the couch.      4) a ten-year old boy is sitting on the couch.   Which is correct? Wrong hyperref with repeated counter I'm having an interesting problem with hyperref.  Apparently, when a counter is reset by \setcounter{mycounter}{0} then hyperref always links to the first possible instance of the counter and not the one where the respective label sits.   Check this MWE out:   % !TEX TS-program = xelatexmk \documentclass{article} \usepackage[paperwidth=6in,paperheight=3in]{geometry} \usepackage{hyperref} \hypersetup{colorlinks=true, allcolors=blue, } \newcounter{mycounter}\setcounter{mycounter}{0} \newcommand\countme{\refstepcounter{mycounter}\themycounter}  \begin{document}  First line \countme{} has some interesting text.  The second line \countme \label{onelabel} has \textbf{more} interesting text.  As we saw at line \ref{onelabel} ...  \newpage  A new page brings new numbers \setcounter{mycounter}{0}   A very different first line \countme{} has other interesting text.  The second line \countme \label{otherlabel} has \textbf{different} interesting text.  As we saw at line \ref{otherlabel} ... \end{document}   As you can see in the screenshot below, the pop up preview of the \ref on the second page doesn't refer to the second line with \label{otherlabel} but to the one on the first page (also has the tooltip "Go to page 1" -- in TeXShop).   Am I not understanding something fundamental about hyperref?      The context for all this is an environment that resets my counter to 0 at begin.  And all subsequent \refs to labels in a second or third iteration of the environment point to the very first instance of that environment, not the correct one where the label sits. Can you reuse marinade used with raw chicken? I marinated chicken a couple weeks ago, and stored the marinade afterwards in a jar. Can it be reused, or is that dangerous? I've been told conflicting stories here. The marinade is mostly teriyaki if that makes a difference.   Intended use of used marinade: Marinate chicken which will then be cooked in the oven. It will not be used with anything that won't be cooked (like a sauce). How to prove $\cos \frac{2\pi }{5}=\frac{-1+\sqrt{5}}{4}$? I would like to find the apothem of a regular pentagon. It follows from   $$\cos \dfrac{2\pi }{5}=\dfrac{-1+\sqrt{5}}{4}.$$  But how can this be proved (geometrically or trigonometrically)? mailto link with HTML body Why isn't smoke flowing with the shape of the domain? I created this Smoke domain.    Then When I added smoke, it didn't stay within the domain, it went through the hole. The title word filter is one of the worst ideas ever implemented on SO Why does the buffer take up whole screen? I am trying to create buffers around the Hurricane Sandy path I created in QGIS (points are lat/long).   I have both points from each day she was tracted and the line I created from it with Points2One.   When I go to make buffers around either the line or the points, the buffer takes up the whole screen. Its all just one color.   I have made buffers before but from data I did not create.   Right now all of my projections are set to WGS 84 EPSG 4326. Object created by joining several objects doesn't rotate uniformly consistently Aloha.  I'm experiencing a similar problem I had with a prior posting  with another object I created by joining 3 objects that doesn't rotate uniformly consistently.  I tried clearing and applying rotation of individual objects and joined objects to no avail.  I have  as well as object by itself in blend file if you need to see them  Any ideas?  Thanks. I am a girl in my early twenties traveling to USA from India and in my visa application I have provided the contact address for a relative in San Francisco, and their invitation letter. I would like to visit LA first. Will I face problems during immigration if I land in LA (with an immediate on wards ticket to SF)? I dont plan to get on the flight from LA to SFO.  Initially I was planning to fly to SFO from India and then fly to LA immediately after completing immigration at SFO airport.