I am trying to animate numbers to count up to the number specified in a div. This works but I would like the number to include the necessary commas. For example 62000000 should display as 62,000,000 - is there a way to do this by adding the commas to the numbers in my div or by having js add the commas automatically? Demo   $(function(){     var current = 0;     var finish = jQuery('#statAssistance .statNum').text();     var miliseconds = 3000;     var rate = 100000;      var counter = setInterval(function(){          if(current &gt;= finish) clearInterval(counter);          $("#statAssistance .statNum").text("$" + current);          current = parseInt(current) + parseInt(rate);     }, miliseconds / (finish / rate)); });
I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: &quot;$ 2,500.00&quot;  What's the best way to do this?
Young Adult book about kids being bred for genetic purity in a world where races no longer exist I'm looking for a book I read in Junior High (probably) about a world where everyone was basically the same race.  One genetically pure male and female teenager of each race still exists.  They are transporting a genetically pure boy to meet his genetically pure female counterpart and accidentally introduce him to a genetically pure female of a different race.  And, of course, chaos ensues.  Any thoughts? Streaming large files in a java servlet I am trying to make a map where you have to make a village from scratch, and I need help. I'm trying to make a /clone command happen relative to where a mob that's named house is, and I cant figure it out. Any help? I know cell phone cameras are the lowest rung, but when reading reviews of phones, the reviewers always have sample shots that are much better than what I can manage.  What are some ways to take decent shots with a cell phone camera?  (I'm thinking of the higher end Android or iPhone cameras). Error message in my excel formula Every element outside the maximal ideal of a local ring is a unit A homework question from my algebra class asks:     Show that in a local ring $R$ with maximal ideal $M$, every element outside $M$ is a unit.   My argument is that since $M$ is maximal $R /M $ is a field and so for any $ x \in R \backslash M $, $ x + M $ has a multiplicative inverse, which implies $ x $ is a unit.  I don't see where we need the fact that $R$ is a local ring. Weird font in system windows Suddenly all the system windows have this weird font. I can't read nor understand what the system is asking me. How can I change it to normal fonts?    I'm using OS X Yosemite 10.10.3 In "", Mark Lutz mentions "mixins". I'm from a C/C++/C# background and I have not heard the term before. What is a mixin?   Reading between the lines of  (which I've linked to because it's quite long), I'm presuming it's a case of using multiple inheritance to extend a class as opposed to 'proper' subclassing. Is this right?   Why would I want to do that rather than put the new functionality into a subclass? For that matter, why would a mixin/multiple inheritance approach be better than using composition?  What separates a mixin from multiple inheritance? Is it just a matter of semantics? Why don't wizards always use multiple wands? We are asked the following:      let $f(x)$ be a continuous function on $[0, 1]$ such that   $$\int _ {0} ^ {1} \ f(y) dy = 1$$   prove that $f(x) = 1$ for some $x ∈ [0, 1]$   The question asks to take into account Rolle's Theorem and Mean Value Theorem.  I'm aware of the definitions, but I am really unsure how to answer this question and my tutors are not really responding till after easter.    Could someone please help? Why is there a "y" involved?  Thanks you How to delete entry in Auto Complete in Microsoft Edge How do I delete an unwanted entry in AutoComplete in Microsoft Edge?  I have tried everything including highlighting with the down arrows and nothing works. I use the highlight mode in vim to copy a few characters.  I then want to paste more than once.  My current technique does not work well.  Sample text: Linux Solaris Irix HP-UX  Suppose I want to copy the word Linux, then paste over Solaris and Irix.   Place cursor at L in Linux Command v (for visual hilite), then e (for end-of-word), then y (for yank/copy) Now Linux is on my "vim clipboard" Move cursor to S in Solaris (first instance) Command v (for visual hilite), then e (for end-of-word), then p (for paste) Text is now: Linux Linux Irix HP-UX, but now Solaris is on my "vim clipboard" Move cursor to I in Irix (second instance) Command v (for visual hilite), then e (for end-of-word), then p (for paste) Text is now: Linux Linux Solaris HP-UX which is not what I expected.   I resort to using highlite/paste with the mouse (via X Terminal).  Surely, I can do this better.  How? How to detect when a variable changes value How can I easily detect when a variable changes value? I would like the execution of the program to break on the debugger whenever a specified variable changes value. Right now I'm using Eclipse's debugger. I have an Object[] array, and I am trying to find the ones that are primitives. I've tried to use Class.isPrimitive(), but it seems I'm doing something wrong:  int i = 3; Object o = i;  System.out.println(o.getClass().getName() + ", " +                    o.getClass().isPrimitive());   prints java.lang.Integer, false.  Is there a right way or some alternative? Mod of numbers with large exponents [modular order reduction] I am wondering whether there exists a function such that:  $$\lim_{x \rightarrow a}f(x)=\infty$$  at some point $a$ on the real axis but yet,  $$\int_{-\infty}^{+\infty}\left|f(x)\right|\ dx&lt;\infty$$  Does the fact that a function is unbounded imply that it has no finite integral? Why are .goutputstream-xxxxx files created in home folder? I find a lot of files with names of the like  .goutputstream-xxxxx   where xxxxx are some alphanumeric characters.  Here is a screenshot of the home folder    Any idea why I should keep these or can I remove and also stop further creation? How do I (or can I) SELECT DISTINCT on multiple columns? I need to retrieve all rows from a table where 2 columns combined are all different. So I want all the sales that do not have any other sales that happened on the same day for the same price. The sales that are unique based on day and price will get updated to an active status.  So I'm thinking:  UPDATE sales SET status = 'ACTIVE' WHERE id IN (SELECT DISTINCT (saleprice, saledate), id, count(id)              FROM sales              HAVING count = 1)   But my brain hurts going any farther than that. Maximum number of files in one ext3 directory while still getting acceptable performance? I have an application writing to an ext3 directory which over time has grown to roughly three million files. Needless to say, reading the file listing of this directory is unbearably slow.  I don't blame ext3. The proper solution would have been to let the application code write to sub-directories such as ./a/b/c/abc.ext rather than using only ./abc.ext.  I'm changing to such a sub-directory structure and my question is simply: roughly how many files should I expect to store in one ext3 directory while still getting acceptable performance? What's your experience?  Or in other words; assuming that I need to store three million files in the structure, how many levels deep should the ./a/b/c/abc.ext structure be?  Obviously this is a question that cannot be answered exactly, but I'm looking for a ball park estimate. Interscholastic Mathematics League Senior B Division #2