<?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>CodeDump</title>
	<atom:link href="http://codedump.tsdme.nl/feed" rel="self" type="application/rss+xml" />
	<link>http://codedump.tsdme.nl</link>
	<description>A little blog where I write about my experiences while coding.</description>
	<lastBuildDate>Fri, 08 Jan 2010 16:08:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>My new favorite function: map</title>
		<link>http://codedump.tsdme.nl/php/my-new-favorite-function-map</link>
		<comments>http://codedump.tsdme.nl/php/my-new-favorite-function-map#comments</comments>
		<pubDate>Mon, 28 Dec 2009 03:46:55 +0000</pubDate>
		<dc:creator>Ezra</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[formulae]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[memoization]]></category>

		<guid isPermaLink="false">http://codedump.tsdme.nl/?p=111</guid>
		<description><![CDATA[Map, that&#8217;s my new favorite pure function. It&#8217;s very simple in use and has tons of uses! Ever been fidgeting with numbers trying to get the right output? Save your time the next time and use Map!
1234function map&#40;$v, $a, $b, $x = 0, $y = 1&#41;
&#123;
&#160; return &#40;$v == $a&#41; ? $x : &#40;$v - [...]<p>This is a post from <a href="http://codedump.tsdme.nl" title="CodeDump">CodeDump</a><br/><br/><a href="http://codedump.tsdme.nl/php/my-new-favorite-function-map">My new favorite function: map</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Map, that&#8217;s my new favorite pure function. It&#8217;s very simple in use and has tons of uses! Ever been fidgeting with numbers trying to get the right output? Save your time the next time and use Map!</p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">function</span> map<span style="color: #009900;">&#40;</span><span style="color: #000088;">$v</span><span style="color: #339933;">,</span> <span style="color: #000088;">$a</span><span style="color: #339933;">,</span> <span style="color: #000088;">$b</span><span style="color: #339933;">,</span> <span style="color: #000088;">$x</span> <span style="color: #339933;">=</span> 0<span style="color: #339933;">,</span> <span style="color: #000088;">$y</span> <span style="color: #339933;">=</span> 1<span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$v</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$x</span> <span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$v</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$y</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$x</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$b</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$x</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>As you can see it&#8217;s very easy in use. The first parameter is the value that needs to be mapped, the next two values are respectfully the minimum and maximum value of the input and the last two are respectfully the min and max of the output.</p>
<p>So lets take an example: It&#8217;s 20 degrees Celsius outside, but we want to map it to Fahrenheit.</p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">map<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'c'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #339933;">-</span>40<span style="color: #339933;">,</span> 200<span style="color: #339933;">,</span> <span style="color: #339933;">-</span>40<span style="color: #339933;">,</span> 392<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>And that&#8217;s it!, we know that -40 degrees Celsius is -40 degrees Fahrenheit and that 200 degrees Celsius is 392 degrees Fahrenheit, and this way the value of c gets mapped from Celsius to Fahrenheit, that simple! No more fidgeting with formulae.</p>
<p>Also because it&#8217;s a pure function it&#8217;s easily memoized, this will make the already fast function even faster by caching the inputs and the outputs. But because I don&#8217;t know an easy way of Memoizing functions in PHP except for explicitly making the function memoized, i&#8217;ll leave it with a link to <a title="Memoization" href="http://en.wikipedia.org/wiki/Memoization">Wikipedia</a>.</p>
<p>This is a post from <a href="http://codedump.tsdme.nl" title="CodeDump">CodeDump</a><br/><br/><a href="http://codedump.tsdme.nl/php/my-new-favorite-function-map">My new favorite function: map</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codedump.tsdme.nl/php/my-new-favorite-function-map/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox and the Cache Mystery</title>
		<link>http://codedump.tsdme.nl/browser-quirks/firefox-and-the-cache-mystery</link>
		<comments>http://codedump.tsdme.nl/browser-quirks/firefox-and-the-cache-mystery#comments</comments>
		<pubDate>Wed, 15 Jul 2009 20:08:17 +0000</pubDate>
		<dc:creator>Ezra</dc:creator>
				<category><![CDATA[Browser Quirks]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[cache-control]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[headers]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[refresh]]></category>

		<guid isPermaLink="false">http://codedump.tsdme.nl/?p=15</guid>
		<description><![CDATA[Lately I&#8217;ve been working on a small and fast CMS system for my new website. I&#8217;m hoping the website will attract a lot of visitors and since my server is not that strong I&#8217;ve decided on sending some caching headers so the browsers won&#8217;t overwhelm the server with requests.
After some research the Cache-Control header will [...]<p>This is a post from <a href="http://codedump.tsdme.nl" title="CodeDump">CodeDump</a><br/><br/><a href="http://codedump.tsdme.nl/browser-quirks/firefox-and-the-cache-mystery">Firefox and the Cache Mystery</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Lately I&#8217;ve been working on a small and fast CMS system for my new website. I&#8217;m hoping the website will attract a lot of visitors and since my server is not that strong I&#8217;ve decided on sending some caching headers so the browsers won&#8217;t overwhelm the server with requests.</p>
<p>After some research the Cache-Control header will work the best for me. It sets an &#8216;freshness&#8217; time to the resource and during this time the browser won&#8217;t request the resource again and simply load it from disk.</p>
<p>This might seem like a very easy case but it did give me some problems. After sending the headers I verified with firebug that the header was being sent, but when I refreshed the page, Firefox was requesting the resource again. I was stunned, here I was sending the right headers and somehow the browser was simply ignoring me&#8230; or was it?</p>
<p>After some asking around I was still getting nowhere, somehow Firefox just did not want to cache my resources. But after much searching around on the internet, I finally found my answer. <strong>Firefox does not load resources from the cache when refreshing!</strong>.</p>
<p>I don&#8217;t know why, but I guess it makes sense somehow. But I don&#8217;t know why they didn&#8217;t move this to the Hard-Refresh. (Ctrl+F5 or Ctrl+Shift+R). If anyone can answer me this, please do.</p>
<p>This is a post from <a href="http://codedump.tsdme.nl" title="CodeDump">CodeDump</a><br/><br/><a href="http://codedump.tsdme.nl/browser-quirks/firefox-and-the-cache-mystery">Firefox and the Cache Mystery</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codedump.tsdme.nl/browser-quirks/firefox-and-the-cache-mystery/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSearch Wordpress Plugin</title>
		<link>http://codedump.tsdme.nl/php/opensearch-wordpress-plugin</link>
		<comments>http://codedump.tsdme.nl/php/opensearch-wordpress-plugin#comments</comments>
		<pubDate>Mon, 06 Oct 2008 18:01:47 +0000</pubDate>
		<dc:creator>Ezra</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[opensearch]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://codedump.tsdme.nl/?p=9</guid>
		<description><![CDATA[I&#8217;ve been searching for a plugin for Wordpress that makes an OpenSearch file.
Found nothing so i&#8217;ve been working on it myself, however lately I&#8217;ve seen another OpenSearch plugin appear in the plugins database.
The plugin system of wordpress is ok, but could be a lot better, namely a class system. The way it works now is [...]<p>This is a post from <a href="http://codedump.tsdme.nl" title="CodeDump">CodeDump</a><br/><br/><a href="http://codedump.tsdme.nl/php/opensearch-wordpress-plugin">OpenSearch Wordpress Plugin</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been searching for a plugin for Wordpress that makes an OpenSearch file.</p>
<p>Found nothing so i&#8217;ve been working on it myself, however lately I&#8217;ve seen another OpenSearch plugin appear in the plugins database.</p>
<p>The plugin system of wordpress is ok, but could be a lot better, namely a class system. The way it works now is there are a lot of events that you can register functions to, that will fire when the event happens. You can also create some filters that will for example pass the text that has been written in a new post to alter some text like tags added to the post.</p>
<p>It would have been very nice if the plugin system would have worked with a class system, by simply creating a class to expand on the features.</p>
<p>But enough talk about the plugin system, let me tell you some about the plugin. It&#8217;s my first plugin so I&#8217;m still experimenting with the API. The way it works now is it creates a OpenSearch.xml file when the plugin activates and the file is basically static with some variable values that make the file specific for your blog.</p>
<p>As I said before, now someone else started working on the plugin so mine has become useless as the other one is superior to mine. So without further ado, the code that I had for anyone to download if they please.</p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br />106<br />107<br />108<br />109<br />110<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<br />
<span style="color: #009933; font-style: italic;">/** <br />
&nbsp; Edits:<br />
&nbsp; &nbsp; Ezra &nbsp; &nbsp; &nbsp;18-08-08 &nbsp; &nbsp;Eerste versie<br />
&nbsp; &nbsp; Ezra &nbsp; &nbsp; &nbsp;19-08-08 &nbsp; &nbsp;Hij werkt, gzip ook!<br />
&nbsp; &nbsp; Ezra &nbsp; &nbsp; &nbsp;28-08-08 &nbsp; &nbsp;Bij Deactivaten wordt het bestand verwijderd. Encoding veranderd naar US-ASCII.<br />
&nbsp; <br />
*/</span><br />
<br />
<span style="color: #666666; font-style: italic;">/*<br />
Plugin Name: OpenSearch<br />
Plugin URI: http://codedump.tsdme.nl<br />
Description: Add a OpenSearch description to your blog<br />
Version: 0.1<br />
Author: Ezra (Ezra@tsdme.nl)<br />
Author URI: http://codedump.tsdme.nl/Admin<br />
*/</span><br />
<br />
<span style="color: #666666; font-style: italic;">//Definitions</span><br />
<a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;OS_LOCATION&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;OpenSearch.xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/define"><span style="color: #990000;">define</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;PLUGIN_BORDER&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;!-- OpenSearch Plugin --&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">//Hooks</span><br />
register_activation_hook<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'OS_Activate'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
register_deactivation_hook<span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'OS_Deactivate'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'wp_head'</span><span style="color: #339933;">,</span> OS_Head<span style="color: #339933;">,</span> 10<span style="color: #339933;">,</span> 0<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">//Functions</span><br />
<span style="color: #000000; font-weight: bold;">function</span> SO_add_pages<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; add_options_page<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'OpenSearch'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'OpenSearch'</span><span style="color: #339933;">,</span> 10<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">__FILE__</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'OS_Menu'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">function</span> OS_Activate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; <a href="http://www.php.net/clearstatcache"><span style="color: #990000;">clearstatcache</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <br />
&nbsp; <span style="color: #000088;">$os_file</span> &nbsp;<span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;?xml version=<span style="color: #000099; font-weight: bold;">\&quot;</span>1.0<span style="color: #000099; font-weight: bold;">\&quot;</span> encoding=<span style="color: #000099; font-weight: bold;">\&quot;</span>US-ASCII<span style="color: #000099; font-weight: bold;">\&quot;</span>?&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$os_file</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;OpenSearchDescription xmlns=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://a9.com/-/spec/opensearch/1.1/<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$os_file</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;ShortName&gt;&quot;</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/ShortName&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$os_file</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;LongName&gt;Search &quot;</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/LongName&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$os_file</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;Description&gt;Search &quot;</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/Description&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$os_file</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;Tags&gt;&quot;</span><span style="color: #339933;">.</span>get_the_tag_list<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #0000ff;">','</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/Tags&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$os_file</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;Contact&gt;&quot;</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'admin_email'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/Contact&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$os_file</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;Url type=<span style="color: #000099; font-weight: bold;">\&quot;</span>text/html<span style="color: #000099; font-weight: bold;">\&quot;</span> template=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://gedachtegoed.tsdme.nl/?s={searchTerms}<span style="color: #000099; font-weight: bold;">\&quot;</span>/&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$os_file</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;Image height=<span style="color: #000099; font-weight: bold;">\&quot;</span>48<span style="color: #000099; font-weight: bold;">\&quot;</span> width=<span style="color: #000099; font-weight: bold;">\&quot;</span>48<span style="color: #000099; font-weight: bold;">\&quot;</span> type=<span style="color: #000099; font-weight: bold;">\&quot;</span>image/png<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&quot;</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/favicon.png&lt;/Image&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$os_file</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;Query role=<span style="color: #000099; font-weight: bold;">\&quot;</span>example<span style="color: #000099; font-weight: bold;">\&quot;</span> searchTerms=<span style="color: #000099; font-weight: bold;">\&quot;</span>cat<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$os_file</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/OpenSearchDescription&gt;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <br />
&nbsp; <span style="color: #000088;">$os_xml</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><a href="http://www.php.net/fopen"><span style="color: #990000;">fopen</span></a><span style="color: #009900;">&#40;</span>GetHomePath<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>OS_LOCATION<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;wb&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$os_xml</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/flock"><span style="color: #990000;">flock</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$os_xml</span><span style="color: #339933;">,</span> LOCK_EX<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/fwrite"><span style="color: #990000;">fwrite</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$os_xml</span><span style="color: #339933;">,</span> <span style="color: #000088;">$os_file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/fclose"><span style="color: #990000;">fclose</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$os_xml</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #000088;">$gz_xml</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><a href="http://www.php.net/gzopen"><span style="color: #990000;">gzopen</span></a><span style="color: #009900;">&#40;</span>GetHomePath<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>OS_LOCATION<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.gz&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;wb9&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$gz_xml</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/flock"><span style="color: #990000;">flock</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$gz_xml</span><span style="color: #339933;">,</span> LOCK_EX<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/gzwrite"><span style="color: #990000;">gzwrite</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$gz_xml</span><span style="color: #339933;">,</span> <span style="color: #000088;">$os_file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/gzclose"><span style="color: #990000;">gzclose</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$gz_xml</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> OS_Deactivate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/file_exists"><span style="color: #990000;">file_exists</span></a><span style="color: #009900;">&#40;</span>GetHomePath<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>OS_LOCATION<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/unlink"><span style="color: #990000;">unlink</span></a><span style="color: #009900;">&#40;</span>GetHomePath<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>OS_LOCATION<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/file_exists"><span style="color: #990000;">file_exists</span></a><span style="color: #009900;">&#40;</span>GetHomePath<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>OS_LOCATION<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.gz&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/unlink"><span style="color: #990000;">unlink</span></a><span style="color: #009900;">&#40;</span>GetHomePath<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>OS_LOCATION<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.gz&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> OS_Head<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> PLUGIN_BORDER<span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&lt;link rel=<span style="color: #000099; font-weight: bold;">\&quot;</span>search<span style="color: #000099; font-weight: bold;">\&quot;</span> type=<span style="color: #000099; font-weight: bold;">\&quot;</span>application/opensearchdescription+xml<span style="color: #000099; font-weight: bold;">\&quot;</span> title=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Search<span style="color: #000099; font-weight: bold;">\&quot;</span> href=<span style="color: #000099; font-weight: bold;">\&quot;</span>&quot;</span><span style="color: #339933;">.</span>get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">.</span>OS_LOCATION<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\&quot;</span> /&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> PLUGIN_BORDER<span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009933; font-style: italic;">/**<br />
&nbsp; &nbsp;* Returns the path to the blog directory<br />
&nbsp; &nbsp;* <br />
&nbsp; &nbsp;* @since 3.0<br />
&nbsp; &nbsp;* @access public<br />
&nbsp; &nbsp;* @author Arne Brachhold<br />
&nbsp; &nbsp;* @return string The full path to the blog directory<br />
&nbsp; */</span><br />
&nbsp; <span style="color: #000000; font-weight: bold;">function</span> GetHomePath<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000088;">$res</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//Check if we are in the admin area -&gt; get_home_path() is avaiable</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/function_exists"><span style="color: #990000;">function_exists</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;get_home_path&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$res</span> <span style="color: #339933;">=</span> get_home_path<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//get_home_path() is not available, but we can't include the admin</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//libraries because many plugins check for the &quot;check_admin_referer&quot;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//function to detect if you are on an admin page. So we have to copy</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//the get_home_path function in our own...</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$home</span> <span style="color: #339933;">=</span> get_option<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'home'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$home</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$home</span> <span style="color: #339933;">!=</span> get_option<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'siteurl'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$home_path</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/parse_url"><span style="color: #990000;">parse_url</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$home</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$home_path</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$home_path</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'path'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$root</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;PHP_SELF&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;SCRIPT_FILENAME&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$home_path</span> <span style="color: #339933;">=</span> trailingslashit<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$root</span><span style="color: #339933;">.</span><span style="color: #000088;">$home_path</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$home_path</span> <span style="color: #339933;">=</span> ABSPATH<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$res</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$home_path</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$res</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Have fun with it and good luck to the person that is developing the other OpenSearch plugin!</p>
<p>This is a post from <a href="http://codedump.tsdme.nl" title="CodeDump">CodeDump</a><br/><br/><a href="http://codedump.tsdme.nl/php/opensearch-wordpress-plugin">OpenSearch Wordpress Plugin</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codedump.tsdme.nl/php/opensearch-wordpress-plugin/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cookies and Actionscript</title>
		<link>http://codedump.tsdme.nl/actionscript/cookies-and-actionscript</link>
		<comments>http://codedump.tsdme.nl/actionscript/cookies-and-actionscript#comments</comments>
		<pubDate>Thu, 10 Jul 2008 04:22:30 +0000</pubDate>
		<dc:creator>Ezra</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[cookies actionscript browser urlloader]]></category>
		<category><![CDATA[PHPSESSID]]></category>

		<guid isPermaLink="false">http://codedump.tsdme.nl/?p=4</guid>
		<description><![CDATA[I have been searching and searching today to find out a way to see the cookies that the server sends to you while downloading a page using URLLoader. I needed to read the PHPSESSID cookie that php send me so I could use it again in another URLLoader object so I could download some information [...]<p>This is a post from <a href="http://codedump.tsdme.nl" title="CodeDump">CodeDump</a><br/><br/><a href="http://codedump.tsdme.nl/actionscript/cookies-and-actionscript">Cookies and Actionscript</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I have been searching and searching <abbr class="datetime" title="2008-07-10">today</abbr> to find out a way to see the cookies that the server sends to you while downloading a page using URLLoader. I needed to read the PHPSESSID cookie that php send me so I could use it again in another URLLoader object so I could download some information that was protected behind a login. With one URLLoader object I sent the necessary form information to the login script and then I would transfer the PHPSESSID cookie to new URLLoader objects to download the information I wanted that was stored on different pages while still being authenticated with the correct session ID.</p>
<p>Sadly tho, after searching long I could not find anything that would tell me how to read the cookies from the URLLoader object or how to transfer them to the new objects. &#8211;I found a lot about the Flash Shared Object, but that was not what I was looking for, sadly&#8211;</p>
<p>I&#8217;m still not sure why, but for some reason I ran the code without copying the session ID to the new object to see what would happen and waddayaknow, I was getting the information I wanted. So somehow cookies are stored automatically from one URLLoader object to another, what struck me as strange, because I thought I would be starting with a clean sheet when I created a new object, not that cookies &#8211;and who knows what else&#8211; would be stored between them. So next time I will have to find out how to open multiple sessions at the same time, but I&#8217;ll do that when I&#8217;ll need to.</p>
<p>If anyone <strong>does</strong> know how to see what cookies were sent and what their value is, please let me know as I&#8217;m sure I could use it sometime.</p>
<p>P.S: For anyone wondering what I was making. My university has a special page with all my grades and ECTS credits and I wanted an easy way of checking them and maybe alerting me when the page was updated. So I decided to create it with <a title="Adobe Integrated Runtime" href="http://en.wikipedia.org/wiki/Adobe_Integrated_Runtime" target="_blank">AIR</a> because some of my classmates &#8211;That might find it handy too&#8211; have macs while I use a pc, so it would be OS Independent.</p>
<p>This is a post from <a href="http://codedump.tsdme.nl" title="CodeDump">CodeDump</a><br/><br/><a href="http://codedump.tsdme.nl/actionscript/cookies-and-actionscript">Cookies and Actionscript</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codedump.tsdme.nl/actionscript/cookies-and-actionscript/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Conway&#8217;s Game of Life</title>
		<link>http://codedump.tsdme.nl/processing/conways-game-of-life</link>
		<comments>http://codedump.tsdme.nl/processing/conways-game-of-life#comments</comments>
		<pubDate>Fri, 27 Jun 2008 22:52:23 +0000</pubDate>
		<dc:creator>Ezra</dc:creator>
				<category><![CDATA[processing]]></category>
		<category><![CDATA[javascript web processing]]></category>

		<guid isPermaLink="false">http://codedump.tsdme.nl/?p=3</guid>
		<description><![CDATA[Every time I try to learn a new programming language as a &#8216;Hello World&#8217; world program I write Conway&#8217;s Game of Life.
So when John Resig created processing.js I started building again.
I&#8217;m not sure why, but the program is using a LOT of cpu cycles, I tried to optimize as much as I can, but i&#8217;m [...]<p>This is a post from <a href="http://codedump.tsdme.nl" title="CodeDump">CodeDump</a><br/><br/><a href="http://codedump.tsdme.nl/processing/conways-game-of-life">Conway&#8217;s Game of Life</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Every time I try to learn a new programming language as a &#8216;Hello World&#8217; world program I write <a title="Conway's Game of Life" href="http://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" target="_blank">Conway&#8217;s Game of Life.</a></p>
<p>So when John Resig created <a title="Processing.js" href="http://ejohn.org/blog/processingjs/" target="_blank">processing.js</a> I started building again.</p>
<p>I&#8217;m not sure why, but the program is using a LOT of cpu cycles, I tried to optimize as much as I can, but i&#8217;m not sure if it worked as they were javascript optimization and I don&#8217;t know if they apply to processing too. Also I found out that some things still don&#8217;t work, most processing functions are working natively in javascript but some also don&#8217;t exist and are not put into processing.js yet. Like the function round, that like the name implies rounds the number to it&#8217;s closest integer value. I tried to submit a bug at the <a title="Processing-js at GitHub" href="http://github.com/jeresig/processing-js/" target="_blank">github page</a> for processing but there is no such thing. The way I solved my problem is by simply adding 1 to the number and using the floor function that <strong>is</strong> implemented.</p>
<p>I&#8217;ve tried numerous ways of optimizing the program and been timing everything with the awesome <a title="Firebug add-on for Firefox" href="http://getfirebug.com/" target="_blank">add-on Firebug</a>. The test results are noted in the code and if anyone knows any ways to optimize it better please let me know.</p>
<p>But let&#8217;s not ramble on too much about the code and just show it.</p>
<div class="codecolorer-container processing blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br />94<br />95<br />96<br />97<br />98<br />99<br />100<br />101<br />102<br />103<br />104<br />105<br />106<br />107<br />108<br />109<br />110<br />111<br />112<br />113<br />114<br />115<br />116<br />117<br />118<br />119<br />120<br />121<br />122<br />123<br />124<br />125<br />126<br />127<br />128<br />129<br />130<br />131<br /></div></td><td><div class="processing codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #777755;">/** A little test to see if processing.js is really that good...<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp;So, not to break with tradition I wrote my usual Hello World<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - Conway's Game of Life<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - It has a couple of optimizations, namely calculating the new<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - matrix and visualizing them is done at the same time.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - The matrix consists of a ring of 'death'cells as a safe sandbox<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - to avoid memory errors<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - The 2 matrices are not copied over after calculating, but they<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - are swapped.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; Loops are run in reverse because it's faster to check a value to<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; zero than to another value (w&amp;amp;h).<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Author: Ezra Pool (ezra@tsdme.nl);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Version: 0.4<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #993300; font-weight: bold;">int</span> a,b,w,h<span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #993300; font-weight: bold;">int</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span><span style="color: #000000;">&#93;</span> m<span style="color: #000000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #993300; font-weight: bold;">void</span> <span style="color: #996600;">setup</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; h=<span style="color: #000000;">250</span><span style="color: #000000;">;</span>w=<span style="color: #000000;">250</span><span style="color: #000000;">;</span>a=<span style="color: #000000;">0</span><span style="color: #000000;">;</span>b=<span style="color: #000000;">1</span><span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; m = <span style="color: #996600;">new</span> <span style="color: #993300; font-weight: bold;">int</span><span style="color: #000000;">&#91;</span>2<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>w+1<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>h+1<span style="color: #000000;">&#93;</span><span style="color: #000000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #996600;">size</span><span style="color: #000000;">&#40;</span>w, h<span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #cc0000;">frameRate</span><span style="color: #000000;">&#40;</span>5<span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; spawn<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #993300; font-weight: bold;">void</span> <span style="color: #996600;">draw</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #996600;">background</span><span style="color: #000000;">&#40;</span>255<span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lifedeathandshow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #993300; font-weight: bold;">void</span> spawn<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993300; font-weight: bold;">int</span> i,j<span style="color: #000000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #777755;">/**<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; Apparantly it's faster to run a loop in reverse because checking to see<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; if a value is zero is faster than checking another value (w &amp;amp; h).<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; Testing results:<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; normalloop: 148ms<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; reverseloop: 145ms<br />
//*/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #996600;">for</span><span style="color: #000000;">&#40;</span>i=<span style="color: #000000;">1</span><span style="color: #000000;">;</span>i0<span style="color: #000000;">;</span>i--<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #996600;">for</span><span style="color: #000000;">&#40;</span>j=h-<span style="color: #000000;">1</span><span style="color: #000000;">;</span>j<span style="color: #000000;">&amp;</span>gt<span style="color: #000000;">;</span><span style="color: #000000;">0</span><span style="color: #000000;">;</span>j--<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span> = <span style="color: #996600;">floor</span><span style="color: #000000;">&#40;</span><span style="color: #996600;">random</span><span style="color: #000000;">&#40;</span>0,2<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #993300; font-weight: bold;">void</span> lifedeathandshow<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993300; font-weight: bold;">int</span> c,i,j,n<span style="color: #000000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span style="color: #777755;">/**<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; Apparantly it's faster to run a loop in reverse because checking to see<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; if a value is zero is faster than checking another value (w &amp;amp; h).<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; Testing results don't show much improvement, some rounds are faster<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; some are slower, but this is mostly due to the complexity of some of<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; the iterations. (More alive or dead cells).<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; for(i=1;i&amp;lt; 2 || n &amp;gt; 3){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m[b][i][j] = 0;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m[b][i][j] = m[a][i][j];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; point(i,j);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(n == 3){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m[b][i][j] = 1;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; point(i,j);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m[b][i][j] = m[a][i][j];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; //*/</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #996600;">for</span><span style="color: #000000;">&#40;</span>i=w-<span style="color: #000000;">1</span><span style="color: #000000;">;</span>i<span style="color: #000000;">&amp;</span>gt<span style="color: #000000;">;</span><span style="color: #000000;">0</span><span style="color: #000000;">;</span>i--<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #996600;">for</span><span style="color: #000000;">&#40;</span>j=h-<span style="color: #000000;">1</span><span style="color: #000000;">;</span>j<span style="color: #000000;">&amp;</span>gt<span style="color: #000000;">;</span><span style="color: #000000;">0</span><span style="color: #000000;">;</span>j--<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; n = neighbours<span style="color: #000000;">&#40;</span>i,j<span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #996600;">if</span><span style="color: #000000;">&#40;</span>m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span> == 1<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #996600;">if</span><span style="color: #000000;">&#40;</span>n <span style="color: #000000;">&amp;</span>lt<span style="color: #000000;">;</span> 2 || n <span style="color: #000000;">&amp;</span>gt<span style="color: #000000;">;</span> 3<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>b<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span> = <span style="color: #000000;">0</span><span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><span style="color: #996600;">else</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>b<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span> = m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #996600;">point</span><span style="color: #000000;">&#40;</span>i,j<span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><span style="color: #996600;">else</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #996600;">if</span><span style="color: #000000;">&#40;</span>n == 3<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>b<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span> = <span style="color: #000000;">1</span><span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #996600;">point</span><span style="color: #000000;">&#40;</span>i,j<span style="color: #000000;">&#41;</span><span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><span style="color: #996600;">else</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>b<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span> = m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span><span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #777755;">/** I don't know which of the two versions is faster in javascript/processing...<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - is the temp variable one faster or the XOR swap??<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; Testing with Firebug in Mozilla/5.0 Gecko/2008062505 GranParadiso/3.0.1pre<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; Results<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; tempvar: 171ms (10.000 iterations)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; - &nbsp; xorswap: 203ms (10.000 iterations)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; c=b<span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; b=a<span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; a=c<span style="color: #000000;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #777755;">//a ^= b;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #777755;">//b ^= a;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #777755;">//a ^= b;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #993300; font-weight: bold;">int</span> neighbours<span style="color: #000000;">&#40;</span><span style="color: #993300; font-weight: bold;">int</span> i, <span style="color: #993300; font-weight: bold;">int</span> j<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #996600;">return</span> m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i-1<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j-1<span style="color: #000000;">&#93;</span> +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j-1<span style="color: #000000;">&#93;</span> +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i+1<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j-1<span style="color: #000000;">&#93;</span> +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i-1<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span> +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span> +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i+1<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j<span style="color: #000000;">&#93;</span> +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i-1<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j+1<span style="color: #000000;">&#93;</span> +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j+1<span style="color: #000000;">&#93;</span> +<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; m<span style="color: #000000;">&#91;</span>a<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>i+1<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#91;</span>j+1<span style="color: #000000;">&#93;</span><span style="color: #000000;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div></td></tr></tbody></table></div>
<p>This is a post from <a href="http://codedump.tsdme.nl" title="CodeDump">CodeDump</a><br/><br/><a href="http://codedump.tsdme.nl/processing/conways-game-of-life">Conway&#8217;s Game of Life</a></p>
]]></content:encoded>
			<wfw:commentRss>http://codedump.tsdme.nl/processing/conways-game-of-life/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
