Welcome

Thanks for visiting my productivity blog. I’m passionate about personal productivity, you know, finding that better way to be effective in the everyday things. I guess I simply don’t like wasting time.

With productive.me I’ll attempt to share tools and tidbits to improve .. well anything that happens to interest me at the time.


Jaco Swarts




jQuery UI autocomplete as a kind of IntelliSense

Apr 13, 2012   //   by Jaco Swarts   //   Develop  //  No Comments

I recently had to develop an email template system, where the user could create a new email template with a couple of placeholders to be replaced when the email is compiled and sent. What I wanted was a normal textarea where the user could type out the email body, but when they pressed the $ key followed by a couple of characters, then the jQuery UI dialog should dropdown and show the various fields that are available and match with the characters entered. Read more >>

New iPhone app: Plan my call

Mar 12, 2012   //   by Jaco Swarts   //   Apps, Blog, Develop  //  No Comments

Plan my call Splash screenI’m proud to announce that my first iPhone app has just gone into public beta. It’s called Plan my call and was developed by a joint venture between Jeanne Jordaan (the visionary), Renier van Rensburg (the backbone) and myself (the coder). To become one of the lucky beta testers, you can navigate to http://planmycall.com and click the GET IT NOW or BUY ON ITUNES button.

Once registered with TestFlight, remember to add your iPhone as a device by following the email instructions and I’ll add you to the list of beta testers for the next build.

Looking forward to some constructive feedback!

Simple javascript formatCurrency function

Dec 16, 2011   //   by Jaco Swarts   //   Develop  //  No Comments

Wrote this recently after finding an answer by Tim Pietzcker at stackoverflow.com. Thought it was quite neat.

Credit: Jeffrey Friedl, Mastering Regular Expressions, 3rd. edition, p. 66-67

/*****************
 * formats number into currency
 *
 * num : the value to be formatted
 * dec : the number of decimals to be returned
 * sep : the thousands seperator
 * decChar : the decimals seperator
 * pre : string to prefix the result
 * post : string to postfix the result
 **/
function formatCurrency(num,dec,sep,decChar,pre,post) {
    var n = num.toString().split(decChar);
    return (pre || '') + n[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + sep) + (n.length > 1 ? decChar + n[1].substr(0,dec) : '') + (post || '');
}

close

Login

Switch to our mobile site