<?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>AquilaX's development blog</title>
	<atom:link href="http://dev.horemag.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.horemag.net</link>
	<description>code and so on...</description>
	<lastBuildDate>Mon, 22 Feb 2010 07:38:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Small Bulls and cows in PHP</title>
		<link>http://dev.horemag.net/2010/02/22/small-bulls-and-cows-in-php/</link>
		<comments>http://dev.horemag.net/2010/02/22/small-bulls-and-cows-in-php/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 07:38:45 +0000</pubDate>
		<dc:creator>AquilaX</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://dev.horemag.net/?p=108</guid>
		<description><![CDATA[There is competition going on in bbGameZone. I decided to participate with small Bulls and cows game:
Here is my submission "CowsNBulls".
It's a game I loved playing when I was younger.
Demo: http://posterfans.com/game/
Source code: http://posterfans.com/game/index.php.txt (2013 bytes)
The code can be further optimized, but let's leave something for Phase 2 Smiley
Total planning + development + bug fixing time [...]]]></description>
			<content:encoded><![CDATA[<p>There is competition going on in <a href="http://community.bbgamezone.net/index.php/topic,2705.0.html" onclick="javascript:urchinTracker('/outbound/article/http://community.bbgamezone.net/index.php/topic,2705.0.html');">bbGameZone</a>. I decided to participate with small Bulls and cows game:</p>
<p>Here is my submission "CowsNBulls".</p>
<p>It's a game I loved playing when I was younger.</p>
<p>Demo: <a href="http://posterfans.com/game/" onclick="javascript:urchinTracker('/outbound/article/http://posterfans.com/game/');">http://posterfans.com/game/</a><br />
Source code: <a href="http://posterfans.com/game/index.php.txt" onclick="javascript:urchinTracker('/outbound/article/http://posterfans.com/game/index.php.txt');">http://posterfans.com/game/index.php.txt</a> (2013 bytes)</p>
<p>The code can be further optimized, but let's leave something for Phase 2 Smiley<br />
Total planning + development + bug fixing time about 1 hour.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.horemag.net/2010/02/22/small-bulls-and-cows-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resize column in postgres without recreating</title>
		<link>http://dev.horemag.net/2010/02/17/resize-column-in-postgres-without-recreating/</link>
		<comments>http://dev.horemag.net/2010/02/17/resize-column-in-postgres-without-recreating/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 14:01:00 +0000</pubDate>
		<dc:creator>AquilaX</dc:creator>
				<category><![CDATA[/dev/null]]></category>

		<guid isPermaLink="false">http://dev.horemag.net/2010/02/17/resize-column-in-postgres-without-recreating/</guid>
		<description><![CDATA[A nice hack for postgres field size: http://sniptools.com/databases/resize-a-column-in-a-postgresql-table-without-changing-data
]]></description>
			<content:encoded><![CDATA[<p>A nice hack for postgres field size: <a href="http://sniptools.com/databases/resize-a-column-in-a-postgresql-table-without-changing-data" onclick="javascript:urchinTracker('/outbound/article/http://sniptools.com/databases/resize-a-column-in-a-postgresql-table-without-changing-data');">http://sniptools.com/databases/resize-a-column-in-a-postgresql-table-without-changing-data</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.horemag.net/2010/02/17/resize-column-in-postgres-without-recreating/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>75% discount on HostGator only today</title>
		<link>http://dev.horemag.net/2009/11/27/75-discount-on-hostgator-only-today/</link>
		<comments>http://dev.horemag.net/2009/11/27/75-discount-on-hostgator-only-today/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 12:53:39 +0000</pubDate>
		<dc:creator>AquilaX</dc:creator>
				<category><![CDATA[/dev/null]]></category>

		<guid isPermaLink="false">http://dev.horemag.net/2009/11/27/75-discount-on-hostgator-only-today/</guid>
		<description><![CDATA[Today HostGator is offering 75% discount for hosting with code: 75OFF
]]></description>
			<content:encoded><![CDATA[<p>Today <a href="http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=aquilax" onclick="javascript:urchinTracker('/outbound/article/http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=aquilax');">HostGator</a> is offering 75% discount for hosting with code: <code>75OFF</code></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.horemag.net/2009/11/27/75-discount-on-hostgator-only-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Move table in postgres to different schema</title>
		<link>http://dev.horemag.net/2009/08/26/move-table-in-postgres-to-different-schema/</link>
		<comments>http://dev.horemag.net/2009/08/26/move-table-in-postgres-to-different-schema/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 08:15:00 +0000</pubDate>
		<dc:creator>AquilaX</dc:creator>
				<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://dev.horemag.net/?p=102</guid>
		<description><![CDATA[To move table to different schema in PostgreSQL use:
ALTER TABLE table_name SET SCHEMA schema_name;
]]></description>
			<content:encoded><![CDATA[<p>To move table to different schema in PostgreSQL use:</p>
<p>ALTER TABLE <em>table_name</em> SET SCHEMA <em>schema_name</em>;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.horemag.net/2009/08/26/move-table-in-postgres-to-different-schema/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing with big files</title>
		<link>http://dev.horemag.net/2009/08/24/playing-with-big-files/</link>
		<comments>http://dev.horemag.net/2009/08/24/playing-with-big-files/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 06:43:58 +0000</pubDate>
		<dc:creator>AquilaX</dc:creator>
				<category><![CDATA[/dev/null]]></category>

		<guid isPermaLink="false">http://dev.horemag.net/?p=100</guid>
		<description><![CDATA[If you're looking for a big text file to play with, why don't you try http://www.dotnetdotcom.org/. 
We invite you to help us share the content of internet by downloading the first part of our index. It has roughly 600,000 pages and is shared in an easy to parse text file. We are making this available [...]]]></description>
			<content:encoded><![CDATA[<p>If you're looking for a big text file to play with, why don't you try http://www.dotnetdotcom.org/. </p>
<blockquote><p>We invite you to help us share the content of internet by downloading the first part of our index. It has roughly 600,000 pages and is shared in an easy to parse text file. We are making this available as a bit torrent to help conserve bandwidth. Enjoy!</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dev.horemag.net/2009/08/24/playing-with-big-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rating for Blogger (Blogspot)</title>
		<link>http://dev.horemag.net/2009/07/31/rating-for-blogger-blogspot/</link>
		<comments>http://dev.horemag.net/2009/07/31/rating-for-blogger-blogspot/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 07:17:14 +0000</pubDate>
		<dc:creator>AquilaX</dc:creator>
				<category><![CDATA[/dev/null]]></category>
		<category><![CDATA[Java Script]]></category>
		<category><![CDATA[blogger]]></category>
		<category><![CDATA[blogspot]]></category>
		<category><![CDATA[rating]]></category>

		<guid isPermaLink="false">http://dev.horemag.net/2009/07/31/rating-for-blogger-blogspot/</guid>
		<description><![CDATA[If you want to add rating system for your posts in Blogger, check Outbrain (http://www.outbrain.com/). They have fully automated script for that.
I'm using it form my animated gifs blog.
]]></description>
			<content:encoded><![CDATA[<p>If you want to add rating system for your posts in Blogger, check Outbrain (<a href="http://www.outbrain.com/" onclick="javascript:urchinTracker('/outbound/article/http://www.outbrain.com/');">http://www.outbrain.com/</a>). They have fully automated script for that.<br />
I'm using it form my <a href="gif4e.blogspot.com">animated gifs blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.horemag.net/2009/07/31/rating-for-blogger-blogspot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get parameters in Code Igniter</title>
		<link>http://dev.horemag.net/2009/05/29/get-parameters-in-code-igniter/</link>
		<comments>http://dev.horemag.net/2009/05/29/get-parameters-in-code-igniter/#comments</comments>
		<pubDate>Fri, 29 May 2009 04:19:22 +0000</pubDate>
		<dc:creator>AquilaX</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[code_igniter]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[request]]></category>

		<guid isPermaLink="false">http://dev.horemag.net/?p=96</guid>
		<description><![CDATA[If you want to use GET parameters in Code igniter just for specific controller do use the following line in your Controller's constructor:
&#160;
    parse_str&#40;$_SERVER&#91;'QUERY_STRING'&#93;,$_GET&#41;;
&#160;
Also make sure to call your script like this (even if you use mod_rewrite to get rid of index.php):
www.example.com/index.php/controller/method/?par1=1&#038;par2=2
]]></description>
			<content:encoded><![CDATA[<p>If you want to use GET parameters in Code igniter just for specific controller do use the following line in your Controller's constructor:</p>
<pre class="php">&nbsp;
    <a href="http://www.php.net/parse_str" onclick="javascript:urchinTracker('/outbound/article/http://www.php.net/parse_str');"><span style="color: #000066;">parse_str</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$_SERVER</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'QUERY_STRING'</span><span style="color: #66cc66;">&#93;</span>,<span style="color: #0000ff;">$_GET</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
<p>Also make sure to call your script like this (even if you use mod_rewrite to get rid of index.php):</p>
<p>www.example.com/<strong>index.php</strong>/controller/method/?par1=1&par2=2</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.horemag.net/2009/05/29/get-parameters-in-code-igniter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smooth tile scrolling with Slick</title>
		<link>http://dev.horemag.net/2009/05/05/smooth-tile-scrolling-with-slick/</link>
		<comments>http://dev.horemag.net/2009/05/05/smooth-tile-scrolling-with-slick/#comments</comments>
		<pubDate>Tue, 05 May 2009 05:27:10 +0000</pubDate>
		<dc:creator>AquilaX</dc:creator>
				<category><![CDATA[Slick]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[tile-based]]></category>
		<category><![CDATA[tiles]]></category>

		<guid isPermaLink="false">http://dev.horemag.net/?p=89</guid>
		<description><![CDATA[
This is my first attempt for smooth tile scrolling in Slick. The offx/offy coordinates are not entirely correct for hero, smaller than the tile image but it's a good start the "smooth" part comes from shx/shy variables which offset the rendering position. The code is after the break:
Update: Check the project source code page at [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://dev.horemag.net/wp-content/uploads/game1.png" alt="game1" title="game1" width="299" height="254" class="alignnone size-full wp-image-92" /></p>
<p>This is my first attempt for smooth tile scrolling in Slick. The offx/offy coordinates are not entirely correct for hero, smaller than the tile image but it's a good start the "smooth" part comes from shx/shy variables which offset the rendering position. The code is after the break:</p>
<p><strong>Update:</strong> Check the project source code page at Google Code: <a href="http://code.google.com/p/jmuonline/" onclick="javascript:urchinTracker('/outbound/article/http://code.google.com/p/jmuonline/');">http://code.google.com/p/jmuonline/</a></p>
<p><span id="more-89"></span></p>
<pre class="java">&nbsp;
<span style="color: #000000; font-weight: bold;">package</span> scroller;
&nbsp;
<span style="color: #a1a100;">import org.newdawn.slick.AppGameContainer;</span>
<span style="color: #a1a100;">import org.newdawn.slick.BasicGame;</span>
<span style="color: #a1a100;">import org.newdawn.slick.Color;</span>
<span style="color: #a1a100;">import org.newdawn.slick.GameContainer;</span>
<span style="color: #a1a100;">import org.newdawn.slick.Graphics;</span>
<span style="color: #a1a100;">import org.newdawn.slick.Input;</span>
<span style="color: #a1a100;">import org.newdawn.slick.SlickException;</span>
<span style="color: #a1a100;">import org.newdawn.slick.tiled.TiledMap;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/**
 *
 * @author aquilax
 */</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Scroller2 <span style="color: #000000; font-weight: bold;">extends</span> BasicGame<span style="color: #66cc66;">&#123;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">private</span> TiledMap map = <span style="color: #000000; font-weight: bold;">null</span>;
  <span style="color: #000000; font-weight: bold;">private</span> Hero hero = <span style="color: #000000; font-weight: bold;">null</span>;
&nbsp;
  <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">int</span> screenw = <span style="color: #cc66cc;">432</span>;
  <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">int</span> screenh = <span style="color: #cc66cc;">336</span>;
  <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">int</span> centerx = screenw/<span style="color: #cc66cc;">2</span>;
  <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">int</span> centery = screenh/<span style="color: #cc66cc;">2</span>;
  <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">int</span> visx = <span style="color: #cc66cc;">9</span>;
  <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">int</span> visy = <span style="color: #cc66cc;">7</span>;
  <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">float</span> halfvisx = visx/<span style="color: #cc66cc;">2</span>;
  <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">float</span> halfvisy = visy/<span style="color: #cc66cc;">2</span>;
&nbsp;
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #993333;">int</span> tileW;
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #993333;">int</span> tileH;
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #993333;">int</span> mapW;
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #993333;">int</span> mapH;
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #993333;">boolean</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> blocked;
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #993333;">int</span> offx;
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #993333;">int</span> offy;
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> Scroller2<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Scroller2&quot;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  @Override
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> init<span style="color: #66cc66;">&#40;</span>GameContainer container<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> SlickException <span style="color: #66cc66;">&#123;</span>
    map = <span style="color: #000000; font-weight: bold;">new</span> TiledMap<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;data/testone.tmx&quot;</span><span style="color: #66cc66;">&#41;</span>;
    tileW = map.<span style="color: #006600;">getTileWidth</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    tileH = map.<span style="color: #006600;">getTileHeight</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    mapW = map.<span style="color: #006600;">getWidth</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    mapH = map.<span style="color: #006600;">getHeight</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    fillBlocked<span style="color: #66cc66;">&#40;</span>map<span style="color: #66cc66;">&#41;</span>;
    hero = <span style="color: #000000; font-weight: bold;">new</span> Hero<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;data/hero.png&quot;</span><span style="color: #66cc66;">&#41;</span>;
    hero.<span style="color: #006600;">speed</span> = <span style="color: #cc66cc;">1</span>;
    hero.<span style="color: #006600;">xtile</span> = <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky" onclick="javascript:urchinTracker('/outbound/article/http://www.google.com/search?hl=en&amp;q=allinurl%3AInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky');"><span style="color: #aaaadd; font-weight: bold;">Integer</span></a>.<span style="color: #006600;">parseInt</span><span style="color: #66cc66;">&#40;</span>map.<span style="color: #006600;">getMapProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;herox&quot;</span>, <span style="color: #ff0000;">&quot;16&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    hero.<span style="color: #006600;">ytile</span> = <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky" onclick="javascript:urchinTracker('/outbound/article/http://www.google.com/search?hl=en&amp;q=allinurl%3AInteger+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky');"><span style="color: #aaaadd; font-weight: bold;">Integer</span></a>.<span style="color: #006600;">parseInt</span><span style="color: #66cc66;">&#40;</span>map.<span style="color: #006600;">getMapProperty</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;heroy&quot;</span>, <span style="color: #ff0000;">&quot;8&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
    hero.<span style="color: #006600;">xpos</span> = centerx - hero.<span style="color: #006600;">awidth</span>/<span style="color: #cc66cc;">2</span>;
    hero.<span style="color: #006600;">ypos</span> = centery - hero.<span style="color: #006600;">aheight</span>/<span style="color: #cc66cc;">2</span>;
&nbsp;
    offx = hero.<span style="color: #006600;">xtile*tileW</span>;
    offy = hero.<span style="color: #006600;">ytile*tileH</span>;
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  @Override
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> update<span style="color: #66cc66;">&#40;</span>GameContainer container, <span style="color: #993333;">int</span> delta<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> SlickException <span style="color: #66cc66;">&#123;</span>
    Input input = container.<span style="color: #006600;">getInput</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>input.<span style="color: #006600;">isKeyDown</span><span style="color: #66cc66;">&#40;</span>Input.<span style="color: #006600;">KEY_LEFT</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      moveChar<span style="color: #66cc66;">&#40;</span>hero, <span style="color: #cc66cc;">-1</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>input.<span style="color: #006600;">isKeyDown</span><span style="color: #66cc66;">&#40;</span>Input.<span style="color: #006600;">KEY_RIGHT</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      moveChar<span style="color: #66cc66;">&#40;</span>hero, <span style="color: #cc66cc;">+1</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>input.<span style="color: #006600;">isKeyDown</span><span style="color: #66cc66;">&#40;</span>Input.<span style="color: #006600;">KEY_UP</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      moveChar<span style="color: #66cc66;">&#40;</span>hero, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">-1</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>input.<span style="color: #006600;">isKeyDown</span><span style="color: #66cc66;">&#40;</span>Input.<span style="color: #006600;">KEY_DOWN</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
      moveChar<span style="color: #66cc66;">&#40;</span>hero, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">+1</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> render<span style="color: #66cc66;">&#40;</span>GameContainer container, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AGraphics+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky" onclick="javascript:urchinTracker('/outbound/article/http://www.google.com/search?hl=en&amp;q=allinurl%3AGraphics+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky');"><span style="color: #aaaadd; font-weight: bold;">Graphics</span></a> g<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> SlickException <span style="color: #66cc66;">&#123;</span>
    <span style="color: #993333;">int</span> shx = <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>offx/tileW<span style="color: #66cc66;">&#41;</span>*tileW - offx;
    <span style="color: #993333;">int</span> shy = <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>offy/tileH<span style="color: #66cc66;">&#41;</span>*tileH - offy;
    map.<span style="color: #006600;">render</span><span style="color: #66cc66;">&#40;</span>shx, shy, <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>offx/tileW-halfvisx<span style="color: #66cc66;">&#41;</span>, <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>offy/tileH-halfvisy<span style="color: #66cc66;">&#41;</span>, visx<span style="color: #cc66cc;">+1</span>, visy<span style="color: #cc66cc;">+1</span><span style="color: #66cc66;">&#41;</span>;
    hero.<span style="color: #006600;">draw</span><span style="color: #66cc66;">&#40;</span>hero.<span style="color: #006600;">xpos</span>, hero.<span style="color: #006600;">ypos</span><span style="color: #66cc66;">&#41;</span>;
    g.<span style="color: #006600;">setColor</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AColor+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky" onclick="javascript:urchinTracker('/outbound/article/http://www.google.com/search?hl=en&amp;q=allinurl%3AColor+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky');"><span style="color: #aaaadd; font-weight: bold;">Color</span></a>.<span style="color: #006600;">red</span><span style="color: #66cc66;">&#41;</span>;
    g.<span style="color: #006600;">drawString</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;offx &quot;</span>+offx, <span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
    g.<span style="color: #006600;">drawString</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;offy &quot;</span>+offy, <span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #993333;">void</span> main<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky" onclick="javascript:urchinTracker('/outbound/article/http://www.google.com/search?hl=en&amp;q=allinurl%3AString+java.sun.com&amp;bntI=I%27m%20Feeling%20Lucky');"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> args<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> SlickException <span style="color: #66cc66;">&#123;</span>
    AppGameContainer app = <span style="color: #000000; font-weight: bold;">new</span> AppGameContainer<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Scroller2<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
    app.<span style="color: #006600;">setDisplayMode</span><span style="color: #66cc66;">&#40;</span>screenw, screenh, <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;
    app.<span style="color: #006600;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #993333;">void</span> fillBlocked<span style="color: #66cc66;">&#40;</span>TiledMap map<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    blocked = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #993333;">boolean</span><span style="color: #66cc66;">&#91;</span>mapW<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>mapH<span style="color: #66cc66;">&#93;</span>;
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> x = <span style="color: #cc66cc;">0</span>; x &lt; mapW; x++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
      <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> y = <span style="color: #cc66cc;">0</span>; y &lt; mapH; y++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
        blocked<span style="color: #66cc66;">&#91;</span>x<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>y<span style="color: #66cc66;">&#93;</span>  = <span style="color: #ff0000;">&quot;true&quot;</span>.<span style="color: #006600;">equals</span><span style="color: #66cc66;">&#40;</span>map.<span style="color: #006600;">getTileProperty</span><span style="color: #66cc66;">&#40;</span>map.<span style="color: #006600;">getTileId</span><span style="color: #66cc66;">&#40;</span>x, y, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #ff0000;">&quot;blocked&quot;</span>, <span style="color: #ff0000;">&quot;false&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
      <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
  <span style="color: #66cc66;">&#125;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #993333;">void</span> moveChar<span style="color: #66cc66;">&#40;</span>Hero ob, <span style="color: #993333;">int</span> dirx, <span style="color: #993333;">int</span> diry<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    offx += <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>dirx*ob.<span style="color: #006600;">speed</span><span style="color: #66cc66;">&#41;</span>;
    offy += <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#40;</span>diry*ob.<span style="color: #006600;">speed</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://dev.horemag.net/2009/05/05/smooth-tile-scrolling-with-slick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Media Wiki Bot</title>
		<link>http://dev.horemag.net/2009/03/24/media-wiki-bot/</link>
		<comments>http://dev.horemag.net/2009/03/24/media-wiki-bot/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 06:11:15 +0000</pubDate>
		<dc:creator>AquilaX</dc:creator>
				<category><![CDATA[/dev/null]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[bot]]></category>
		<category><![CDATA[media wiki]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://dev.horemag.net/?p=86</guid>
		<description><![CDATA[I needed a bot to quickly modify the pages of wiki.muonlinehelp.com. So I created Mutex which kind of helps do the job. It's full of bugs with no error handling but works for me.
Usage:
&#160;
&#60;?
  require 'class.mediawiki.php';
  $mw = new mediawiki&#40;'http://yourwikiurl/api.php'&#41;;
  $mw-&#62;login&#40;'bot_user', 'bot_password'&#41;;
  $mw-&#62;editPage&#40;'title', 'page_text'&#41;;
?&#62;
&#160;
You can get the source code from here. [...]]]></description>
			<content:encoded><![CDATA[<p>I needed a bot to quickly modify the pages of <a href="http://wiki.muonlinehelp.com" onclick="javascript:urchinTracker('/outbound/article/http://wiki.muonlinehelp.com');">wiki.muonlinehelp.com</a>. So I created <a href="http://wiki.muonlinehelp.com/index.php?title=User:Mutex" onclick="javascript:urchinTracker('/outbound/article/http://wiki.muonlinehelp.com/index.php?title=User:Mutex');">Mutex</a> which kind of helps do the job. It's full of bugs with no error handling but works for me.</p>
<p>Usage:</p>
<pre class="php">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?</span>
  <span style="color: #b1b100;">require</span> <span style="color: #ff0000;">'class.mediawiki.php'</span>;
  <span style="color: #0000ff;">$mw</span> = <span style="color: #000000; font-weight: bold;">new</span> mediawiki<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'http://yourwikiurl/api.php'</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #0000ff;">$mw</span>-&gt;<span style="color: #006600;">login</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'bot_user'</span>, <span style="color: #ff0000;">'bot_password'</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #0000ff;">$mw</span>-&gt;<span style="color: #006600;">editPage</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'title'</span>, <span style="color: #ff0000;">'page_text'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&nbsp;</pre>
<p>You can get the source code from <a href="http://wiki.muonlinehelp.com/index.php?title=User:Mutex" onclick="javascript:urchinTracker('/outbound/article/http://wiki.muonlinehelp.com/index.php?title=User:Mutex');">here</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://dev.horemag.net/2009/03/24/media-wiki-bot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Randomize timestamp in MySQL</title>
		<link>http://dev.horemag.net/2009/02/16/randomize-timestamp-in-mysql/</link>
		<comments>http://dev.horemag.net/2009/02/16/randomize-timestamp-in-mysql/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 20:09:11 +0000</pubDate>
		<dc:creator>AquilaX</dc:creator>
				<category><![CDATA[MySql]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[randomize]]></category>
		<category><![CDATA[timestamp]]></category>

		<guid isPermaLink="false">http://dev.horemag.net/?p=79</guid>
		<description><![CDATA[To randomize timestamp column in mysql You can use the following statement:
&#160;
UPDATE your_table SET
timestamp_field = TIMESTAMPADD&#40;MINUTE, RAND&#40;&#41;*60,timestamp_field&#41;;
&#160;
]]></description>
			<content:encoded><![CDATA[<p>To randomize timestamp column in mysql You can use the following statement:</p>
<pre class="sql">&nbsp;
<span style="color: #993333; font-weight: bold;">UPDATE</span> your_table <span style="color: #993333; font-weight: bold;">SET</span>
timestamp_field = TIMESTAMPADD<span style="color: #66cc66;">&#40;</span>MINUTE, RAND<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>*<span style="color: #cc66cc;">60</span>,timestamp_field<span style="color: #66cc66;">&#41;</span>;
&nbsp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://dev.horemag.net/2009/02/16/randomize-timestamp-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
