<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Open Warrior &#187; programming</title>
	<atom:link href="http://kylewilliams.co.za/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://kylewilliams.co.za</link>
	<description>Because digital freedom matters...</description>
	<lastBuildDate>Wed, 30 Jun 2010 07:22:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/za/</creativeCommons:license>
		<item>
		<title>dropbox-servicemenu-kde</title>
		<link>http://kylewilliams.co.za/2009/11/12/dropbox-servicemenu-kde</link>
		<comments>http://kylewilliams.co.za/2009/11/12/dropbox-servicemenu-kde#comments</comments>
		<pubDate>Thu, 12 Nov 2009 02:11:10 +0000</pubDate>
		<dc:creator>Kyle Williams</dc:creator>
				<category><![CDATA[dropbox]]></category>
		<category><![CDATA[gpl]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://kylewilliams.co.za/?p=184</guid>
		<description><![CDATA[I just wrote a KDE service menu wrapper around the Dropbox python CLI. For more information please go here. On another note, if you haven&#8217;t tried Dropbox I advise that you give it a go by clicking here]]></description>
			<content:encoded><![CDATA[<p>I just wrote a KDE service menu wrapper around the <a href="https://www.dropbox.com/referrals/NTI5NDIzODU5">Dropbox</a> python CLI. For more information please go <a href="http://kylewilliams.co.za/code/dropbox-servicemenu-kde">here.</a></p>
<p>On another note, if you haven&#8217;t tried Dropbox I advise that you give it a go by clicking <a href="https://www.dropbox.com/referrals/NTI5NDIzODU5">here</a> <img src='http://kylewilliams.co.za/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://kylewilliams.co.za/2009/11/12/dropbox-servicemenu-kde/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/za/</creativeCommons:license>
	</item>
		<item>
		<title>boldproject: bold translator overview</title>
		<link>http://kylewilliams.co.za/2009/10/02/boldproject-bold-translator-overview</link>
		<comments>http://kylewilliams.co.za/2009/10/02/boldproject-bold-translator-overview#comments</comments>
		<pubDate>Thu, 01 Oct 2009 22:51:25 +0000</pubDate>
		<dc:creator>Kyle Williams</dc:creator>
				<category><![CDATA[bold]]></category>
		<category><![CDATA[boldproject]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[digital libraries]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[honours]]></category>
		<category><![CDATA[information retrieval]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://kylewilliams.co.za/?p=156</guid>
		<description><![CDATA[A few weeks ago I wrote a post which introduced the BOLD Project. Well, a lot has happened since then and this post gives an overview of the translation system which I am building. The translator is split into three parts: The preprocessor The user input The matcher The Preprocessor The preprocessor is called as [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I wrote a <a href="../2009/09/09/boldproject-introducing-the-bold-project">post</a> which introduced the BOLD Project. Well, a lot has happened since then and this post gives an overview of the translation system which I am building.</p>
<p style="text-align: center;">
<div id="attachment_160" class="wp-caption aligncenter" style="width: 510px"><a href="http://kylewilliams.co.za/wp-content/uploads/2009/10/overview_1024.png"><img class="size-full wp-image-160" style="border: 1px solid black;" title="overview_1024" src="http://kylewilliams.co.za/wp-content/uploads/2009/10/overview_1024.png" alt="BOLD Translator Overview" width="500" height="260" /></a><p class="wp-caption-text">BOLD Translator Overview</p></div>
<p>The translator is split into three parts:</p>
<ol>
<li>The preprocessor</li>
<li>The user input</li>
<li>The matcher</li>
</ol>
<p><strong>The Preprocessor</strong></p>
<p>The preprocessor is called as soon as an image is inserted into the repository. The preprocessor works by first segmenting the Bushman words in the dictionary. It does this by exploiting the known fact that every Bushman word on a page is underlined by a solid black line. Once the Bushman words have been segmented, specific features are extracted from them and these features are stored in <a href="http://en.wikipedia.org/wiki/Inverted_index">inverted files</a>. Once the features have been extracted then the orifinal image, the segmented words and the inverted files are all stored in the repository.</p>
<p><strong>The User Input</strong></p>
<p>The user who is accessing the Bleek &amp; Lloyd notebooks uses a tool to select a specific word on a page which then becomes known as the key. The same features which were extracted from each word in the preprocessor are extracted from the key. These features along with the key image will be used later for matching.</p>
<p><strong>The Matcher</strong></p>
<p>The matcher starts by taking the features belonging to the key and finding images with the same features in the inverted files. For each feature match, the score of the image which matched increases. At the end of all the feature comparisons, the images with the highest scores are returned. At this stage there may be some images with the same or similar scores, so to resolve this clash the matcher performs a more intensive comparison between the key and the images with the highest score. Based on the result of this comparison, the most likely match is returned.</p>
<p>So that&#8217;s how the BOLD Translator works. Ultimately it is a framework which means that it will be designed such that anyone can adapt it and make use of it by plugging their own algorithms into each of the specific parts. In the next day or two I will blog about the actual work that has been done on the system up to now as well as show some of the results that the translator returns at this point.</p>
]]></content:encoded>
			<wfw:commentRss>http://kylewilliams.co.za/2009/10/02/boldproject-bold-translator-overview/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/za/</creativeCommons:license>
	</item>
		<item>
		<title>netbeans jtable automatic expansion</title>
		<link>http://kylewilliams.co.za/2007/11/01/netbeans-jtable-automatic-expansion</link>
		<comments>http://kylewilliams.co.za/2007/11/01/netbeans-jtable-automatic-expansion#comments</comments>
		<pubDate>Thu, 01 Nov 2007 10:17:00 +0000</pubDate>
		<dc:creator>Kyle Williams</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://kylewilliams.co.za/2008/11/01/netbeans-jtable-automatic-expansion</guid>
		<description><![CDATA[HOWTO get a NetBeans JTable to automatically expand when it runs out of space. That is, add new rows whenever needed. Step 1: Create a normal JTable in NetBeans Step 2: Add a PropertyChangeEvent handler to the table via the inspector window. Right click jTable1 -&#62; Events -&#62; PropertyChange -&#62; propertyChange This should take you [...]]]></description>
			<content:encoded><![CDATA[<p class="entry">HOWTO get a NetBeans JTable to automatically expand when it runs out of space. That is, add new rows whenever needed.</p>
<p>Step 1:<br />
Create a normal JTable in NetBeans</p>
<p>Step 2:<br />
Add a PropertyChangeEvent handler to the table via the inspector window.<br />
Right click jTable1 -&gt; Events -&gt; PropertyChange -&gt; propertyChange<br />
This should take you to the source.</p>
<p>Step 3:<br />
Add the following to the PropertyChangeEvent handler:</p>
<blockquote><p> private void jTable1PropertyChange(java.beans.PropertyChangeEvent evt) {</p>
<p>int last = jTable1.getRowCount(); //count the number of rows already in the table</p>
<p>if (jTable1.getValueAt(last-1,0) == null){ //check if there&#8217;s anything in the first column of last row<br />
//first column of last row is empty, so do nothing<br />
}</p>
<p>else{ //last row was not empty</p>
<p>Object o[][] = new Object[jTable1.getRowCount()+1][jTable1.getColumnCount()]; //create a new 2D object with size the same as the table+1</p>
<p>for (int i = 0; i &lt; jTable1.getRowCount(); i++){ //loop through the rows<br />
for (int j = 0; j &lt; jTable1.getColumnCount(); j++){ //loop through the columns<br />
o[i][j] = jTable1.getValueAt(i,j); //populate the new Object with values from the table<br />
}<br />
}</p>
<p>for (int k = 0; k &lt; jTable1.getColumnCount(); k++){<br />
o[jTable1.getRowCount()][k] = null; //add a null row to the new object<br />
}</p>
<p>//set the tables new model with &#8220;o&#8221; as the first parameter &#8211; o is the new object<br />
jTable1.setModel(new javax.swing.table.DefaultTableModel(<br />
o, new String [] {<br />
&#8220;Firstname&#8221;, &#8220;Surname&#8221;, &#8220;Birthday&#8221;<br />
}<br />
)</p>
<p>//Create the rest of the table model &#8211; copied from generated code</p>
<p>{<br />
Class[] types = new Class [] {<br />
java.lang.String.class, java.lang.String.class, java.lang.String.class<br />
};</p>
<p>public Class getColumnClass(int columnIndex) {<br />
return types [columnIndex];<br />
}<br />
});<br />
}<br />
}</p></blockquote>
<p>And that&#8217;s it &#8211; your table should now automatically expand when necessary.<br />
The same logic can be applied to deleting rows when they&#8217;re not needed.</p>
<p>Below is an complete program which shows automatic table expansion in action. It can be downloaded, compiled and executed independently.</p>
<p>Source: <a href="http://kylewilliams.co.za/codebase/general/TableExpandGUI.java">TableExpandGUI.java</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kylewilliams.co.za/2007/11/01/netbeans-jtable-automatic-expansion/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/za/</creativeCommons:license>
	</item>
		<item>
		<title>fill mysql table with dates using java</title>
		<link>http://kylewilliams.co.za/2007/11/01/fill-mysql-table-with-dates-using-java</link>
		<comments>http://kylewilliams.co.za/2007/11/01/fill-mysql-table-with-dates-using-java#comments</comments>
		<pubDate>Thu, 01 Nov 2007 10:13:30 +0000</pubDate>
		<dc:creator>Kyle Williams</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://kylewilliams.co.za/2008/11/01/fill-mysql-table-with-dates-using-java</guid>
		<description><![CDATA[I had the problem of needing to populate a MySQL table with dates between openingDate and closingDate, using Java and JDBC Connector/J. Well, after a while I figured out how to do it and thought I’d share it with you. Step 1: See how many dates will need to be entered ResultSet rs = statement.executeQuery(”SELECT [...]]]></description>
			<content:encoded><![CDATA[<p class="entry">I had the problem of needing to populate a MySQL table with dates between openingDate and closingDate, using Java and JDBC Connector/J.<br />
Well, after a while I figured out how to do it and thought I’d share it with you.</p>
<p>Step 1: See how many dates will need to be entered</p>
<blockquote><p>ResultSet rs = statement.executeQuery(”SELECT DATEDIFF(’2007-07-01′, ‘2006-07-01′);”);<br />
rs.next();<br />
int days = rs.getInt(1);</p></blockquote>
<p>The MySQL DATEDIFF query calculates the value of date1 &#8211; date2, in this case (2007-07-01 &#8211; 2006-07-01) which evaluates to 365.<br />
The days variable takes the value of the first column returned by the ResultSet object, which is the result of the DATEDIFF query.</p>
<p>Step 2: Insert the days into the database</p>
<blockquote><p>for (int i = 0; i &lt;= days; i++){<br />
int j = statement.executeUpdate(&#8220;INSERT INTO MyTable VALUES (&#8217;2006-07-01&#8242; + INTERVAL &#8221; + i + &#8221; DAY);&#8221;);<br />
}</p></blockquote>
<p>This statement will need to be customized to suit your table but essentially what it does is takes the first date specified, and add 1 day for each count in the day variable.</p>
<p>At the end you have a table filled with dates!</p>
]]></content:encoded>
			<wfw:commentRss>http://kylewilliams.co.za/2007/11/01/fill-mysql-table-with-dates-using-java/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/za/</creativeCommons:license>
	</item>
		<item>
		<title>the road to kde hacking</title>
		<link>http://kylewilliams.co.za/2007/10/16/the-road-to-kde-hacking</link>
		<comments>http://kylewilliams.co.za/2007/10/16/the-road-to-kde-hacking#comments</comments>
		<pubDate>Tue, 16 Oct 2007 18:50:40 +0000</pubDate>
		<dc:creator>Kyle Williams</dc:creator>
				<category><![CDATA[kde]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[old]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://kylewilliams.co.za/?p=21</guid>
		<description><![CDATA[Aaron Siego, president of KDE e.V recently made a post titled “Getting into KDE hacking” which reminded me of the reason I started this blog in the first place &#8211; to detail my journey into the world of KDE hacking. Truth is though, that I haven’t posted anything related to KDE hacking since I started [...]]]></description>
			<content:encoded><![CDATA[<p class="entry">Aaron Siego, president of <a href="http://ev.kde.org/">KDE e.V</a> recently made a post titled <a href="http://aseigo.blogspot.com/2007/09/getting-into-kde-hacking.html">“Getting into KDE hacking”</a> which reminded me of the reason I started this blog in the first place &#8211; to detail my journey into the world of KDE hacking.</p>
<p>Truth is though, that I haven’t posted anything related to KDE hacking since I started this blog, mainly because I haven’t had the time to do any of the great free software things I plan to do. Anyway, Aaron highlight 6 steps to getting involved in KDE hacking, and so far I’ve completed the first one which is learning Qt4. So not all is lost, I am one step closer to developing free software for the desktop environment which I have grown to love over the years (more on that another time).</p>
]]></content:encoded>
			<wfw:commentRss>http://kylewilliams.co.za/2007/10/16/the-road-to-kde-hacking/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/za/</creativeCommons:license>
	</item>
		<item>
		<title>learning a new language</title>
		<link>http://kylewilliams.co.za/2007/10/16/learning-a-new-language</link>
		<comments>http://kylewilliams.co.za/2007/10/16/learning-a-new-language#comments</comments>
		<pubDate>Tue, 16 Oct 2007 18:49:59 +0000</pubDate>
		<dc:creator>Kyle Williams</dc:creator>
				<category><![CDATA[old]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://kylewilliams.co.za/?p=20</guid>
		<description><![CDATA[Learning a new language is never an easy thing &#8211; especially if the new language is a programming language. In the past my approach has been to start learning a language, work on it for a a couple of days till I feel competent at it, and then forget about it. The problem with that [...]]]></description>
			<content:encoded><![CDATA[<p class="entry">Learning a new language is never an easy thing &#8211; especially if the new language is a programming language. In the past my approach has been to start learning a language, work on it for a a couple of days till I feel competent at it, and then forget about it.<br />
The problem with that approach is that three months down the line when I want to write an application in that language I’ve already forgotten it &#8211; as was my case with <a href="http://en.wikipedia.org/wiki/COBOL">COBOL</a> and <a href="http://www.python.org/">Python</a>.</p>
<p>For the last year or so I’ve been coding in c++ though never really got involved in any large projects, resulting in something similar to my <a href="http://en.wikipedia.org/wiki/COBOL">COBOL</a> and <a href="http://www.python.org/">Python</a> woes…I keep forgetting the semantics and syntax of the language!</p>
<p>However, for about the last two months I’ve been working on a project in c++ almost every day, and the result &#8211; familiarity! It’s led me to conclude that the best way to learn a programming language and become fluent in it (so to speak) is to work with it every day on large project which encompasses all aspects of that language…but you knew that anyway, didn’t you!</p>
]]></content:encoded>
			<wfw:commentRss>http://kylewilliams.co.za/2007/10/16/learning-a-new-language/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/za/</creativeCommons:license>
	</item>
		<item>
		<title>openwarriors.org blog</title>
		<link>http://kylewilliams.co.za/2007/10/16/openwarriorsorg-blog</link>
		<comments>http://kylewilliams.co.za/2007/10/16/openwarriorsorg-blog#comments</comments>
		<pubDate>Tue, 16 Oct 2007 18:37:39 +0000</pubDate>
		<dc:creator>Kyle Williams</dc:creator>
				<category><![CDATA[kde]]></category>
		<category><![CDATA[old]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://kylewilliams.co.za/?p=10</guid>
		<description><![CDATA[A couple of months ago I had the idea to start up a site, openwarriors.org, which I would use to highlight “individuals committed to open source.” So I went ahead and registered the domain, uploaded a placeholder index page (which is still there) and waited for the right time to get started on the project. [...]]]></description>
			<content:encoded><![CDATA[<p class="entry">A couple of months ago I had the idea to start up a site, openwarriors.org, which I would use to highlight “individuals committed to open source.” So I went ahead and registered the domain, uploaded a placeholder index page (which is still there) and waited for the right time to get started on the project.</p>
<p>Now that I’m on a seven week holiday I have the time to get started on my openwarriors.org project. However last night I started doubting the project, the reason being that if it becomes successful I won’t be able to sustain it, one because of the bandwidth costs and two because of the time that I’d need to put into it.</p>
<p>Since I’ve really been getting into open source hacking in recent times I decided to make my ventures into it’s world the focus of openwarriors.org and thus (for now) scrapping the original idea. So, I’ve started this blog on iblog.co.za and named it openwarriors.org. In this blog I will detail my experiences with open source hacking, primarily focusing on KDE and specifically KDE4. And thus I announce my holiday project: in order to get a good feeling for Qt and KDE4 development I’m going to develop a KDE4 Financial Calculator. For this project I’ll detail my setting up of KDE4 for development, the resources I use to learn how to create KDE4 applications and any other interesting things I might run into while experimenting.</p>
<p>However KDE won’t be the only focus of this blog, anything which I find interesting relating to open source software will be posted here, so keep a look out…</p>
]]></content:encoded>
			<wfw:commentRss>http://kylewilliams.co.za/2007/10/16/openwarriorsorg-blog/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/za/</creativeCommons:license>
	</item>
	</channel>
</rss>
