Coding a jQuery hotbox. I've always wanted to be good in 3D modeling.
It's lightweight, fully localisable and has zero dependencies. Library Methods formatMoney() - format any number into currency The most basic function of this library is money-formatting numbers, with currency symbol, precision (places), and thousand/decimal separators: formatColumn() - format a list of values for column-display This table demonstrates how accounting.js can take a list of numbers and money-format them with padding to line up currency symbols and decimal places (NB: white-space:pre is needed for the browser to render the padded spaces): // Format list of numbers for display: accounting.formatColumn([123.5, 3456.49, 777888.99, 12345678, -5432], "$ "); formatNumber() - format a number with custom precision and localisation toFixed() - better rounding for floating point numbers Demo / Try it out Money formatting:
These articles are tagged with lmaf. The project we’re creating is called Turing. Documentation is available at turingjs.com. Last week I demonstrated a simple event class implementation. Some readers pointed out weaknesses in that implementation, so I’ve written fixes and regression tests. Listener Removal Richard pointed out that listeners that remove themselves might cause unexpected side effects: Take care when removing listeners!
To put it concisely: removing listeners mutates the same array that’s used to fire events. If you’re still puzzled, consider this test: There are two counters that get incremented when the same event, 'add', fires: i and j. Assert.ok(! Then I fire the same event again, which should still trigger add2. . ✕ Assertion failed in: test listener removal in Emitter AssertionError: 1 == 2 But how do we fix it?