<?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>Werx Limited &#187; software development</title>
	<atom:link href="http://werxltd.com/wp/category/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://werxltd.com/wp</link>
	<description>We make IT work.</description>
	<lastBuildDate>Thu, 29 Jul 2010 19:00:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Using PHP to write PHP</title>
		<link>http://werxltd.com/wp/2010/07/29/using-php-to-write-php/</link>
		<comments>http://werxltd.com/wp/2010/07/29/using-php-to-write-php/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 19:00:49 +0000</pubDate>
		<dc:creator>wes</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[kml]]></category>
		<category><![CDATA[mapping]]></category>
		<category><![CDATA[utilities]]></category>
		<category><![CDATA[wkt]]></category>

		<guid isPermaLink="false">http://werxltd.com/wp/?p=630</guid>
		<description><![CDATA[I ran into a situation recently where I had a very large array object that was not going to change. It was the polygon coordinates for the world countries to be used in KML provided by Thematic Mapping. I didn&#8217;t wan&#8217;t to pull this data out of MySQL every time I went to build a [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into a situation recently where I had a very large array object that was not going to change. It was the polygon coordinates for the world countries to be used in <a href="http://code.google.com/apis/kml/documentation/">KML</a> provided by <a href="http://thematicmapping.org/">Thematic Mapping</a>.</p>
<p>I didn&#8217;t wan&#8217;t to pull this data out of MySQL every time I went to build a map, I wanted to use one giant static array instead. So to write the array back out in a re-usable fashion I developed the following code which can take any array, of any depth, associative or index based, and spit out corresponding PHP that you can copy and paste back into your script.</p>
<pre class="brush:php">function phpPrintArr(array $arr) {
	echo "array(".PHP_EOL;

	$c = 1;
	$total = count($arr);

	foreach($arr as $i =&gt;$v) {
		$iq = is_numeric($i) ? '' : '"';
		$vq = is_numeric($v) ? '' : '"';
		$e = $c &lt; $total ? ',' : '';

		if(is_array($v)) {
			echo $iq.$i.$iq.'=&gt;'.PHP_EOL;
			phpPrintArr($v);
			echo $e.PHP_EOL;
		} else {
			echo $iq.$i.$iq.'=&gt;'.$vq.$v.$vq.$e.PHP_EOL;
		}
		$c++;
	}

	echo ")".PHP_EOL;
}</pre>
<p>Oh, and for anyone who is interested in the array of country polygons this produced from the Thematic Mapping Engine data, <a href="http://werxltd.com/software/TME_Countries">here is the rather large array</a>. Feel free to use it in your own KML project.</p>
]]></content:encoded>
			<wfw:commentRss>http://werxltd.com/wp/2010/07/29/using-php-to-write-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HBase JSON-RPC Bridge updated, allows scanning</title>
		<link>http://werxltd.com/wp/2010/07/27/hbase-json-rpc-bridge-updated-allows-scanning/</link>
		<comments>http://werxltd.com/wp/2010/07/27/hbase-json-rpc-bridge-updated-allows-scanning/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 18:05:04 +0000</pubDate>
		<dc:creator>wes</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[bigdata]]></category>
		<category><![CDATA[bigtable]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[jsonrpc]]></category>
		<category><![CDATA[mapreduce]]></category>

		<guid isPermaLink="false">http://werxltd.com/wp/?p=632</guid>
		<description><![CDATA[The HBase JSON-RPC bridge has been updated to allow scanning on non-key columns. Now, passing a filter parameter creates a scanner using a RegexStringComparator. Results are returned in 100 block chunks until null is returned, in which case the ResultScanner is closed Here is an example query that is now possible: http://localhost:8080/hbasebridge/rpc?debug=true&#38;data={"method":"lookup","params":{"table":"hbasetable","filter":"searchstring"}}]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://code.google.com/p/hbasebridge/">HBase JSON-RPC bridge</a> has been updated to allow scanning on non-key columns. Now, passing a filter parameter creates a scanner using a <a href="http://hbase.apache.org/docs/r0.20.5/api/org/apache/hadoop/hbase/filter/RegexStringComparator.html">RegexStringComparator</a>. <a href="http://hbase.apache.org/docs/r0.20.5/api/org/apache/hadoop/hbase/client/Result.html">Result</a>s are returned in 100 block chunks until null is returned, in which case the <a href="http://hbase.apache.org/docs/r0.20.4/api/org/apache/hadoop/hbase/client/ResultScanner.html">ResultScanner</a> is closed</p>
<p>Here is an example query that is now possible:</p>
<pre>http://localhost:8080/hbasebridge/rpc?debug=true&amp;data={"method":"lookup","params":{"table":"hbasetable","filter":"searchstring"}}</pre>
]]></content:encoded>
			<wfw:commentRss>http://werxltd.com/wp/2010/07/27/hbase-json-rpc-bridge-updated-allows-scanning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bible Flashcards for Android 2.0</title>
		<link>http://werxltd.com/wp/2010/06/28/bible-flashcards-for-android-2-0/</link>
		<comments>http://werxltd.com/wp/2010/06/28/bible-flashcards-for-android-2-0/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 12:00:45 +0000</pubDate>
		<dc:creator>wes</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[graphics design]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[bible flashcards]]></category>
		<category><![CDATA[new release]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://werxltd.com/wp/?p=619</guid>
		<description><![CDATA[It&#8217;s been a while since I released Bible Flashcards version 1.0. Long enough in fact that I started getting emails asking whether I intended on updating past the 1.1.4 release. Well I am proud to announce version 2.0 which includes a lot of requested features and a lot of bug-fixes and improvements. For this release [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since I released Bible Flashcards version 1.0. Long enough in fact that I started getting emails asking whether I intended on updating past the 1.1.4 release.</p>
<p>Well I am proud to announce version 2.0 which includes a lot of requested features and a lot of bug-fixes and improvements. For this release I decided to take my time and re-factor the way various screens interacted, making them more modular and self-contained which should translate into fewer force closes. I also <a href="http://developer.android.com/guide/developing/tools/monkey.html">unleased the monkey</a> on my app which helped me improve my code even more.</p>
<p>So without further ado here are the major features included in this release:</p>
<ul>
<li>Ability to mark cards learned/unlearned</li>
<li>Ability to choose a random card</li>
<li>Cards now cycle so that if you are on card 1 and you attempt to go backwards, you are taken to the last card. Likewise if you are on the last card and you attempt to go forwards you are taken to the first card.</li>
<li>Menus also cycle so that if you hit the back button you will go from the active card view to the lesson chooser to the lesson set chooser and back to the card view.</li>
<li>Preferences to control settings such as card text size, whether to display learned cards, and a button to remove all learned cards from the internal database.</li>
</ul>
<p>Some interface items had to be chopped to make room for these improvements. So if you are wondering where the next/back buttons are, they have been removed in favor of the more intuitive gesture controls. Swipe right for next card and left for previous card. Tapping the card flips it over.</p>
<p>I also want to give a special thanks to everyone who contacted me with words of encouragement and everyone who brought to my attention things that were broken and things that could be improved upon.</p>
<p>This release also includes a new lesson set, RossWords, which is being put together by  Samuel Rogers as he takes Hebrew this year. If anyone else is feeling generous  and would like to help out, feel free to contact me about a lesson set that you could help me improve upon or create as Samuel is doing.</p>
<p>Here are some screen shots from the new version:<br />
<a href="http://werxltd.com/wp/wp-content/uploads/2010/06/bibleflashcards1.png"><img class="alignleft size-medium wp-image-620" style="margin: 5px;" title="bibleflashcards1" src="http://werxltd.com/wp/wp-content/uploads/2010/06/bibleflashcards1-200x300.png" alt="" width="200" height="300" /></a><a href="http://werxltd.com/wp/wp-content/uploads/2010/06/bibleflashcards3.png"><img class="alignleft size-medium wp-image-623" style="margin: 5px;" title="bibleflashcards3" src="http://werxltd.com/wp/wp-content/uploads/2010/06/bibleflashcards3-168x300.png" alt="" width="168" height="300" /></a><a href="http://werxltd.com/wp/wp-content/uploads/2010/06/bibleflashcards2.png"><img class="alignleft size-medium wp-image-622" style="margin: 5px;" title="bibleflashcards2" src="http://werxltd.com/wp/wp-content/uploads/2010/06/bibleflashcards2-200x300.png" alt="" width="200" height="300" /></a><a href="http://werxltd.com/wp/wp-content/uploads/2010/06/bibleflashcards4.png"><img class="alignleft size-medium wp-image-624" style="margin: 5px;" title="bibleflashcards4" src="http://werxltd.com/wp/wp-content/uploads/2010/06/bibleflashcards4-168x300.png" alt="" width="168" height="300" /></a></p>
<p>And as usual, you can find Bible Flashcards in the Android Marketplace by searching for &#8220;Bible Flashcards&#8221; or by scanning the barcode below:<br />
<img src="http://werxltd.com/wp/wp-content/plugins/wp-qrencoder/qr_img.php?d=http://market.android.com/search?q=pname:com.werxltd.bibleflash&#038;t=other&#038;s=4&#038;s=M" /></p>
]]></content:encoded>
			<wfw:commentRss>http://werxltd.com/wp/2010/06/28/bible-flashcards-for-android-2-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Cascading Style Sheets (CSS) Beginner&#8217;s Tutorial</title>
		<link>http://werxltd.com/wp/2010/06/15/a-cascading-style-sheets-css-beginners-tutorial/</link>
		<comments>http://werxltd.com/wp/2010/06/15/a-cascading-style-sheets-css-beginners-tutorial/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 19:39:16 +0000</pubDate>
		<dc:creator>wes</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[graphics design]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[web 2.0]]></category>

		<guid isPermaLink="false">http://werxltd.com/wp/?p=611</guid>
		<description><![CDATA[Learning CSS can be a bit daunting if you&#8217;ve never encountered it before. Likewise, if you&#8217;ve only had limited exposure to CSS, the various ways browsers implement various aspects of the CSS standard (or make up their own) can leave you with the impression that it is all a giant hairy mess. So to help out, [...]]]></description>
			<content:encoded><![CDATA[<p>Learning CSS can be a bit daunting if you&#8217;ve never encountered it before. Likewise, if you&#8217;ve only had limited exposure to CSS, the various ways browsers implement various aspects of the CSS standard (or make up their own) can <a href="http://ajaxian.com/archives/rolling-a-coke-can-around-with-pure-css">l</a>eave you with the impression that it is all a giant hairy mess. So to help out, I&#8217;ve compiled a list of resources to make the learning curve not quite as steep for beginners and to hopefully help tame the CSS wilderness for novices.</p>
<p>First, here is a pretty good and in-depth video on HTML and CSS basics:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/GwQMnpUsj8I&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/GwQMnpUsj8I&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Next we have several handy beginner&#8217;s tutorial sites:</p>
<ul>
<li><a href="http://htmldog.com/guides/cssbeginner/">HTML Dog&#8217;s CSS Beginner</a></li>
<li><a href="http://friendlybit.com/css/beginners-guide-to-css-and-standards/">Friendly Bit&#8217;s Beginner&#8217;s Guide to CSS and Standards</a></li>
<li><a href="http://www.yourhtmlsource.com/stylesheets/introduction.html">Your HTML Sourse&#8217;s Introduction to CSS</a></li>
<li><a href="http://www.w3schools.com/css/default.asp">W3 Schools CSS Tutorial</a> (also an excellent reference site)</li>
</ul>
<p>Finally, here are a few <a href="http://en.wikipedia.org/wiki/CSS_framework">CSS frameworks</a> designed to help make CSS a lot easier by providing a standard system that takes care of much of the common ugly quirks found in CSS:</p>
<ul>
<li><a href="http://www.blueprintcss.org/">Blueprint</a></li>
<li><a href="http://960.gs/">960 Grid System</a></li>
<li><a href="http://elasticss.com/">ElastiCSS</a></li>
</ul>
<p>As a bonus, here are a few inspirational sites to help give you an idea of what CSS can do if applied properly:</p>
<ul>
<li><a href="http://www.csszengarden.com/">CSS zen garden</a></li>
<li><a href="http://ajaxian.com/archives/magnifyma-a-css-magnifying-glass">CSS Magnifying glass</a></li>
<li><a href="http://ajaxian.com/archives/rolling-a-coke-can-around-with-pure-css">3D Coke can in CSS</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://werxltd.com/wp/2010/06/15/a-cascading-style-sheets-css-beginners-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple JSON-RPC updated to 0.9.7</title>
		<link>http://werxltd.com/wp/2010/06/01/simple-json-rpc-updated-to-0-9-7/</link>
		<comments>http://werxltd.com/wp/2010/06/01/simple-json-rpc-updated-to-0-9-7/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 12:00:19 +0000</pubDate>
		<dc:creator>wes</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[json-rpc]]></category>
		<category><![CDATA[rpc]]></category>

		<guid isPermaLink="false">http://werxltd.com/wp/?p=604</guid>
		<description><![CDATA[Simple JSON-RPC has been updated to 0.9.7. This new version includes the ability to enable using full class names rather than simple method names. This makes using multiple classes with the same public method names possible. To enable this functionality simply add an init-param to your web.xml file like: &#60;init-param&#62; &#60;param-name&#62;use_full_classname&#60;/param-name&#62; &#60;param-value&#62;true&#60;/param-value&#62; &#60;/init-param&#62; With this [...]]]></description>
			<content:encoded><![CDATA[<p>Simple JSON-RPC has been updated to 0.9.7. This new version includes the ability to enable using full class names rather than simple method names. This makes using multiple classes with the same public method names possible.</p>
<p>To enable this functionality simply add an <a href="http://www.factorypattern.com/storing-parameters-in-webxml-context-param-init-param/">init-param</a> to your <a href="http://en.wikipedia.org/wiki/WAR_(Sun_file_format)">web.xml</a> file like:</p>
<pre class="brush:xml">
&lt;init-param&gt;
	&lt;param-name&gt;use_full_classname&lt;/param-name&gt;
	&lt;param-value&gt;true&lt;/param-value&gt;
&lt;/init-param&gt;
</pre>
<p>With this feature enabled, you then call methods via their full classname + method name separated by a dot (this nomenclature is for both static as well as non-static methods, the framework handles the particulars in the back-end).</p>
<p>Special thanks to Stephan of <a href="http://www.crosspollinate.org/">Cross Pollinate</a> for suggesting this improvement!</p>
]]></content:encoded>
			<wfw:commentRss>http://werxltd.com/wp/2010/06/01/simple-json-rpc-updated-to-0-9-7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bible Flashcards for Android 1.0</title>
		<link>http://werxltd.com/wp/2010/05/20/bible-flashcards-for-android-1-0/</link>
		<comments>http://werxltd.com/wp/2010/05/20/bible-flashcards-for-android-1-0/#comments</comments>
		<pubDate>Thu, 20 May 2010 12:00:56 +0000</pubDate>
		<dc:creator>wes</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[bible]]></category>
		<category><![CDATA[educational]]></category>
		<category><![CDATA[flashcard]]></category>
		<category><![CDATA[greek]]></category>
		<category><![CDATA[hebrew]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://werxltd.com/wp/?p=595</guid>
		<description><![CDATA[Bible Flashcards is an Android application based on the data files provided by the Crosswire Bible Society&#8216;s Flashcard application. It contains flashcards for both Greek and Hebrew along with appropriate fonts for proper display. I&#8217;ve also included an additional lesson set titled &#8220;greekBasics&#8221; which includes flashcards for the Greek alphabet. Here are some screenshots: You [...]]]></description>
			<content:encoded><![CDATA[<p>Bible Flashcards is an Android application based on the data files provided by the <a href="http://www.crosswire.org">Crosswire Bible Society</a>&#8216;s <a href="http://www.crosswire.org/flashcards/">Flashcard application</a>. It contains flashcards for both Greek and Hebrew along with appropriate fonts for proper display.</p>
<p>I&#8217;ve also included an additional lesson set titled &#8220;greekBasics&#8221; which includes flashcards for the Greek alphabet.</p>
<p>Here are some screenshots:</p>
<div style="float: left;"><img class="alignleft size-medium wp-image-594" style="margin-left: 5px; margin-right: 5px;" title="lessonset_chooser" src="http://werxltd.com/wp/wp-content/uploads/2010/05/lessonset_chooser-168x300.png" alt="" width="168" height="300" /><img class="alignleft size-medium wp-image-593" style="margin-left: 5px; margin-right: 5px;" title="lesson_chooser" src="http://werxltd.com/wp/wp-content/uploads/2010/05/lesson_chooser-168x300.png" alt="" width="168" height="300" /><img class="alignleft size-medium wp-image-590" style="margin-left: 5px; margin-right: 5px;" title="card_front_vertical" src="http://werxltd.com/wp/wp-content/uploads/2010/05/card_front_vertical-168x300.png" alt="" width="168" height="300" /><img class="alignleft size-medium wp-image-589" style="margin-left: 5px; margin-right: 5px;" title="card_back_vertical" src="http://werxltd.com/wp/wp-content/uploads/2010/05/card_back_vertical-168x300.png" alt="" width="168" height="300" /></div>
<div style="clear: both;">You can find Bible Flashcards in the Android app Market by entering &#8220;Bible Flashcards&#8221; or by scanning the barcode below:<br />
<img src="http://werxltd.com/wp/wp-content/plugins/wp-qrencoder/qr_img.php?d=http://market.android.com/search?q=pname:com.werxltd.bibleflash&#038;t=other&#038;s=4&#038;s=M" /></p>
<p>Additionally, if you are interested in helping out with new lessons or if you would like to provide feedback, please feel free to email me.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://werxltd.com/wp/2010/05/20/bible-flashcards-for-android-1-0/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Learning Languages: Java</title>
		<link>http://werxltd.com/wp/2010/05/18/learning-languages-java/</link>
		<comments>http://werxltd.com/wp/2010/05/18/learning-languages-java/#comments</comments>
		<pubDate>Tue, 18 May 2010 12:00:56 +0000</pubDate>
		<dc:creator>wes</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[beginner]]></category>
		<category><![CDATA[enviroment]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://werxltd.com/wp/?p=532</guid>
		<description><![CDATA[The first thing you&#8217;ll need to consider is the development environment you want to use primarily. This is important as it will have an impact on how you run through tutorials and examples later on. Environments can be broken down into two broad categories; command-line or a visual IDE. Both have their merits and you&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>The first thing you&#8217;ll need to consider is the development environment you want to use primarily. This is important as it will have an impact on how you run through tutorials and examples later on.</p>
<p>Environments can be broken down into two broad categories; command-line or a <a href="http://en.wikipedia.org/wiki/Integrated_development_environment">visual IDE</a>. Both have their merits and you&#8217;ll eventually need to be familiar with both (especially if you expect to be releasing production code or participating in any well-maintained development environment).</p>
<p>The most common command-line environments are <a href="http://maven.apache.org/">Maven</a> and <a href="http://ant.apache.org/ivy/">Ivy</a>. Both come with a somewhat steep learning curve (which, unfortunately is unavoidable) but both are well worth investigating as they are both very common in production environments.</p>
<p>Starting out, however, you&#8217;ll most likely find that using a visual IDE will help you get right down to learning and compiling example code fairly quickly.</p>
<p>There are several common IDEs; <a href="http://www.jetbrains.com/idea/">IntelliJ</a>, <a href="http://netbeans.org/">NetBeans</a>, and <a href="http://www.eclipse.org">Eclipse</a> are all great ones that I&#8217;ve seen used in production. My favorite hands-down is Eclipse, especially since it also has configurations to help you develop in other languages such as  <a href="http://www.aptana.org/">PHP (Aptana)</a> and <a href="http://www.eclipse.org/cdt/">C/C++</a>.</p>
<p>For general basics and a broad overview of Java; I would recommend you take a look at <a href="http://www.javabeginner.com/">the Java Beginner site</a>.</p>
<p>There&#8217;s also several handy video tutorials (mostly using Eclipse) on YouTube such as this one:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/UGmhks4K13g&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/UGmhks4K13g&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Once you get the basics down, I&#8217;ve found that working on a full project helps. A great place to start would be to help our with an existing open-source project like <a href="http://www.crosswire.org/jsword/">JSword</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://werxltd.com/wp/2010/05/18/learning-languages-java/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript implementation of Java&#8217;s String.hashCode() method</title>
		<link>http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/</link>
		<comments>http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/#comments</comments>
		<pubDate>Thu, 13 May 2010 12:00:14 +0000</pubDate>
		<dc:creator>wes</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[hashcode]]></category>
		<category><![CDATA[prototype]]></category>

		<guid isPermaLink="false">http://werxltd.com/wp/?p=581</guid>
		<description><![CDATA[Here is a direct replacement for Java&#8217;s String.hashCode() method implemented in Javascript. I wrote this function to fulfill a requirement at work. Apparently, the back-end engineers thought hashCode() was a standard function. One of the hurdles for this project was not only figuring out how to translate the mathematical formula used in Java to generate [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a direct replacement for Java&#8217;s <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#hashCode()">String.hashCode()</a> method implemented in Javascript.</p>
<p>I wrote this function to fulfill a requirement at work. Apparently, the back-end engineers thought hashCode() was a standard function. One of the hurdles for this project was not only figuring out how to translate the mathematical formula used in Java to generate hashCode()&#8217;s but also how to force Javascript to use 32bit integer math (no small feat).</p>
<p>Fortunately, I <a href="http://www.hunlock.com/blogs/The_Complete_Javascript_Number_Reference">discovered that Java supports bitwise operators</a> which are constrained to 32bit integer math.</p>
<p>So here&#8217;s the resulting String prototype in Javascript. With this prototype you can simply call .hashCode() on any string, ie. &#8220;some string&#8221;.hashCode(), and receive a numerical hash code (more specifically, a Java equivalent) such as 1395333309.</p>
<pre class="brush:javascript">
String.prototype.hashCode = function(){
	var hash = 0;
	if (this.length == 0) return code;
	for (i = 0; i < this.length; i++) {
		char = this.charCodeAt(i);
		hash = 31*hash+char;
		hash = hash & hash; // Convert to 32bit integer
	}
	return hash;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HipHop for PHP</title>
		<link>http://werxltd.com/wp/2010/04/29/hiphop-for-php/</link>
		<comments>http://werxltd.com/wp/2010/04/29/hiphop-for-php/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 12:00:15 +0000</pubDate>
		<dc:creator>wes</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[it industry]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[high performance]]></category>
		<category><![CDATA[hiphop]]></category>
		<category><![CDATA[web scale]]></category>

		<guid isPermaLink="false">http://werxltd.com/wp/?p=573</guid>
		<description><![CDATA[Earlier this year Facebook developers caused quite a stir in the PHP community by releasing HipHop, the central piece in their high-performance arsenal. Here is the video of the initial announcement along with some juicy technical details: If you are interested in seeing how your PHP project fares when run through HipHop, check out the [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this year <a href="http://developers.facebook.com/blog/post/358">Facebook developers</a> caused quite a stir in the PHP community by releasing <a href="http://en.wikipedia.org/wiki/HipHop_(software)">HipHop</a>, the central piece in their high-performance arsenal.</p>
<p><a href="http://www.ustream.tv/recorded/4409735">Here is the video</a> of the initial announcement along with some juicy technical details:<br />
<object id="utv946196" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="386" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="utv_n_687056" /><param name="flashvars" value="loc=%2F&amp;autoplay=false&amp;vid=4409735&amp;locale=en_US" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.ustream.tv/flash/video/4409735" /><embed id="utv946196" type="application/x-shockwave-flash" width="480" height="386" src="http://www.ustream.tv/flash/video/4409735" allowscriptaccess="always" allowfullscreen="true" flashvars="loc=%2F&amp;autoplay=false&amp;vid=4409735&amp;locale=en_US" name="utv_n_687056"></embed></object></p>
<p>If you are interested in seeing how your PHP project fares when run through HipHop, check out the official <a href="http://github.com/facebook/hiphop-php">HipHop project page</a>.</p>
<p>With tools like HipHop, scripting languages like PHP are no longer subject to the charges of gross computational inefficiency. In short, it&#8217;s a great day to be a web developer.</p>
]]></content:encoded>
			<wfw:commentRss>http://werxltd.com/wp/2010/04/29/hiphop-for-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Native Sword libraries for Android</title>
		<link>http://werxltd.com/wp/2010/04/22/native-sword-libraries-for-android/</link>
		<comments>http://werxltd.com/wp/2010/04/22/native-sword-libraries-for-android/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 09:00:46 +0000</pubDate>
		<dc:creator>wes</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[sword]]></category>

		<guid isPermaLink="false">http://werxltd.com/wp/?p=565</guid>
		<description><![CDATA[I&#8217;ve spend quite a bit of time recently figuring out the best approach for incorporating some form of Sword libraries1 into my Android application. After an unsuccessful attempt to get the pure Java implementation, JSword, to work2 I decided to see if I could, instead, use the Android Native Development Kit and wrap the C/C++ [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://developer.android.com/index.html"><img class="size-full wp-image-567 alignright" style="margin: 5px; border: 0px initial initial; float: left;" title="android" src="http://werxltd.com/wp/wp-content/uploads/2010/04/android-sm.png" alt="" width="150" height="150" /></a>I&#8217;ve spend quite a bit of time recently figuring out the best approach for incorporating some form of <a href="http://www.crosswire.org/sword/about/index.jsp">Sword</a> libraries<sup>1</sup> into my <a href="http://en.wikipedia.org/wiki/Android_(operating_system)">Android</a> application. After an unsuccessful attempt to get the pure Java implementation, <a href="http://www.crosswire.org/jsword/">JSword</a>, to work<sup>2</sup> I decided to see if I could, instead, use the <a href="http://developer.android.com/sdk/ndk/index.html">Android Native Development Kit</a> and wrap the C/C++ library in a <a href="http://en.wikipedia.org/wiki/Java_Native_Interface">Java Native Interface</a>.</p>
<p>After doing some digging on the web I found out that Troy over at <a href="http://www.crosswire.org/index.jsp">Crosswire</a> had <a href="http://www.mail-archive.com/sword-devel@crosswire.org/msg19578.html">already begun a project named &#8220;bishop&#8221;</a> whose aim was to provide a Java native interface to the sword library. Just what I was looking for!</p>
<p>While <a href="http://www.mail-archive.com/sword-devel@crosswire.org/msg20790.html">the process of building the library and corresponding java source files</a> is more than what I want to get into here (though I may later on as I hopefully help contribute to the maturity of the project) I wanted to share my findings with anyone else who, like me, is interested in bringing more open-source Bible applications to the Android platform.</p>
<p>So without further ado; <a href="http://werxltd.com/bishop.zip">Here is a jar file</a> and corresponding JNI library you can use in your own Android project to harness the power of Sword in your own Bible-related apps.</p>
<ol class="footnotes"><li id="footnote_0_565" class="footnote">Sword is an excellent suite of libraries for accessing a large array of Bibles and Bible-related <a href="http://www.crosswire.org/sword/modules/index.jsp">modules</a> stored in an open format.</li><li id="footnote_1_565" class="footnote">The fault here was not with the JSword project per-se, the fault really lies with the limited Java environment provided by the <a href="http://en.wikipedia.org/wiki/Dalvik_virtual_machine">Dalvik JVM</a>.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://werxltd.com/wp/2010/04/22/native-sword-libraries-for-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
