<?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>Adams Bros Blog</title>
	<atom:link href="http://blog.adamsbros.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adamsbros.org</link>
	<description></description>
	<lastBuildDate>Tue, 13 Mar 2012 22:58:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Age of Empires Cannot Detect CD</title>
		<link>http://blog.adamsbros.org/2012/03/13/age-of-empires-cannot-detect-cd/</link>
		<comments>http://blog.adamsbros.org/2012/03/13/age-of-empires-cannot-detect-cd/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 22:58:03 +0000</pubDate>
		<dc:creator>Trenton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.adamsbros.org/?p=439</guid>
		<description><![CDATA[I have the collectors edition, which includes AOE 1/2 and the expansions.  I was having troubles with this game, as it kept asking for the CD, when the DVD was in the drive.  This was because I applied a patch downloaded off the original site, thinking I needed to make sure it was up to [...]]]></description>
			<content:encoded><![CDATA[<p>I have the collectors edition, which includes AOE 1/2 and the expansions.  I was having troubles with this game, as it kept asking for the CD, when the DVD was in the drive.  This was because I applied a patch downloaded off the original site, thinking I needed to make sure it was up to date.  Well, as the story goes, the readme.txt on the DVD tells you NOT to do that, and that all the latest patches are already applied, and the ones on the website are not compatible with the DVD version.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adamsbros.org/2012/03/13/age-of-empires-cannot-detect-cd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade Android SQLite Database</title>
		<link>http://blog.adamsbros.org/2012/02/28/upgrade-android-sqlite-database/</link>
		<comments>http://blog.adamsbros.org/2012/02/28/upgrade-android-sqlite-database/#comments</comments>
		<pubDate>Tue, 28 Feb 2012 20:37:33 +0000</pubDate>
		<dc:creator>Trenton</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.adamsbros.org/?p=431</guid>
		<description><![CDATA[After fiddling with a few different styles of coding a database upgrade implementation for Android, I've settled on a fairly simple method.  Basically, I take the old version, and increment a counter until I get to the current version.  Through each iteration, I use switch on the value of the upgradeTo variable, and upgrade each [...]]]></description>
			<content:encoded><![CDATA[<p>After fiddling with a few different styles of coding a database upgrade implementation for Android, I've settled on a fairly simple method.  Basically, I take the old version, and increment a counter until I get to the current version.  Through each iteration, I use <strong>switch</strong> on the value of the upgradeTo variable, and upgrade each cycle.  If things get too complex for your application, you can always create individual upgrade methods, for each version.</p>
<p>Of course this method will only work if your database version is incremented by one each time you change the database.  And, this really should be the way you version it anyhow.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> onUpgrade<span style="color: #009900;">&#40;</span>
        <span style="color: #000000; font-weight: bold;">final</span> SQLiteDatabase db, <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> oldVersion,
        <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> newVersion<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #000066; font-weight: bold;">int</span> upgradeTo <span style="color: #339933;">=</span> oldVersion <span style="color: #339933;">+</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span>upgradeTo <span style="color: #339933;">&lt;=</span> newVersion<span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">switch</span> <span style="color: #009900;">&#40;</span>upgradeTo<span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">:</span>
                    db.<span style="color: #006633;">execSQL</span><span style="color: #009900;">&#40;</span>SQLiteSet.<span style="color: #006633;">V5_ADD_LAST_CARD</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    db.<span style="color: #006633;">execSQL</span><span style="color: #009900;">&#40;</span>SQLiteCard.<span style="color: #006633;">V5_ADD_FAILED</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">6</span><span style="color: #339933;">:</span>
                    db.<span style="color: #006633;">execSQL</span><span style="color: #009900;">&#40;</span>SQLiteSet.<span style="color: #006633;">V6_ADD_IMPORT_TYPE</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">7</span><span style="color: #339933;">:</span>
                    db.<span style="color: #006633;">execSQL</span><span style="color: #009900;">&#40;</span>SQLiteSet.<span style="color: #006633;">V7_ADD_SHORT_FNAME</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            upgradeTo<span style="color: #339933;">++;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.adamsbros.org/2012/02/28/upgrade-android-sqlite-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>perltwit just release</title>
		<link>http://blog.adamsbros.org/2012/02/13/perltwit-just-release/</link>
		<comments>http://blog.adamsbros.org/2012/02/13/perltwit-just-release/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 05:23:54 +0000</pubDate>
		<dc:creator>Trenton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://blog.adamsbros.org/?p=428</guid>
		<description><![CDATA[Perl Twit is a Linux/Unix command line utility for sending twitter messages.
I've been using this for probably well over a year now, and just never managed to release it.  Today I decided to push it up to github.com, and let the world have at her.
https://github.com/TrentonAdams/perltwit
]]></description>
			<content:encoded><![CDATA[<p>Perl Twit is a Linux/Unix command line utility for sending twitter messages.</p>
<p>I've been using this for probably well over a year now, and just never managed to release it.  Today I decided to push it up to github.com, and let the world have at her.</p>
<p><a href="https://github.com/TrentonAdams/perltwit">https://github.com/TrentonAdams/perltwit</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adamsbros.org/2012/02/13/perltwit-just-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send Email in your Android Application</title>
		<link>http://blog.adamsbros.org/2011/12/31/send-email-in-your-android-application/</link>
		<comments>http://blog.adamsbros.org/2011/12/31/send-email-in-your-android-application/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 21:48:59 +0000</pubDate>
		<dc:creator>Trenton</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.adamsbros.org/?p=416</guid>
		<description><![CDATA[I've seen a lot of examples of how to send email from an android application.  All of them result in applications coming up in a chooser list that are not appropriate for sending email.  In this post, I'll described the various solutions I found, and the solution that brings up only email clients.

If you want [...]]]></description>
			<content:encoded><![CDATA[<p>I've seen a lot of examples of how to send email from an android application.  All of them result in applications coming up in a chooser list that are not appropriate for sending email.  In this post, I'll described the various solutions I found, and the solution that brings up only email clients.<br />
<span id="more-416"></span></p>
<p>If you want to skip the junk, and go straight to the solution, go to the last two code snippets at the end.</p>
<p>One variation, from stack overflow, goes something like this.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">Intent intent <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #009900;">&#40;</span>Intent.<span style="color: #006633;">ACTION_SEND</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
intent.<span style="color: #006633;">setType</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;text/plain&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
intent.<span style="color: #006633;">putExtra</span><span style="color: #009900;">&#40;</span>Intent.<span style="color: #006633;">EXTRA_EMAIL</span>  , <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;recipient@example.com&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
intent.<span style="color: #006633;">putExtra</span><span style="color: #009900;">&#40;</span>Intent.<span style="color: #006633;">EXTRA_SUBJECT</span>, <span style="color: #0000ff;">&quot;subject of email&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
intent.<span style="color: #006633;">putExtra</span><span style="color: #009900;">&#40;</span>Intent.<span style="color: #006633;">EXTRA_TEXT</span>   , <span style="color: #0000ff;">&quot;body of email&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
startActivity<span style="color: #009900;">&#40;</span>Intent.<span style="color: #006633;">createChooser</span><span style="color: #009900;">&#40;</span>intent, <span style="color: #0000ff;">&quot;Send mail...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The reason this doesn't work properly, is because it brings up pretty much any app that can handle <strong>text/plain</strong> content. To expect a user to send an email with bluetooth, or wifi, or evernote, is simply not appropriate.  So, if your intention is to have them send an actual email, as opposed to sharing content in some other way, then this won't work for you.</p>
<p>Another variation from stack overflow, is to replace the mime-type of <strong>text/plain</strong> with <strong>message/rfc822</strong>.  This results in a list of applications that can handle "email message" content.  As a result, if you have ever-note installed, it comes up in the list as well.  It will happily store your complete RFC822 email message for you.  However, this is a hack, and is totally not appropriate.  That mime type implies that you have already constructed a complete and valid RFC822 email message, including headers and what not.</p>
<p>Finally, I was able to find an example on the IT Wizard website, that shows the almost proper way of doing this, using the <strong>mailto</strong> URI handling.  Theoretically, only valid email applications will ever come up in this list.  It goes like this...</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">Intent intent <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #009900;">&#40;</span>Intent.<span style="color: #006633;">ACTION_SENDTO</span>, Uri.<span style="color: #006633;">parse</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mailto:someone@example.com&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
intent.<span style="color: #006633;">putExtra</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;subject&quot;</span>, <span style="color: #0000ff;">&quot;my subject&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
intent.<span style="color: #006633;">putExtra</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;body&quot;</span>, <span style="color: #0000ff;">&quot;my message&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
startActivity<span style="color: #009900;">&#40;</span>intent<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Unfortunately, that only works with gmail on my phone.  So, I revised it to include everything inside the mailto url.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">Intent intent <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Intent<span style="color: #009900;">&#40;</span>Intent.<span style="color: #006633;">ACTION_SENDTO</span>, Uri.<span style="color: #006633;">parse</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;mailto:someone@example.com?subject=&quot;</span> <span style="color: #339933;">+</span>
    Uri.<span style="color: #006633;">encode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;my subject&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span>  <span style="color: #0000ff;">&quot;&amp;body=&quot;</span> <span style="color: #339933;">+</span>
    Uri.<span style="color: #006633;">encode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;My big long body with spaces, new lines, and all sorts of invalid URI characters&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
startActivity<span style="color: #009900;">&#40;</span>intent<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now the only activities that come up are email apps. <img src='http://blog.adamsbros.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />   Now, if you want the complete list of email applications to always come up for the user, whether they've chosen a "default" email app or not, then you need to start the activity like this...</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">startActivity<span style="color: #009900;">&#40;</span>Intent.<span style="color: #006633;">createChooser</span><span style="color: #009900;">&#40;</span>intent, <span style="color: #0000ff;">&quot;your chooser title&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I do not know how to attach files to an email, using this method; in fact I do not think it is possible, seeing the <strong>mailto:</strong> URL scheme is pretty limited.  So, unfortunately, if you want to attach files, you're going to have to use one of the other methods, with the <strong>EXTRA_STREAM</strong> option to <strong>putExtra()</strong> and file URI pointing to a file on your android device.  As a result, you'll just have to live with some non-email related applications coming up.</p>
<p>If someone has a way of making sure ONLY email apps come up, using the other methods, I'd sure like to hear about it.  Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adamsbros.org/2011/12/31/send-email-in-your-android-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conversion to Dalvik format failed with error</title>
		<link>http://blog.adamsbros.org/2011/11/07/conversion-to-dalvik-format-failed-with-error/</link>
		<comments>http://blog.adamsbros.org/2011/11/07/conversion-to-dalvik-format-failed-with-error/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 05:28:58 +0000</pubDate>
		<dc:creator>Trenton</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.adamsbros.org/?p=411</guid>
		<description><![CDATA[I went looking, and looking, and looking, for a solution to this problem.  None of them seemed to fit the bill.  I tried...

updating proguard
not using libraries I shouldn't be
re-importing the project
removing duplicate android jars
removing all android jars
a host of other "suggestions" from Eclipse Android users


Not one of the ones I found worked.  I [...]]]></description>
			<content:encoded><![CDATA[<p>I went looking, and looking, and looking, for a solution to this problem.  None of them seemed to fit the bill.  I tried...</p>
<ol>
<li>updating proguard</li>
<li>not using libraries I shouldn't be</li>
<li>re-importing the project</li>
<li>removing duplicate android jars</li>
<li>removing all android jars</li>
<li>a host of other "suggestions" from Eclipse Android users</li>
</ol>
<p><span id="more-411"></span></p>
<p>Not one of the ones I found worked.  I suddenly right clicked the project, and happened to see a menu called "<strong>Android Tools</strong>".  I wasn't thinking it would do anything for my predicament, but was curious what was under it.  I then saw, and clicked, the item called "<strong>Fix Project Properties</strong>", and voilà, the error disappeared.</p>
<p>Go figure, an Eclipse option to fix a problem that Eclipse caused.  KEWL!</p>
<p>Hope this helps someone through their pain.</p>
<p>IntelliJ folks, <strong>PLEASE</strong> add GUI support for android, so that I can ditch this piece of junk Java IDE called Eclipse.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adamsbros.org/2011/11/07/conversion-to-dalvik-format-failed-with-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse Android Hello World Tutorial Video – Part 3</title>
		<link>http://blog.adamsbros.org/2011/07/22/eclipse-android-hello-world-tutorial-video-%e2%80%93-part-3/</link>
		<comments>http://blog.adamsbros.org/2011/07/22/eclipse-android-hello-world-tutorial-video-%e2%80%93-part-3/#comments</comments>
		<pubDate>Sat, 23 Jul 2011 03:01:11 +0000</pubDate>
		<dc:creator>Trenton</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.adamsbros.org/?p=394</guid>
		<description><![CDATA[In third part of the android hello world video, we explain the different components of the application, and why things are done in a certain way.  This video is a bit raw.  However, rather than editing the videos, I'm going to try and improve my presentation skills as I go.
Before we get started, the code [...]]]></description>
			<content:encoded><![CDATA[<p>In third part of the android hello world video, we explain the different components of the application, and why things are done in a certain way.  This video is a bit raw.  However, rather than editing the videos, I'm going to try and improve my presentation skills as I go.</p>
<p><span id="more-394"></span>Before we get started, the code for part 3 is located on <a href="https://github.com/TrentonAdams/HelloAndroid">github</a> under the tag "<a href="https://github.com/TrentonAdams/HelloAndroid/tree/part3">part3</a>".  You should be able to switch to that tag and download a tar.gz of the code.   Or you can simply clone it as follows.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">git clone git:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>TrentonAdams<span style="color: #000000; font-weight: bold;">/</span>HelloAndroid.git HelloAndroid
<span style="color: #7a0874; font-weight: bold;">cd</span> HelloAndroid
git checkout part3</pre></div></div>

<p>In this video, we will</p>
<ol>
<li>explain the various sections of code</li>
<li>explain the semantics of the android <strong>R</strong> class for referencing resources</li>
<li>explain the use of localized resource files</li>
</ol>
<p>We have one new screenshot from this video in the series.  It is the French version of the application.</p>
<p><a href="http://blog.adamsbros.org/wp-content/uploads/2011/07/bonjourandroid-dialogue.png"></a><a href="http://blog.adamsbros.org/wp-content/uploads/2011/07/bonjourandroid-dialogue.png"><img class="alignnone size-medium wp-image-397" title="Bonjour Android Dialogue" src="http://blog.adamsbros.org/wp-content/uploads/2011/07/bonjourandroid-dialogue-180x300.png" alt="" width="180" height="300" /></a></p>
<p>If this video fails to play, please check back later, it may still be processing.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/Vfx-wo5XKdk" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/Vfx-wo5XKdk"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adamsbros.org/2011/07/22/eclipse-android-hello-world-tutorial-video-%e2%80%93-part-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu Sluggish or Slow</title>
		<link>http://blog.adamsbros.org/2011/07/21/ubuntu-sluggish-or-slow/</link>
		<comments>http://blog.adamsbros.org/2011/07/21/ubuntu-sluggish-or-slow/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 00:44:46 +0000</pubDate>
		<dc:creator>Trenton</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.adamsbros.org/?p=400</guid>
		<description><![CDATA[I was recently having a problem where my new computer was becoming extremely sluggish while running Ubuntu Linux 11.04.  The keyboard input was very delayed and slow.  The graphics were terribly slow.  Just about everything in the system became very slow.  I've heard reports from similar problems, of complete lockups.  It seemed to be linked [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently having a problem where my new computer was becoming extremely sluggish while running Ubuntu Linux 11.04.  The keyboard input was very delayed and slow.  The graphics were terribly slow.  Just about everything in the system became very slow.  I've heard reports from similar problems, of complete lockups.  It seemed to be linked to when the screensaver was activated, or power management was activated.  But, after having disabled both, and continuing to have problems, I realized that wasn't it.  Keep reading for the solution to my problem; I hope it helps you too.</p>
<p><span id="more-400"></span></p>
<p>I searched Google to no avail.  I was completely unable to use the correct search terms to find anything relevant, except to find that others were having the same problems.  But, I found no solutions in any of the posts I found, or even hints of how to diagnose such a thing.  So, I finally decided that I should be a programmer instead of a user.  After all, I moved to Ubuntu so that I could be a user; I don't really have the time to be tinkering with my system these days.</p>
<p>My new system is made up of the following core components</p>
<ul>
<li>ASUS P8P67 EVO motherboard</li>
<li>I7 2600k</li>
<li>eVGA GeForce GTX 460 video card</li>
</ul>
<p>So, after having put on my programmers cap, I decided to go fishing.  Obviously the first place I looked was /var/log/syslog.  In there, I found the following...</p>

<div class="wp_syntax"><div class="code"><pre class="txt" style="font-family:monospace;">Jul 20 21:56:39 tda-desktop kernel: [ 9607.079961] eth0: no IPv6 routers present
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800384] irq 16: nobody cared (try booting with the &quot;irqpoll&quot; option)
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800386] Pid: 0, comm: swapper Tainted: P            2.6.38-10-generic #46-Ubuntu
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800387] Call Trace:
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800389]  &lt;IRQ&gt;  [&lt;ffffffff810d51ab&gt;] ? __report_bad_irq.clone.2+0x2b/0xa0
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800395]  [&lt;ffffffff810d55aa&gt;] ? note_interrupt+0x19a/0x1e0
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800396]  [&lt;ffffffff810d649d&gt;] ? handle_fasteoi_irq+0xdd/0x110
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800399]  [&lt;ffffffff8100e9c2&gt;] ? handle_irq+0x22/0x40
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800402]  [&lt;ffffffff815cb33d&gt;] ? do_IRQ+0x5d/0xe0
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800404]  [&lt;ffffffff815c3693&gt;] ? ret_from_intr+0x0/0x15
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800405]  &lt;EOI&gt;  [&lt;ffffffff81336c8a&gt;] ? intel_idle+0xca/0x120
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800409]  [&lt;ffffffff81336c69&gt;] ? intel_idle+0xa9/0x120
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800411]  [&lt;ffffffff814a3e5a&gt;] ? cpuidle_idle_call+0xaa/0x1b0
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800414]  [&lt;ffffffff8100a266&gt;] ? cpu_idle+0xa6/0xf0
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800416]  [&lt;ffffffff815a94d5&gt;] ? rest_init+0x75/0x80
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800418]  [&lt;ffffffff81acac90&gt;] ? start_kernel+0x3f5/0x400
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800421]  [&lt;ffffffff81aca388&gt;] ? x86_64_start_reservations+0x132/0x136
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800423]  [&lt;ffffffff81aca45d&gt;] ? x86_64_start_kernel+0xd1/0xe0
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800424] handlers:
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800425] [&lt;ffffffffa0698e90&gt;] (nv_kern_isr+0x0/0x80 [nvidia])
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800526] [&lt;ffffffffa0c66020&gt;] (rtl8169_interrupt+0x0/0x250 [r8169])
Jul 20 21:57:06 tda-desktop kernel: [ 9633.800529] Disabling IRQ #16</pre></div></div>

