background preloader


Facebook Twitter

Coding a jQuery hotbox. I've always wanted to be good in 3D modeling.

Coding a jQuery hotbox

It is pure magic. It allows you to create anything you imagine in a photo realistic way. If you have the skills that is. I clearly don't, and I do not have the time to acquire them. Accounting.js - format money / currency in JavaScript. Accounting.js is a tiny JavaScript library for number, money and currency formatting, with optional excel-style column rendering (to line up symbols and decimals).

accounting.js - format money / currency in JavaScript

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:

AJAX file upload tutorial. In this tutorial I will show you how to create simple AJAX file upload system using PHP and JavaScript. Tutorial info: Bookmark AJAX file upload tutorial Step 1 - AJAX file upload AJAX file upload tutorial. Mastering Node - Open Source Nodejs eBook.


JavaScript Testing. JavaScript Library. Javascript. Essential JavaScript Design Patterns For Beginners. Design patterns are reusable solutions to commonly occurring problems in software design. They are both exciting and a fascinating topic to explore in any programming language. One reason for this is that they help us build upon the combined experience of many developers that came before us and ensure we structure our code in an optimized way, meeting the needs of problems we're attempting to solve. Design patterns also provide us a common vocabulary to describe solutions. This can be significantly simpler than describing syntax and semantics when we're attempting to convey a way of structuring a solution in code form to others.

In this book we will explore applying both classical and modern design patterns to the JavaScript programming language. Target Audience This book is targeted at professional developers wishing to improve their knowledge of design patterns and how they can be applied to the JavaScript programming language. Acknowledgments Credits Reading We already use patterns everyday. Let's Make a Framework: Custom Events 3. Let’s Make a Framework is an ongoing series about building a JavaScript framework from the ground up.

Let's Make a Framework: Custom Events 3

These articles are tagged with lmaf. The project we’re creating is called Turing. Documentation is available at 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?