<?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>Randomly Intermittent Thoughts</title>
	<atom:link href="http://www.nathanblomquist.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nathanblomquist.net/blog</link>
	<description>Thoughts I have pondered, but may not be wholely original...</description>
	<lastBuildDate>Mon, 15 Mar 2010 18:32:27 +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>When you want your computer to sleep for the Winter, call on Wizmo!</title>
		<link>http://www.nathanblomquist.net/blog/2010/02/19/computer-sleep-for-the-winter-call-on-wizmo/</link>
		<comments>http://www.nathanblomquist.net/blog/2010/02/19/computer-sleep-for-the-winter-call-on-wizmo/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 16:27:34 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/?p=83</guid>
		<description><![CDATA[Yesterday I was digging around the interwebs looking to find out how I can hibernate a computer from the command line.  My first thought was &#8220;Oh, the shutdown command might work&#8221;, but nope.  It doesn&#8217;t have a hibernate option.  Then I went to Google and did a search for it.  A [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I was digging around the interwebs looking to find out how I can hibernate a computer from the command line.  My first thought was &#8220;Oh, the shutdown command might work&#8221;, but nope.  It doesn&#8217;t have a hibernate option.  Then I went to <a href="http://www.google.com/search?q=windows+hibernate+command+line">Google</a> and did a search for it.  A forum thread lead me to <a href="http://www.grc.com/wizmo/wizmo.htm">Wizmo</a>.  This is a freeware utility that can hibernate a computer plus a lot more.  I think this is getting added to my toolbox of tools!</p>
<p>Thanks Steve!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2010/02/19/computer-sleep-for-the-winter-call-on-wizmo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make It Yourself: Preschool Math Game</title>
		<link>http://www.nathanblomquist.net/blog/2010/01/07/make-it-yourself-preschooler-math-board-game/</link>
		<comments>http://www.nathanblomquist.net/blog/2010/01/07/make-it-yourself-preschooler-math-board-game/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 17:56:55 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
				<category><![CDATA[Family]]></category>
		<category><![CDATA[Kids]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/?p=77</guid>
		<description><![CDATA[As I was reading other blogs, I found an interesting article on Parenting Science about preschoolers and math board games.
Direct link is here: Preschool math games.
What I liked was the fact they discuss a game that can be created by both the parent and preschooler (fun for the whole family).  But it also teaches [...]]]></description>
			<content:encoded><![CDATA[<p>As I was reading other blogs, I found an interesting article on <a href="http://www.parentingscience.com">Parenting Science</a> about preschoolers and math board games.<br />
Direct link is here: <a href="http://www.parentingscience.com/preschool-math-games.html">Preschool math games</a>.</p>
<p>What I liked was the fact they discuss a game that can be created by both the parent and preschooler (fun for the whole family).  But it also teaches basic math skills. Good times!<br />
<strong><br />
Update 17JAN2010 &#8212; Removing full instructions at the request of the original author.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2010/01/07/make-it-yourself-preschooler-math-board-game/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Final Static Objects = the Devil</title>
		<link>http://www.nathanblomquist.net/blog/2009/09/03/final-static-objects-the-devil/</link>
		<comments>http://www.nathanblomquist.net/blog/2009/09/03/final-static-objects-the-devil/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 21:51:22 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/?p=70</guid>
		<description><![CDATA[What does this code output?
No fair, running it!
PLAIN TEXT
JAVA:




public class Hmm &#123;


&#160; &#160; public static class X&#123;


&#160; &#160; &#160; &#160; int x = -1;


&#160; &#160; &#160; &#160; public X&#40;&#41;&#123;&#125;


&#160; &#160; &#160; &#160; public X&#40;int x &#41;&#123;setX&#40;x&#41;;&#125;


&#160; &#160; &#160; &#160; public int getX&#40;&#41;&#123;return x;&#125;


&#160; &#160; &#160; &#160; public void setX&#40;int x&#41;&#123;this.x = x;&#125;


&#160; &#160; &#125;


&#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>What does this code output?<br />
No fair, running it!</p>
<div class="igBar"><span id="ljava-2"><a href="#" onclick="javascript:showPlainTxt('java-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-2">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Hmm <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">static</span> <span style="color: #000000; font-weight: bold;">class</span> X<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">int</span> x = -<span style="color: #cc66cc;color:#800000;">1</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> X<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> X<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> x <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>setX<span style="color: #66cc66;">&#40;</span>x<span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">int</span> getX<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">return</span> x;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setX<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> x<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">x</span> = x;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// the default object has a default value of 0.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #993333;">static</span> X DEFAULT_X = <span style="color: #000000; font-weight: bold;">new</span> X<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> X m_X = <span style="color: #000000; font-weight: bold;">new</span> X<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// A Hmm object uses the default value</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> Hmm<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; m_X = DEFAULT_X;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> X getX<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> m_X;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setX<span style="color: #66cc66;">&#40;</span>X x<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006600;">m_X</span>.<span style="color: #006600;">setX</span><span style="color: #66cc66;">&#40;</span>x.<span style="color: #006600;">getX</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">static</span> <span style="color: #993333;">void</span> main<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> args<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Hmm hmm1 = <span style="color: #000000; font-weight: bold;">new</span> Hmm<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; hmm1.<span style="color: #006600;">getX</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">setX</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">15</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; Hmm hmm2 = <span style="color: #000000; font-weight: bold;">new</span> Hmm<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Hmm1 X = "</span> +</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hmm1.<span style="color: #006600;">getX</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getX</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Hmm2 X = "</span> +</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; hmm2.<span style="color: #006600;">getX</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getX</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"DEFAULT_X X = "</span> +</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEFAULT_X.<span style="color: #006600;">getX</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>Hint: </strong>It outputs exactly what the code tells it to! Not much of a hint... It doesn't do what the person wrote it expects it to do though.</p>
<p><strong>Answer:</strong> <em>15 </em>for all three.</p>
<p><strong>Why:</strong> Cause the Hmm constructor sets its X reference to the static default object.  Thereby the call to set the hmm1 object's X value to 15 actually sets the default value to 15!</p>
<p>Hence, Final Static Objects are the devil!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2009/09/03/final-static-objects-the-devil/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More Utilities/Programs/Tools</title>
		<link>http://www.nathanblomquist.net/blog/2009/08/13/more-utilitiesprogramstools/</link>
		<comments>http://www.nathanblomquist.net/blog/2009/08/13/more-utilitiesprogramstools/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 17:12:19 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
				<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/?p=59</guid>
		<description><![CDATA[More tools that I think I are vital.  Was just reading an article about what things to backup during an OS reinstallation, so I thought I would post some more of the utilities I found useful or needed.

Mozilla Firefox, the foxy way to browse:
http://www.getfirefox.com
Mozilla Thunderbird, emailing with Thunder:
http://www.mozillamessaging.com/en-US/thunderbird/
7-zip, the only way to extract:
http://www.7-zip.org/
Truecrypt, encrypting [...]]]></description>
			<content:encoded><![CDATA[<p>More tools that I think I are vital.  Was just reading an <a href="http://www.techspot.com/guides/183-app-backup-checklist/">article</a> about what things to backup during an OS reinstallation, so I thought I would post some more of the utilities I found useful or needed.</p>
<ul>
<li><strong>Mozilla Firefox, the foxy way to browse:</strong><br />
<a href="http://www.getfirefox.com">http://www.getfirefox.com</a></li>
<li><strong>Mozilla Thunderbird, emailing with Thunder:</strong><br />
<a href="http://www.mozillamessaging.com/en-US/thunderbird/">http://www.mozillamessaging.com/en-US/thunderbird/</a></li>
<li><strong>7-zip, the only way to extract:</strong><br />
<a href="http://www.7-zip.org/">http://www.7-zip.org/</a></li>
<li><strong>Truecrypt, encrypting with style:</strong><br />
<a href="http://www.truecrypt.org/">http://www.truecrypt.org/</a></li>
<li><strong>Audacity, sound recorder on crack:</strong><br />
<a href="http://audacity.sourceforge.net/">http://audacity.sourceforge.net/</a></li>
<li><strong>CDex, extractor of the Compact Disc Audio variety:</strong><br />
<a href="http://cdexos.sourceforge.net/">http://cdexos.sourceforge.net/</a></li>
<li><strong>VLC, media player extraordinaire:</strong><br />
<a href="http://www.videolan.org/vlc/">http://www.videolan.org/vlc/</a>
</li>
</ul>
<p>I think that is enough for now!  More to come when I think of them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2009/08/13/more-utilitiesprogramstools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Simple Things in Life (or the Tools/Utilities I Find Most Useful)</title>
		<link>http://www.nathanblomquist.net/blog/2009/07/29/the-simple-things-in-life-or-the-toolsutilities-i-find-most-useful/</link>
		<comments>http://www.nathanblomquist.net/blog/2009/07/29/the-simple-things-in-life-or-the-toolsutilities-i-find-most-useful/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 16:39:42 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
				<category><![CDATA[Utilities]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/?p=48</guid>
		<description><![CDATA[
Baretail, 'tail -f' for Windows:
http://www.baremetalsoft.com/baretail/
CommitMonitor, I'z n yr Subversion, wachin' yr commits:
http://tools.tortoisesvn.net/CommitMonitor
The Whole Sysinternals Suite, Windows Exposed:
http://technet.microsoft.com/en-us/sysinternals
Notepad++, Editing Made Easy:
http://notepad-plus.sourceforge.net

]]></description>
			<content:encoded><![CDATA[<ul>
<li><strong>Baretail, 'tail -f' for Windows:</strong><br />
<a href="http://www.baremetalsoft.com/baretail/">http://www.baremetalsoft.com/baretail/</a></li>
<li><strong>CommitMonitor, I'z n yr Subversion, wachin' yr commits:</strong><br />
<a href="http://tools.tortoisesvn.net/CommitMonitor">http://tools.tortoisesvn.net/CommitMonitor</a></li>
<li><strong>The Whole Sysinternals Suite, Windows Exposed:</strong><br />
<a href="http://technet.microsoft.com/en-us/sysinternals">http://technet.microsoft.com/en-us/sysinternals</a></li>
<li><strong>Notepad++, Editing Made Easy:</strong><br />
<a href="http://notepad-plus.sourceforge.net">http://notepad-plus.sourceforge.net</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2009/07/29/the-simple-things-in-life-or-the-toolsutilities-i-find-most-useful/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Who Knew XOR Was So Hard?</title>
		<link>http://www.nathanblomquist.net/blog/2009/07/29/who-knew-xor-was-so-hard/</link>
		<comments>http://www.nathanblomquist.net/blog/2009/07/29/who-knew-xor-was-so-hard/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 16:27:11 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/?p=35</guid>
		<description><![CDATA[XOR in C++

http://www.codeguru.com/forum/archive/index.php/t-179920.html
http://bytes.com/groups/c/215986-why-isnt-there-logical-xor-operator

Final Recommendation:
PLAIN TEXT
C:




// 'a' and 'b' are some sort of integer type.


// the double NOTs coerce to a standard boolean type


// (compiler dependent)


!!a ^ !!b 






Thankfully Java is easier
http://www.sap-img.com/java/java-boolean-logical-operators.htm
PLAIN TEXT
JAVA:




// 'a' and 'b' are of boolean type


// yay, no coercion necessary!


a ^ b 






I didn’t know that the ^ operator was overloaded to [...]]]></description>
			<content:encoded><![CDATA[<p>XOR in C++</p>
<ul>
<li><a href="http://www.codeguru.com/forum/archive/index.php/t-179920.html">http://www.codeguru.com/forum/archive/index.php/t-179920.html</a></li>
<li><a href="http://bytes.com/groups/c/215986-why-isnt-there-logical-xor-operator">http://bytes.com/groups/c/215986-why-isnt-there-logical-xor-operator</a></li>
</ul>
<p>Final Recommendation:</p>
<div class="igBar"><span id="lc-5"><a href="#" onclick="javascript:showPlainTxt('c-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">C:</span>
<div id="c-5">
<div class="c">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// 'a' and 'b' are some sort of integer type.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// the double NOTs coerce to a standard boolean type</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// (compiler dependent)</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">!!a ^ !!b </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Thankfully Java is easier<br />
<a href="http://www.sap-img.com/java/java-boolean-logical-operators.htm">http://www.sap-img.com/java/java-boolean-logical-operators.htm</a></p>
<div class="igBar"><span id="ljava-6"><a href="#" onclick="javascript:showPlainTxt('java-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-6">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// 'a' and 'b' are of boolean type</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// yay, no coercion necessary!</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">a ^ b </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>I didn’t know that the ^ operator was overloaded to handle Booleans, until I needed it a few weeks ago.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2009/07/29/who-knew-xor-was-so-hard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the serialVersionUID Programmatically</title>
		<link>http://www.nathanblomquist.net/blog/2009/02/11/getting-the-serialversionuid-programmatically/</link>
		<comments>http://www.nathanblomquist.net/blog/2009/02/11/getting-the-serialversionuid-programmatically/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 16:35:28 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/?p=25</guid>
		<description><![CDATA[At work I have been tasked with some Java serialization issues and I needed a quick way to get the serialversionUid from a class.
I tried the serialver command that comes with the JDK, but I didn't like that I had to setup the full classpath (which for us can be quite large, lots of jars [...]]]></description>
			<content:encoded><![CDATA[<p>At work I have been tasked with some Java serialization issues and I needed a quick way to get the serialversionUid from a class.</p>
<p>I tried the serialver command that comes with the JDK, but I didn't like that I had to setup the full classpath (which for us can be quite large, lots of jars and directories).  Instead I wanted it to work in my <a href="http://www.eclipse.org/">Eclipse</a> environment which already has this classpath set and is always updated.</p>
<p>I found this site that had a simple way of doing it:<br />
<a href="http://www.jguru.com/faq/view.jsp?EID=42982">http://www.jguru.com/faq/view.jsp?EID=42982</a><br />
Thanks Tim!</p>
<p>I wrote up a little wrapper main function:</p>
<div class="igBar"><span id="ljava-8"><a href="#" onclick="javascript:showPlainTxt('java-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-8">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.io.ObjectStreamClass;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SerialVer <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">static</span> <span style="color: #993333;">void</span> main<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> args<span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?q=allinurl%3AClassNotFoundException+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">ClassNotFoundException</span></a> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>args.<span style="color: #006600;">length</span> != <span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">err</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Must pass a class name!"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">exit</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">Class</span> cclass = <span style="color: #000000; font-weight: bold;">Class</span>.<span style="color: #006600;">forName</span><span style="color: #66cc66;">&#40;</span>args<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">long</span> uid = </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AObjectStreamClass+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">ObjectStreamClass</span></a>.<span style="color: #006600;">lookup</span><span style="color: #66cc66;">&#40;</span>cclass<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getSerialVersionUID</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AStringBuffer+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">StringBuffer</span></a> sb = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AStringBuffer+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">StringBuffer</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; sb.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span>cclass.<span style="color: #006600;">getName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; sb.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">":<span style="color: #000099; font-weight: bold;">\t</span>"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; sb.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"static final long serialVersionUID = "</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; sb.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span>uid<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; sb.<span style="color: #006600;">append</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"L"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3ASystem+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">System</span></a>.<span style="color: #006600;">out</span>.<span style="color: #006600;">println</span><span style="color: #66cc66;">&#40;</span>sb.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2009/02/11/getting-the-serialversionuid-programmatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reverse an Array in Place</title>
		<link>http://www.nathanblomquist.net/blog/2007/10/15/reverse-an-array-in-place/</link>
		<comments>http://www.nathanblomquist.net/blog/2007/10/15/reverse-an-array-in-place/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 03:02:59 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2007/10/15/reverse-an-array-in-place/</guid>
		<description><![CDATA[I was just looking through some code.  I noticed that an array needed to be reversed and that the original order was never needed again.  This was a perfect time to reverse the array in place.  This was Java so I looked in the Arrays class.  But alas there wasn't a [...]]]></description>
			<content:encoded><![CDATA[<p>I was just looking through some code.  I noticed that an array needed to be reversed and that the original order was never needed again.  This was a perfect time to reverse the array in place.  This was Java so I looked in the <a href="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html">Arrays</a> class.  But alas there wasn't a reverse for primitive arrays!  Java <a href="http://java.sun.com/javase/6/docs/api/java/util/Collections.html#reverse(java.util.List)">Lists get a reverse method</a> in the <a href="http://java.sun.com/javase/6/docs/api/java/util/Collections.html">Collections</a> class.  But primitive arrays get no such love.</p>
<p>Also, I thought of using the <a href="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html#asList(T...)">asList</a> method from <a href="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html">Arrays</a>, but that just seems like a ton of overhead.</p>
<p>So instead I wrote a quick little method for ints and any other primitive type.</p>
<p>Here is the int example:</p>
<div class="igBar"><span id="ljava-10"><a href="#" onclick="javascript:showPlainTxt('java-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-10">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">static</span> <span style="color: #993333;">void</span> reverseInPlace<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> iar<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #993333;">int</span> length = iar.<span style="color: #006600;">length</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #993333;">int</span> halfLength = length / <span style="color: #cc66cc;color:#800000;">2</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #993333;">int</span> lengthMinus1 = length - <span style="color: #cc66cc;color:#800000;">1</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> i = <span style="color: #cc66cc;color:#800000;">0</span>; i &lt;halfLength; ++i<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #993333;">int</span> index2 = lengthMinus1 - i;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//swap</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #993333;">int</span> tmp = iar<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; iar<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = iar<span style="color: #66cc66;">&#91;</span>index2<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; iar<span style="color: #66cc66;">&#91;</span>index2<span style="color: #66cc66;">&#93;</span> = tmp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Basically, this method just swaps the items from the front to back until reaching the middle of the array.  If the loop continued on, it would just switch everything back and the original order would be preserved!</p>
<p>The other implementations for the rest of the primitive types can be found <a href="http://nathanblomquist.net/websvn/filedetails.php?repname=NDB+Repo&#038;path=%2Ftrunk%2FNBUtil%2Fsrc%2Fnb%2Futil%2FArrayUtils.java">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2007/10/15/reverse-an-array-in-place/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yet Another Reason to Love Process Explorer — Part 2</title>
		<link>http://www.nathanblomquist.net/blog/2007/10/12/yet-another-reason-to-love-process-explorer-%e2%80%94-part-2/</link>
		<comments>http://www.nathanblomquist.net/blog/2007/10/12/yet-another-reason-to-love-process-explorer-%e2%80%94-part-2/#comments</comments>
		<pubDate>Fri, 12 Oct 2007 20:27:46 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
				<category><![CDATA[Process Explorer]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2007/10/12/yet-another-reason-to-love-process-explorer-%e2%80%94-part-2/</guid>
		<description><![CDATA[This is a bit different from my last post about Process Explorer.  Process Explorer is so powerful that I accidentally killed a different process than I wanted. This wasn't through some fancy schmancy search with regular expressions and kill accident.  I just highlighted a process and clicked the .
I then proceeded to click [...]]]></description>
			<content:encoded><![CDATA[<p>This is a bit different from my last post about Process Explorer.  Process Explorer is so powerful that I accidentally killed a different process than I wanted. This wasn't through some fancy schmancy search with regular expressions and kill accident.  I just highlighted a process and clicked the <img src='http://www.nathanblomquist.net/blog/wp-content/uploads/2007/10/pe_red_x.PNG' alt='Process Explorer Red X' alt="Process Explorer Red X" />.</p>
<p>I then proceeded to click 'Yes' on the simple dialog: <img src='http://www.nathanblomquist.net/blog/wp-content/uploads/2007/10/pe_are_you_sure_want_to_kill_xxxx.PNG' alt='pe_are_you_sure_want_to_kill_xxxx.PNG' />.</p>
<p>Notice the blackened out word at the end of the Dialog's text?  Well that is essentially what my brain did when I read that dialog.</p>
<p>So, long story short I killed the wrong process.  Nothing seemed to break for a few hours.  Then when I went to debug a couple of things, I wasn't able to connect to a service that was supposed to be running.  I restarted somethings on my end, then remembered, "Oh yeah, I killed a random process earlier."  I restarted the killed service and lo and behold everything started working again.</p>
<p><strong>Lesson learned here kids:</strong> <em>Don't kill random processes and then wonder why stuff breaks!</em></p>
<p><a href="http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/ProcessExplorer.mspx">Process Explorer</a> is part of the <a href="http://www.microsoft.com/technet/sysinternals/default.mspx">Microsoft Sysinternals</a> set of utilities.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2007/10/12/yet-another-reason-to-love-process-explorer-%e2%80%94-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>onbeforeunload IE7 Woes!</title>
		<link>http://www.nathanblomquist.net/blog/2007/10/12/onbeforeunload-ie7-woes/</link>
		<comments>http://www.nathanblomquist.net/blog/2007/10/12/onbeforeunload-ie7-woes/#comments</comments>
		<pubDate>Fri, 12 Oct 2007 19:40:39 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2007/10/12/onbeforeunload-ie7-woes/</guid>
		<description><![CDATA[Was just having a problem getting the IE7 onbeforeunload event to be canceled.  Found this blog about it:  OnBeforeUnload, IE7, Assigning event handlers to null and the problems that arise.
Pretty simple, just wrap the return with a boolean:
PLAIN TEXT
JAVASCRIPT:




var goodExit = false;


window.onbeforeunload = confirmExit;


function confirmExit&#40;&#41;


&#123;


&#160; // normally this if-check wouldn't be here,


&#160; // [...]]]></description>
			<content:encoded><![CDATA[<p>Was just having a problem getting the IE7 onbeforeunload event to be canceled.  Found this blog about it:  <a href="http://bustedmug.blogspot.com/2007/01/onbeforeunload-ie7-assigning-event.html">OnBeforeUnload, IE7, Assigning event handlers to null and the problems that arise</a>.</p>
<p>Pretty simple, just wrap the return with a boolean:</p>
<div class="igBar"><span id="ljavascript-12"><a href="#" onclick="javascript:showPlainTxt('javascript-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-12">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> goodExit = <span style="color: #003366; font-weight: bold;">false</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">window.<span style="color: #006600;">onbeforeunload</span> = confirmExit;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> confirmExit<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// normally this if-check wouldn't be here,</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// cause the event handler was nulled elsewhere.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// But IE7 doesn't respect the null, and</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// wants the handler to not return anything</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// (not even null).</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>!goodExit<span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">"Leaving this page will cause all unplaced orders to be discarded."</span>+</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #3366CC;">"&nbsp; Are you sure you want to leave the page?"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// notice no return statement here!</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/script&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; . . . . . </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;input type=<span style="color: #3366CC;">"image"</span> src=<span style="color: #3366CC;">"&lt;%=AppService.BASEDIR%&gt;/images/lgrequest.gif"</span> onclick=<span style="color: #3366CC;">"javascript: goodExit = true; window.onbeforeunload = null; document.forms[0].submit();"</span> /&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This example was stolen from Brandon Himes and his blog, <a href="http://bustedmug.blogspot.com/">The Busted Mug</a>.  Thank you Brandon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2007/10/12/onbeforeunload-ie7-woes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