<p>As you can see, two drivers are in use on IRQ 16; the nvidia and rtl8169 drivers.  I ended up doing some more analysis by running lspci -v, which resulted in finding that my USB 3.0 devices, my rtl8169 ethernet chip, and my nVidia GTX 460 were all using the same interrupt (IRQ 16).  Normally sharing IRQs isn't so bad, so I'm thinking one or more of the drivers has a bug that occurs during idle times.</p>
<p>So, the thought came to me to restart my ethernet interface.  After doing that, my system was back to normal until the next time it happened.  Seeing that my motherboard has two ethernet interfaces, I plan on disabling the RealTek one, and activating the intel one, and see if that resolves it permanently.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adamsbros.org/2011/07/21/ubuntu-sluggish-or-slow/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Eclipse Android Hello World Tutorial Video – Part 2</title>
		<link>http://blog.adamsbros.org/2011/07/16/eclipse-android-hello-world-tutorial-video-%e2%80%93-part-2/</link>
		<comments>http://blog.adamsbros.org/2011/07/16/eclipse-android-hello-world-tutorial-video-%e2%80%93-part-2/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 01:05:37 +0000</pubDate>
		<dc:creator>Trenton</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.adamsbros.org/?p=368</guid>
		<description><![CDATA[Part 3 - Code Explained
Okay, I've finished another android development demo video.  Sorry it took so long, I got really busy with a new computer and what not, and life in general.  In the next video in this series, I will explain the details of the hello android application.  So, if you do not understand [...]]]></description>
			<content:encoded><![CDATA[<p><a style="float: right;" href="http://blog.adamsbros.org/2011/07/22/eclipse-android-hello-world-tutorial-video-%e2%80%93-part-3/">Part 3 - Code Explained</a></p>
<p>Okay, I've finished another android development demo video.  Sorry it took so long, I got really busy with a new computer and what not, and life in general.  In the next video in this series, I will explain the details of the hello android application.  So, if you do not understand some of what is happening, stay tuned for the next video in the series.</p>
<p><span id="more-368"></span></p>
<p>Before we get started, the code for part 2 is located on <a href="https://github.com/TrentonAdams/HelloAndroid">github</a> under the tag "<a href="https://github.com/TrentonAdams/HelloAndroid/tree/part2">part2</a>".  You should be able to switch to that tag and download a tar.gz of the code.   Or you can simply clone it as follows.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">git clone git:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>TrentonAdams<span style="color: #000000; font-weight: bold;">/</span>HelloAndroid.git HelloAndroid
<span style="color: #7a0874; font-weight: bold;">cd</span> HelloAndroid
git checkout part2</pre></div></div>

<p>In this video, we do the following...</p>
<ol>
<li> an actual android application with a button that opens a dialog box. The dialog box has a Okay/Cancel button.</li>
<li>Handling and implementing events
<ol>
<li>onCreateDialog(int) - when a dialog is requested to be created in this activity, this method is called</li>
<li>onClick(View arg0) - we tied the click event from the button to our activity rather than making a custom class for it</li>
</ol>
</li>
<li>log debug information to the android log</li>
<li>use logcat to see the debug information</li>
</ol>
<p>Below are the two screens that you will see in this application.</p>
<div id="attachment_370" class="wp-caption alignnone" style="width: 190px"><a href="http://blog.adamsbros.org/wp-content/uploads/2011/07/helloandroid.png"><img class="size-medium wp-image-370" title="Hello Android Screenshot" src="http://blog.adamsbros.org/wp-content/uploads/2011/07/helloandroid-180x300.png" alt="" width="180" height="300" /></a><p class="wp-caption-text">Hello Android Screenshot</p></div>
<div id="attachment_371" class="wp-caption alignnone" style="width: 190px"><a href="http://blog.adamsbros.org/wp-content/uploads/2011/07/helloandroid-dialog.png"><img class="size-medium wp-image-371" title="Hello Android Okay/Cancel Dialog" src="http://blog.adamsbros.org/wp-content/uploads/2011/07/helloandroid-dialog-180x300.png" alt="" width="180" height="300" /></a><p class="wp-caption-text">Hello Android Okay/Cancel Dialog</p></div>
<p><strong><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/-9TRZMQm8-8" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/-9TRZMQm8-8"></embed></object><br />
</strong></p>
<p>This android demo was created using a software package under Linux   called "recordMyDesktop".  It's terribly slow for encoding the video, which it does after the video has been recorded.  I think it's recording my whole screen as a series of screenshots, which is probably what takes it so long.  I used it from the command line, as I have   not yet attempted to use a GUI tool with it.  I found that I  basically  required 240 fps, because it did not capture all of my  selections if I  did not use a high frame rate.  This time I decreased the quality and the bitrate, as it did not seem to make a huge impact on quality.</p>
<p>recordmydesktop --pause-shortcut Control+Shift+P --fps 240 --v_quality 30 --v_bitrate 400 -o ~/Videos/newvideo</p>
<p>This is based in part on the Android Hello World documentation at   http://developer.android.com/resources/tutorials/hello-world.html</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adamsbros.org/2011/07/16/eclipse-android-hello-world-tutorial-video-%e2%80%93-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Slow SSH Login</title>
		<link>http://blog.adamsbros.org/2011/07/16/slow-ssh-login/</link>
		<comments>http://blog.adamsbros.org/2011/07/16/slow-ssh-login/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 17:56:51 +0000</pubDate>
		<dc:creator>Trenton</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.adamsbros.org/?p=364</guid>
		<description><![CDATA[I had slow login problems with my SSH server for many months, and never bothered to try and fix it.  Finally I got sick of it, and enabled verbose mode.  I noticed it was doing public key authentication, GSSAPI authentication, and then password.  The authentication would fail on public key, then the [...]]]></description>
			<content:encoded><![CDATA[<p>I had slow login problems with my SSH server for many months, and never bothered to try and fix it.  Finally I got sick of it, and enabled verbose mode.  I noticed it was doing public key authentication, GSSAPI authentication, and then password.  The authentication would fail on public key, then the GSSAPI authentication would sit there for a long time, before moving on to password authentication.</p>
<p>Add the following to your /etc/ssh/sshd_config</p>
<pre>GSSAPIAuthentication no
GSSAPICleanupCredentials no</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.adamsbros.org/2011/07/16/slow-ssh-login/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maven Test Debug Mode Profile</title>
		<link>http://blog.adamsbros.org/2011/07/09/maven-test-debug-mode/</link>
		<comments>http://blog.adamsbros.org/2011/07/09/maven-test-debug-mode/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 05:14:49 +0000</pubDate>
		<dc:creator>Trenton</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.adamsbros.org/?p=352</guid>
		<description><![CDATA[I should have blogged about this long ago, as I feel that this is a very useful way of debugging unit tests with maven.  This is especially so if you're primarily a command line sort of guy like myself.
All that is required to be able to debug a unit test is

configure the maven surefire plugin [...]]]></description>
			<content:encoded><![CDATA[<p>I should have blogged about this long ago, as I feel that this is a very useful way of debugging unit tests with maven.  This is especially so if you're primarily a command line sort of guy like myself.</p>
<p>All that is required to be able to debug a unit test is</p>
<ol>
<li>configure the maven surefire plugin from within a profile</li>
<li>activate the maven profile from the command line</li>
</ol>
<p>The following XML <strong>profiles</strong> section will work just peachy for you.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>dtest<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/id<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;maven.test.skip<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>false<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/maven.test.skip<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/properties<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.apache.maven.plugins<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>maven-surefire-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>2.5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;forkMode<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>once<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/forkMode<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
              <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;debugForkedProcess<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>true<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/debugForkedProcess<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/configuration<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
          <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugin<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/plugins<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/build<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profile<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/profiles<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Now just run this.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">  mvn <span style="color: #660033;">-Pdtest</span> package</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.adamsbros.org/2011/07/09/maven-test-debug-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

