<?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>Ken&#039;s Code Pit &#187; Ken</title>
	<atom:link href="http://ken.ath.cx/kens_code_pit/author/ken/feed/" rel="self" type="application/rss+xml" />
	<link>http://ken.ath.cx/kens_code_pit</link>
	<description>Spewing code in the wrong direction</description>
	<lastBuildDate>Sun, 27 Dec 2009 19:57:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OpenOffice Calc: Can&#8217;t save files</title>
		<link>http://ken.ath.cx/kens_code_pit/2009/12/27/openoffice-calc-cant-save-files/</link>
		<comments>http://ken.ath.cx/kens_code_pit/2009/12/27/openoffice-calc-cant-save-files/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 17:14:43 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[openoffice]]></category>

		<guid isPermaLink="false">http://ken.ath.cx/kens_code_pit/?p=473</guid>
		<description><![CDATA[I&#8217;m having the strangest problem with OpenOffice Calc lately. I can create and a save a new file fine, but I can only save it once. If I then edit that same document and try to save it, I get an error:

I&#8217;ve tried running revdep-rebuild but it came back clean. This happens to me on [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m having the strangest problem with OpenOffice Calc lately. I can create and a save a new file fine, but I can only save it <em>once</em>. If I then edit that same document and try to save it, I get an error:</p>

<div id="attachment_474" class="wp-caption alignnone" style="width: 354px"><a href="http://ken.ath.cx/kens_code_pit/wp-content/uploads/2009/12/oocalc.png"><img src="http://ken.ath.cx/kens_code_pit/wp-content/uploads/2009/12/oocalc.png" alt="OOCalc saving error" title="OOCalc saving error" width="344" height="151" class="size-full wp-image-474" /></a><p class="wp-caption-text">Can't save in Calc</p></div>

<p>I&#8217;ve tried running revdep-rebuild but it came back clean. This happens to me on the compiled and -bin versions of openoffice. I really don&#8217;t know how to fix this as I&#8217;m not sure whats wrong. I really don&#8217;t want to remerge <em>all</em> of openoffice&#8217;s dependencies manually.</p>

<p>Googling around references this error on network mounted shares, but this is just my local ext3 partition that it&#8217;s happening on. KSpread can open and write to the same exact file, so it&#8217;s got to be something picky with OpenOffice itself&#8230;</p>

<p><strong>Update:</strong> Nuking my ~/.ooo3 directory fixed the issue. I&#8217;m not really sure why it was broken but I&#8217;m glad I can at least use openoffice again</p>
]]></content:encoded>
			<wfw:commentRss>http://ken.ath.cx/kens_code_pit/2009/12/27/openoffice-calc-cant-save-files/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Euler Problem 50</title>
		<link>http://ken.ath.cx/kens_code_pit/2009/12/26/euler-problem-50/</link>
		<comments>http://ken.ath.cx/kens_code_pit/2009/12/26/euler-problem-50/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 20:30:01 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[euler]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://ken.ath.cx/kens_code_pit/?p=464</guid>
		<description><![CDATA[Hm, does wasting time doing Project Euler problems count as slacking? I&#8217;ve solved yet another problem, this time it was problem 50. At first I was very disappointed that my code was taking over 5 minutes until I realized that if the number of summed primes that overflowed the prime to find was less than [...]]]></description>
			<content:encoded><![CDATA[<p>Hm, does wasting time doing Project Euler problems count as slacking? I&#8217;ve solved yet another problem, this time it was <a href="http://projecteuler.net/index.php?section=problems&#038;id=50">problem 50</a>. At first I was very disappointed that my code was taking over 5 minutes until I realized that if the number of summed primes that overflowed the prime to find was less than that of the currently largest number of summed primes then it should simply abort that prime number and move on to the next, as shifting the sum index would only make the number of summed primes smaller anyway. After that optimization, my program went from 40+ minutes to just <em>0.6 seconds</em>.</p>

<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ken@khaos build % bash -c ' time java -cp ../../kenscodepit-javatoolkit/dist/lib/kenscodepit-javatoolkit.jar:. ken.p50'<br />
[...]<br />
<br />
real&nbsp; &nbsp; 0m0.661s<br />
user&nbsp; &nbsp; 0m0.642s<br />
sys 0m0.025s</div></div>

<p>I was pretty satisfied with this result. Please note I use getPrimes(num) from a utility class I wrote, but one can substitute any getPrimes(num) implementation that returns all the primes up to the passed number.</p>

<div class="codecolorer-container java geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">ken</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.ArrayList</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">kcp.KMath</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> p50 <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ArrayList<span style="color: #339933;">&lt;</span>Integer<span style="color: #339933;">&gt;</span> primes <span style="color: #339933;">=</span> KMath.<span style="color: #006633;">getPrimes</span><span style="color: #009900;">&#40;</span>1000000<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;prime generation done&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> largest <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> cnum <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// check each prime</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> prime <span style="color: #339933;">:</span> primes<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> target <span style="color: #339933;">=</span> prime<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">boolean</span> found <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// check how many additions it will take</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> dprime <span style="color: #339933;">:</span> primes<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> csum <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> tnum <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>found<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> index <span style="color: #339933;">=</span> primes.<span style="color: #006633;">indexOf</span><span style="color: #009900;">&#40;</span>dprime<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// &nbsp;perform the addition from dprime and on</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> cprime <span style="color: #339933;">=</span> index<span style="color: #339933;">;</span> cprime <span style="color: #339933;">&lt;</span> primes.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> cprime<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// current value</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> cval <span style="color: #339933;">=</span> primes.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>cprime<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; csum<span style="color: #339933;">+=</span>cval<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tnum<span style="color: #339933;">++;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>csum <span style="color: #339933;">==</span> target<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>tnum <span style="color: #339933;">&gt;</span> cnum<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cnum <span style="color: #339933;">=</span> tnum<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; largest <span style="color: #339933;">=</span> prime<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; found <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>csum <span style="color: #339933;">&gt;</span> target<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// if tnum at this point is shorter than longest, its</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// probably best to just die as it will only get</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// shorter and thus never be our desired number</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Without this, the time goes from ~.6s to 40m+!</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>tnum <span style="color: #339933;">&lt;</span> cnum<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; found <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;The largest was &quot;</span> <span style="color: #339933;">+</span> largest <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; at &quot;</span> <span style="color: #339933;">+</span> cnum <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; primes&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://ken.ath.cx/kens_code_pit/2009/12/26/euler-problem-50/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Euler Problem 23</title>
		<link>http://ken.ath.cx/kens_code_pit/2009/12/26/euler-problem-23/</link>
		<comments>http://ken.ath.cx/kens_code_pit/2009/12/26/euler-problem-23/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 06:02:04 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[euler]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://ken.ath.cx/kens_code_pit/?p=456</guid>
		<description><![CDATA[Just solved another Euler Problem, this time #23. I&#8217;m not really doing them in any kind of order. This code takes about 2 seconds to calculate the answer. Not exactly fast, but acceptable. My main problem was I forgot I needed to use Arrays.copyOf to actually copy an array.

import java.util.Arrays;

public class p23 &#123;
&#160; &#160; //Find [...]]]></description>
			<content:encoded><![CDATA[<p>Just solved another Euler Problem, this time <a href="http://projecteuler.net/index.php?section=problems&#038;id=23">#23</a>. I&#8217;m not really doing them in any kind of order. This code takes about 2 seconds to calculate the answer. Not exactly fast, but acceptable. My main problem was I forgot I needed to use <em>Arrays.copyOf</em> to actually copy an array.</p>

<div class="codecolorer-container java geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.Arrays</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> p23 <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//Find the sum of all the positive integers which cannot be written</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">//as the sum of two abundant numbers.</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> LARGEST <span style="color: #339933;">=</span> <span style="color: #cc66cc;">28123</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> ints <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span>LARGEST<span style="color: #339933;">+</span>1<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">boolean</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> abundant <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">boolean</span><span style="color: #009900;">&#91;</span>LARGEST<span style="color: #339933;">+</span>1<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;=</span> LARGEST<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ints<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> i<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>factorsum<span style="color: #009900;">&#40;</span>i<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> i<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; abundant<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span> abundant<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> old <span style="color: #339933;">=</span> <span style="color: #003399;">Arrays</span>.<span style="color: #006633;">copyOf</span><span style="color: #009900;">&#40;</span>ints, ints.<span style="color: #006633;">length</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// remove from ints abundant sums</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">:</span> old<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>abundant<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> x <span style="color: #339933;">:</span> old<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>abundant<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>x<span style="color: #339933;">+</span>i<span style="color: #009900;">&#41;</span> <span style="color: #339933;">&lt;=</span> LARGEST<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ints<span style="color: #009900;">&#91;</span>x<span style="color: #339933;">+</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> sum <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> z <span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> z<span style="color: #339933;">&lt;=</span> LARGEST<span style="color: #339933;">;</span> z<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sum<span style="color: #339933;">+=</span>ints<span style="color: #009900;">&#91;</span>z<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;The total is: &quot;</span> <span style="color: #339933;">+</span> sum<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">int</span> factorsum<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> num<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> sum <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;=</span> num<span style="color: #339933;">/</span><span style="color: #cc66cc;">2.0</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>num <span style="color: #339933;">%</span> i<span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> 0<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sum<span style="color: #339933;">+=</span>i<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> sum<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://ken.ath.cx/kens_code_pit/2009/12/26/euler-problem-23/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Euler Problem 28</title>
		<link>http://ken.ath.cx/kens_code_pit/2009/12/24/euler-problem-28/</link>
		<comments>http://ken.ath.cx/kens_code_pit/2009/12/24/euler-problem-28/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 22:40:16 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[euler]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://ken.ath.cx/kens_code_pit/?p=449</guid>
		<description><![CDATA[Finally got around to solving Problem 28 today in Java. It&#8217;s no where near as efficient as it could be but it got the problem done at least.

The size parameter it takes is the total number of elements in the spiral, so for the solution you would pass 1002001 to the program. (as 1001^2 equals [...]]]></description>
			<content:encoded><![CDATA[<p>Finally got around to solving <a href="http://projecteuler.net/index.php?section=problems&#038;id=28">Problem 28</a> today in Java. It&#8217;s no where near as efficient as it could be but it got the problem done at least.</p>

<p>The size parameter it takes is the total number of elements in the spiral, so for the solution you would pass 1002001 to the program. <em>(as 1001^2 equals 1002001)</em></p>

<p>Code is below:
<span id="more-449"></span></p>

<div class="codecolorer-container java geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// GPLv2</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.ArrayList</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> p28 <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> size <span style="color: #339933;">=</span> <span style="color: #003399;">Integer</span>.<span style="color: #006633;">parseInt</span><span style="color: #009900;">&#40;</span>args<span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// 21 22 23 24 28</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// 20 &nbsp;7 &nbsp;8 &nbsp;9 10</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// 19 &nbsp;6 &nbsp;1 &nbsp;2 11</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// 18 &nbsp;5 &nbsp;4 &nbsp;3 12</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// 17 16 15 14 13</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// We start at one</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> next <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> tinc <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> incrementor <span style="color: #339933;">=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> sum <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// we don't want to exceed our spiral size</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>next <span style="color: #339933;">&lt;</span> size<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>next <span style="color: #339933;">==</span> 1<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; next <span style="color: #339933;">+=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sum <span style="color: #339933;">+=</span> next<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; next <span style="color: #339933;">+=</span> incrementor<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sum <span style="color: #339933;">+=</span>next<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// increment times we have used incrementor</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tinc<span style="color: #339933;">++;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// our incrementer increases every 4th time</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>tinc <span style="color: #339933;">==</span> 4<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; incrementor <span style="color: #339933;">+=</span><span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tinc <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;The total is &quot;</span> <span style="color: #339933;">+</span> sum<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://ken.ath.cx/kens_code_pit/2009/12/24/euler-problem-28/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with eclim</title>
		<link>http://ken.ath.cx/kens_code_pit/2009/12/22/fun-with-eclim/</link>
		<comments>http://ken.ath.cx/kens_code_pit/2009/12/22/fun-with-eclim/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 20:40:29 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[eclim]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://ken.ath.cx/kens_code_pit/?p=417</guid>
		<description><![CDATA[So I just recently tried eclim and I have to say I&#8217;m loving it for the java work I normally do. The power of vim with eclipse&#8217;s autocompletion support, automatic imports, and javadoc search is extremely handy. I had heard of eclim for awhile, but I just never tried it. Now I regret not trying [...]]]></description>
			<content:encoded><![CDATA[<p>So I just recently tried <a href="http://eclim.org/">eclim</a> and I have to say I&#8217;m loving it for the java work I normally do. The power of vim with eclipse&#8217;s autocompletion support, automatic imports, and javadoc search is extremely handy. I had heard of eclim for awhile, but I just never tried it. Now I regret not trying it sooner as its awesome.</p>

<p>I&#8217;m still experimenting with it and digging it. Here&#8217;s some settings I&#8217;ve made for ease of use in my <code class="codecolorer text default"><span class="text">~/.vimrc</span></code>:</p>

<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">let g:EclimBrowser='xdg-open'<br />
nnoremap &lt;F2&gt; &lt;ESC&gt;:JavaDocSearch&lt;cr&gt;<br />
nnoremap &lt;F11&gt; &lt;ESC&gt;:Ant&lt;cr&gt;<br />
nnoremap &lt;F3&gt; &lt;ESC&gt;:JavaImportMissing&lt;cr&gt;:JavaImportClean&lt;cr&gt;<br />
abbr print System.out.println(&quot;&quot;);&lt;esc&gt;hhi</div></div>

<p>I also usually use ctags with my projects too. For java I usually use <code class="codecolorer text default"><span class="text">ctags -R --links=yes --java-types=cimp -f tags</span></code> to generate the tags file and then use in my <code class="codecolorer text default"><span class="text">~/.vimrc</span></code>:</p>

<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">map &lt;C-\&gt; :tab split&lt;CR&gt;:exec(&quot;tag &quot;.expand(&quot;&lt;cword&gt;&quot;))&lt;CR&gt;<br />
set tags=./tags;$HOME</div></div>

<p>These settings allow me to hit <code class="codecolorer text default"><span class="text">ctrl-\</span></code> and jump to the class/method of the file its defined in and open it in a new tab. If its in the same file, I use the normal <code class="codecolorer text default"><span class="text">ctrl-]</span></code> tag command. The second line has vim search up from the current directory up to my home directory for a file called &#8220;tags&#8221; which was generated by the ctags command.</p>

<p>For the time being this is looking like it will replace my old eclipse only java environment, and perhaps this will improve my python and other ones too. The ctags alone have made python a lot easier to work with.</p>
]]></content:encoded>
			<wfw:commentRss>http://ken.ath.cx/kens_code_pit/2009/12/22/fun-with-eclim/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GPytage 0.3.0 RC1 Unleashed</title>
		<link>http://ken.ath.cx/kens_code_pit/2009/12/19/gpytage-0-3-0-rc1-unleashed/</link>
		<comments>http://ken.ath.cx/kens_code_pit/2009/12/19/gpytage-0-3-0-rc1-unleashed/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 03:56:07 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[GPytage]]></category>

		<guid isPermaLink="false">http://ken.ath.cx/kens_code_pit/?p=399</guid>
		<description><![CDATA[Well, after a lot of hacking GPytage 0.3.0 RC1 is finally ready to be released. This version underwent nearly a complete rewrite to make coding it much easier and of course improve the end users experience of editing Portage&#8217;s config files. Notable features of this release include:


    Supports recursive directory support now, [...]]]></description>
			<content:encoded><![CDATA[<p>Well, after a lot of hacking GPytage 0.3.0 RC1 is finally ready to be released. This version underwent nearly a complete rewrite to make coding it much easier and of course improve the end users experience of editing Portage&#8217;s config files. Notable features of this release include:</p>

<ul>
    <li>Supports recursive directory support now, where the old release was limited to one depth of a package.foo directory</li>
    <li>Improved creation, deletion, and renaming of files. You can now rightclick in the leftpanel on the desired file and get these options as well</li>
    <li>Copy and Paste support now implemented</li>
    <li>When editing an entry you can now hit tab to save the change and move to the next editable field.</li>
    <li>When adding a new file, reverting, deleting, or a similar operation is executed the folder you were currently in is now reselected after GPytage reloads its database</li>
</ul>

<p>GPytage should be hitting the Portage tree in the next few hours. A simple</p>

<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">emerge -av =app-portage/gpytage-0.3.0_rc1</div></div>

<p>should net you package for testing. It will be keyworded ~arch, so stable users will need to add an entry to package.keywords to install it.</p>

<p>While this is a release candidate, there should not be any bugs floating around. If you find any bugs or want to suggest an improvement don&#8217;t hesitate to either post it here or at <a href="https://gna.org/projects/gpytage/">https://gna.org/projects/gpytage/</a>
<div id="attachment_406" class="wp-caption alignnone" style="width: 310px"><a href="http://ken.ath.cx/kens_code_pit/wp-content/uploads/2009/12/gpytage-0.3.0_rc1.png"><img src="http://ken.ath.cx/kens_code_pit/wp-content/uploads/2009/12/gpytage-0.3.0_rc1-300x197.png" alt="" title="gpytage-0.3.0_rc1" width="300" height="197" class="size-medium wp-image-406" /></a><p class="wp-caption-text">GPytage-0.3.0 RC1</p></div></p>

<p>Looking forward to hearing everyone&#8217;s feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://ken.ath.cx/kens_code_pit/2009/12/19/gpytage-0-3-0-rc1-unleashed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Impressions of Google Wave</title>
		<link>http://ken.ath.cx/kens_code_pit/2009/12/13/impressions-of-google-wave/</link>
		<comments>http://ken.ath.cx/kens_code_pit/2009/12/13/impressions-of-google-wave/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 01:49:39 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[google wave]]></category>

		<guid isPermaLink="false">http://ken.ath.cx/kens_code_pit/?p=395</guid>
		<description><![CDATA[So I&#8217;ve been using Google Wave for about 2 weeks now off and on with the few people I know that use wave. My first impression after logging in was that the interface wasn&#8217;t exactly that intuitive and friendly. Wave did import all my gmail contacts into wave that had a wave account which was [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been using Google Wave for about 2 weeks now off and on with the few people I know that use wave. My first impression after logging in was that the interface wasn&#8217;t exactly that intuitive and friendly. Wave did import all my gmail contacts into wave that had a wave account which was nifty.</p>

<p>Chatting in waves themselves is relatively simple if you know the keyboard shortcuts, but everything is transferred in real time as the draft mode has not been implemented yet. This means you cannot formulate your thoughts before sending it off unless you type it up externally and paste it in. While not normally something I&#8217;d care about, there are times I&#8217;d like to spent a little time composing and editing my response to such things.</p>

<p>Also, once someone is added to a wave they are there pretty much forever as the remove function is also not implemented yet. So take care in who gets added to a wave if there&#8217;s anything in the wave you would prefer to remain private.</p>

<p>The buddy status indication of online/offline is also pretty poor. From what I&#8217;ve observed it isn&#8217;t entirely accurate yet as I&#8217;ve had numerous conversations with people that all showed offline. Not knowing whether someone is online or not is a pretty big deal, I mean whats the point if it doesn&#8217;t work. Might as well just check a regular IM or email the person instead.</p>

<p>All these problems aren&#8217;t really the biggest problem I have with Wave though. My biggest problem is almost no one I know actually continues to use Wave, and I&#8217;m about to throw in the towel for Wave as well. I just don&#8217;t see any real point to using Wave right now besides extremely niche uses. It also adds yet another layer of stuff I need to keep track of to keep in contact with various people who don&#8217;t desire to use all the same protocol/communication tool which is somewhat annoying. I have enough of those to track already and more keep popping up all the time. Perhaps after a bit of polishing by Google I&#8217;ll give Wave another chance.</p>
]]></content:encoded>
			<wfw:commentRss>http://ken.ath.cx/kens_code_pit/2009/12/13/impressions-of-google-wave/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Keeping up with all those RSS feeds</title>
		<link>http://ken.ath.cx/kens_code_pit/2009/12/12/keeping-up-with-all-those-rss-feeds/</link>
		<comments>http://ken.ath.cx/kens_code_pit/2009/12/12/keeping-up-with-all-those-rss-feeds/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 19:19:58 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[google reader]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false">http://ken.ath.cx/kens_code_pit/?p=387</guid>
		<description><![CDATA[I&#8217;m subscribed to a fairly decent amount of RSS feeds that I read daily ranging from technical websites to comics to hulu shows. Recently this list has grown quite large and it became apparent that using Opera as my rss reader was coming to an end. Opera&#8217;s rss reader lacks any kind of organizational ability [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m subscribed to a fairly decent amount of RSS feeds that I read daily ranging from technical websites to comics to hulu shows. Recently this list has grown quite large and it became apparent that using Opera as my rss reader was coming to an end. Opera&#8217;s rss reader lacks any kind of organizational ability such as folders. For a long time this fact did not bother me at all, but after my feeds list started growing the UI&#8217;s weaknesses were starting to surface.</p>

<p>I tried alternative dedicated rss reader applications but they mainly just got annoying as they were practically full blown browsers disguised as an rss reader. The rendering quirks and other minor problems pretty much turned me off to the idea entirely.</p>

<p>Since I have a google account, I decided to try out Google Reader and see if it lived up to its name. Been using for about a day so far and am liking it fairly well. The ability to navigate Google Reader entirely through the use of the keyboard is something that was appealing to me as clicking through all those feeds and entries would be a massive pain. Reader also easily allowed me to add my feeds into folder based categories to help sort out the massive flow of information. Adding a folder was slightly unintuitive but I figured it out in a reasonable amount of time.</p>

<p>I&#8217;ll be using Google Reader exclusively this week for reading all my rss stories to see if I find any annoying quirks about it. So far it&#8217;s better than what I was currently using, however, so I don&#8217;t really foresee switching back to Opera for reading rss any time soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://ken.ath.cx/kens_code_pit/2009/12/12/keeping-up-with-all-those-rss-feeds/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GPytage rewrite nearing completion</title>
		<link>http://ken.ath.cx/kens_code_pit/2009/12/05/gpytage-rewrite-nearing-completion/</link>
		<comments>http://ken.ath.cx/kens_code_pit/2009/12/05/gpytage-rewrite-nearing-completion/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 03:11:37 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[GPytage]]></category>

		<guid isPermaLink="false">http://ken.ath.cx/kens_code_pit/?p=371</guid>
		<description><![CDATA[So recently I&#8217;ve gotten back into the game on rewriting my application GPytage so it&#8217;s a bit easier to work with. For those of you who don&#8217;t know what GPytage is, it&#8217;s a GTK application for managing Portage&#8217;s config files traditionally located in

/etc/portage

written with PyGTK. The application is coming along nicely with its new backend, [...]]]></description>
			<content:encoded><![CDATA[<p>So recently I&#8217;ve gotten back into the game on rewriting my application <a href="https://gna.org/projects/gpytage/">GPytage</a> so it&#8217;s a bit easier to work with. For those of you who don&#8217;t know what GPytage is, it&#8217;s a GTK application for managing Portage&#8217;s config files traditionally located in</p>

<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/portage</div></div>

<p>written with PyGTK. The application is coming along nicely with its new backend, but still has a bit of a way to go before a rc is released. I&#8217;d say the current svn trunk is about beta status at the moment, it&#8217;s safe to use but all the features just aren&#8217;t implemented yet. Basic editing works right now as does saving and creating new files. It also supports infinitely recursive folders and files which the older version did not.</p>

<p>A quick list of the top of my head that I&#8217;ve still got to implement:</p>

<ul>
    <li>Deleting files</li>
    <li>Renaming files</li>
    <li>Copy, Paste, Cut, etc</li>
    <li>Possibly drag and drop support</li>
    <li>Figures out sane keybindings for adding and deleting a row. I was thinking ctrl+e for inserting a new row and ctrl+d for deleting a row but I really have no idea, recommendations are welcome</li>
    <li>Converting a configuration file into the directory layout like the older GPytage did</li>
</ul>

<p>That&#8217;s all I can think of off the top of my head. The <a href="https://gna.org/svn/?group=gpytage">svn trunk</a> should be good for testing right now, I promise not to horribly break it. It would be appreciated if people would checkout the current trunk and give it a whirl and comment about how you liked, disliked, hated, loved, or would change about GPytage.</p>

<p>For testing purposes after checking out the svn trunk just cd into the scripts directory and run</p>

<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">./gpytage -l</div></div>

<p>. Then you should see the application in all its glory. If you feel uneasy about letting GPytage have actual access to your portage files, simply create a /etc/testportage directory that is identical to the old one such as</p>

<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cp -r /etc/portage /etc/testportage</div></div>

<p>. This way GPytage can&#8217;t cause any harm. If you use the /etc/testportage directory, you would launch GPytage with</p>

<div class="codecolorer-container text geshi" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">./gpytage -lt</div></div>

<p>.</p>

<p>Feel free to drop by and say hi in #gpytage on the Freenode irc network.</p>

<div id="attachment_382" class="wp-caption alignnone" style="width: 310px"><a href="http://ken.ath.cx/kens_code_pit/wp-content/uploads/2009/12/gpytage.png"><img src="http://ken.ath.cx/kens_code_pit/wp-content/uploads/2009/12/gpytage-300x197.png" alt="trunk r230" title="gpytage" width="300" height="197" class="size-medium wp-image-382" /></a><p class="wp-caption-text">trunk r230</p></div>
]]></content:encoded>
			<wfw:commentRss>http://ken.ath.cx/kens_code_pit/2009/12/05/gpytage-rewrite-nearing-completion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quirks with Opera</title>
		<link>http://ken.ath.cx/kens_code_pit/2009/11/20/quirks-with-opera/</link>
		<comments>http://ken.ath.cx/kens_code_pit/2009/11/20/quirks-with-opera/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 23:31:47 +0000</pubDate>
		<dc:creator>Ken</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Opera]]></category>

		<guid isPermaLink="false">http://ken.ath.cx/kens_code_pit/?p=366</guid>
		<description><![CDATA[So I&#8217;ve been a long time Opera user, but lately some bugs have really started to agitate me and are killing my user experience.

The first bug is Opera is unable to open certain long URL&#8217;s from the commandline, approximately if the URL is 86 characters or longer. This was fixed awhile ago in the Windows [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve been a long time Opera user, but lately some bugs have really started to agitate me and are killing my user experience.</p>

<p>The first bug is Opera is unable to open certain long URL&#8217;s from the commandline, approximately if the URL is 86 characters or longer. This was fixed awhile ago in the Windows version of Opera, but it seems it never got corrected in the Linux builds. This causes me to be greatly annoyed as applications can no longer pass long URLs to Opera to be opened. Most notably in my case is links inside my email client. I click those links expecting Opera to happily open them, but all I get is no response. Manually copying and pasting links into Opera from email is a royal pain and has tempted me to try Chromium a bit more full time. I submitted a bug report about it to Opera but we will see if that changes anything. If it doesn&#8217;t get fixed soon I&#8217;ll have to switch to just maintain my sanity of clicking URLs.</p>

<p>The second bug is flash <em>freezes all the time</em> in Opera. This is incredibly annoying when I&#8217;m watching something on Hulu. The show will be playing fine and then suddenly the video will freeze, but the sound will keep playing. This doesn&#8217;t seem to occur in other browsers such as chromium or arora. Based on that, I&#8217;d assume its an Opera bug but I can&#8217;t be sure. Either way it&#8217;s quite annoying. I can&#8217;t tell if it was a recent Opera update or flash update that introduced this behavior though.</p>

<p>Hoping the next Opera beta/rc fixes at the least my url length problem</p>
]]></content:encoded>
			<wfw:commentRss>http://ken.ath.cx/kens_code_pit/2009/11/20/quirks-with-opera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
