<?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>A State Of Development</title>
	<atom:link href="http://blog.jeremybrooks.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jeremybrooks.net</link>
	<description>tales from a software engineer</description>
	<lastBuildDate>Tue, 10 Apr 2012 18:15:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Interlacer Workshop and Free Interlacer</title>
		<link>http://blog.jeremybrooks.net/2011/10/interlacer-workshop-and-free-interlacer/</link>
		<comments>http://blog.jeremybrooks.net/2011/10/interlacer-workshop-and-free-interlacer/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 01:47:55 +0000</pubDate>
		<dc:creator>jeremybrooks</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.jeremybrooks.net/?p=174</guid>
		<description><![CDATA[To celebrate the release of the iPhone 4S, I will be joining Doctor Popular for an early morning Interlacer workshop. We will be in line at the Apple Store in downtown San Francisco. The workshop will start around 6:30 am. In addition, Interlacer will be free on the App Store all day October 14th. Come&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/jeremybrooks/5860140061/" title="Day And Night by Jeremy Brooks, on Flickr"><img src="http://farm6.static.flickr.com/5102/5860140061_fbcef7a8d7_b.jpg" width="1024" height="1024" alt="Day And Night"></a></p>
<p>To celebrate the release of the iPhone 4S, I will be joining <a href="http://www.docpop.org/2011/10/iphone4sline/">Doctor Popular</a> for an early morning Interlacer workshop. We will be in line at the Apple Store in downtown San Francisco. The workshop will start around 6:30 am.</p>
<p>In addition, Interlacer will be free on the App Store all day October 14th.</p>
<p>Come on down, have some coffee, and learn about creative ways to use Interlacer!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeremybrooks.net/2011/10/interlacer-workshop-and-free-interlacer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interlacer 1.3 &#8211; Now With Postcards!</title>
		<link>http://blog.jeremybrooks.net/2011/10/interlacer-1-3-now-with-postcards/</link>
		<comments>http://blog.jeremybrooks.net/2011/10/interlacer-1-3-now-with-postcards/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 17:35:51 +0000</pubDate>
		<dc:creator>jeremybrooks</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[Interlacer]]></category>

		<guid isPermaLink="false">http://blog.jeremybrooks.net/?p=167</guid>
		<description><![CDATA[It&#8217;s a pleasure to announce that Interlacer version 1.3 is now available in the app store. Interlacer is proud to be a launch partner with the Sincerely Ship Library. You can now send your photos as real printed postcards. This functionality is provided by Sincerely (the makers of Postagram and PopBooth), and the postcards have&#8230;]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a pleasure to announce that <a href="http://jeremybrooks.net/interlacer">Interlacer</a> version 1.3 is now available in the app store. Interlacer is proud to be a launch partner with the <a href="http://dev.sincerely.com/partners">Sincerely Ship Library</a>.</p>
<p><img src="http://blog.jeremybrooks.net/wp-content/uploads/2011/10/v1.3_share.png" alt="" title="v1.3_share" width="368" height="716" class="alignnone size-full wp-image-169" /></p>
<p>You can now send your photos as real printed postcards. This functionality is provided by <a href="http://sincerely.com/">Sincerely</a> (the makers of <a href="http://postagramapp.com/">Postagram</a> and <a href="http://popbooth.com/">PopBooth</a>), and the postcards have the same great quality you have come to expect from them. Sending a card is integrated into Interlacer, so you don&#8217;t have to open another app.</p>
<p>You can also send photos via email or send them directly to another app, like Instagram or Camera+.</p>
<p>This version also adds a much requested feature: auto-scale images. If you enable auto-scale, Interlacer will use the first image as the target size and automatically scale any additional images to the same size.</p>
<p>Interlacer is available now on the <a href="http://itunes.apple.com/app/interlacer/id435346014?mt=8">App Store</a>.</p>
<p>If you are an iOS developer and would like to integrate printing into your own application, check out the <a href="http://dev.sincerely.com/">Sincerely Ship Developer Page</a>. The gang at Sincerely has made it very easy to add this feature to your app, and they are great people to work with.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeremybrooks.net/2011/10/interlacer-1-3-now-with-postcards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Camera View Overlay in iOS</title>
		<link>http://blog.jeremybrooks.net/2011/06/camera-view-overlay-in-ios/</link>
		<comments>http://blog.jeremybrooks.net/2011/06/camera-view-overlay-in-ios/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 00:00:35 +0000</pubDate>
		<dc:creator>jeremybrooks</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sample Code]]></category>

		<guid isPermaLink="false">http://blog.jeremybrooks.net/?p=153</guid>
		<description><![CDATA[iOS 4 and higher allow for an overlay view to be added to the view hierarchy in the UIImagePickerController when it is in Camera mode. I wanted to use this technique in Interlacer to allow the user to line up multiple shots. It seemed that this would be very straightforward: 12345// assume there is an&#8230;]]></description>
			<content:encoded><![CDATA[<p>iOS 4 and higher allow for an overlay view to be added to the view hierarchy in the UIImagePickerController when it is in Camera mode. I wanted to use this technique in <http://jeremybrooks.net/interlacer>Interlacer</a> to allow the user to line up multiple shots. It seemed that this would be very straightforward:</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #11740a; font-style: italic;">// assume there is an instance of UIImagePickerController* named picker...</span><br />
<span style="color: #11740a; font-style: italic;">// assume that there is a UIImage* property named overlayImage...</span><br />
UIImageView <span style="color: #002200;">*</span>overlay <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIImageView alloc<span style="color: #002200;">&#93;</span> initWithImage<span style="color: #002200;">:</span>self.overlayImage<span style="color: #002200;">&#93;</span>;<br />
overlay.alpha <span style="color: #002200;">=</span> 0.5f;<br />
picker.cameraOverlayView <span style="color: #002200;">=</span> overlay;</div></td></tr></tbody></table></div>
<p>That code will show the image as a translucent overlay, but it is not lined up correctly in the viewfinder. The image was off by about 50 pixels. To make this work, I needed to resize the image to the correct viewfinder size, place that image in a UIImageView whose frame was the size of the main screen, then position the content (the resized image) at the top of the frame:</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #11740a; font-style: italic;">// assume there is an instance of UIImagePickerController* named picker...</span><br />
<span style="color: #11740a; font-style: italic;">// assume that there is a UIImage* property named overlayImage...</span><br />
UIImageView <span style="color: #002200;">*</span>overlay <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIImageView alloc<span style="color: #002200;">&#93;</span> initWithFrame<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIScreen mainScreen<span style="color: #002200;">&#93;</span> bounds<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
<br />
<span style="color: #11740a; font-style: italic;">// with an image sized to fit in the viewfinder window</span><br />
<span style="color: #11740a; font-style: italic;">// (Resize using Trevor Harmon's UIImage+ categories)</span><br />
overlay.image <span style="color: #002200;">=</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #002200;">&#91;</span>self.overlayImage resizedImageWithContentMode<span style="color: #002200;">:</span>UIViewContentModeScaleAspectFill<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bounds<span style="color: #002200;">:</span>CGSizeMake<span style="color: #002200;">&#40;</span><span style="color: #2400d9;">320</span>, <span style="color: #2400d9;">430</span><span style="color: #002200;">&#41;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;interpolationQuality<span style="color: #002200;">:</span>kCGInterpolationDefault<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #11740a; font-style: italic;">// tell the view to put the image at the top, and make it translucent</span><br />
overlay.contentMode <span style="color: #002200;">=</span> UIViewContentModeTop; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
overlay.alpha <span style="color: #002200;">=</span> 0.5f;<br />
picker.cameraOverlayView <span style="color: #002200;">=</span> overlay;</div></td></tr></tbody></table></div>
<p>This code is in an xcode project that demonstrates the overlay by allowing you to take a photo, then overlaying it in the camera view. You can find the code <a href="https://github.com/jeremybrooks/TestOverlay">on github</a>.</p>
<p>This fix will be in the next release of Interlacer.</p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeremybrooks.net/2011/06/camera-view-overlay-in-ios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding EXIF Metadata To Images On The iPhone</title>
		<link>http://blog.jeremybrooks.net/2011/05/adding-exif-metadata-to-images-on-the-iphone/</link>
		<comments>http://blog.jeremybrooks.net/2011/05/adding-exif-metadata-to-images-on-the-iphone/#comments</comments>
		<pubDate>Fri, 27 May 2011 00:00:32 +0000</pubDate>
		<dc:creator>jeremybrooks</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sample Code]]></category>

		<guid isPermaLink="false">http://blog.jeremybrooks.net/?p=140</guid>
		<description><![CDATA[EXIF metadata is embedded in most of the images created by digital cameras, and the iPhone is no exception. This can include information about the camera that made the photo, the software used to process it, the data and time, geolocation information, and many other pieces of interesting information. When I was developing Interlacer, one&#8230;]]></description>
			<content:encoded><![CDATA[<p>EXIF metadata is embedded in most of the images created by digital cameras, and the iPhone is no exception. This can include information about the camera that made the photo, the software used to process it, the data and time, geolocation information, and many other pieces of interesting information. </p>
<p>When I was developing <a href="http://jeremybrooks.net/interlacer">Interlacer</a>, one of my goals was to include information about how the photo was created. Since Interlacer creates a new photo from multiple sources, the EXIF metadata block in the final image is missing. I didn&#8217;t want to just copy metadata from the source images, since there is no guarantee that the metadata in the source images would be relevant to the final image. I decided that I wanted to save the name and version of the app, some information about the source images that were used to create the final image, and the date and time the final image was created.</p>
<p>There are a lot of examples of how to manipulate the existing EXIF data in an image on the iPhone, but I didn&#8217;t find much information about how to add EXIF data to an image that did not contain any. The solution turned out to be quite straightforward. When an image is saved using the ALAssetsLibrary class, a dictionary of metadata can be included. This dictionary includes some basic metadata and can also include dictionaries of other metadata, such as EXIF and TIFF metadata. The keys for all these metadata values are constants declared in ImageIO/CGImageProperties.h.</p>
<p>Depending on the information you want to save, you may need several dictionaries, each containing a specific type of metadata. In Interlacer, the date and time and image dimensions are saved as EXIF metadata, and information about Interlacer and the source images is saved as TIFF metadata.</p>
<p>Here is the code showing how to create EXIF and TIFF dictionaries and save the information along with an image:</p>
<div class="codecolorer-container objc default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:500px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br /></div></td><td><div class="objc codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>saveImageAndAddMetadata<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span>UIImage <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>image<br />
<span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Format the current date and time</span><br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/"><span style="color: #400080;">NSDateFormatter</span></a> <span style="color: #002200;">*</span>formatter <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/"><span style="color: #400080;">NSDateFormatter</span></a> alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>formatter setDateFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;yyyy:MM:dd HH:mm:ss&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>now <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>formatter stringFromDate<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/"><span style="color: #400080;">NSDate</span></a> date<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>formatter release<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Exif metadata dictionary</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Includes date and time as well as image dimensions</span><br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/"><span style="color: #400080;">NSMutableDictionary</span></a> <span style="color: #002200;">*</span>exifDictionary <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/"><span style="color: #400080;">NSMutableDictionary</span></a> dictionary<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>exifDictionary setValue<span style="color: #002200;">:</span>now forKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>kCGImagePropertyExifDateTimeOriginal<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>exifDictionary setValue<span style="color: #002200;">:</span>now forKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>kCGImagePropertyExifDateTimeDigitized<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>exifDictionary setValue<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/"><span style="color: #400080;">NSNumber</span></a> numberWithFloat<span style="color: #002200;">:</span>image.size.width<span style="color: #002200;">&#93;</span> forKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>kCGImagePropertyExifPixelXDimension<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>exifDictionary setValue<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/"><span style="color: #400080;">NSNumber</span></a> numberWithFloat<span style="color: #002200;">:</span>image.size.height<span style="color: #002200;">&#93;</span> forKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>kCGImagePropertyExifPixelYDimension<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Tiff metadata dictionary</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Includes information about the application used to create the image</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// &quot;Make&quot; is the name of the app, &quot;Model&quot; is the version of the app</span><br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/"><span style="color: #400080;">NSMutableDictionary</span></a> <span style="color: #002200;">*</span>tiffDictionary <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/"><span style="color: #400080;">NSMutableDictionary</span></a> dictionary<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>tiffDictionary setValue<span style="color: #002200;">:</span>now forKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>kCGImagePropertyTIFFDateTime<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>tiffDictionary setValue<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Interlacer&quot;</span> forKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>kCGImagePropertyTIFFMake<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>version <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSBundle_Class/"><span style="color: #400080;">NSBundle</span></a> mainBundle<span style="color: #002200;">&#93;</span> infoDictionary<span style="color: #002200;">&#93;</span> objectForKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;CFBundleShortVersionString&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span>build <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSBundle_Class/"><span style="color: #400080;">NSBundle</span></a> mainBundle<span style="color: #002200;">&#93;</span> infoDictionary<span style="color: #002200;">&#93;</span> objectForKey<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;CFBundleVersion&quot;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>tiffDictionary setValue<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;%@ (%@)&quot;</span>, version, build<span style="color: #002200;">&#93;</span> forKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>kCGImagePropertyTIFFModel<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Image metadata dictionary</span><br />
&nbsp; &nbsp; <span style="color: #11740a; font-style: italic;">// Includes image dimensions, as well as the EXIF and TIFF metadata</span><br />
&nbsp; &nbsp; <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/"><span style="color: #400080;">NSMutableDictionary</span></a> <span style="color: #002200;">*</span>dict <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSMutableDictionary_Class/"><span style="color: #400080;">NSMutableDictionary</span></a> dictionary<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>dict setValue<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/"><span style="color: #400080;">NSNumber</span></a> numberWithFloat<span style="color: #002200;">:</span>image.size.width<span style="color: #002200;">&#93;</span> forKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>kCGImagePropertyPixelWidth<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>dict setValue<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSNumber_Class/"><span style="color: #400080;">NSNumber</span></a> numberWithFloat<span style="color: #002200;">:</span>image.size.height<span style="color: #002200;">&#93;</span> forKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>kCGImagePropertyPixelHeight<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>dict setValue<span style="color: #002200;">:</span>exifDictionary forKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>kCGImagePropertyExifDictionary<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>dict setValue<span style="color: #002200;">:</span>tiffDictionary forKey<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/"><span style="color: #400080;">NSString</span></a> <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>kCGImagePropertyTIFFDictionary<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; ALAssetsLibrary <span style="color: #002200;">*</span>al <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>ALAssetsLibrary alloc<span style="color: #002200;">&#93;</span> init<span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>al writeImageToSavedPhotosAlbum<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span>image CGImage<span style="color: #002200;">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; metadata<span style="color: #002200;">:</span>dict<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;completionBlock<span style="color: #002200;">:^</span><span style="color: #002200;">&#40;</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/"><span style="color: #400080;">NSURL</span></a> <span style="color: #002200;">*</span>assetURL, <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSError_Class/"><span style="color: #400080;">NSError</span></a> <span style="color: #002200;">*</span>error<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>error <span style="color: #002200;">==</span> <span style="color: #a61390;">nil</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// notify user image was saved</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #11740a; font-style: italic;">// handle error</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #002200;">&#125;</span><span style="color: #002200;">&#93;</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #002200;">&#91;</span>al release<span style="color: #002200;">&#93;</span>;<br />
<span style="color: #002200;">&#125;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeremybrooks.net/2011/05/adding-exif-metadata-to-images-on-the-iphone/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Announcing Interlacer</title>
		<link>http://blog.jeremybrooks.net/2011/05/announcing-interlacer/</link>
		<comments>http://blog.jeremybrooks.net/2011/05/announcing-interlacer/#comments</comments>
		<pubDate>Tue, 10 May 2011 05:58:51 +0000</pubDate>
		<dc:creator>jeremybrooks</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.jeremybrooks.net/?p=133</guid>
		<description><![CDATA[My new iOS application, Interlacer, is now available in the App Store. Interlacer is a photo application that combines multiple photos and/or colors into a new image. It does this by using alternating lines from each image and color. It is probably easier to illustrate with a picture: You can take photos from within the&#8230;]]></description>
			<content:encoded><![CDATA[<p>My new iOS application, Interlacer, is now available in the <a href="http://itunes.apple.com/app/interlacer/id435346014?mt=8">App Store</a>.</p>
<p>Interlacer is a photo application that combines multiple photos and/or colors into a new image. It does this by using alternating lines from each image and color. It is probably easier to illustrate with a picture:<br />
<a href="http://blog.jeremybrooks.net/wp-content/uploads/2011/05/Example.png"><img src="http://blog.jeremybrooks.net/wp-content/uploads/2011/05/Example.png" alt="" title="Example" width="300" height="67" class="alignnone size-full wp-image-134" /></a></p>
<p>You can take photos from within the application, select photos from your album, or select a color from the color picker. You can control the size of the lines and shift alternating lines to get a video interlace effect.</p>
<p><a href="http://www.flickr.com/photos/jeremybrooks/5622596587/" title="Two Is Spookier Than One by Jeremy Brooks, on Flickr"><img src="http://farm6.static.flickr.com/5305/5622596587_c7aabd8ed3_z.jpg" width="533" height="640" alt="Two Is Spookier Than One"></a></p>
<p>If you make any photos with Interlacer, feel free to add them to the <a href="http://www.flickr.com/groups/interlacerapp/">Interlacer App Group on Flickr</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeremybrooks.net/2011/05/announcing-interlacer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Jinx Updated</title>
		<link>http://blog.jeremybrooks.net/2011/05/jinx-updated/</link>
		<comments>http://blog.jeremybrooks.net/2011/05/jinx-updated/#comments</comments>
		<pubDate>Wed, 04 May 2011 00:00:58 +0000</pubDate>
		<dc:creator>jeremybrooks</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[jinx]]></category>

		<guid isPermaLink="false">http://blog.jeremybrooks.net/?p=129</guid>
		<description><![CDATA[Jinx, a Java library to access the Flickr API, has been updated. The latest version supports these API entry points: * activity * auth * blogs * collections * commons * contacts * favorites * galleries * groups * groups.members * photos * photosets You can get it on github. Happy coding!]]></description>
			<content:encoded><![CDATA[<p>Jinx, a Java library to access the Flickr API, has been updated. The latest version supports these API entry points:<br />
  * activity<br />
  * auth<br />
  * blogs<br />
  * collections<br />
  * commons<br />
  * contacts<br />
  * favorites<br />
  * galleries<br />
  * groups<br />
  * groups.members<br />
  * photos<br />
  * photosets</p>
<p>You can get it on <a href="https://github.com/jeremybrooks/jinx/">github</a>.</p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeremybrooks.net/2011/05/jinx-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>X of 365</title>
		<link>http://blog.jeremybrooks.net/2011/04/x-of-365/</link>
		<comments>http://blog.jeremybrooks.net/2011/04/x-of-365/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 19:00:39 +0000</pubDate>
		<dc:creator>jeremybrooks</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.jeremybrooks.net/?p=121</guid>
		<description><![CDATA[My latest iOS application, X of 365, went live on the App Store yesterday. It is a simple application, designed to help with 365 photo projects by telling you the ordinal day of the year. When the application starts, it displays the current date and which day of the year it is. You can change&#8230;]]></description>
			<content:encoded><![CDATA[<p>My latest iOS application, X of 365, went live on the App Store yesterday. It is a simple application, designed to help with 365 photo projects by telling you the ordinal day of the year.<br />
<img src="http://blog.jeremybrooks.net/wp-content/uploads/2011/04/iOS-Simulator-iPhone-_-iOS-4.3-8F192.png" alt="" title="iOS Simulator - iPhone _ iOS 4.3 (8F192)" width="206" height="400" class="aligncenter size-full wp-image-123" /><br />
When the application starts, it displays the current date and which day of the year it is. You can change the date, or tap on the bottom half of the screen to bring up a menu. The menu will take you back to the current date, copy the text &#8216;x/365&#8242; to the clipboard (where x is the ordinal day of the year), or show an About dialog. You can also shake the device to return to the current date.</p>
<p>It is a simple application, but I have found it very helpful when tweeting my daily <a href="http://mostly365.com/">mostly365</a> shots, and I have a few features planned for a future version that will make it even more useful for 365 projects. I wanted to give it a steampunk look and feel, and the graphic design by <a href="http://www.olivierzibret.com/portfolio/">Olivier Zibret</a> really does the trick.</p>
<p>The application is free, and can be found on the <a href="http://itunes.apple.com/us/app/x-of-365/id432433078?mt=8&#038;ls=1">App Store</a>. I have been using it on my own iPhone without issues, and it should work on any device with iOS 4.0 or higher. If you experience any issues with the app, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeremybrooks.net/2011/04/x-of-365/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Knicker Version 2 and Examples</title>
		<link>http://blog.jeremybrooks.net/2011/04/knicker-version-2-and-examples/</link>
		<comments>http://blog.jeremybrooks.net/2011/04/knicker-version-2-and-examples/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 18:00:24 +0000</pubDate>
		<dc:creator>jeremybrooks</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[wordnik]]></category>

		<guid isPermaLink="false">http://blog.jeremybrooks.net/?p=111</guid>
		<description><![CDATA[Version 2 of Knicker, the Java library for the Wordnik API, is now available. This version supports version 4 of the Wordnik API. In addition to supporting version 4 of the Wordnik API, this version of Knicker follows the organization of the API more closely. Previously, all the methods were in one class, Knicker.java. Knicker.java&#8230;]]></description>
			<content:encoded><![CDATA[<p>Version 2 of <a href="http://jeremybrooks.net/knicker">Knicker</a>, the Java library for the <a href="http://www.wordnik.com">Wordnik</a> API, is now available. This version supports version 4 of the Wordnik API.</p>
<p>In addition to supporting version 4 of the Wordnik API, this version of Knicker follows the organization of the API more closely. Previously, all the methods were in one class, Knicker.java. Knicker.java still exists, but it is now abstract and contains only constants used by other classes. The methods that access the Wordnik API are now in classes named after the section of the API they access. So account API methods are now in AccountApi, word API methods are in WordApi, and so on. This makes the source a little more manageable, and allows a more modular approach to testing and development.</p>
<p>This version also includes JUnit tests for all the Wordnik API methods. During the development of version 2, these tests helped find several bugs in the API, which the Wordnik team quickly fixed.</p>
<p>One of the coolest features of the new Wordnik API is the ability to retrieve audio pronunciation data for words. Retrieval of the audio data is fully supported in Knicker version 2. Playback of the data is left up to you.</p>
<p>In addition to a new version of the library, I have also started a <a href="https://github.com/jeremybrooks/Knicker-Examples">Knicker Examples</a> project. There is currently one example that shows how to retrieve and display text definitions, and retrieve and play the audio definition for the word. The project contains all necessary libraries, so you can grab it and go. I will probably be adding additional examples as I have time, and contributions are welcome.</p>
<p>As always, please let me know when you find bugs. You can contact me via email, leave a comment here, or post to the Wordnik developers mailing list, which I am subscribed to.</p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeremybrooks.net/2011/04/knicker-version-2-and-examples/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Knicker, a Wordnik API Library for Java</title>
		<link>http://blog.jeremybrooks.net/2011/01/knicker-a-wordnik-api-library-for-java/</link>
		<comments>http://blog.jeremybrooks.net/2011/01/knicker-a-wordnik-api-library-for-java/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 20:00:26 +0000</pubDate>
		<dc:creator>jeremybrooks</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sample Code]]></category>

		<guid isPermaLink="false">http://blog.jeremybrooks.net/?p=105</guid>
		<description><![CDATA[ ]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordnik.com">Wordnik</a> is an online dictionary that bills itself as &#8220;The most comprehensive dictionary in the known universe&#8221;. Recently I wanted to add the ability to lookup word definitions to one of my applications, so I wrote a Java library to wrap the Wordnik API. The library is called <a href="http://jeremybrooks.net/knicker">Knicker</a>, and is available under the terms of the GPL.</p>
<p>Using Knicker is simple:</p>
<ol>
<li>Sign up for a <a href="http://api.wordnik.com/signup/">Wordnik API key</a></li>
<li>Set the system property WORDNIK_API_KEY to your API key</li>
<li>Put the Knicker library in your classpath</li>
<li>Call methods on the library</li>
</ol>
<p>Here&#8217;s an example of how to use the API to get a list of definitions for the word &#8220;siren&#8221;:</p>
<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:500px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.util.List</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">net.jeremybrooks.knicker.Knicker</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">net.jeremybrooks.knicker.dto.Definition</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">net.jeremybrooks.knicker.dto.TokenStatus</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TestKnicker <span style="color: #009900;">&#123;</span><br />
<br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// use your API key here</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">setProperty</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;WORDNIK_API_KEY&quot;</span>, <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// check the status of the API key</span><br />
&nbsp; &nbsp; TokenStatus status <span style="color: #339933;">=</span> Knicker.<span style="color: #006633;">status</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>status.<span style="color: #006633;">isValid</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;API key is valid.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;API key is invalid!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// get a list of definitions for a word</span><br />
&nbsp; &nbsp; List<span style="color: #339933;">&lt;</span>Definition<span style="color: #339933;">&gt;</span> def <span style="color: #339933;">=</span> Knicker.<span style="color: #006633;">definitions</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;siren&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Found &quot;</span> <span style="color: #339933;">+</span> def.<span style="color: #006633;">size</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; definitions.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>Definition d <span style="color: #339933;">:</span> def<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;) &quot;</span> <span style="color: #339933;">+</span> d.<span style="color: #006633;">getPartOfSpeech</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;: &quot;</span> <span style="color: #339933;">+</span> d.<span style="color: #006633;">getText</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>For more information about the Wordnik API, see their <a href="http://www.wordnik.com/developers">developers page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeremybrooks.net/2011/01/knicker-a-wordnik-api-library-for-java/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Introducing Jinx</title>
		<link>http://blog.jeremybrooks.net/2010/09/introducing-jinx/</link>
		<comments>http://blog.jeremybrooks.net/2010/09/introducing-jinx/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 16:00:52 +0000</pubDate>
		<dc:creator>jeremybrooks</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[jinx]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.jeremybrooks.net/?p=92</guid>
		<description><![CDATA[Jinx is a Java library that provides access to the Flickr API. It is pure Java, with no external dependencies. The package structure is straightforward. Each Flickr API section (activity, auth, blogs, etc) has a corresponding class in the net.jeremybrooks.jinx.api package. The API classes are named ActivityApi, AuthApi, BlogsApi, etc. Each API class is implemented&#8230;]]></description>
			<content:encoded><![CDATA[<p>Jinx is a Java library that provides access to the <a href="http://www.flickr.com/services/api/">Flickr API</a>. It is pure Java, with no external dependencies. </p>
<p>The package structure is straightforward. Each Flickr API section (activity, auth, blogs, etc) has a corresponding class in the net.jeremybrooks.jinx.api package. The API classes are named ActivityApi, AuthApi, BlogsApi, etc. Each API class is implemented as a singleton. You can obtain an instance of an API class with a call to getInstance():</p>
<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">BlogsApi bApi <span style="color: #339933;">=</span> BlogsApi.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Each Flickr method has a corresponding method in the API class. So if you want to call the Flickr flickr.blogs.getList method, you will call the getList() method on BlogsApi:</p>
<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">BlogsApi.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getList</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>The API methods that return data will generally return instances of the Data Transfer Objects located in the net.jeremybrooks.jinx.dto package. The DTO&#8217;s are very simple classes, containing getter and setter methods and no other logic. All DTO&#8217;s implement java.io.Serializable. </p>
<p>Flickr returns a status message along with data for every API call. Jinx will check that status message for you. If Flickr reports an error, an instance of net.jeremybrooks.jinx.JinxException will be thrown. The Flickr error code and error message can be retrieved by calling getErrorCode and getErrorMessage. </p>
<p>This project is currently being used in <a href="http://jeremybrooks.net/suprsetr">SuprSetr</a>. Currently, the following Flickr API sections are implemented:</p>
<ul>
<li>Activity</li>
<li>Auth</li>
<li>Blogs</li>
<li>Collections</li>
<li>Commons</li>
<li>Photos</li>
<li>Photosets</li>
</ul>
<p>Other sections of the Flickr API will be implemented over time. If you want to use Jinx now, you can get the source code from <a href="http://github.com/jeremybrooks/jinx">github</a> and build it with ant. If you just want the binary jar file, you can download it at the <a href="http://jeremybrooks.net/jinx">Jinx home page</a>. Javadocs are located <a href="http://jeremybrooks.net/jinx/javadoc">here</a>.</p>
<p>The test directory contains sample code showing how to use Jinx to access the Flickr API. Here is the TestAuthorization class, showing how to authorize an application to use Flickr:</p>
<div class="codecolorer-container java default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;height:500px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br /></div></td><td><div class="java codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.File</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">net.jeremybrooks.jinx.Jinx</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">net.jeremybrooks.jinx.JinxConstants</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">net.jeremybrooks.jinx.api.AuthApi</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">net.jeremybrooks.jinx.dto.Frob</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">net.jeremybrooks.jinx.dto.Token</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #008000; font-style: italic; font-weight: bold;">/**<br />
&nbsp;* This test class demonstrates how to perform authorization for your application.<br />
&nbsp;*<br />
&nbsp;* Your application must have its own key and secret. These can be obtained here:<br />
&nbsp;* http://www.flickr.com/services/apps/create/apply/?<br />
&nbsp;*<br />
&nbsp;* <br />
&nbsp;* @author jeremyb<br />
&nbsp;*/</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> TestAuthorizaion <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">/*<br />
&nbsp; &nbsp; &nbsp;* Get a key for your app here:<br />
&nbsp; &nbsp; &nbsp;* http://www.flickr.com/services/apps/create/apply/?<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> KEY <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a> SECRET <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">String</span></a><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Afile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">File</span></a> tokenFile <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Afile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">File</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/tmp/myToken&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; Token token <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Attempt to initialize with an existing token</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>tokenFile.<span style="color: #006633;">exists</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; token <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Token<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; token.<span style="color: #006633;">load</span><span style="color: #009900;">&#40;</span>tokenFile<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Jinx.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">init</span><span style="color: #009900;">&#40;</span>KEY, SECRET, token<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// No token exists, so initialize with our key and secret,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// then prompt user to authorize our application</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Jinx.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">init</span><span style="color: #009900;">&#40;</span>KEY, SECRET<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Frob frob <span style="color: #339933;">=</span> AuthApi.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getFrob</span><span style="color: #009900;">&#40;</span>JinxConstants.<span style="color: #006633;">PERMS_READ</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Send user to the login URL</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// In a real application, you would probably do this in a GUI</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// of some sort</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Please go to this URL and allow access: &quot;</span> <span style="color: #339933;">+</span> frob.<span style="color: #006633;">getLoginUrl</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;After you have authorized this application, press a key.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Wait for user to press a key</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">in</span>.<span style="color: #006633;">read</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Complete authorization by getting the token and telling</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// Jinx about it</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; token <span style="color: #339933;">=</span> AuthApi.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getToken</span><span style="color: #009900;">&#40;</span>frob<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; Jinx.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">setToken</span><span style="color: #009900;">&#40;</span>token<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Authorization successful.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// The token can be stored for future use, and is valid until</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// the user revokes access</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; token.<span style="color: #006633;">store</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Afile+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">File</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/tmp/myToken&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">Exception</span></a> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span style="color: #003399;">System</span></a>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Oops, something went wrong!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>Jinx is released under the <a href="http://www.gnu.org/licenses/gpl.html">Gnu General Public License</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jeremybrooks.net/2010/09/introducing-jinx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

