<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>simplebits.org</title>
	<atom:link href="http://simplebits.org/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://simplebits.org</link>
	<description>Developer notes, code snippets and links</description>
	<lastBuildDate>Sat, 21 Nov 2009 19:51:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Detecting iPhone/iPod version</title>
		<link>http://simplebits.org/?p=32</link>
		<comments>http://simplebits.org/?p=32#comments</comments>
		<pubDate>Fri, 20 Nov 2009 12:21:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[iPhone SDK]]></category>

		<guid isPermaLink="false">http://simplebits.org/?p=32</guid>
		<description><![CDATA[In some cases it is required to change application behaviour depending on iPhone or iPod Touch device version.
#import &#60;sys/utsname.h&#62;;
...
struct utsname u;
uname(&#38;u);
After calling uname() function, u.machine will be &#8220;iPod1,1&#8243;, &#8220;iPod2,1&#8243; for iPod Touch and &#8220;iPhone1,1&#8243;, &#8220;iPhone1,2&#8243;, &#8220;iPhone2,1&#8243; for iPhone (or similar depending on current device).
Source:

Mac OS X Manual Page For uname(3)
Detect the specific iPhone/iPod touch model [...]]]></description>
			<content:encoded><![CDATA[<p>In some cases it is required to change application behaviour depending on iPhone or iPod Touch device version.</p>
<pre><code>#import &lt;sys/utsname.h&gt;;
...
struct utsname u;
uname(&amp;u);</code></pre>
<p>After calling <code>uname()</code> function, <code>u.machine</code> will be &#8220;iPod1,1&#8243;, &#8220;iPod2,1&#8243; for iPod Touch and &#8220;iPhone1,1&#8243;, &#8220;iPhone1,2&#8243;, &#8220;iPhone2,1&#8243; for iPhone (or similar depending on current device).</p>
<p>Source:</p>
<ul class="list">
<li><a title="Mac OS X Manual Page For uname(3)" href="http://developer.apple.com/IPhone/library/documentation/System/Conceptual/ManPages_iPhoneOS/man3/uname.3.html" onclick="pageTracker._trackPageview('/outgoing/developer.apple.com/IPhone/library/documentation/System/Conceptual/ManPages_iPhoneOS/man3/uname.3.html?referer=');">Mac OS X Manual Page For uname(3)</a></li>
<li><a title="Detect the specific iPhone/iPod touch model - Stack Overflow" href="http://stackoverflow.com/questions/1108859/detect-the-specific-iphone-ipod-touch-model" onclick="pageTracker._trackPageview('/outgoing/stackoverflow.com/questions/1108859/detect-the-specific-iphone-ipod-touch-model?referer=');">Detect the specific iPhone/iPod touch model &#8211; Stack Overflow</a></li>
<li><a title="Get the type of the iPhone programmatically? - iPhone Dev SDK Forum" href="http://www.iphonedevsdk.com/forum/iphone-sdk-development/21423-get-type-iphone-programmatically.html" onclick="pageTracker._trackPageview('/outgoing/www.iphonedevsdk.com/forum/iphone-sdk-development/21423-get-type-iphone-programmatically.html?referer=');">Get the type of the iPhone programmatically? &#8211; iPhone Dev SDK Forum</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://simplebits.org/?feed=rss2&amp;p=32</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQLite Sorcerer &#8211; great application for editing SQLite</title>
		<link>http://simplebits.org/?p=17</link>
		<comments>http://simplebits.org/?p=17#comments</comments>
		<pubDate>Wed, 18 Nov 2009 09:20:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[SQLite]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://simplebits.org/?p=17</guid>
		<description><![CDATA[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 &#8211; SQLite Sorcerer.

It&#8217;s written using Adobe Flex [...]]]></description>
			<content:encoded><![CDATA[<p>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 &#8211; <a title="SQLite Sorcerer" href="http://afoucal.free.fr/index.php/applications/sqlite-sorcerer/" onclick="pageTracker._trackPageview('/outgoing/afoucal.free.fr/index.php/applications/sqlite-sorcerer/?referer=');">SQLite Sorcerer</a>.</p>
<p style="text-align: center;"><a href="http://simplebits.org/wp-content/uploads/2009/11/sqlite-sorcerer.png" rel="lightbox[17]"><img class="size-medium wp-image-23  aligncenter"  title="SQLite Sorcerer 1.5" src="http://simplebits.org/wp-content/uploads/2009/11/sqlite-sorcerer-300x229.png" alt="sqlite-sorcerer" width="300" height="229" /></a></p>
<p>It&#8217;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.</p>
<p><a href="http://afoucal.free.fr/index.php/applications/sqlite-sorcerer/#Getit" onclick="pageTracker._trackPageview('/outgoing/afoucal.free.fr/index.php/applications/sqlite-sorcerer/_Getit?referer=');">Download SQLite Sorcerer 1.5</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://simplebits.org/?feed=rss2&amp;p=17</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RegExhibit</title>
		<link>http://simplebits.org/?p=16</link>
		<comments>http://simplebits.org/?p=16#comments</comments>
		<pubDate>Sat, 14 Nov 2009 22:34:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Regular Expressions]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://simplebits.org/?p=16</guid>
		<description><![CDATA[RegExhibit is great Mac OS X tool for testing regular expressions.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://homepage.mac.com/roger_jolly/software/#regexhibit" onclick="pageTracker._trackPageview('/outgoing/homepage.mac.com/roger_jolly/software/_regexhibit?referer=');">RegExhibit</a> is great Mac OS X tool for testing regular expressions.</p>
]]></content:encoded>
			<wfw:commentRss>http://simplebits.org/?feed=rss2&amp;p=16</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python &#8211; testing regular expressions</title>
		<link>http://simplebits.org/?p=15</link>
		<comments>http://simplebits.org/?p=15#comments</comments>
		<pubDate>Sat, 14 Nov 2009 22:28:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Regular Expressions]]></category>

		<guid isPermaLink="false">http://simplebits.org/?p=15</guid>
		<description><![CDATA[Very nice and simple online Python regular expressions tester: Python Regular Expression Testing Tool.
]]></description>
			<content:encoded><![CDATA[<p>Very nice and simple online Python regular expressions tester: <a href="http://www.pythonregex.com/" onclick="pageTracker._trackPageview('/outgoing/www.pythonregex.com/?referer=');">Python Regular Expression Testing Tool</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://simplebits.org/?feed=rss2&amp;p=15</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RIA Data Loading Benchmarks</title>
		<link>http://simplebits.org/?p=11</link>
		<comments>http://simplebits.org/?p=11#comments</comments>
		<pubDate>Thu, 24 Apr 2008 10:48:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://simplebits.org/?p=11</guid>
		<description><![CDATA[I just found great application for testing performance of various data exchange protocols for client-server communication using Flex - Census.
]]></description>
			<content:encoded><![CDATA[<p>I just found great application for testing performance of various data exchange protocols for client-server communication using Flex - <a href="http://www.jamesward.org/census/" onclick="pageTracker._trackPageview('/outgoing/www.jamesward.org/census/?referer=');">Census</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://simplebits.org/?feed=rss2&amp;p=11</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random permutation of array</title>
		<link>http://simplebits.org/?p=10</link>
		<comments>http://simplebits.org/?p=10#comments</comments>
		<pubDate>Thu, 17 Apr 2008 09:40:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://simplebits.org/?p=10</guid>
		<description><![CDATA[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 &#60; a.length; ++i )
{
    var j:int = Math.random()*i;
    var j:int = Math.random()*( i [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the code snippet for generating random permutation of array:</p>
<pre><code>var a:Array = new Array( 1, 2, 3, 4, 5, 6, 7, 8, 9 );

trace( "Array: " + a );

for ( var i:uint = 0; i &lt; a.length; ++i )
{
    <del datetime="2009-11-21T19:51:24+00:00">var j:int = Math.random()*i;</del>
    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 );</code></pre>
<p><strong>Update</strong>: fixed bug with finding index of item to swap &#8211; thanks for <a href="http://simplebits.org/?p=10#comment-136">pointing that out Kevin</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://simplebits.org/?feed=rss2&amp;p=10</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flex Explorers</title>
		<link>http://simplebits.org/?p=9</link>
		<comments>http://simplebits.org/?p=9#comments</comments>
		<pubDate>Wed, 16 Apr 2008 13:39:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://simplebits.org/?p=9</guid>
		<description><![CDATA[Four most useful explorers for every Flex developer:

Flex 3 Style Explorer,
Flex 3 Component Explorer,
Flex 2 Primitive Explorer by Jason Hawryluk,
Flex 2 Filter Explorer.

]]></description>
			<content:encoded><![CDATA[<p>Four most useful explorers for every Flex developer:</p>
<ul class="list">
<li><a href="http://examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html" onclick="pageTracker._trackPageview('/outgoing/examples.adobe.com/flex3/consulting/styleexplorer/Flex3StyleExplorer.html?referer=');">Flex 3 Style Explorer</a>,</li>
<li><a href="http://examples.adobe.com/flex3/componentexplorer/explorer.html" onclick="pageTracker._trackPageview('/outgoing/examples.adobe.com/flex3/componentexplorer/explorer.html?referer=');">Flex 3 Component Explorer</a>,</li>
<li><a href="http://www.flexibleexperiments.com/Flex/PrimitiveExplorer/Flex2PrimitiveExplorer.html" onclick="pageTracker._trackPageview('/outgoing/www.flexibleexperiments.com/Flex/PrimitiveExplorer/Flex2PrimitiveExplorer.html?referer=');">Flex 2 Primitive Explorer</a> by <a href="http://flexibleexperiments.wordpress.com/2007/03/14/flex-20-primitive-explorer/" onclick="pageTracker._trackPageview('/outgoing/flexibleexperiments.wordpress.com/2007/03/14/flex-20-primitive-explorer/?referer=');">Jason Hawryluk</a>,</li>
<li><a href="http://merhl.com/flex2_samples/filterExplorer/" onclick="pageTracker._trackPageview('/outgoing/merhl.com/flex2_samples/filterExplorer/?referer=');">Flex 2 Filter Explorer</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://simplebits.org/?feed=rss2&amp;p=9</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TODO/FIXME extension for Flex Builder</title>
		<link>http://simplebits.org/?p=8</link>
		<comments>http://simplebits.org/?p=8#comments</comments>
		<pubDate>Sun, 13 Apr 2008 22:15:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flex Builder]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://simplebits.org/?p=8</guid>
		<description><![CDATA[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 &#62; Other views &#62; General &#62; Tasks panel. It was designed for Flex Builder 2 but works like a charm with version 3.
Download extension
]]></description>
			<content:encoded><![CDATA[<p>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 &gt; Other views &gt; General &gt; Tasks panel. It was designed for Flex Builder 2 but works like a charm with version 3.</p>
<p><a href="http://www.richinternet.de/blog/index.cfm?entry=911D4B57-0F0D-5A73-AF6F4D4D04099757" onclick="pageTracker._trackPageview('/outgoing/www.richinternet.de/blog/index.cfm?entry=911D4B57-0F0D-5A73-AF6F4D4D04099757&amp;referer=');">Download extension</a></p>
]]></content:encoded>
			<wfw:commentRss>http://simplebits.org/?feed=rss2&amp;p=8</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seeded random number generator in ActionScript 3</title>
		<link>http://simplebits.org/?p=7</link>
		<comments>http://simplebits.org/?p=7#comments</comments>
		<pubDate>Sat, 12 Apr 2008 17:12:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>

		<guid isPermaLink="false">http://simplebits.org/?p=7</guid>
		<description><![CDATA[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:

Source Code: Seeded Random in ActionScript 3 by Grant Skinner,
A good Pseudo-Random Number Generator [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I needed seeded pseudo-random number generator for my Flex project. After searching I found three good articles with solution of that problem. <a href="http://www.gskinner.com/blog/archives/2008/01/source_code_see.html" onclick="pageTracker._trackPageview('/outgoing/www.gskinner.com/blog/archives/2008/01/source_code_see.html?referer=');">Grant Skinner</a> proposed use of <a href="http://livedocs.adobe.com/flex/3/langref/flash/display/BitmapData.html#noise()" onclick="pageTracker._trackPageview('/outgoing/livedocs.adobe.com/flex/3/langref/flash/display/BitmapData.html_noise?referer=');">BitmapData.noise()</a> method. He also provides Parker-Miller psuedo-random number generator based on implementation by <a href="http://lab.polygonal.de/2007/04/21/a-good-pseudo-random-number-generator-prng/" onclick="pageTracker._trackPageview('/outgoing/lab.polygonal.de/2007/04/21/a-good-pseudo-random-number-generator-prng/?referer=');">Michael Baczynski</a>.</p>
<p>Useful links:</p>
<ul class="list">
<li><a href="http://www.gskinner.com/blog/archives/2008/01/source_code_see.html" onclick="pageTracker._trackPageview('/outgoing/www.gskinner.com/blog/archives/2008/01/source_code_see.html?referer=');">Source Code: Seeded Random in ActionScript 3</a> by Grant Skinner,</li>
<li><a href="http://lab.polygonal.de/2007/04/21/a-good-pseudo-random-number-generator-prng/" onclick="pageTracker._trackPageview('/outgoing/lab.polygonal.de/2007/04/21/a-good-pseudo-random-number-generator-prng/?referer=');">A good Pseudo-Random Number Generator (PRNG)</a> by Michael Baczynski,</li>
<li><a href="http://www.dncompute.com/blog/2007/03/19/seed-based-pseudorandom-number-generator-in-actionscript.html" onclick="pageTracker._trackPageview('/outgoing/www.dncompute.com/blog/2007/03/19/seed-based-pseudorandom-number-generator-in-actionscript.html?referer=');">SeededRandomizer. A Seed Based Pseudorandom Number Generator in Actionscript</a> by Noel Billig.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://simplebits.org/?feed=rss2&amp;p=7</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plugin: Code Markup</title>
		<link>http://simplebits.org/?p=6</link>
		<comments>http://simplebits.org/?p=6#comments</comments>
		<pubDate>Sat, 12 Apr 2008 12:54:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://simplebits.org/?p=6</guid>
		<description><![CDATA[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.
]]></description>
			<content:encoded><![CDATA[<p>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 <a href="http://www.thunderguy.com/semicolon/wordpress/code-markup-wordpress-plugin/" onclick="pageTracker._trackPageview('/outgoing/www.thunderguy.com/semicolon/wordpress/code-markup-wordpress-plugin/?referer=');">semicolon blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://simplebits.org/?feed=rss2&amp;p=6</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
