<?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"
	>

<channel>
	<title>Jeffrey Sharkey</title>
	<atom:link href="http://www.jsharkey.org/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jsharkey.org/blog</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Fri, 20 Jun 2008 05:29:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>News coverage of Android Scan</title>
		<link>http://www.jsharkey.org/blog/2008/06/19/news-coverage-of-android-scan/</link>
		<comments>http://www.jsharkey.org/blog/2008/06/19/news-coverage-of-android-scan/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 05:29:17 +0000</pubDate>
		<dc:creator>jsharkey</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jsharkey.org/blog/?p=25</guid>
		<description><![CDATA[Over the past few weeks Scan has been showing up in various news articles all over the web, and earlier today my local newspaper and news station covered it.  Google has kept all of us busy with new internal SDK releases, and I haven&#8217;t had much time to keep up with my E-mail lately. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="float" src="http://www.jsharkey.org/blog/android-univ.jpg" alt="" />Over the past few weeks Scan has been showing up in various news articles all over the web, and earlier today my local newspaper and news station covered it.  Google has kept all of us busy with new internal SDK releases, and I haven&#8217;t had much time to keep up with my E-mail lately. Below are some of the news highlights I&#8217;ve pulled out.  Oh yeah, and I made the <a href="http://digg.com/">Digg</a> front-page, so that&#8217;s one lifelong goal to check off my list. <img src='http://www.jsharkey.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<ul>
<li><a href="http://www.forbes.com/2008/05/12/google-android-apple-tech-cx_ew_0512android.html">Forbes &#8212; Top 50 Androids</a></li>
<li><a href="http://digg.com/gadgets/How_Android_Will_Change_Your_Shopping_Experience_Forever">Digg.com &#8212; How Android Will Change Your Shopping Experience Forever</a></li>
<li><a href="http://gizmodo.com/390045/the-top-5-android-developer-challenge-round-1-winners">Gizmodo &#8212; The Top 5 Android Developer Challenge Round 1 Winners</a></li>
<li><a href="http://www.techcrunch.com/2008/05/13/fifty-android-developers-get-25000-each-the-list/">TechCrunch &#8212; Fifty Android Developers Get $25,000 Each: The List</a></li>
<li><a href="http://news.cnet.com/8301-13579_3-9942958-37.html">CNET &#8212; Google chooses 50 finalists in Android Developer Challenge</a></li>
</ul>
<p>About a week ago Michael Becker from Montana State University interviewed me.  I ended up with an article on the <a href="http://montana.edu/">montana.edu</a> front page, and then today in our <a href="http://bozemandailychronicle.com/">local newspaper</a>:</p>
<p style="text-align: center"><a href="http://www.jsharkey.org/blog/android-paper-hi.jpg" target="_new"><img src="http://www.jsharkey.org/blog/android-paper.jpg" alt="" /></a></p>
<p>And earlier today I also interviewed with our <a href="http://www.ktvm.com/">local NBC affiliate KTVM</a>.  Ripped it wonderfully using my <a href="http://www.silicondust.com/wiki/products/hdhomerun">HDHomeRun</a> and MythTV so you can watch it here:</p>
<p style="text-align: center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" 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/tCWdxfTdsaA&amp;hl=en" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/tCWdxfTdsaA&amp;hl=en"></embed></object></p>
<p>Cringe with me as they mispronounce my name several times and then get the contest details slightly wrong. Oh well.  <img src='http://www.jsharkey.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I&#8217;m not really one for media attention, but this is hopefully getting the word out about Scan and even Android in general.  I&#8217;ve got a few packed weeks in front of me, but I&#8217;m sure it will turn out great.  Sadly because of the NDA that Google made us sign for the SDK, I&#8217;m not sure when I&#8217;ll be able to post a new list of features.</p>
<p>(Photo above by Kelly Gorham.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jsharkey.org/blog/2008/06/19/news-coverage-of-android-scan/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using ddrescue with an entire disk</title>
		<link>http://www.jsharkey.org/blog/2008/06/07/using-ddrescue-with-an-entire-disk/</link>
		<comments>http://www.jsharkey.org/blog/2008/06/07/using-ddrescue-with-an-entire-disk/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 18:08:46 +0000</pubDate>
		<dc:creator>jsharkey</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jsharkey.org/blog/?p=24</guid>
		<description><![CDATA[Earlier this week we quickly ran ddrescue on a few 40GB disks, copying them to large .img files on another drive.  We accidentally saved the entire disk /dev/hda instead of the individual partitions, and of course mount isn&#8217;t smart enough to read the partition tables embedded in the .img files.
One solution would be to [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this week we quickly ran <kbd>ddrescue</kbd> on a few 40GB disks, copying them to large .img files on another drive.  We accidentally saved the entire disk /dev/hda instead of the individual partitions, and of course <kbd>mount</kbd> isn&#8217;t smart enough to read the partition tables embedded in the .img files.</p>
<p>One solution would be to dd the .img back to a physical disk and let the system read the partitions.  After some digging around, some friends stumbled on using <kbd>lomount</kbd> from the Xen tools package:</p>
<blockquote><p>losetup /dev/loop0 /path/to/backuphda.img<br />
lomount -diskimage /dev/loop0 -partition 3 /mnt/yayitworks/</p></blockquote>
<p>It would be nice if something like this was mentioned with the <kbd>ddrescue</kbd> documentation, because I&#8217;m sure plenty of people have run into this problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jsharkey.org/blog/2008/06/07/using-ddrescue-with-an-entire-disk/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Winner of Google Developer Challenge</title>
		<link>http://www.jsharkey.org/blog/2008/05/10/winner-of-google-developer-challenge/</link>
		<comments>http://www.jsharkey.org/blog/2008/05/10/winner-of-google-developer-challenge/#comments</comments>
		<pubDate>Sat, 10 May 2008 11:52:44 +0000</pubDate>
		<dc:creator>jsharkey</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jsharkey.org/blog/?p=23</guid>
		<description><![CDATA[ So earlier today I sat down at lunch with my Nokia N810 and connected to some nearby Wifi, only to find an E-mail congratulating me on being one of the 50 winners of the Google Android Developer Challenge.  Mine was only one of 1,700 total entries, so I&#8217;m pretty stoked.   
I [...]]]></description>
			<content:encoded><![CDATA[<p><img class="float" src="http://www.jsharkey.org/blog/scanpdf.png" alt="" width="240" /> So earlier today I sat down at lunch with my <a href="http://en.wikipedia.org/wiki/Nokia_N810">Nokia N810</a> and connected to some nearby Wifi, only to find an E-mail congratulating me on being one of the 50 winners of the <a href="http://code.google.com/android/adc.html">Google Android Developer Challenge</a>.  Mine was only one of 1,700 total entries, so I&#8217;m pretty stoked.  <img src='http://www.jsharkey.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I talked <a href="http://www.jsharkey.org/blog/2008/04/14/android-scan/">briefly on this blog</a> about my project back in April after I first submitted Scan.  If you haven&#8217;t seen Scan, there is a <a href="http://scan.jsharkey.org/">quick 3-minute video</a> showing it in action with real barcodes.</p>
<p>Because I&#8217;m geeky, I recorded the voicemail I received later in the day from Stephanie at Google:</p>
<p style="text-align:center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="20" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="transparent" /><param name="src" value="http://www.jsharkey.org/downloads/flvplayer2.swf?file=/downloads/andcall.mp3" /><embed type="application/x-shockwave-flash" width="480" height="20" src="http://www.jsharkey.org/downloads/flvplayer2.swf?file=/downloads/andcall.mp3" wmode="transparent"></embed></object></p>
<p>I already registered for <a href="http://code.google.com/events/io/">Google I/O</a> in about a month, but word is that the winners get free admission.  Not sure how that will work out since I already paid, but it&#8217;s all good.  <img src='http://www.jsharkey.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jsharkey.org/blog/2008/05/10/winner-of-google-developer-challenge/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Android Scan</title>
		<link>http://www.jsharkey.org/blog/2008/04/14/android-scan/</link>
		<comments>http://www.jsharkey.org/blog/2008/04/14/android-scan/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 17:28:35 +0000</pubDate>
		<dc:creator>jsharkey</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jsharkey.org/blog/2008/04/14/android-scan/</guid>
		<description><![CDATA[ So today is the deadline for the Android Developer Challenge, and I just finished up my submission.  It&#8217;s a sweet tool that can show you pricing and metadata for anything with a barcode.  Here&#8217;s a few of the features that make it stand out:

Automatic barcode recognition using phone camera
Shows CD, DVD, or [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/blog/scan.jpg" class="float" /> So today is the deadline for the <a href="http://code.google.com/android/adc.html">Android Developer Challenge</a>, and I just finished up my submission.  It&#8217;s a sweet tool that can show you pricing and metadata for anything with a barcode.  Here&#8217;s a few of the features that make it stand out:</p>
<ul>
<li><strong>Automatic barcode recognition</strong> using phone camera</li>
<li>Shows CD, DVD, or book cover along with <strong>detailed reviews</strong></li>
<li>Searches <strong>over a dozen stores</strong>, both online and brick+mortar</li>
<li>Tracklisting for CDs and play <strong>sample tracks right on phone</strong></li>
<li>For books, <strong>searches local libraries</strong> to see if they have a copy</li>
</ul>
<p>It&#8217;s called <a href="http://scan.jsharkey.org/">Android Scan</a> and I&#8217;ve put up some documentation and a quick <strong>video that shows it in action</strong> with an external camera and real-world barcodes.</p>
<ul>
<li><a href="http://scan.jsharkey.org/">Android Scan website with high-quality video</a></li>
<li><a href="http://www.youtube.com/watch?v=bwhdXJuiO48">Android Scan video on YouTube</a></li>
</ul>
<p style="text-align: center"><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/bwhdXJuiO48&#038;hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/bwhdXJuiO48&#038;hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
<p>Once the developer challenge is over in mid-May I&#8217;ll be releasing both the Android and Python server source code under a GPLv3 open-source license.  Send me an E-mail if you have any ideas or comments.  I&#8217;m pumped about getting an actual Android device later this year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jsharkey.org/blog/2008/04/14/android-scan/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Thesis in Six Weeks</title>
		<link>http://www.jsharkey.org/blog/2008/04/14/thesis-in-six-weeks/</link>
		<comments>http://www.jsharkey.org/blog/2008/04/14/thesis-in-six-weeks/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 09:06:18 +0000</pubDate>
		<dc:creator>jsharkey</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jsharkey.org/blog/2008/04/14/thesis-in-six-weeks/</guid>
		<description><![CDATA[ So the past 6 weeks of my life have been almost non-existent.  They give advice to new graduate students saying you should start writing your thesis early, usually about 6 months before you graduate.  Somehow I kept putting if off with excuses of &#8220;just one more test dataset&#8221; and &#8220;let&#8217;s make the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.jsharkey.org/blog/thesis.jpg" class="float" /> So the past 6 weeks of my life have been almost non-existent.  They give advice to new graduate students saying you should start writing your thesis early, usually about 6 months before you graduate.  Somehow I kept putting if off with excuses of &#8220;just one more test dataset&#8221; and &#8220;let&#8217;s make the code even faster.&#8221;  Because of these excuses, I ended up with was the most intense 6 weeks of my life to date.  When I wasn&#8217;t writing or studying for my oral exam, I was sleeping or eating.  Even during classes, all I could think about was my thesis.</p>
<p>During this time, I jumped into my code just long enough to setup new datasets, then left it to run for a few days while I went back to writing.  Thankfully I had access to two dual-processor Intel Xeon E5345 machines (sixteen 2.33GHz cores in total) with 16GB of RAM each.  As I frantically ran different parameter settings, I was extremely thankful for all the time I had spent optimizing the codebase.  In the end I probably ran those boxes for about 6 days straight, which ends up being about 3 months of single-CPU time.</p>
<p>Looking back, I think I saved a lot of time by carefully crafting everything I put into my thesis.  This caused writing to be tedious and very slow, but it made for solid drafts.  Over the 6 weeks I also saw the value of keeping a regular sleeping and eating schedule.  You really need to pace yourself for the long haul&#8211;it&#8217;s not like a class project that you can skip a night of sleep to complete.</p>
<p>To keep from going completely insane during the process, I started getting serious about coffee.  Until now I&#8217;ve only had a cup of the office coffee on occasion, but not on a regular basis.  On the advice of a few friends, I picked up some beans, a grinder, and a French press, all for about $35.  While writing my thesis, coffee turned into a sort of comforting ritual.  Anyway, I digress.  To summarize the things I took away, I learned that pacing yourself is key to large projects, and that an hourly cron&#8217;ed rsync of your thesis to seven servers on three different continents can really help you sleep soundly.</p>
<p>At some point I actually finished a solid second draft of my thesis, and then was faced with preparing and giving my thesis defense.  From what I remember it went well, besides losing my voice for the rest of the night.  My oral exam the next morning went well too.  So at this point I&#8217;m pretty much a Master of Science, I just need to finish the one class I&#8217;m taking this semester.  <img src='http://www.jsharkey.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you&#8217;re interested in my thesis research, we put together a nice poster back in January for a conference.  In short, we&#8217;re using artificial intelligence to design radio networks.  If you&#8217;re really interested, you could watch my thesis defense or read my second thesis draft linked below.</p>
<ul>
<li><a href="/downloads/thesis-defense.flv">Download the video below</a> for offline viewing</li>
<li><a href="/downloads/present.pdf">Presentation slides from defense</a></li>
<li><a href="/thesis-draft2.pdf">Second thesis draft</a> (42 page PDF)</li>
<li><a href="/downloads/trb-jsharkey.pdf/poster-jsharkey.pdf">Poster overview of our research</a></li>
</ul>
<p style="text-align:center"><object width="480" height="290" data="/downloads/flvplayer2.swf?file=/downloads/thesis-defense.flv" type="application/x-shockwave-flash"><param name="movie" value="/downloads/flvplayer2.swf?file=/downloads/thesis-defense.flv" /><param name="wmode" value="transparent" /></object></p>
<p>
I can&#8217;t believe it&#8217;s all over so quickly.  I suppose that&#8217;s how academia works&#8211;steady progress over time with short bursts of intense activity around deadlines.  Like I said earlier, this has been the most intense 6 weeks of my life to date.  I wasn&#8217;t really overwhelmed at any point, and to some extent it was a blast.  I wouldn&#8217;t mind doing it again sometime soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jsharkey.org/blog/2008/04/14/thesis-in-six-weeks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Android TabHost in the M5 SDK</title>
		<link>http://www.jsharkey.org/blog/2008/02/14/android-tabhost-in-the-m5-sdk/</link>
		<comments>http://www.jsharkey.org/blog/2008/02/14/android-tabhost-in-the-m5-sdk/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 15:43:19 +0000</pubDate>
		<dc:creator>jsharkey</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jsharkey.org/blog/2008/02/14/android-tabhost-in-the-m5-sdk/</guid>
		<description><![CDATA[ So about a week ago I wrote up a quick example for TabHost.  Then yesterday Google released a new version of the Android SDK which changed quite a bit.  In the process, TabHost is no longer deprecated (yay!), but its interface has changed quite a bit, so I spent about an hour [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.jsharkey.org/downloads/tab2b-t.png" class="float" height="192" width="240" /> So about a week ago I wrote up a quick example for <a href="http://code.google.com/android/reference/android/widget/TabHost.html">TabHost</a>.  Then yesterday Google <a href="http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html">released a new version of the Android SDK</a> which changed quite a bit.  In the process, TabHost is no longer deprecated (yay!), but its interface has changed quite a bit, so I spent about an hour changing <a href="http://www.jsharkey.org/blog/2008/02/07/using-android-tabhost/">my earlier example</a> to work.</p>
<p>Here is a quick run-down of what applies to TabHost: all of our id&#8217;s change to android:id&#8217;s, TabWidget&#8217;s width needs to fill_parent, and its height needs to be about 65px.  The top padding of the content FrameLayout also needs to be about 65px.</p>
<p>The Java interface to TabHost also changed, letting us put both text and icons in the tabs:</p>
<blockquote style="overflow: auto; max-height: 200px"><p>setContentView(R.layout.tabs);</p>
<p>TabHost tabs = (TabHost)this.findViewById(R.id.tabs);<br />
tabs.setup();</p>
<p>TabHost.TabSpec one = tabs.newTabSpec(&#8221;one&#8221;);<br />
one.setContent(R.id.content1);<br />
one.setIndicator(&#8221;labelone&#8221;,  this.getResources().getDrawable(R.drawable.gohome));<br />
tabs.addTab(one);</p>
<p>TabHost.TabSpec two = tabs.newTabSpec(&#8221;two&#8221;);<br />
two.setContent(R.id.content2);<br />
two.setIndicator(&#8221;labeltwo&#8221;);<br />
tabs.addTab(two);</p>
<p>tabs.setCurrentTab(0);</p></blockquote>
<p>And here&#8217;s a peek at what the resulting output looks like:</p>
<p><img src="http://www.jsharkey.org/downloads/tab2a.png" height="280" width="350" /> <img src="http://www.jsharkey.org/downloads/tab2b.png" height="280" width="350" /></p>
<p>The one nice feature is that the tabs are now clickable instead of just keypad-only.  That&#8217;s about it, so have fun with TabHost in the new SDK.  <img src='http://www.jsharkey.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The home icon above came from the <a href="http://tango.freedesktop.org/Tango_Icon_Library">Tango Icon Library</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jsharkey.org/blog/2008/02/14/android-tabhost-in-the-m5-sdk/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using Android TabHost</title>
		<link>http://www.jsharkey.org/blog/2008/02/07/using-android-tabhost/</link>
		<comments>http://www.jsharkey.org/blog/2008/02/07/using-android-tabhost/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 04:17:03 +0000</pubDate>
		<dc:creator>jsharkey</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jsharkey.org/blog/2008/02/07/using-android-tabhost/</guid>
		<description><![CDATA[ Update: the code below needs some slight changes to work with the new M5 SDK.
So over the past few weeks I&#8217;ve jumped into Google&#8217;s Android platform.  It&#8217;s a blast and very well designed, but there are still some rough edges.  One of those rough spots is getting a tab or paging control [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.jsharkey.org/downloads/tabtwo-t.png" class="float" /> <em>Update: the code below <a href="http://www.jsharkey.org/blog/2008/02/14/android-tabhost-in-the-m5-sdk/">needs some slight changes to work with the new M5 SDK</a>.</em></p>
<p>So over the past few weeks I&#8217;ve jumped into Google&#8217;s Android platform.  It&#8217;s a blast and very well designed, but there are still some rough edges.  One of those rough spots is getting a tab or paging control to work.  The API documentation talks about a <a href="http://code.google.com/android/reference/android/widget/TabHost.html" target="_blank">TabHost</a> widget, but it has been marked as deprecated.  (Already!? The API was just formed a few months ago, lol.)  It speaks of a phantom &#8220;views/Tabs2.java&#8221; example which never shipped.  There is also talk about a <a href="http://code.google.com/android/reference/android/widget/PageTurner.html" target="_blank">PageTurner</a> widget, but no examples exist for that either.</p>
<p>Because I needed a tab-like control badly, I brute forced my way through getting a TabHost working.  Hopefully this will save other developers some time.  Remember that the TabHost widget is marked as deprecated in this version of the API.  However, someone <a href="http://groups.google.com/group/android-developers/browse_thread/thread/cc51a6638b3a0fc9/" target="_blank">mentioned that TabHost might be making a comeback</a>.  In either case, here is a quick example of TabHost in action:</p>
<p>First let&#8217;s create an XML layout for our example, just a simple LinearLayout with a TabHost widget inside.  It&#8217;s important to notice that the TabHost must contain both a TabWidget and a FrameLayout with specific id&#8217;s in order to work.</p>
<blockquote style="overflow: auto; max-height: 200px"><p> &lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243;?&gt;<br />
&lt;LinearLayout xmlns:android=&#8221;http://schemas.android.com/apk/res/android&#8221;<br />
android:orientation=&#8221;vertical&#8221;<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;fill_parent&#8221;<br />
&gt;</p>
<p>&lt;TabHost<br />
id=&#8221;@+id/tabs&#8221;<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;fill_parent&#8221;<br />
&gt;</p>
<p>&lt;TabWidget<br />
id=&#8221;@android:id/tabs&#8221;<br />
android:layout_width=&#8221;wrap_content&#8221;<br />
android:layout_height=&#8221;wrap_content&#8221;<br />
/&gt;</p>
<p>&lt;FrameLayout<br />
id=&#8221;@android:id/tabcontent&#8221;<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;200px&#8221;<br />
android:paddingTop=&#8221;30px&#8221;<br />
&gt;</p>
<p>&lt;LinearLayout<br />
id=&#8221;@+id/content1&#8243;<br />
android:orientation=&#8221;vertical&#8221;<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;fill_parent&#8221;<br />
android:background=&#8221;#ff99ccff&#8221;<br />
&gt;</p>
<p>&lt;TextView<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;wrap_content&#8221;<br />
android:text=&#8221;tab item uno  :)&#8221;<br />
/&gt;</p>
<p>&lt;/LinearLayout&gt;</p>
<p>&lt;LinearLayout<br />
id=&#8221;@+id/content2&#8243;<br />
android:orientation=&#8221;vertical&#8221;<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;fill_parent&#8221;<br />
android:background=&#8221;#ffffcc99&#8243;<br />
&gt;</p>
<p>&lt;TextView<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;wrap_content&#8221;<br />
android:text=&#8221;tab item dos  :/&#8221;<br />
/&gt;</p>
<p>&lt;Button<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;wrap_content&#8221;<br />
android:text=&#8221;tabhost needs&#8221;<br />
/&gt;</p>
<p>&lt;Button<br />
android:layout_width=&#8221;fill_parent&#8221;<br />
android:layout_height=&#8221;wrap_content&#8221;<br />
android:text=&#8221;to be upgraded  ;)&#8221;<br />
/&gt;</p>
<p>&lt;/LinearLayout&gt;</p>
<p>&lt;/FrameLayout&gt;</p>
<p>&lt;/TabHost&gt;</p>
<p>&lt;/LinearLayout&gt;</p></blockquote>
<p>Inside the FrameLayout we can put our tab contents, which in this case are two LinearLayouts with different contents.  These, of course, could be pulled by id and filled with dynamic content as needed.  If I remember correctly, I think it was important that some sort of tab-content container needed to actually exist as a sub-widget under the FrameLayout in order for the tabs to work.</p>
<p>Next, let&#8217;s jump over to the Java code and build up the tab example.</p>
<blockquote style="overflow: auto; max-height: 200px"><p>setContentView(R.layout.tabs);</p>
<p>TabHost tabs = (TabHost)this.findViewById(R.id.tabs);<br />
tabs.setup();</p>
<p>tabs.addTab(&#8221;one&#8221;, R.id.content1, &#8220;labelone&#8221;);<br />
tabs.addTab(&#8221;two&#8221;, R.id.content2, &#8220;labeltwo&#8221;);</p></blockquote>
<p>Nothing too fancy, just pull the TabHost, initialize it, and let it know about the tabs we have.  Now let&#8217;s give the example a spin on the emulator:</p>
<p><img src="http://www.jsharkey.org/downloads/tabone.png" height="190" width="350" />  <img src="http://www.jsharkey.org/downloads/tabtwo.png" height="190" width="350" /></p>
<p>This is the first real look we&#8217;ve had at the TabHost widget, and it looks okay.  Mouse clicking doesn&#8217;t switch tabs, so you need to use the keypad&#8217;s left/right arrow keys to navigate.  The up/down keys work as expected on a tab with buttons, so not much to complain about.  <img src='http://www.jsharkey.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jsharkey.org/blog/2008/02/07/using-android-tabhost/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Laser Graffiti on Buildings</title>
		<link>http://www.jsharkey.org/blog/2008/01/05/laser-graffiti-on-buildings/</link>
		<comments>http://www.jsharkey.org/blog/2008/01/05/laser-graffiti-on-buildings/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 08:33:36 +0000</pubDate>
		<dc:creator>jsharkey</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jsharkey.org/blog/2008/01/05/laser-graffiti-on-buildings/</guid>
		<description><![CDATA[
Over a weekend back in August I wrote a C++ program that allows people to draw graffiti on any surface.  The person draws using a normal red laser pointer, and a MiniDV camera then detects the red dot.  The C++ program maps the laser dot from camera coordinates into OpenGL screen coordinates using [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.jsharkey.org/blog/laser.jpg" class="float" /></p>
<p>Over a weekend back in August I wrote a C++ program that allows people to draw graffiti on any surface.  The person draws using a normal red laser pointer, and a MiniDV camera then detects the red dot.  The C++ program maps the laser dot from camera coordinates into OpenGL screen coordinates using a simple homography.  The computer projects its screen image back onto the surface, offering a persistent view of what the user has drawn.</p>
<p>The system is self-calibrating on startup&#8211;it uses four green squares to generate the homography.  They disappear once calibration is complete.  We then use OpenGL textures to render a chalk-like pen, following the laser pointer when it&#8217;s turned on.  The system can also detect crude gestures to change ink color or clear the screen.</p>
<ul>
<li><a href="http://www.jsharkey.org/blog/laser/">Pictures of drawing on building</a></li>
<li><a href="http://www.jsharkey.org/downloads/laser.zip">C++ source code</a> pretty rough code right now</li>
</ul>
<p>Using a typical VGA projector, we filled the side of a seven story building at night.  Above are some pictures of things we drew.  Because the system recognized gestures, we could easily draw using the laser pointer from a few blocks away from the actual equipment.  We used a Panasonic MiniDV camcorder connected through firewire to a Intel Core2 2.4GHz box running Gentoo Linux.  The computer was connected to an Epson 2400-lumens projector through a VGA cable and pointed towards the building.</p>
<p>Future work includes moving to an ffmpeg-based image processing solution, instead of using pipes to pass raw image data.  Gestures need work so they are detected more reliably.  Some effort should also be put into the laser pointer detection, as its thresholds can vary widely under different lighting conditions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jsharkey.org/blog/2008/01/05/laser-graffiti-on-buildings/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Radio propagation using libprop</title>
		<link>http://www.jsharkey.org/blog/2008/01/03/radio-propagation-using-libprop/</link>
		<comments>http://www.jsharkey.org/blog/2008/01/03/radio-propagation-using-libprop/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 03:46:22 +0000</pubDate>
		<dc:creator>jsharkey</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jsharkey.org/blog/2008/01/03/radio-propagation-using-libprop/</guid>
		<description><![CDATA[
As part of my thesis work, I&#8217;ve been writing algorithms to design wireless radio networks.  One important question we needed to answer was whether a given pair of locations could communicate using a set of radio equipment.  This question is pretty hard to answer because there is so much uncertainty in the real-world. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="float" src="http://libprop.jsharkey.org/mash.jpg" /></p>
<p>As part of my thesis work, I&#8217;ve been writing algorithms to design wireless radio networks.  One important question we needed to answer was whether a given pair of locations could communicate using a set of radio equipment.  This question is pretty hard to answer because there is so much uncertainty in the real-world.  If we make some simplifying assumptions, we can boil the problem down to a handful of calculations:</p>
<p>First we need to check if the link is line-of-sight.  That is, can both the towers physically see each other, or is there a mountain in the way?  We&#8217;re using high-resolution 10-meter data from USGS to walk along a path between the towers, checking for obstructions as we go.  If nothing blocks the path, the link might be possible.</p>
<p>Next we need to check our link budget.  If the radio isn&#8217;t powerful enough, it will be too weak when we reach the other tower.  This boils down to a neat equation:</p>
<blockquote><p> transmitter power (dBm) + antenna (dB) - free space (db) - Fresnel loss (db) - vegetation loss (db)</p></blockquote>
<p>From our equipment, we know the transmitter power and antenna specifications.  From the distance and terrain we can calculate free space, Fresnel, and vegetation losses.  Then we compare this budget against the receiver sensitivity of the destination tower.  If there is enough signal power left, the link is possible.</p>
<ul>
<li><a href="http://libprop.jsharkey.org/">libprop propagation library</a></li>
<li><a href="http://libprop.jsharkey.org/mash/">Propagation mash-up interface</a></li>
</ul>
<p>This is just a quick summary of what I&#8217;ve spent months writing and testing.  As part of my fellowship here, I&#8217;m allowed to open-source the code I&#8217;ve written for my thesis.  So if you&#8217;re interested in a fast C++ library that can do propagation testing, libprop is the way to go.  It can easily read USGS terrain data, and there are some quick examples.</p>
<p>I&#8217;ve also written an awesome little mashup that overlays propagation images in Google Maps.  It&#8217;s an instant &#8220;What if we put a tower here?&#8221; tool.  Other propagation tools on the market are a few thousand bucks, and they don&#8217;t even offer anything like this.  <img src='http://www.jsharkey.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Check it out and let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jsharkey.org/blog/2008/01/03/radio-propagation-using-libprop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Reclaim screen space by using Two-column Google</title>
		<link>http://www.jsharkey.org/blog/2007/03/01/reclaim-screen-space-by-using-two-column-google/</link>
		<comments>http://www.jsharkey.org/blog/2007/03/01/reclaim-screen-space-by-using-two-column-google/#comments</comments>
		<pubDate>Thu, 01 Mar 2007 17:17:00 +0000</pubDate>
		<dc:creator>jsharkey</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jsharkey.org/blog/2007/03/01/reclaim-screen-space-by-using-two-column-google/</guid>
		<description><![CDATA[
Okay, so here at school we have these huge Dell LCD monitors that are just gorgeous.  However, it&#8217;s annoying every time I do a Google search because over half of the screen space is just wasted with whitespace.    Yeah, it&#8217;s because Google decided to be friendly to everyone still running at [...]]]></description>
			<content:encoded><![CDATA[<p><img style="margin-top: 0px" class="float" src="/blog/googletwo.jpg" /></p>
<p>Okay, so here at school we have these huge Dell LCD monitors that are just gorgeous.  However, it&#8217;s annoying every time I do a Google search because over half of the screen space is just wasted with whitespace.  <img src='http://www.jsharkey.org/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Yeah, it&#8217;s because Google decided to be friendly to everyone still running at 640&#215;480.  But I don&#8217;t want to deal with that!  I hate having to scroll down only a few inches to get to the page-navigation links.</p>
<ul>
<li><a href="http://www.jsharkey.org/downloads/googletwo.user.js">Two-column Google Greasemonkey Script</a></li>
<li><a href="https://addons.mozilla.org/firefox/748/">Installing Greasemonkey in Firefox</a></li>
<li><a href="http://userscripts.org/scripts/show/7732">Script page at Userscripts.org</a></li>
</ul>
<p>So I pulled out my long-lost friend Greasemonkey, an excellent Firefox extension that essentially lets you change any website on the fly.  I wrote a quick script that wraps the lower half of every Google search result page onto a second column on the right-hand side of the screen.  Our screen-waste problem is solved, yay!  It does this by adding a two-column table to the page, and then splitting the Google search results equally into the two columns.  The results read like newspaper columns (vertically first, then horizontally).</p>
<p>So yeah, check it out, and let me know if you find it useful.  <img src='http://www.jsharkey.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jsharkey.org/blog/2007/03/01/reclaim-screen-space-by-using-two-column-google/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 3.626 seconds -->
