In some cases it is required to change application behaviour depending on iPhone or iPod Touch device version.
#import <sys/utsname.h>;
...
struct utsname u;
uname(&u);
After calling uname() function, u.machine will be “iPod1,1″, “iPod2,1″ for iPod Touch and “iPhone1,1″, “iPhone1,2″, “iPhone2,1″ for iPhone (or similar depending on current device).
Source:
Last few days I spent a lot of time looking for clean and simple tool for viewing and editing SQLite databases. As a user of Windows and Mac computers, I wanted it to be multiplatform so I could use it on both machines. And finally I found it – SQLite Sorcerer.

It’s written using Adobe Flex and AIR so it runs as standalone application on all supported operating systems. There are no fancy features available in many commercial applications, but I am sure that there is everything that most users need during day-to-day usage of SQLite.
Download SQLite Sorcerer 1.5
RegExhibit is great Mac OS X tool for testing regular expressions.
Very nice and simple online Python regular expressions tester: Python Regular Expression Testing Tool.
I just found great application for testing performance of various data exchange protocols for client-server communication using Flex - Census.
Here is the code snippet for generating random permutation of array:
var a:Array = new Array( 1, 2, 3, 4, 5, 6, 7, 8, 9 );
trace( "Array: " + a );
for ( var i:uint = 0; i < a.length; ++i )
{
var j:int = Math.random()*i;
var j:int = Math.random()*( i + 1 );
// Swap a[i] and a[j]
var temp:* = a[j];
a[j] = a[i];
a[i] = temp;
}
trace( "Permutation: " + a );
Update: fixed bug with finding index of item to swap – thanks for pointing that out Kevin!
Four most useful explorers for every Flex developer:
Great little tool for Flex Builder users. It parser all ActionScript and MXML files and searches comments for FIXME and TODO tokens. Complete list of them will be available in Window > Other views > General > Tasks panel. It was designed for Flex Builder 2 but works like a charm with version 3.
Download extension
Recently I needed seeded pseudo-random number generator for my Flex project. After searching I found three good articles with solution of that problem. Grant Skinner proposed use of BitmapData.noise() method. He also provides Parker-Miller psuedo-random number generator based on implementation by Michael Baczynski.
Useful links:
The best plugin for displaying code in WP. Without any fancy coloring but supports HTML tags and preserves code formatting. You can find it at semicolon blog.