« September 2009 | Main | November 2009 »

WordPress Plugin for SurfShare Micropayment System

We've added a WordPress plugin for bloggers who want to try out our SurfShare micropayment platform. If you are interested, visit the SurfShare WordPress Plugin Page for more information and download.

How to use radio and check boxes with JavasScript

Helpful guide to manipulating radio and check boxes via JavaScript

via www.javascriptkit.com

How to add CSS styles via Javascript dynamically

With DOM support across all A-grade browsers, many basic (and some complex) interactions can be accomplished with relative ease. Things like adding and removing elements, inserting HTML text, and working with events are now reasonably manageable on a cross-browser basis. There are, of course, some quirks that have to be accounted for, but generally speaking, most things work as you would expect them to. Except for dynamically inserting CSS into your page.

via yuiblog.com

Nice demonstration of dynamic addition of style tags via javascript.

How to optimize PHP performance with the APC Cache

I highly suggest using the APC cache on your PHP installation. Here are instructions for installing APC on Debian Etch. The package exists on Debian Lenny.

With no extra work by the programmer, APC begins creating pre-interpreted (opcode) caches of your most run PHP files and keeping them in memory. When requests come through, many common classes no longer need to be loaded from the hard disk and interpreted. 

The speed improvements on my server was visible.

MySQL Timestamp Column Properties for Auto Initialization and Update

I always forget the syntax for MySQL Timestamp Properties:

The following column definitions demonstrate each of the possibilities:

  • Auto-initialization and auto-update:

    ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
    
  • Auto-initialization only:

    ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP
    
  • Auto-update only:

    ts TIMESTAMP DEFAULT 0 ON UPDATE CURRENT_TIMESTAMP
    
  • Neither:

    ts TIMESTAMP DEFAULT 0