Useful AJAX Modal windows using javascript frameworks

This is an interesting link which has 30 useful AJAX Modal windows implemented using javascript frameworks.
These have neat little descriptions about the framework it uses.
It is easy to pick the solution based on the current javascript framework your using !

http://www.dottony.com/30-useful-ajax-lightbox-and-modal-dialog-solutions/

Installing UBUNTU on MAC using Parallels Desktop

To install any Linux guest OS on Parallels Desktop, we need to download the respective .dmg from http://www.parallels.com/ptn/download/va/?categ=5&sort=rating&lsort=www

Now at this time, the latest release of UBUNTU for Parallels is 8.04.1 and is available at http://www.parallels.com/ptn/download/va/?va_id=228 Click getApp and download the .dmg.

Administration Interfaces:
GUI
Login: ubuntu
Password: 123


I tried downloading .iso files directly from ubuntu site but could not set it up as it asks for a partition !
Also no luck downloading the CentOS.iso from its site, it wouldn't even create the VM.
Windows 7 gets installed fine !

Get names of month, weekday of the year for any date value in PHP


To get the names of month, weekday, of the year for any date value in PHP, use the function getDate();


Example:

$datePieces = getDate(strtotime($mydate));




echo "Month name: ".$datePieces['month'];  
echo "Weekday name: ".$datePieces['weekday'];

Make sure to use quotes for the key value like $datePieces['month'] instead $datePieces[month], since it would throw : Notice: Use of undefined constant .... 

The associative array $datePieces contains all of the following:




Array
(
    [seconds] => 40
    [minutes] => 58
    [hours]   => 21
    [mday]    => 17
    [wday]    => 2
    [mon]     => 6
    [year]    => 2003
    [yday]    => 167
    [weekday] => Tuesday
    [month]   => June
    [0]       => 1055901520
)

Python contextlib for Timing Python code

If you've ever found yourself needing to measure the execution time of specific portions of your Python code, the `contextlib` module o...