<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>One Hit Wonder &#187; programming</title>
	<atom:link href="http://blog.digitalbias.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.digitalbias.com</link>
	<description>Exploring, Innovating, Playing</description>
	<lastBuildDate>Fri, 20 Aug 2010 19:41:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.6" -->
	<copyright>2006-2007 </copyright>
	<managingEditor>mitchelld@acm.org (One Hit Wonder)</managingEditor>
	<webMaster>mitchelld@acm.org (One Hit Wonder)</webMaster>
	<category>posts</category>
	<image>
		<url>http://blog.digitalbias.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
		<title>One Hit Wonder &#187; programming</title>
		<link>http://blog.digitalbias.com</link>
		<width>144</width>
		<height>144</height>
	</image>
	<itunes:subtitle></itunes:subtitle>
	<itunes:summary>Exploring, Innovating, Playing</itunes:summary>
	<itunes:keywords></itunes:keywords>
	<itunes:category text="Society &amp; Culture" />
	<itunes:author>One Hit Wonder</itunes:author>
	<itunes:owner>
		<itunes:name>One Hit Wonder</itunes:name>
		<itunes:email>mitchelld@acm.org</itunes:email>
	</itunes:owner>
	<itunes:block>no</itunes:block>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://blog.digitalbias.com/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<item>
		<title>Rails with jQuery and Prototype</title>
		<link>http://blog.digitalbias.com/2010/08/20/rails-with-jquery-and-prototype/</link>
		<comments>http://blog.digitalbias.com/2010/08/20/rails-with-jquery-and-prototype/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 19:33:00 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.digitalbias.com/?p=288</guid>
		<description><![CDATA[I found out about jQuery today when I watched this weeks railscast, and thought it was a much better date picker than what I have been using so far, but I had a couple challenges when trying to use it right off. In my app I also use prototype, which uses the $ function&#8230;just like [...]]]></description>
			<content:encoded><![CDATA[<p>I found out about jQuery today when I watched this weeks railscast, and thought it was a much better date picker than what I have been using so far, but I had a couple challenges when trying to use it right off.</p>
<p>In my app I also use prototype, which uses the $ function&#8230;just like jQuery. Fortunately there is a work around. All that is needed is a simple javascript in the header. Something like this should work well:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">  <span style="color: #003366; font-weight: bold;">var</span> $j <span style="color: #339933;">=</span> jQuery.<span style="color: #660066;">noConflict</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>That then allows you to use both jquery as well as prototype in the same application. Anywhere you need to use jquery instead of doing a $() you use use $j instead.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbias.com/2010/08/20/rails-with-jquery-and-prototype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cucumber</title>
		<link>http://blog.digitalbias.com/2009/09/03/cucumber/</link>
		<comments>http://blog.digitalbias.com/2009/09/03/cucumber/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 03:43:22 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.digitalbias.com/?p=261</guid>
		<description><![CDATA[Cucumber is a fairly easy BDD tool that I&#8217;ve been using for the last month or so, but there have been a couple things I&#8217;ve had to learn on my own to make some of the webrat stuff work, so I thought I&#8217;d share one instance of what I&#8217;ve been doing. To start, lets show [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cukes.info/">Cucumber</a> is a fairly easy BDD tool that I&#8217;ve been using for the last month or so, but there have been a couple things I&#8217;ve had to learn on my own to make some of the webrat stuff work, so I thought I&#8217;d share one instance of what I&#8217;ve been doing.</p>
<p>To start, lets show the feature. I&#8217;ll go through each line one at a time.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="cucumber" style="font-family:monospace;">    Scenario: Create a new style from scratch
        Given I have logged in as &quot;testuser&quot;
        And I am on the style creation page
        And I fill in the fields
            | unit_style_code        | S100  |
            | unit_style_description | A simple floorplan |
            | unit_style_square_feet | 100.0 |
            | unit_style_price       | 1000.0 |
        When I press &quot;Save&quot;
        Then with the latest unit_style
        Then I should be on the edit style page for that unit_style
        Then the &quot;unit_style[code]&quot; field should contain &quot;S100&quot;
        Then the &quot;unit_style[description]&quot; field should contain &quot;A simple floorplan&quot;
        Then the &quot;unit_style[square_feet]&quot; field should contain &quot;100.00&quot;
        Then the &quot;unit_style[price]&quot; field should contain &quot;1000.00&quot;</pre></td></tr></table></div>

<p>Line 2: This one was tricky. I&#8217;m using restful authentication for rails and I&#8217;m using users already created with dummy/test account information for testing purposes. The &#8220;I have logged in as&#8221; step does all the logging in steps. Getting through all that is another posts (one shorter than this one tho).</p>
<p>Line 3: Just create the mapping for &#8220;the style creation page&#8221; in /features/support/path.rb</p>
<p>Line 4-8: In /features/step_definitions/webrat_steps.rb, I put in the following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">When</span> <span style="color:#006600; font-weight:bold;">/</span>^I fill <span style="color:#9966CC; font-weight:bold;">in</span> the fields$<span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>table<span style="color:#006600; font-weight:bold;">|</span>
  table.<span style="color:#9900CC;">raw</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>row<span style="color:#006600; font-weight:bold;">|</span>
    fill_in<span style="color:#006600; font-weight:bold;">&#40;</span>row<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#ff3333; font-weight:bold;">:with</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> row<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">1</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>Line 9: &#8220;Save&#8221; is the name of the submit button. The &#8220;I press&#8221; step is already in the generated webrat_steps.rb</p>
<p>Line 10: I created a unit_style_steps.rb, which contains:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">Then</span> <span style="color:#006600; font-weight:bold;">/</span>^with the latest unit_style$<span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  <span style="color:#0066ff; font-weight:bold;">@unit_style</span> = UnitStyle.<span style="color:#9900CC;">find</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:last</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>Line 11: Again, back to path.rb, this time I added the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;">    <span style="color:#9966CC; font-weight:bold;">when</span> <span style="color:#006600; font-weight:bold;">/</span>the edit style page <span style="color:#9966CC; font-weight:bold;">for</span> that unit_style<span style="color:#006600; font-weight:bold;">/</span>
      <span style="color:#996600;">&quot;/housing/engineering/edit_style/&quot;</span> <span style="color:#006600; font-weight:bold;">+</span> <span style="color:#0066ff; font-weight:bold;">@unit_style</span>.<span style="color:#9900CC;">id</span>.<span style="color:#9900CC;">to_s</span></pre></td></tr></table></div>

<p>Line 12-15: This is where I was having problems. The generated webrat_steps had the following for it:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">Then</span> <span style="color:#006600; font-weight:bold;">/</span>^the <span style="color:#996600;">&quot;([^<span style="color:#000099;">\&quot;</span>]*)&quot;</span> field should contain <span style="color:#996600;">&quot;([^<span style="color:#000099;">\&quot;</span>]*)&quot;</span>$<span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>field, value<span style="color:#006600; font-weight:bold;">|</span>
  field_labeled<span style="color:#006600; font-weight:bold;">&#40;</span>field<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">value</span>.<span style="color:#9900CC;">should</span> =~ <span style="color:#006600; font-weight:bold;">/</span><span style="color:#008000; font-style:italic;">#{value}/</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>But it wasn&#8217;t finding the fields correctly. So after using the save_and_open webrat function (now another method in my webrat_steps) I was able to determine that the fields were there and that they had the correct information in them. Webrat just was not finding them. After a bit more digging I found the file_named function, and now, the step looks like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">Then</span> <span style="color:#006600; font-weight:bold;">/</span>^the <span style="color:#996600;">&quot;([^<span style="color:#000099;">\&quot;</span>]*)&quot;</span> field should contain <span style="color:#996600;">&quot;([^<span style="color:#000099;">\&quot;</span>]*)&quot;</span>$<span style="color:#006600; font-weight:bold;">/</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>field, value<span style="color:#006600; font-weight:bold;">|</span>
  field_named<span style="color:#006600; font-weight:bold;">&#40;</span>field<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">value</span>.<span style="color:#9900CC;">should</span> =~ <span style="color:#006600; font-weight:bold;">/</span><span style="color:#008000; font-style:italic;">#{value}/</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>So, with only a few lines of code, I have a simple, easy to read scenario that just about any user would be able to read and understand, but also something I can take and run on a regular basis to make sure the application is also running the way it should.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbias.com/2009/09/03/cucumber/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fun with computers and git</title>
		<link>http://blog.digitalbias.com/2009/07/18/fun-with-computers-and-git/</link>
		<comments>http://blog.digitalbias.com/2009/07/18/fun-with-computers-and-git/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 06:33:25 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.digitalbias.com/?p=256</guid>
		<description><![CDATA[I&#8217;ve been using git as my scm system for a while now, but getting it to work nicely on windows can sometimes be a real pain, especially when running cygwin 1.7 and still having to connect to subversion as well. Granted the git svn command works, but some of the latest patches have caused a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using git as my scm system for a while now, but getting it to work nicely on windows can sometimes be a real pain, especially when running cygwin 1.7 and still having to connect to subversion as well. Granted the git svn command works, but some of the latest patches have caused a couple of hiccups too.</p>
<p>Add a dose of a primary hard drive crash and you have for a busy couple weeks. Finally I&#8217;ve managed to reinstall most of my necessary software, but I lost my .gitconfig file. So, for future reference, here are a couple of essentials needed to get git, svn and kdiff3 working (at least for now). All of it can be done with the git config command, but it is so much easier to just cut and paste.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>user<span style="color: #7a0874; font-weight: bold;">&#93;</span>
	name = David Mitchell
	email = mitchelld<span style="color: #000000; font-weight: bold;">@</span>acm.org
<span style="color: #7a0874; font-weight: bold;">&#91;</span>color<span style="color: #7a0874; font-weight: bold;">&#93;</span>
	interactive = always
	status = always
	pager = <span style="color: #c20cb9; font-weight: bold;">true</span>
	branch = always
	<span style="color: #c20cb9; font-weight: bold;">patch</span> = always
	ui = always
	<span style="color: #c20cb9; font-weight: bold;">diff</span> = always
	<span style="color: #c20cb9; font-weight: bold;">grep</span> = always
<span style="color: #7a0874; font-weight: bold;">&#91;</span>format<span style="color: #7a0874; font-weight: bold;">&#93;</span>
	pretty = medium
<span style="color: #7a0874; font-weight: bold;">&#91;</span>merge<span style="color: #7a0874; font-weight: bold;">&#93;</span>
	tool = kdiff3
<span style="color: #7a0874; font-weight: bold;">&#91;</span>mergetool <span style="color: #ff0000;">&quot;kdiff3&quot;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
	path = C:<span style="color: #000000; font-weight: bold;">/</span>Tools<span style="color: #000000; font-weight: bold;">/</span>KDiff3<span style="color: #000000; font-weight: bold;">/</span>kdiff3.exe 
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #c20cb9; font-weight: bold;">diff</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
	tool = kdiff3
<span style="color: #7a0874; font-weight: bold;">&#91;</span>difftool <span style="color: #ff0000;">&quot;kdiff3&quot;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>
	path = C:<span style="color: #000000; font-weight: bold;">/</span>Tools<span style="color: #000000; font-weight: bold;">/</span>KDiff3<span style="color: #000000; font-weight: bold;">/</span>kdiff3.exe
<span style="color: #7a0874; font-weight: bold;">&#91;</span>difftool<span style="color: #7a0874; font-weight: bold;">&#93;</span>
	prompt = <span style="color: #c20cb9; font-weight: bold;">false</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>mergetool<span style="color: #7a0874; font-weight: bold;">&#93;</span>
	prompt = <span style="color: #c20cb9; font-weight: bold;">false</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbias.com/2009/07/18/fun-with-computers-and-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manual Update to Cupcake</title>
		<link>http://blog.digitalbias.com/2009/05/24/manual-update-to-cupcake/</link>
		<comments>http://blog.digitalbias.com/2009/05/24/manual-update-to-cupcake/#comments</comments>
		<pubDate>Mon, 25 May 2009 01:17:48 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.digitalbias.com/?p=252</guid>
		<description><![CDATA[Here&#8217;s how to update to cupcake if you cannot wait for the OTA release from TMobile. Download the following URL: https://android.clients.google.com/updates/partner/signed-kila-ota-148830.de6a94ca.zip Rename the download to update.zip on the SD card, and then power off the phone Hold the Power and the Home buttons until you see a triangle on the screen Type in Alt-L and Alt-S [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how to update to cupcake if you cannot wait for the OTA release from TMobile.</p>
<ol>
<li>Download the following URL: <a href="https://android.clients.google.com/updates/partner/signed-kila-ota-148830.de6a94ca.zip" target="_blank">https://android.clients.google.com/updates/partner/signed-kila-ota-148830.de6a94ca.zip</a></li>
<li>Rename the download to update.zip on the SD card, and then power off the phone</li>
<li>Hold the Power and the Home buttons until you see a triangle on the screen</li>
<li>Type in Alt-L and Alt-S and wait for the system to update.</li>
<li>Enjoy the new cupcake version of Android.</li>
</ol>
<p>Looks like I now have some work to do to update Scriptures to the new version.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbias.com/2009/05/24/manual-update-to-cupcake/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Scriptures website</title>
		<link>http://blog.digitalbias.com/2009/01/26/scriptures-website/</link>
		<comments>http://blog.digitalbias.com/2009/01/26/scriptures-website/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 14:54:42 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.digitalbias.com/?p=226</guid>
		<description><![CDATA[I&#8217;ve set up a website that is dedicated to the scriptures application. With a list of features, a FAQ and a gallery, it should answer most questions that people have about the application.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve set up a <a href="http://scriptures.digitalbias.com">website</a> that is dedicated to the scriptures application. With a list of features, a FAQ and a gallery, it should answer most questions that people have about the application.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbias.com/2009/01/26/scriptures-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Take Screenshots Of An Android Phone</title>
		<link>http://blog.digitalbias.com/2009/01/24/how-take-screenshots-of-an-android-phone/</link>
		<comments>http://blog.digitalbias.com/2009/01/24/how-take-screenshots-of-an-android-phone/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 20:51:04 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.digitalbias.com/?p=222</guid>
		<description><![CDATA[How Take Screenshots Of An Android Phone is a very handy HOWTO of how to take a picture of what you have on your G1 screen at that moment. Here&#8217;s a picture of my home page:]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.altafsayani.com/2008/11/01/how-take-screenshots-of-an-android-phone/">How Take Screenshots Of An Android Phone</a> is a very handy HOWTO of how to take a picture of what you have on your G1 screen at that moment. Here&#8217;s a picture of my home page:</p>
<p><a href="http://blog.digitalbias.com/wp-content/uploads/2009/01/device.png"><img class="alignnone size-full wp-image-224" title="G1 screenshot" src="http://blog.digitalbias.com/wp-content/uploads/2009/01/device.png" alt="G1 screenshot" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbias.com/2009/01/24/how-take-screenshots-of-an-android-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scriptures 0.3.1</title>
		<link>http://blog.digitalbias.com/2009/01/23/scriptures-031/</link>
		<comments>http://blog.digitalbias.com/2009/01/23/scriptures-031/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 04:39:43 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[Faith]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.digitalbias.com/?p=218</guid>
		<description><![CDATA[Fixed a bug. If you had the app opened, went to another app, and then tried to open the app again it would force close. Then it would open fine the next time. That bug is fixed. You can get the update from the market place or from here.]]></description>
			<content:encoded><![CDATA[<p>Fixed a bug. If you had the app opened, went to another app, and then tried to open the app again it would force close. Then it would open fine the next time. That bug is fixed.</p>
<p>You can get the update from the market place or from <a href="http://blog.digitalbias.com/wp-content/uploads/2009/01/androidscriptures1.apk">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbias.com/2009/01/23/scriptures-031/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Barcodes</title>
		<link>http://blog.digitalbias.com/2009/01/22/barcodes/</link>
		<comments>http://blog.digitalbias.com/2009/01/22/barcodes/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 17:36:34 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.digitalbias.com/?p=208</guid>
		<description><![CDATA[In my application for work, I need to generate barcodes for a number of things. One of the nice things about the G1 is that I can scan all these QR Codes into my phone without any problem. Makes it very easy to test. require 'rubygems' require 'barby' require 'barby/outputter/prawn_outputter' &#160; data = &#34;MECARD:N:David Mitchell;ORG:nStar [...]]]></description>
			<content:encoded><![CDATA[<p>In my application for work, I need to <a href="http://barby.rubyforge.org/outputters.html">generate</a> barcodes for a <a href="http://zxing.appspot.com/generator/">number</a> <a href="http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/function/application/addressbook/index.html">of</a> <a href="http://code.google.com/p/zxing/wiki/BarcodeContents">things</a>. One of the nice things about the G1 is that I can scan all these QR Codes into my phone without any problem. Makes it very easy to test.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'barby'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'barby/outputter/prawn_outputter'</span>
&nbsp;
data = <span style="color:#996600;">&quot;MECARD:N:David Mitchell;ORG:nStar Global Services, LLC;TEL:(801) 555-2855;URL:http://www.digitalbias.com;EMAIL:a@a.com;ADR:3707 South 604 North, Nephi, UT 81651;NOTE:EMP_ID:12232;;&quot;</span>
&nbsp;
barcode = <span style="color:#6666ff; font-weight:bold;">Barby::QrCode</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>data<span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'contact.pdf'</span>, <span style="color:#996600;">'w'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>f<span style="color:#006600; font-weight:bold;">|</span>
  f <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> barcode.<span style="color:#9900CC;">to_pdf</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
data = <span style="color:#996600;">&quot;mailto:mitchelld@acm.org&quot;</span>
&nbsp;
barcode = <span style="color:#6666ff; font-weight:bold;">Barby::QrCode</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>data<span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'email.pdf'</span>, <span style="color:#996600;">'w'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>f<span style="color:#006600; font-weight:bold;">|</span>
  f <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> barcode.<span style="color:#9900CC;">to_pdf</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
data = <span style="color:#996600;">&quot;BEGIN:VEVENT<span style="color:#000099;">\n</span>SUMMARY:Super size me<span style="color:#000099;">\n</span>DTSTART:20090122T151500Z<span style="color:#000099;">\n</span>DTEND:20090122T161500Z<span style="color:#000099;">\n</span>END:VEVENT<span style="color:#000099;">\n</span>&quot;</span>
&nbsp;
barcode = <span style="color:#6666ff; font-weight:bold;">Barby::QrCode</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>data<span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#CC0066; font-weight:bold;">open</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'event.pdf'</span>, <span style="color:#996600;">'w'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>f<span style="color:#006600; font-weight:bold;">|</span>
  f <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> barcode.<span style="color:#9900CC;">to_pdf</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbias.com/2009/01/22/barcodes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s Hot?</title>
		<link>http://blog.digitalbias.com/2009/01/01/whats-hot/</link>
		<comments>http://blog.digitalbias.com/2009/01/01/whats-hot/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 18:41:22 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.digitalbias.com/?p=197</guid>
		<description><![CDATA[Using Google Insights you can find out what people are searching for in a specific part of the world. Today, for the last 12 months what&#8217;s the top in my part of the world? Utah&#8230; Rather self centered. Google Insights for Utah (United States) &#8211; Last 12 months. The last 7 days? The weather. Number 2 [...]]]></description>
			<content:encoded><![CDATA[<p>Using Google Insights you can find out what people are searching for in a specific part of the world. Today, for the last 12 months what&#8217;s the top in my part of the world? Utah&#8230; Rather self centered. <a href="http://www.google.com/insights/search/#geo=US-UT&amp;date=today%2012-m&amp;cmpt=geo">Google Insights for Utah (United States) &#8211; Last 12 months</a>. The<a href="http://www.google.com/insights/search/#geo=US-UT&amp;date=today%207-d&amp;cmpt=geo"> last 7 days</a>? The weather. Number 2 on both searches? Lyrics.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbias.com/2009/01/01/whats-hot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Dev Phone</title>
		<link>http://blog.digitalbias.com/2008/12/06/android-dev-phone/</link>
		<comments>http://blog.digitalbias.com/2008/12/06/android-dev-phone/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 20:05:29 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.digitalbias.com/?p=187</guid>
		<description><![CDATA[Android Dev Phone is a phone you can purchase that is SIM unlocked and hardware unlocked. Basically&#8230;you can do anything on this phone with android. That would be really interesting. Stuff like portable computer like apps, modding the os to add features people want faster than google gets it out. But it&#8217;s also a no warranty [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://android.brightstarcorp.com/">Android Dev Phone</a> is a phone you can purchase that is SIM unlocked and hardware unlocked. Basically&#8230;you can do anything on this phone with android. That would be really interesting. Stuff like portable computer like apps, modding the os to add features people want faster than google gets it out. But it&#8217;s also a no warranty on your own kind of thing.</p>
<p>Too bad I don&#8217;t have the $400, otherwise I&#8217;d consider getting one.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.digitalbias.com/2008/12/06/android-dev-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
