<?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>Hypn.za.net &#187; programming</title>
	<atom:link href="http://www.hypn.za.net/blog/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hypn.za.net/blog</link>
	<description>Games, programming, and general geekyness =)</description>
	<lastBuildDate>Wed, 28 Jul 2010 21:28:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Prince of Persia &#8211; Source Code Notes</title>
		<link>http://www.hypn.za.net/blog/2009/11/25/prince-of-persia-source-code-notes/</link>
		<comments>http://www.hypn.za.net/blog/2009/11/25/prince-of-persia-source-code-notes/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 20:31:05 +0000</pubDate>
		<dc:creator>Hypn</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.hypn.za.net/blog/?p=259</guid>
		<description><![CDATA[Here&#8217;s some retro geeky awesomeness&#8230; Prince of Persia source code notes! Download (404kb)]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s some retro geeky awesomeness&#8230; Prince of Persia source code notes!</p>
<p><a href="http://www.hypn.za.net/downloads/Prince%20of%20Persia%20Source%20Code%20Notes.pdf">Download</a> (404kb)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypn.za.net/blog/2009/11/25/prince-of-persia-source-code-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>USB Webserver 8.0 (unofficial)</title>
		<link>http://www.hypn.za.net/blog/2009/05/17/usb-webserver-80-unofficial/</link>
		<comments>http://www.hypn.za.net/blog/2009/05/17/usb-webserver-80-unofficial/#comments</comments>
		<pubDate>Sun, 17 May 2009 09:14:55 +0000</pubDate>
		<dc:creator>Hypn</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.hypn.za.net/blog/?p=228</guid>
		<description><![CDATA[UPDATE (15 July 2010): An &#8220;official&#8221; version of USB Webserver 8 has been released, please use this instead of my &#8220;unofficial&#8221; version. You can download it from http://www.usbwebserver.net/ This is an unofficial updated version of USB Webserver. The original USB Webserver was created by http://www.usbwebserver.nl &#8211; but their site is currently down, and they haven&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE (15 July 2010):</strong> An &#8220;official&#8221; version of USB Webserver 8 has been released, please use this instead of my &#8220;unofficial&#8221; version. You can download it from <a href="http://www.usbwebserver.net/" target="_blank">http://www.usbwebserver.net/</a></p>
<p>This is an unofficial updated version of USB Webserver. The original USB Webserver was created by <a title="USB Webserver" href="http://www.usbwebserver.nl" target="_blank">http://www.usbwebserver.nl</a> &#8211; but their site is currently down, and they haven&#8217;t released an update for a while.</p>
<p>This version contains:</p>
<p>Apache: 2.2.11<br />
PHP: 5.2.10-dev (with GD and cURL)<br />
MySQL: 5.1.30-community (with InnoDB)</p>
<p>It defaults to &#8220;English&#8221; (the original was &#8220;Dutch&#8221;), and you may need to change the ports if you have been using USB Webserver previously.</p>
<p><strong>Download</strong>: &#8220;<a href="http://hypn.za.net/downloads/USB%20Webserver%208.0%20(unofficial).zip">USB Webserver 8.0 (unofficial).zip</a>&#8221; (17.6mb)</p>
<p>(and yes, I know the main USB Webserver screen still says &#8220;USB Webserver 7.0&#8243; &#8211; ignore that :P)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypn.za.net/blog/2009/05/17/usb-webserver-80-unofficial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP-SciTE</title>
		<link>http://www.hypn.za.net/blog/2008/10/05/php-scite/</link>
		<comments>http://www.hypn.za.net/blog/2008/10/05/php-scite/#comments</comments>
		<pubDate>Sun, 05 Oct 2008 20:38:10 +0000</pubDate>
		<dc:creator>Hypn</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.hypn.za.net/blog/?p=157</guid>
		<description><![CDATA[As a PHP developer I&#8217;ve tried many different IDEs but have always ended going back to SciTE. I started using a version with modifications by Bruce Dodson, but got frustrated with it not listing PHP files in the default &#8220;File Open&#8221; window, and not recognizing PHP5 files as PHP files, so I got to tinkering. [...]]]></description>
			<content:encoded><![CDATA[<p>As a PHP developer I&#8217;ve tried many different IDEs but have always ended going back to <a href="http://www.scintilla.org/SciTE.html" target="_blank">SciTE</a>. I started using a version with modifications by <a href="http://gisdeveloper.tripod.com/scite.html" target="_blank">Bruce Dodson</a>, but got frustrated with it not listing PHP files in the default &#8220;File Open&#8221; window, and not recognizing PHP5 files as PHP files, so I got to tinkering.</p>
<p>I changed the font and colours (for PHP files anyway), removed the other languages, enabled the auto-complete dropdown, changed the menus, included the PHP binary to check files for syntax errors, and included <a href="http://www.sourceforge.net/projects/phpstylist" target="_blank">phpStylist</a> to beautify source code. I also made a new icon, and added the latest &#8220;php.api&#8221;, and made F1 (help) open the PHP manual (included).<br />
<span id="more-157"></span><br />
I made this package for my own personal use, and possibly that of friends, and I offer NO (as in ZERO) support for it. I will also not be held responsible for any damages caused &#8211; you use this at your own risk. Please do not contact the authors of SciTE regarding bugs or problems as I have made several modifications to the compiled executable that may result in all sorts of bugs &#8211; which they aren&#8217;t responsible for.</p>
<p>That said, I hope you will find this packge useful. Once you&#8217;ve opened a PHP file (with &#8220;PHP-SciTE.exe&#8221;) press F5 to check for syntax errors, F7 to run the PHP script currently open, and CTRL+F7 to tidy your source code.</p>
<p>Please realize that your code will be changed to how I like my code formatted which might frustrate you&#8230; the settings passed to phpStylist are in &#8220;php_tidy.bat&#8221; if you want to change them.</p>
<p>I really don&#8217;t know SciTE that well, and most of what I&#8217;ve done has just been lucky guessing, so I probably wont be able to help you with questions but if you want to get hold of me you can e-mail me at: php-scite[at]hypn.za.net</p>
<p>Download: <a href="/downloads/PHP-SciTE 1.7.6.zip">PHP-SciTE 1.7.6.zip</a> (8.85mb)</p>
<p>UPDATE: first bug :( the &#8220;Check Syntax&#8221; menu item (under &#8220;Tools&#8221;) says the hotkey is CTRL+F5, but it&#8217;s actually just F5.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypn.za.net/blog/2008/10/05/php-scite/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL auto-timestamping triggers</title>
		<link>http://www.hypn.za.net/blog/2008/09/22/mysql-auto-timestamping-triggers/</link>
		<comments>http://www.hypn.za.net/blog/2008/09/22/mysql-auto-timestamping-triggers/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 13:24:47 +0000</pubDate>
		<dc:creator>Hypn</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.hypn.za.net/blog/?p=144</guid>
		<description><![CDATA[I used to be dead against things like triggers&#8230; mainly because I hated coding them (and SQL) back when I learnt Oracle PL/SQL at college, and I&#8217;ve always been a &#8220;bare-minimum, must-be-backward-compatible, code-it-yourself&#8221; programmer&#8230; but now I&#8217;ve decided it&#8217;s just much easier to use them, and it&#8217;s not my fault if people refuse to upgrade [...]]]></description>
			<content:encoded><![CDATA[<p>I used to be dead against things like triggers&#8230; mainly because I hated coding them (and SQL) back when I learnt Oracle PL/SQL at college, and I&#8217;ve always been a &#8220;bare-minimum, must-be-backward-compatible, code-it-yourself&#8221; programmer&#8230; but now I&#8217;ve decided it&#8217;s just much easier to use them, and it&#8217;s not my fault if people refuse to upgrade to MySQL 5.</p>
<p>So here&#8217;s my niffty trigger code for the day, which automatically updates the &#8220;last_updated&#8221; (timestamp) field in a table, when a record is inserted or updated:</p>
<blockquote><p><em>CREATE TRIGGER `database_name`.`last_updated_insert_trigger`<br />
BEFORE INSERT ON `database_name`.`table_name` FOR EACH ROW SET new.last_updated := UNIX_TIMESTAMP();</em></p>
<p><em>CREATE TRIGGER `database_name`.`last_updated_update_trigger`<br />
BEFORE UPDATE ON `database_name`.`table_name` FOR EACH ROW SET new.last_updated := UNIX_TIMESTAMP();</em></p></blockquote>
<p>There&#8217;s probably a better way to do this (and I think you can combine both triggers, using &#8220;OR BEFORE UPDATE&#8221;?) but this is the first I&#8217;ve worked with triggers in MySQL and I&#8217;m too lazy to fiddle. Hope it helps. As I&#8217;m sure you can guess, `database_name` is your database name, `last_updated_update_trigger` is the name of your trigger, `table_name` is your table name, and `last_updated` is your field name that will contain the timestamp.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypn.za.net/blog/2008/09/22/mysql-auto-timestamping-triggers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn your S60 phone into an SMS interface for your web application</title>
		<link>http://www.hypn.za.net/blog/2008/08/30/turn-your-s60-phone-into-an-sms-interface-for-your-web-application/</link>
		<comments>http://www.hypn.za.net/blog/2008/08/30/turn-your-s60-phone-into-an-sms-interface-for-your-web-application/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 15:28:15 +0000</pubDate>
		<dc:creator>Hypn</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.hypn.za.net/blog/?p=123</guid>
		<description><![CDATA[A company called Fromdistance has released a program for Series 60 Symbian cell phones, which allow you to use your phone as a Web Application SMS Gateway. Basically you download the Series 60 (Symbian) client and install it on your phone. It will check their server for any &#8220;queued&#8221; messages, and if it finds any [...]]]></description>
			<content:encoded><![CDATA[<p>A company called <a href="http://www.fromdistance.com" target="_blank">Fromdistance</a> has released a program for Series 60 Symbian cell phones, which allow you to use your phone as a Web Application SMS Gateway.</p>
<p>Basically you download the Series 60 (Symbian) client and install it on your phone. It will check their server for any &#8220;queued&#8221; messages, and if it finds any it will send them out &#8211; so the message will come from your number, at your expense (or for free, if you have free SMSes).</p>
<p>You can &#8220;queue&#8221; message by sending an HTTP POST to their server, which means you can implement it into a website, intranet, Facebook App, etc.</p>
<p>It can also check your received SMSes for a keyword or phrase, to flag them as &#8220;inbound&#8221; messages, which are then sent to their server and forwarded on to your web application.</p>
<p>That allows your web app to communicate with people via SMS, and allows them to communicate via SMS with your web app.</p>
<p>See <a onclick="urchinTracker ('/outgoing/http_www_fromsms_net_index_en_htm');" href="http://www.fromsms.net/index_en.htm" target="_blank">FromSMS</a></p>
<p>Hope someone found this interesting, helpful, or financially beneficial (in which case feel free to share with me).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypn.za.net/blog/2008/08/30/turn-your-s60-phone-into-an-sms-interface-for-your-web-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FaceWound hacks</title>
		<link>http://www.hypn.za.net/blog/2008/04/06/facewound-hacks/</link>
		<comments>http://www.hypn.za.net/blog/2008/04/06/facewound-hacks/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 19:31:59 +0000</pubDate>
		<dc:creator>Hypn</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[hacks]]></category>

		<guid isPermaLink="false">http://www.hypn.za.net/blog/?p=19</guid>
		<description><![CDATA[There&#8217;s a game called &#8220;FaceWound&#8220;, a (self-titled) &#8220;Zombie Murder Simulator&#8220;, which the author of Garry&#8217;s Mod has been working on for a few years. He recently released the latest version for free, though he says &#8220;it&#8217;s totally unfinished, unpolished and should be treated with the same attitude you’d treat a leaked alpha with&#8221; &#8211; despite [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a game called &#8220;<a href="http://www.garry.tv/?p=512" target="_blank">FaceWound</a>&#8220;, a (self-titled) &#8220;<em>Zombie Murder Simulator</em>&#8220;, which the author of <a href="http://www.garrysmod.com" target="_blank">Garry&#8217;s Mod</a> has been working on for a few years. He recently <a href="http://www.garry.tv/?p=512" target="_blank">released the latest version</a> for free, though he says &#8220;<em>it&#8217;s totally unfinished, unpolished and should be treated with the same attitude you’d treat a leaked alpha with</em>&#8221; &#8211; despite this it&#8217;s suprisingly bug-free, and fully playable (not to mention lots of fun).</p>
<p>So far the only thing people seem to be moaning about is that you don&#8217;t get extra lives or health during the game, making it rather difficult to finish. There have also been requests for &#8220;Infinite Lives&#8221; and &#8220;Infinite Ammo&#8221; cheats for it &#8211; so I decided to make some hacks ;)</p>
<p><span id="more-19"></span></p>
<p>The &#8220;Patches&#8221; make changes directly to the game files, and can be used in conjunction with each other. You can also undo the changes made to your game file.</p>
<p><strong><a href="http://www.hypn.za.net/downloads/facewound/fwound-patch-infinite-EVERYTHING.exe">Infinite Lives, Health, Ammo and Energy Patch</a></strong> (or you can download the patches individually: <a href="http://www.hypn.za.net/downloads/facewound/fwound-patch-infinite-lives.exe">Infinite Lives Patch</a>, <a href="http://www.hypn.za.net/downloads/facewound/fwound-patch-infinite-health.exe">Infinite Health Patch</a>, <a href="http://www.hypn.za.net/downloads/facewound/fwound-patch-infinite-ammo.exe">Infinite Ammo Patch</a>, <a href="http://www.hypn.za.net/downloads/facewound/fwound-patch-infinite-energy.exe">Infinite Energy Patch)</a></p>
<p><strong>UPDATE (08 April 2008):</strong> I&#8217;ve created a patch which gives you an extra life every 4000 score points &#8211; you should be able to get an extra life half way through the second level, and a second extra life near the beginning of the third level&#8230; though I think it&#8217;ll be easier to get extra lives on the later levels. Download: <strong><a href="http://www.hypn.za.net/downloads/facewound/FaceWound extra lives.exe" target="_self">Facewound extra lives</a></strong> (5.95kb)</p>
<p>Also made a patch to fix a bug, where selecting &#8220;New Game&#8221; from the menu while in a game doesn&#8217;t reset your score back to 0. Download: <strong><a href="http://www.hypn.za.net/downloads/facewound/FaceWound score fix.exe" target="_self">FaceWound (new game) score fix</a></strong> (5.80kb)</p>
<p><strong>UPDATE (09 April 2008):</strong> One of the guys on the official FaceWound forums (Im Crimson) <a href="http://forums.facepunchstudios.com/showthread.php?t=521557#post9590442" target="_blank">asked if I could make a patch</a> to give you more plutonium so you can buy more weapons, so here they are: <strong><a href="http://www.hypn.za.net/downloads/facewound/FaceWound%20double%20plutonium.exe" target="_self">FaceWound Double plutonium</a></strong> (5.77kb) and <strong><a href="http://www.hypn.za.net/downloads/facewound/FaceWound%20triple%20plutonium.exe" target="_self">FaceWound Triple plutonium</a></strong> (5.76kb) :D</p>
<p><strong>UPDATE (10 April 2008):</strong> More hacks, and this page is becoming a real mess. Inspired by <a href="http://forums.facepunchstudios.com/showthread.php?t=520843" target="_blank">Mariowound &#8211; A Mario mod for Facewound</a> (which is awesome), I thought I&#8217;d look into FaceWound&#8217;s jumping and collision detection, to try and hack it so those coin-boxes could actually work&#8230; instead I ended up with some jump hacks which might (though probably not) come in handy for someone, somewhere, one day: <strong><a href="http://www.hypn.za.net/downloads/facewound/FaceWound%20half-height%20jumps.exe" target="_self">FaceWound half-height jumping</a></strong>, <strong><a href="http://www.hypn.za.net/downloads/facewound/FaceWound%20double-height%20jumps.exe" target="_self">FaceWound double-height jumping</a></strong>, <strong><a href="http://www.hypn.za.net/downloads/facewound/FaceWound%20infinite%20jumps.exe" target="_self">FaceWound infinite jumping</a></strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypn.za.net/blog/2008/04/06/facewound-hacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning LINGO</title>
		<link>http://www.hypn.za.net/blog/2008/03/08/learning-lingo/</link>
		<comments>http://www.hypn.za.net/blog/2008/03/08/learning-lingo/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 10:39:49 +0000</pubDate>
		<dc:creator>Hypn</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.hypn.za.net/blog/?p=11</guid>
		<description><![CDATA[My brother has to learn &#8220;LINGO&#8221; for varsity&#8230; basically it&#8217;s a programming language &#8220;to make building and solving linear, nonlinear and integer optimization models&#8221;. Yeh I&#8217;m not really sure what any of that means either, but I&#8217;m the computer programmer in the family, and my brother&#8217;s the genius/mathematician so I said I&#8217;d try and figure [...]]]></description>
			<content:encoded><![CDATA[<p>My brother has to learn &#8220;<a href="http://www.lindo.com" title="LINGO" target="_blank">LINGO</a>&#8221; for varsity&#8230; basically it&#8217;s a programming language &#8220;to make building and solving linear, nonlinear and integer optimization models&#8221;. Yeh I&#8217;m not really sure what any of that means either, but I&#8217;m the computer programmer in the family, and my brother&#8217;s the genius/mathematician so I said I&#8217;d try and figure it out and teach him&#8230;</p>
<p style="text-align: center"><img src="/images/lingo1.jpg" alt="LINGO" height="247" width="350" /></p>
<p style="text-align: center"><span id="more-11"></span></p>
<p>It&#8217;s really good at what it says it does, but the logic and data-typing is horrible (but has made me appreciate PHP so much more!), the editor/IDE is nasty&#8230; it sort of support colours and formatting (eg: bold) &#8211; but it seems to set some of these itself, otherwise use the formatting of the text you paste in (which is really annoying).</p>
<p>I suspect you&#8217;d normally learn LINGO in a class, or from a book, or something like that&#8230; which would explain why I&#8217;m struggling to learn it using just the help file. Even Google doesn&#8217;t offer help much &#8211; it turns out Macromedia/Adobe Director has it&#8217;s own thing called &#8220;LINGO&#8221;&#8230; so while there are lots of &#8220;LINGO tutorials&#8221; and guides, they&#8217;re for the wrong LINGO.</p>
<p style="text-align: center"><img src="/images/lingo2.jpg" alt="LINGO" height="275" width="350" /></p>
<p> Not much fun :|</p>
<p>(*adds another notch on his &#8220;Programming Languages&#8221; belt*)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypn.za.net/blog/2008/03/08/learning-lingo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby on Rails</title>
		<link>http://www.hypn.za.net/blog/2008/03/03/ruby-on-rails/</link>
		<comments>http://www.hypn.za.net/blog/2008/03/03/ruby-on-rails/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 09:56:48 +0000</pubDate>
		<dc:creator>Hypn</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://hypn.za.net/blog/?p=5</guid>
		<description><![CDATA[I&#8217;m trying to learn Ruby&#8230; on Rails. sereNity is helping me :)]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m trying to learn <a href="http://www.ruby-lang.org/en/" title="Ruby" target="_blank">Ruby</a>&#8230; on <a href="http://www.rubyonrails.org/" title="Ruby on Rails" target="_blank">Rails</a>.</p>
<p>sereNity is helping me :)</p>
<p style="text-align: center"><img src="/images/ruby.jpg" alt="Ruby" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hypn.za.net/blog/2008/03/03/ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
