<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7889009576291030100</atom:id><lastBuildDate>Sun, 26 Apr 2026 10:14:35 +0000</lastBuildDate><category>tutorial</category><category>iOS</category><category>iOS 5</category><category>Twitter Framework</category><category>UIKit</category><category>customization</category><category>twitter integration</category><category>uitableview</category><category>core data</category><category>objective-c</category><category>optimization</category><category>performance</category><category>xcode</category><category>UITableViewCell</category><category>storyboard</category><category>testing</category><category>HTML5</category><category>Instagram</category><category>adt</category><category>all tweets</category><category>android</category><category>android studio</category><category>c++</category><category>clang</category><category>cocoapods</category><category>compiling</category><category>dropshadow</category><category>extraction</category><category>ghunit</category><category>iOS5</category><category>intellij</category><category>ipaexplorer</category><category>java</category><category>jenkins</category><category>junit</category><category>ping</category><category>rest</category><category>restkit</category><category>sentest</category><category>server</category><category>simple server</category><category>tweets</category><category>twitter</category><category>twitter api</category><category>uisearchbar</category><category>unit testing</category><category>xctest</category><category>xunit</category><title>Kurry Tran's Blog</title><description>Programming Blog</description><link>http://kurrytran.blogspot.com/</link><managingEditor>noreply@blogger.com (Unknown)</managingEditor><generator>Blogger</generator><openSearch:totalResults>55</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>Programming Blog</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-1818425227777732988</guid><pubDate>Sun, 15 Jan 2017 04:26:00 +0000</pubDate><atom:updated>2017-01-14T20:26:01.156-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">all tweets</category><category domain="http://www.blogger.com/atom/ns#">tweets</category><category domain="http://www.blogger.com/atom/ns#">twitter</category><category domain="http://www.blogger.com/atom/ns#">twitter api</category><title>How To Get All User Tweets</title><description>I was having problems trying to get all tweets from a specific user, and I didn't realize that the Twitter API only lets you retrieve the last 3200 tweets. So to get all of a users tweets, you have to scrape the website. Luckily, this person wrote some really great code that you can get here.&lt;br /&gt;
&lt;a href="https://www.blogger.com/goog_33628547"&gt;&lt;br /&gt;&lt;/a&gt;
&lt;a href="https://github.com/Jefferson-Henrique/GetOldTweets-python"&gt;https://github.com/Jefferson-Henrique/GetOldTweets-python&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I also uploaded a zip of the code to my Google Drive:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://drive.google.com/open?id=0B-5XJQKDfVBHdE1Jc0w1R29QZDA"&gt;https://drive.google.com/open?id=0B-5XJQKDfVBHdE1Jc0w1R29QZDA&lt;/a&gt;</description><link>http://kurrytran.blogspot.com/2017/01/how-to-get-all-user-tweets.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>41</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-8097998129046752409</guid><pubDate>Tue, 09 Dec 2014 04:57:00 +0000</pubDate><atom:updated>2014-12-08T20:57:47.045-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">iOS</category><category domain="http://www.blogger.com/atom/ns#">junit</category><category domain="http://www.blogger.com/atom/ns#">objective-c</category><category domain="http://www.blogger.com/atom/ns#">sentest</category><category domain="http://www.blogger.com/atom/ns#">unit testing</category><category domain="http://www.blogger.com/atom/ns#">xcode</category><category domain="http://www.blogger.com/atom/ns#">xctest</category><category domain="http://www.blogger.com/atom/ns#">xunit</category><title>Setup What? Origins Of Four Step Unit Testing in iOS</title><description>&lt;div class="graf--p" name="ca06"&gt;
When I’m at my desk during the week and have written new code, I always create a new unit test file, and it looks something like this:&lt;/div&gt;
&lt;div class="graf--p" name="ca06"&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/Kurry/78e779a0ef1e2e5646b1.js"&gt;&lt;/script&gt;

&lt;div class="graf--p" name="7b0f"&gt;
I asked myself two questions:&lt;/div&gt;
&lt;ol class="postList"&gt;
&lt;li class="graf--li" name="5c0c"&gt;Why do I create a new testcase class for every new class?&lt;/li&gt;
&lt;li class="graf--li" name="6ce0"&gt;Why do all of the tests I have always contains four-steps?&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;h3 class="graf--h3" name="35ed"&gt;
History of XCTest and xUnit&lt;/h3&gt;
&lt;div class="graf--p graf--empty" name="e339"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="graf--p" name="f6a1"&gt;
XCTest is based off of OCUnit and falls under the family of &lt;em class="markup--em markup--p-em"&gt;xUnit &lt;/em&gt;testing frameworks. xUnit is the collective name for several unit testing frameworks that derive their structure and functionality from Smalltalk’s SUnit [1], notably JUnit, which was also authored by Kent Beck [2]. In March 1998, OCUnit was written by Sen:te using Kent Beck’s description of the Smalltalk testing framework [3]. Understanding the origins of XCTest and JUnit helped me discover that most of the testing habits I have today all derive from Kent Beck’s &lt;a class="markup--anchor markup--p-anchor" data-href="http://www.xprogramming.com/testfram.htm" href="http://www.xprogramming.com/testfram.htm" target="_blank"&gt;Simple Smalltalk Testing: With Patterns&lt;/a&gt;.&lt;/div&gt;
&lt;div class="graf--p" name="f6a1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 class="graf--h3" name="1222"&gt;
One Testcase Class&lt;/h3&gt;
&lt;blockquote class="graf--pullquote pullquote" name="7a97"&gt;
&lt;em class="markup--em markup--pullquote-em"&gt;I recommend that developers write their own unit tests, one per class. The framework supports the writing of suites of tests, which can be attached to a class. I recommend that all classes respond to the message “testSuite”, returning a suite containing the unit tests.&lt;/em&gt;&lt;/blockquote&gt;
&lt;blockquote class="graf--pullquote pullquote" name="482d"&gt;
&lt;em class="markup--em markup--pullquote-em"&gt;— Kent Beck, &lt;/em&gt;&lt;a class="markup--anchor markup--pullquote-anchor" data-href="http://www.xprogramming.com/testfram.htm" href="http://www.xprogramming.com/testfram.htm" target="_blank"&gt;&lt;em class="markup--em markup--pullquote-em"&gt;Simple Smalltalk Testing: With Patterns&lt;/em&gt;&lt;/a&gt;&lt;/blockquote&gt;
&lt;br /&gt;
It was Kent Beck’s philosophy that led to the practice of creating one testcase class per class. Beck believed that test logic should be encoded as a single test method on some class [4], and a testcase class gives you a place to group these similarly related test methods [5]. Making test methods instance methods of a testcase class and creating a testcase object for each test, allows us to manipulate the test methods at runtime, such as running a single test case, a group of test cases, or skipping a particular test case [6].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img class="graf-image" data-height="258" data-image-id="1*7NR71sBotmBBMJ23nDYqXA.gif" data-width="552" src="https://d262ilb51hltx0.cloudfront.net/max/800/1*7NR71sBotmBBMJ23nDYqXA.gif" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="graf--p" name="6b3b"&gt;
&lt;em class="markup--em markup--p-em"&gt;Source: xUnitPatterns&lt;/em&gt;&lt;/div&gt;
&lt;h3 class="graf--h3" name="bddc"&gt;
&lt;br /&gt;&lt;/h3&gt;
&lt;h3 class="graf--h3" name="bddc"&gt;
Four-Phase Test&lt;/h3&gt;
&lt;h3 class="graf--h3 graf--empty" name="bddc"&gt;
&lt;div class="graf--p graf--empty" name="e31a"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="graf--p graf--empty" name="bc65"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;figure class="graf--figure" name="f920"&gt;&lt;div class="aspectRatioPlaceholder is-locked" style="max-height: 258px; max-width: 552px;"&gt;
&lt;div class="aspect-ratio-fill" style="padding-bottom: 46.7%;"&gt;
&lt;img class="graf-image" data-height="258" data-image-id="1*Cni_yfNdgILWtMSRDn5lyw.gif" data-width="552" src="https://d262ilb51hltx0.cloudfront.net/max/800/1*Cni_yfNdgILWtMSRDn5lyw.gif" /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/figure&gt;&lt;div class="graf--p graf--empty" name="0942"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="graf--p" name="6b3b" style="font-size: medium; font-weight: normal;"&gt;
&lt;em class="markup--em markup--p-em"&gt;Source: xUnitPatterns&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
&lt;em class="markup--em markup--p-em" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class="graf--p" name="a1f1"&gt;
&lt;span style="font-weight: normal;"&gt;The idea of having a &lt;em class="markup--em markup--p-em"&gt;setup&lt;/em&gt; method, a test method, then a &lt;em class="markup--em markup--p-em"&gt;tearDown&lt;/em&gt; method come from Beck’s work, and has been formalized into what is called the &lt;em class="markup--em markup--p-em"&gt;Four-Phase Test. &lt;/em&gt;In the &lt;em class="markup--em markup--p-em"&gt;Four-Phase Test&lt;/em&gt;, every test has four distinct phases that are executed in sequence: setup, exercise SUT (system under test), result verification, and fixture teardown [6]. The purpose of creating clear distinctions in the phases was to make the system under test extremely obvious.&lt;/span&gt;&lt;/div&gt;
&lt;div class="graf--p" name="a1f1"&gt;
&lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="graf--p" name="dd4b"&gt;
&lt;span style="font-weight: normal;"&gt;The inspiration for the design was based around the fact that automated tests should serve at least two purposes:&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/h3&gt;
&lt;h3 class="graf--h3 graf--empty" name="1222"&gt;
&lt;blockquote class="graf--pullquote pullquote" name="05ac"&gt;
&lt;span style="font-weight: normal;"&gt;&lt;i&gt;&lt;span class="markup--em markup--pullquote-em"&gt;First, they should act as documentation of how the &lt;/span&gt;&lt;a class="markup--anchor markup--pullquote-anchor" data-href="http://xunitpatterns.com/SUT.html" href="http://xunitpatterns.com/SUT.html" target="_blank"&gt;&lt;span class="markup--em markup--pullquote-em"&gt;system under test (SUT&lt;/span&gt;&lt;/a&gt;&lt;span class="markup--em markup--pullquote-em"&gt;) &lt;/span&gt;&lt;span class="markup--strong markup--pullquote-strong"&gt;&lt;span class="markup--em markup--pullquote-em"&gt;should &lt;/span&gt;&lt;/span&gt;&lt;span class="markup--em markup--pullquote-em"&gt;behave; we call this &lt;/span&gt;&lt;a class="markup--anchor markup--pullquote-anchor" data-href="http://xunitpatterns.com/Goals%20of%20Test%20Automation.html#Tests as Documentation" href="http://xunitpatterns.com/Goals%20of%20Test%20Automation.html#Tests%20as%20Documentation" target="_blank"&gt;Tests as Documentation&lt;/a&gt;. &lt;span class="markup--em markup--pullquote-em"&gt;Second, they should be a self-verifying executable specification.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote class="graf--pullquote pullquote" name="6273"&gt;
&lt;span class="markup--em markup--pullquote-em" style="font-weight: normal;"&gt;&lt;i&gt;— Gerard Meszaros, xUnitPatterns&lt;/i&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;div class="graf--p" name="3e18"&gt;
&lt;span style="font-weight: normal;"&gt;The &lt;em class="markup--em markup--p-em"&gt;Four-Phase Test &lt;/em&gt;can be thought of as a state machine. In the fixture setup phase, the test establishes the prior state of the world. In the second phase we interact with the SUT, which transitions us to the next state. In the third phase we analyze the post state of the world and verify that it meets our expectations. Then in the fourth phase, we reset the state of the world prior to running the test.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/h3&gt;
&lt;h3 class="graf--h3" name="4703"&gt;
Conclusion&lt;/h3&gt;
&lt;h3 class="graf--h3 graf--empty" name="1222"&gt;
&lt;div class="graf--p" name="c798"&gt;
&lt;span style="font-weight: normal;"&gt;Unit testing may sometimes become a laborious process, so it’s refreshing to take a step back and understand why we do the things that we do. The inspiration of unit testing frameworks in iOS or OS X has been around since the first version of SUnit in 1994 [7], and given that unit testing hasn’t changed much since then, it seems that the paradigms of one testcase class per class and four-phase testing are here to stay.&lt;/span&gt;&lt;/div&gt;
&lt;div class="graf--p" name="c798"&gt;
&lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="graf--p" name="c798"&gt;
&lt;/div&gt;
&lt;/h3&gt;
&lt;h3 class="graf--h3 graf--empty" name="1222" style="-webkit-text-stroke-width: 0px; color: black; font-family: Times; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;
&lt;/h3&gt;
&lt;br /&gt;
&lt;h3 class="graf--h3" name="4703" style="-webkit-text-stroke-width: 0px; color: black; font-family: Times; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;
Sources&lt;/h3&gt;
&lt;h3 class="graf--h3 graf--empty" name="1222"&gt;
&lt;br /&gt;
&lt;span style="font-weight: normal;"&gt;[1]&amp;nbsp;"XUnit." Wikipedia. January 12, 2014. Accessed December 08, 2014. &lt;a href="http://en.wikipedia.org/wiki/XUnit"&gt;http://en.wikipedia.org/wiki/XUnit&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-weight: normal;"&gt;[2]&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;"JUnit." Wikipedia. January 12, 2014. Accessed December 08, 2014. &lt;a href="http://en.wikipedia.org/wiki/JUnit"&gt;http://en.wikipedia.org/wiki/JUnit&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-weight: normal;"&gt;[3]&amp;nbsp;"IPhone Unit Testing | Sen:te." Sente RSS. Accessed December 08, 2014. &lt;a href="http://www.sente.ch/?p=535&amp;amp;lang=en"&gt;http://www.sente.ch/?p=535&amp;amp;lang=en&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-weight: normal;"&gt;[4]&amp;nbsp;"Test Method." At XUnitPatterns.com. Accessed December 08, 2014. &lt;a href="http://xunitpatterns.com/Test%20Method.html"&gt;http://xunitpatterns.com/Test%20Method.html&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-weight: normal;"&gt;[5]&amp;nbsp;"Testcase Class." At XUnitPatterns.com. Accessed December 08, 2014. &lt;a href="http://xunitpatterns.com/Testcase%20Class.html"&gt;http://xunitpatterns.com/Testcase%20Class.html&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-weight: normal;"&gt;[6]&amp;nbsp;"Four-Phase Test." Four Phase Test at XUnitPatterns.com. Accessed December 08, 2014. &lt;a href="http://xunitpatterns.com/Four%20Phase%20Test.html"&gt;http://xunitpatterns.com/Four%20Phase%20Test.html&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-weight: normal;"&gt;[7]&amp;nbsp;"Ten Years Of Test Driven Development." Ten Years Of Test Driven Development. Accessed December 08, 2014. &lt;a href="http://c2.com/cgi/wiki?TenYearsOfTestDrivenDevelopment"&gt;http://c2.com/cgi/wiki?TenYearsOfTestDrivenDevelopment&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><link>http://kurrytran.blogspot.com/2014/12/setup-what-origins-of-four-step-unit.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>38</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-3611796643329272604</guid><pubDate>Fri, 07 Nov 2014 00:41:00 +0000</pubDate><atom:updated>2014-11-06T16:41:27.290-08:00</atom:updated><title>Great Git Hook If You Use Cocoapods</title><description>&lt;script src="https://gist.github.com/Kurry/216b82f8063bcfde733f.js"&gt;&lt;/script&gt;</description><link>http://kurrytran.blogspot.com/2014/11/great-git-hook-if-you-use-cocoapods.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>8</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-1449241992874804545</guid><pubDate>Mon, 29 Sep 2014 18:38:00 +0000</pubDate><atom:updated>2014-09-29T11:38:24.411-07:00</atom:updated><title>xcpretty -- Flexible and fast xcodebuild formatter</title><description>This is an amazing tool:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://github.com/supermarin/xcpretty"&gt;https://github.com/supermarin/xcpretty&lt;/a&gt;</description><link>http://kurrytran.blogspot.com/2014/09/xcpretty-flexible-and-fast-xcodebuild.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>9</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-8369796989133290917</guid><pubDate>Thu, 01 May 2014 20:45:00 +0000</pubDate><atom:updated>2014-05-03T10:06:59.591-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">adt</category><category domain="http://www.blogger.com/atom/ns#">android</category><category domain="http://www.blogger.com/atom/ns#">android studio</category><category domain="http://www.blogger.com/atom/ns#">intellij</category><category domain="http://www.blogger.com/atom/ns#">java</category><title>Android Studio List of Suppress Warning Values</title><description>In Android Studio there are a lot of helpful lint warnings that help you avoid unwanted mistakes. Sometimes these warnings become superfluous and I wanted to suppress them, but I was having trouble figuring out the exact name of the warning I wanted to suppress. So I did some digging and found the full list of them in the Android ADT Source Code:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://android.googlesource.com/platform/tools/adt/idea/+/jb-mr2-dev/adt-branding/src/META-INF/AndroidIdePlugin.xml" target="_blank"&gt;https://android.googlesource.com/platform/tools/adt/idea/+/jb-mr2-dev/adt-branding/src/META-INF/AndroidIdePlugin.xml&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://android.googlesource.com/platform/tools/adt/idea/+/jb-mr2-dev/android/src/META-INF/plugin.xml"&gt;https://android.googlesource.com/platform/tools/adt/idea/+/jb-mr2-dev/android/src/META-INF/plugin.xml&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;script src="https://gist.github.com/Kurry/adaf31b65a93ddd41511.js"&gt;&lt;/script&gt;
&lt;script src="https://gist.github.com/Kurry/3c7e3993df9cdeab0535.js"&gt;&lt;/script&gt;</description><link>http://kurrytran.blogspot.com/2014/05/android-studio-list-of-suppress-warning.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>6</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-7863404509416112725</guid><pubDate>Tue, 16 Jul 2013 19:22:00 +0000</pubDate><atom:updated>2013-07-16T13:49:36.999-07:00</atom:updated><title>HTTP Live Streaming Tutorial With HTML5 and Ruby Sinatra</title><description>HTTP Live Streaming is a way to send audio and video over HTTP from a web server to client software on the desktop or to iOS-based devices. HTTP Live Streaming sends audio and video as a series of small files, typically of about 10 seconds duration, called media segment files. An index file, or playlist, gives the clients the URLs of the media segment files. The playlist can be periodically refreshed to accommodate live broadcasts, where media segment files are constantly being produced.&lt;br /&gt;
&lt;br /&gt;
Full Source Code:&amp;nbsp;&lt;a href="http://bit.ly/12EdHal" target="_blank"&gt;http://bit.ly/12EdHal&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
1. Download Apple HTTP Live Streaming Command Line Tools:&amp;nbsp;&lt;a href="https://developer.apple.com/streaming/" target="_blank"&gt;https://developer.apple.com/streaming/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
2. With the MP4 video (mine is Iron-Man-3.mp4) in the same directory:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;
$ mediafilesegmenter Iron-Man-3.mp4 
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
dyn-209-2-221-215:tutorial ktran$ mediafilesegmenter Iron-Man-3.mp4 
Jul 16 2013 14:25:35.304: Using floating point is not backward compatible to iOS 4.1 or earlier devices
Jul 16 2013 14:25:35.304: Processing file /Users/ktran/Desktop/tutorial/Iron-Man-3.mp4
Jul 16 2013 14:25:35.338: Finalized fileSequence0.ts
Jul 16 2013 14:25:35.343: segment bitrate  1.98 Mbits/sec is new max
Jul 16 2013 14:25:35.370: Finalized fileSequence1.ts
Jul 16 2013 14:25:35.377: segment bitrate  4.38 Mbits/sec is new max
Jul 16 2013 14:25:35.401: Finalized fileSequence2.ts
Jul 16 2013 14:25:35.401: segment bitrate  5.24 Mbits/sec is new max
Jul 16 2013 14:25:35.420: Finalized fileSequence3.ts
Jul 16 2013 14:25:35.440: Finalized fileSequence4.ts
Jul 16 2013 14:25:35.470: Finalized fileSequence5.ts
Jul 16 2013 14:25:35.471: segment bitrate  6.56 Mbits/sec is new max
Jul 16 2013 14:25:35.490: Finalized fileSequence6.ts
Jul 16 2013 14:25:35.514: Finalized fileSequence7.ts
Jul 16 2013 14:25:35.549: Finalized fileSequence8.ts
Jul 16 2013 14:25:35.550: segment bitrate  8.19 Mbits/sec is new max
Jul 16 2013 14:25:35.586: Finalized fileSequence9.ts
Jul 16 2013 14:25:35.613: Finalized fileSequence10.ts
Jul 16 2013 14:25:35.653: Finalized fileSequence11.ts
Jul 16 2013 14:25:35.703: Finalized fileSequence12.ts
Jul 16 2013 14:25:35.739: Finalized fileSequence13.ts
Jul 16 2013 14:25:35.765: Finalized fileSequence14.ts
Jul 16 2013 14:25:35.766: Finalized fileSequence15.ts
Jul 16 2013 14:25:35.766: segment does not contain sync frame
Jul 16 2013 14:25:35.767: average bit rate is  5.28 Mbits/sec - max file bit rate is  8.19 Mbits/sec
dyn-209-2-221-215:tutorial ktran$ 
&lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
3. Install Ruby Sinatra and Thin (if not installed)
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
$ gem install sinatra
$ gem install thin
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;

dyn-209-2-214-100:tutorial ktran$ gem install sinatra
Successfully installed sinatra-1.4.3
1 gem installed
Installing ri documentation for sinatra-1.4.3...
Installing RDoc documentation for sinatra-1.4.3...
dyn-209-2-214-100:tutorial ktran$
dyn-209-2-214-100:tutorial ktran$ gem install thin
Building native extensions.  This could take a while...
Successfully installed thin-1.5.1
1 gem installed
Installing ri documentation for thin-1.5.1...
Installing RDoc documentation for thin-1.5.1...
dyn-209-2-214-100:tutorial ktran$
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
&lt;div style="font-size: medium; font-weight: normal;"&gt;
3. Create the server.rb file and index.html file in the same directory as your video segments.&amp;nbsp;&lt;/div&gt;
&lt;div style="font-size: medium; font-weight: normal;"&gt;
&lt;/div&gt;
&lt;/h3&gt;
&lt;h3&gt;
&amp;nbsp;server.rb&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
require 'sinatra'
require 'rubygems'

get '/' do
  File.read(File.join('.', 'index.html'))
end

get '/:filename' do
  File.read(File.join('.', "#{params[:filename]}"))
end
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
index.html&lt;/h3&gt;
&lt;div class="highlight"&gt;
&lt;pre&gt;&lt;span class="nt"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;HTTP Live Streaming Example&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;link href=&lt;span class="s"&gt;"http://vjs.zencdn.net/c/video-js.css"&lt;/span&gt; rel=&lt;span class="s"&gt;"stylesheet"&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;script src=&lt;span class="s"&gt;"http://vjs.zencdn.net/c/video.js"&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;span class="nt"&gt;
    &amp;lt;video class="video-js vjs-default-skin"  
       controls preload="auto" width="1280" height="720"   
       data-setup='{"example_option":true}'&amp;gt;  
   &amp;lt;source src="http://localhost:4567/prog_index.m3u8" type='application/x-mpegURL'/ &amp;gt;
     &amp;lt;/video&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;h3&gt;
&lt;div style="font-size: medium; font-weight: normal;"&gt;
3. Start the server.
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
$ ruby server.rb
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Go to a web browser and go to the address:&amp;nbsp;&lt;a href="http://localhost:4597/"&gt;http://localhost:4597&lt;/a&gt;.&lt;/div&gt;
&lt;div style="font-size: medium; font-weight: normal;"&gt;
&lt;/div&gt;
&lt;/h3&gt;
&lt;h3&gt;
&amp;nbsp;First Mistake - I Didn't Create a General Route to Send Files - But At Least I Know It's Correctly Requesting All of the Segments&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
dyn-209-2-214-100:tutorial ktran$ ruby server.rb 
== Sinatra/1.4.3 has taken the stage on 4567 for development with backup from Thin
&amp;gt;&amp;gt; Thin web server (v1.5.1 codename Straight Razor)
&amp;gt;&amp;gt; Maximum connections set to 1024
&amp;gt;&amp;gt; Listening on localhost:4567, CTRL+C to stop
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET / HTTP/1.1" 200 1204 0.0040
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /prog_index.m3u8 HTTP/1.1" 200 680 0.0009
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /prog_index.m3u8 HTTP/1.1" 200 680 0.0010
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence0.ts HTTP/1.1" 404 453 0.0011
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence1.ts HTTP/1.1" 404 453 0.0013
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence2.ts HTTP/1.1" 404 453 0.0009
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence3.ts HTTP/1.1" 404 453 0.0009
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence4.ts HTTP/1.1" 404 453 0.0009
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence5.ts HTTP/1.1" 404 453 0.0009
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence6.ts HTTP/1.1" 404 453 0.0008
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence7.ts HTTP/1.1" 404 453 0.0010
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence8.ts HTTP/1.1" 404 453 0.0009
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence9.ts HTTP/1.1" 404 453 0.0008
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence10.ts HTTP/1.1" 404 454 0.0008
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence11.ts HTTP/1.1" 404 454 0.0009
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence12.ts HTTP/1.1" 404 454 0.0011
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence13.ts HTTP/1.1" 404 454 0.0011
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence14.ts HTTP/1.1" 404 454 0.0008
127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence15.ts HTTP/1.1" 404 454 0.0009
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
Success&lt;/h3&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqgVbSPjcPSG-DJrXgO-uaDpaKMoKS8Iys9Rnw7-7Xt4AudyhksBKb8aZV_-rIDhBgAXiBjC-nXCvxVsJsf-0yf2J16jSGHQHlbnkA8ycYxuStetjZedMUVzMUe7nEdamMLcmaARnBQQ/s1600/Screen+Shot+2013-07-16+at+3.16.52+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="398" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqgVbSPjcPSG-DJrXgO-uaDpaKMoKS8Iys9Rnw7-7Xt4AudyhksBKb8aZV_-rIDhBgAXiBjC-nXCvxVsJsf-0yf2J16jSGHQHlbnkA8ycYxuStetjZedMUVzMUe7nEdamMLcmaARnBQQ/s640/Screen+Shot+2013-07-16+at+3.16.52+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;
dyn-209-2-214-100:tutorial ktran$ ruby server.rb 
== Sinatra/1.4.3 has taken the stage on 4567 for development with backup from Thin
&amp;gt;&amp;gt; Thin web server (v1.5.1 codename Straight Razor)
&amp;gt;&amp;gt; Maximum connections set to 1024
&amp;gt;&amp;gt; Listening on localhost:4567, CTRL+C to stop
127.0.0.1 - - [16/Jul/2013 15:04:18] "GET / HTTP/1.1" 200 1204 0.0039
127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /prog_index.m3u8 HTTP/1.1" 200 680 0.0011
127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /prog_index.m3u8 HTTP/1.1" 200 680 0.0008
127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence0.ts HTTP/1.1" 200 2468252 0.0208
127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence1.ts HTTP/1.1" 200 5461964 0.0228
127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence2.ts HTTP/1.1" 200 6529428 0.0398
127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence3.ts HTTP/1.1" 200 5280732 0.0163
127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence4.ts HTTP/1.1" 200 5495616 0.0246
127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence5.ts HTTP/1.1" 200 8170480 0.0412
127.0.0.1 - - [16/Jul/2013 15:04:33] "GET /fileSequence6.ts HTTP/1.1" 200 4904168 0.0152
127.0.0.1 - - [16/Jul/2013 15:04:43] "GET /fileSequence7.ts HTTP/1.1" 200 6491452 0.0148
127.0.0.1 - - [16/Jul/2013 15:04:53] "GET /fileSequence8.ts HTTP/1.1" 200 10209716 0.0429
127.0.0.1 - - [16/Jul/2013 15:05:03] "GET /fileSequence9.ts HTTP/1.1" 200 9690648 0.0372
127.0.0.1 - - [16/Jul/2013 15:05:13] "GET /fileSequence10.ts HTTP/1.1" 200 6523036 0.0215
127.0.0.1 - - [16/Jul/2013 15:05:22] "GET /fileSequence11.ts HTTP/1.1" 200 5998328 0.0246
127.0.0.1 - - [16/Jul/2013 15:05:33] "GET /fileSequence12.ts HTTP/1.1" 200 8308284 0.0357
127.0.0.1 - - [16/Jul/2013 15:05:42] "GET /fileSequence13.ts HTTP/1.1" 200 6363236 0.0265
127.0.0.1 - - [16/Jul/2013 15:05:53] "GET /fileSequence14.ts HTTP/1.1" 200 7246648 0.0295
127.0.0.1 - - [16/Jul/2013 15:06:02] "GET /fileSequence15.ts HTTP/1.1" 200 255492 0.0037
127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence0.ts HTTP/1.1" 200 2468252 0.0124
127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence1.ts HTTP/1.1" 200 5461964 0.0062
127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence2.ts HTTP/1.1" 200 6529428 0.0151
127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence3.ts HTTP/1.1" 200 5280732 0.0034
127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence4.ts HTTP/1.1" 200 5495616 0.0052
127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence5.ts HTTP/1.1" 200 8170480 0.0167
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
Note: You can't view the movie on multiple browsers at once.&lt;br /&gt;
&lt;br /&gt;
Sources:&lt;a href="http://www.christopherlavender.com/2012/07/14/http-live-streaming-part-1-setup-segment-stream/" target="_blank"&gt;&amp;nbsp;http://www.christopherlavender.com/2012/07/14/http-live-streaming-part-1-setup-segment-stream/&lt;/a&gt;</description><link>http://kurrytran.blogspot.com/2013/07/http-live-streaming-tutorial-with-html5.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqgVbSPjcPSG-DJrXgO-uaDpaKMoKS8Iys9Rnw7-7Xt4AudyhksBKb8aZV_-rIDhBgAXiBjC-nXCvxVsJsf-0yf2J16jSGHQHlbnkA8ycYxuStetjZedMUVzMUe7nEdamMLcmaARnBQQ/s72-c/Screen+Shot+2013-07-16+at+3.16.52+PM.png" width="72"/><thr:total>41</thr:total><enclosure length="-1" type="application/json" url="http://bit.ly/12EdHal"/><itunes:explicit/><itunes:subtitle>HTTP Live Streaming is a way to send audio and video over HTTP from a web server to client software on the desktop or to iOS-based devices. HTTP Live Streaming sends audio and video as a series of small files, typically of about 10 seconds duration, called media segment files. An index file, or playlist, gives the clients the URLs of the media segment files. The playlist can be periodically refreshed to accommodate live broadcasts, where media segment files are constantly being produced. Full Source Code:&amp;nbsp;http://bit.ly/12EdHal 1. Download Apple HTTP Live Streaming Command Line Tools:&amp;nbsp;https://developer.apple.com/streaming/ 2. With the MP4 video (mine is Iron-Man-3.mp4) in the same directory: $ mediafilesegmenter Iron-Man-3.mp4 dyn-209-2-221-215:tutorial ktran$ mediafilesegmenter Iron-Man-3.mp4 Jul 16 2013 14:25:35.304: Using floating point is not backward compatible to iOS 4.1 or earlier devices Jul 16 2013 14:25:35.304: Processing file /Users/ktran/Desktop/tutorial/Iron-Man-3.mp4 Jul 16 2013 14:25:35.338: Finalized fileSequence0.ts Jul 16 2013 14:25:35.343: segment bitrate 1.98 Mbits/sec is new max Jul 16 2013 14:25:35.370: Finalized fileSequence1.ts Jul 16 2013 14:25:35.377: segment bitrate 4.38 Mbits/sec is new max Jul 16 2013 14:25:35.401: Finalized fileSequence2.ts Jul 16 2013 14:25:35.401: segment bitrate 5.24 Mbits/sec is new max Jul 16 2013 14:25:35.420: Finalized fileSequence3.ts Jul 16 2013 14:25:35.440: Finalized fileSequence4.ts Jul 16 2013 14:25:35.470: Finalized fileSequence5.ts Jul 16 2013 14:25:35.471: segment bitrate 6.56 Mbits/sec is new max Jul 16 2013 14:25:35.490: Finalized fileSequence6.ts Jul 16 2013 14:25:35.514: Finalized fileSequence7.ts Jul 16 2013 14:25:35.549: Finalized fileSequence8.ts Jul 16 2013 14:25:35.550: segment bitrate 8.19 Mbits/sec is new max Jul 16 2013 14:25:35.586: Finalized fileSequence9.ts Jul 16 2013 14:25:35.613: Finalized fileSequence10.ts Jul 16 2013 14:25:35.653: Finalized fileSequence11.ts Jul 16 2013 14:25:35.703: Finalized fileSequence12.ts Jul 16 2013 14:25:35.739: Finalized fileSequence13.ts Jul 16 2013 14:25:35.765: Finalized fileSequence14.ts Jul 16 2013 14:25:35.766: Finalized fileSequence15.ts Jul 16 2013 14:25:35.766: segment does not contain sync frame Jul 16 2013 14:25:35.767: average bit rate is 5.28 Mbits/sec - max file bit rate is 8.19 Mbits/sec dyn-209-2-221-215:tutorial ktran$ 3. Install Ruby Sinatra and Thin (if not installed) $ gem install sinatra $ gem install thin dyn-209-2-214-100:tutorial ktran$ gem install sinatra Successfully installed sinatra-1.4.3 1 gem installed Installing ri documentation for sinatra-1.4.3... Installing RDoc documentation for sinatra-1.4.3... dyn-209-2-214-100:tutorial ktran$ dyn-209-2-214-100:tutorial ktran$ gem install thin Building native extensions. This could take a while... Successfully installed thin-1.5.1 1 gem installed Installing ri documentation for thin-1.5.1... Installing RDoc documentation for thin-1.5.1... dyn-209-2-214-100:tutorial ktran$ 3. Create the server.rb file and index.html file in the same directory as your video segments.&amp;nbsp; &amp;nbsp;server.rb require 'sinatra' require 'rubygems' get '/' do File.read(File.join('.', 'index.html')) end get '/:filename' do File.read(File.join('.', "#{params[:filename]}")) end index.html &amp;lt;!DOCTYPE html&amp;gt; &amp;lt;html lang="en"&amp;gt; &amp;lt;head&amp;gt; &amp;lt;meta charset="utf-8"&amp;gt; &amp;lt;title&amp;gt;HTTP Live Streaming Example&amp;lt;/title&amp;gt; &amp;lt;link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet"&amp;gt; &amp;lt;script src="http://vjs.zencdn.net/c/video.js"&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;/head&amp;gt; &amp;lt;body&amp;gt; &amp;lt;video class="video-js vjs-default-skin" controls preload="auto" width="1280" height="720" data-setup='{"example_option":true}'&amp;gt; &amp;lt;source src="http://localhost:4567/prog_index.m3u8" type='application/x-mpegURL'/ &amp;gt; &amp;lt;/video&amp;gt; &amp;lt;/body&amp;gt; &amp;lt;/html&amp;gt; 3. Start the server. $ ruby server.rb 4. Go to a web browser and go to the address:&amp;nbsp;http://localhost:4597. &amp;nbsp;First Mistake - I Didn't Create a General Route to Send Files - But At Least I Know It's Correctly Requesting All of the Segments dyn-209-2-214-100:tutorial ktran$ ruby server.rb == Sinatra/1.4.3 has taken the stage on 4567 for development with backup from Thin &amp;gt;&amp;gt; Thin web server (v1.5.1 codename Straight Razor) &amp;gt;&amp;gt; Maximum connections set to 1024 &amp;gt;&amp;gt; Listening on localhost:4567, CTRL+C to stop 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET / HTTP/1.1" 200 1204 0.0040 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /prog_index.m3u8 HTTP/1.1" 200 680 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /prog_index.m3u8 HTTP/1.1" 200 680 0.0010 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence0.ts HTTP/1.1" 404 453 0.0011 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence1.ts HTTP/1.1" 404 453 0.0013 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence2.ts HTTP/1.1" 404 453 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence3.ts HTTP/1.1" 404 453 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence4.ts HTTP/1.1" 404 453 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence5.ts HTTP/1.1" 404 453 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence6.ts HTTP/1.1" 404 453 0.0008 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence7.ts HTTP/1.1" 404 453 0.0010 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence8.ts HTTP/1.1" 404 453 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence9.ts HTTP/1.1" 404 453 0.0008 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence10.ts HTTP/1.1" 404 454 0.0008 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence11.ts HTTP/1.1" 404 454 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence12.ts HTTP/1.1" 404 454 0.0011 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence13.ts HTTP/1.1" 404 454 0.0011 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence14.ts HTTP/1.1" 404 454 0.0008 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence15.ts HTTP/1.1" 404 454 0.0009 Success dyn-209-2-214-100:tutorial ktran$ ruby server.rb == Sinatra/1.4.3 has taken the stage on 4567 for development with backup from Thin &amp;gt;&amp;gt; Thin web server (v1.5.1 codename Straight Razor) &amp;gt;&amp;gt; Maximum connections set to 1024 &amp;gt;&amp;gt; Listening on localhost:4567, CTRL+C to stop 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET / HTTP/1.1" 200 1204 0.0039 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /prog_index.m3u8 HTTP/1.1" 200 680 0.0011 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /prog_index.m3u8 HTTP/1.1" 200 680 0.0008 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence0.ts HTTP/1.1" 200 2468252 0.0208 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence1.ts HTTP/1.1" 200 5461964 0.0228 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence2.ts HTTP/1.1" 200 6529428 0.0398 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence3.ts HTTP/1.1" 200 5280732 0.0163 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence4.ts HTTP/1.1" 200 5495616 0.0246 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence5.ts HTTP/1.1" 200 8170480 0.0412 127.0.0.1 - - [16/Jul/2013 15:04:33] "GET /fileSequence6.ts HTTP/1.1" 200 4904168 0.0152 127.0.0.1 - - [16/Jul/2013 15:04:43] "GET /fileSequence7.ts HTTP/1.1" 200 6491452 0.0148 127.0.0.1 - - [16/Jul/2013 15:04:53] "GET /fileSequence8.ts HTTP/1.1" 200 10209716 0.0429 127.0.0.1 - - [16/Jul/2013 15:05:03] "GET /fileSequence9.ts HTTP/1.1" 200 9690648 0.0372 127.0.0.1 - - [16/Jul/2013 15:05:13] "GET /fileSequence10.ts HTTP/1.1" 200 6523036 0.0215 127.0.0.1 - - [16/Jul/2013 15:05:22] "GET /fileSequence11.ts HTTP/1.1" 200 5998328 0.0246 127.0.0.1 - - [16/Jul/2013 15:05:33] "GET /fileSequence12.ts HTTP/1.1" 200 8308284 0.0357 127.0.0.1 - - [16/Jul/2013 15:05:42] "GET /fileSequence13.ts HTTP/1.1" 200 6363236 0.0265 127.0.0.1 - - [16/Jul/2013 15:05:53] "GET /fileSequence14.ts HTTP/1.1" 200 7246648 0.0295 127.0.0.1 - - [16/Jul/2013 15:06:02] "GET /fileSequence15.ts HTTP/1.1" 200 255492 0.0037 127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence0.ts HTTP/1.1" 200 2468252 0.0124 127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence1.ts HTTP/1.1" 200 5461964 0.0062 127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence2.ts HTTP/1.1" 200 6529428 0.0151 127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence3.ts HTTP/1.1" 200 5280732 0.0034 127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence4.ts HTTP/1.1" 200 5495616 0.0052 127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence5.ts HTTP/1.1" 200 8170480 0.0167 Note: You can't view the movie on multiple browsers at once. Sources:&amp;nbsp;http://www.christopherlavender.com/2012/07/14/http-live-streaming-part-1-setup-segment-stream/</itunes:subtitle><itunes:author>noreply@blogger.com (Unknown)</itunes:author><itunes:summary>HTTP Live Streaming is a way to send audio and video over HTTP from a web server to client software on the desktop or to iOS-based devices. HTTP Live Streaming sends audio and video as a series of small files, typically of about 10 seconds duration, called media segment files. An index file, or playlist, gives the clients the URLs of the media segment files. The playlist can be periodically refreshed to accommodate live broadcasts, where media segment files are constantly being produced. Full Source Code:&amp;nbsp;http://bit.ly/12EdHal 1. Download Apple HTTP Live Streaming Command Line Tools:&amp;nbsp;https://developer.apple.com/streaming/ 2. With the MP4 video (mine is Iron-Man-3.mp4) in the same directory: $ mediafilesegmenter Iron-Man-3.mp4 dyn-209-2-221-215:tutorial ktran$ mediafilesegmenter Iron-Man-3.mp4 Jul 16 2013 14:25:35.304: Using floating point is not backward compatible to iOS 4.1 or earlier devices Jul 16 2013 14:25:35.304: Processing file /Users/ktran/Desktop/tutorial/Iron-Man-3.mp4 Jul 16 2013 14:25:35.338: Finalized fileSequence0.ts Jul 16 2013 14:25:35.343: segment bitrate 1.98 Mbits/sec is new max Jul 16 2013 14:25:35.370: Finalized fileSequence1.ts Jul 16 2013 14:25:35.377: segment bitrate 4.38 Mbits/sec is new max Jul 16 2013 14:25:35.401: Finalized fileSequence2.ts Jul 16 2013 14:25:35.401: segment bitrate 5.24 Mbits/sec is new max Jul 16 2013 14:25:35.420: Finalized fileSequence3.ts Jul 16 2013 14:25:35.440: Finalized fileSequence4.ts Jul 16 2013 14:25:35.470: Finalized fileSequence5.ts Jul 16 2013 14:25:35.471: segment bitrate 6.56 Mbits/sec is new max Jul 16 2013 14:25:35.490: Finalized fileSequence6.ts Jul 16 2013 14:25:35.514: Finalized fileSequence7.ts Jul 16 2013 14:25:35.549: Finalized fileSequence8.ts Jul 16 2013 14:25:35.550: segment bitrate 8.19 Mbits/sec is new max Jul 16 2013 14:25:35.586: Finalized fileSequence9.ts Jul 16 2013 14:25:35.613: Finalized fileSequence10.ts Jul 16 2013 14:25:35.653: Finalized fileSequence11.ts Jul 16 2013 14:25:35.703: Finalized fileSequence12.ts Jul 16 2013 14:25:35.739: Finalized fileSequence13.ts Jul 16 2013 14:25:35.765: Finalized fileSequence14.ts Jul 16 2013 14:25:35.766: Finalized fileSequence15.ts Jul 16 2013 14:25:35.766: segment does not contain sync frame Jul 16 2013 14:25:35.767: average bit rate is 5.28 Mbits/sec - max file bit rate is 8.19 Mbits/sec dyn-209-2-221-215:tutorial ktran$ 3. Install Ruby Sinatra and Thin (if not installed) $ gem install sinatra $ gem install thin dyn-209-2-214-100:tutorial ktran$ gem install sinatra Successfully installed sinatra-1.4.3 1 gem installed Installing ri documentation for sinatra-1.4.3... Installing RDoc documentation for sinatra-1.4.3... dyn-209-2-214-100:tutorial ktran$ dyn-209-2-214-100:tutorial ktran$ gem install thin Building native extensions. This could take a while... Successfully installed thin-1.5.1 1 gem installed Installing ri documentation for thin-1.5.1... Installing RDoc documentation for thin-1.5.1... dyn-209-2-214-100:tutorial ktran$ 3. Create the server.rb file and index.html file in the same directory as your video segments.&amp;nbsp; &amp;nbsp;server.rb require 'sinatra' require 'rubygems' get '/' do File.read(File.join('.', 'index.html')) end get '/:filename' do File.read(File.join('.', "#{params[:filename]}")) end index.html &amp;lt;!DOCTYPE html&amp;gt; &amp;lt;html lang="en"&amp;gt; &amp;lt;head&amp;gt; &amp;lt;meta charset="utf-8"&amp;gt; &amp;lt;title&amp;gt;HTTP Live Streaming Example&amp;lt;/title&amp;gt; &amp;lt;link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet"&amp;gt; &amp;lt;script src="http://vjs.zencdn.net/c/video.js"&amp;gt;&amp;lt;/script&amp;gt; &amp;lt;/head&amp;gt; &amp;lt;body&amp;gt; &amp;lt;video class="video-js vjs-default-skin" controls preload="auto" width="1280" height="720" data-setup='{"example_option":true}'&amp;gt; &amp;lt;source src="http://localhost:4567/prog_index.m3u8" type='application/x-mpegURL'/ &amp;gt; &amp;lt;/video&amp;gt; &amp;lt;/body&amp;gt; &amp;lt;/html&amp;gt; 3. Start the server. $ ruby server.rb 4. Go to a web browser and go to the address:&amp;nbsp;http://localhost:4597. &amp;nbsp;First Mistake - I Didn't Create a General Route to Send Files - But At Least I Know It's Correctly Requesting All of the Segments dyn-209-2-214-100:tutorial ktran$ ruby server.rb == Sinatra/1.4.3 has taken the stage on 4567 for development with backup from Thin &amp;gt;&amp;gt; Thin web server (v1.5.1 codename Straight Razor) &amp;gt;&amp;gt; Maximum connections set to 1024 &amp;gt;&amp;gt; Listening on localhost:4567, CTRL+C to stop 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET / HTTP/1.1" 200 1204 0.0040 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /prog_index.m3u8 HTTP/1.1" 200 680 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /prog_index.m3u8 HTTP/1.1" 200 680 0.0010 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence0.ts HTTP/1.1" 404 453 0.0011 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence1.ts HTTP/1.1" 404 453 0.0013 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence2.ts HTTP/1.1" 404 453 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence3.ts HTTP/1.1" 404 453 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence4.ts HTTP/1.1" 404 453 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence5.ts HTTP/1.1" 404 453 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence6.ts HTTP/1.1" 404 453 0.0008 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence7.ts HTTP/1.1" 404 453 0.0010 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence8.ts HTTP/1.1" 404 453 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence9.ts HTTP/1.1" 404 453 0.0008 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence10.ts HTTP/1.1" 404 454 0.0008 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence11.ts HTTP/1.1" 404 454 0.0009 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence12.ts HTTP/1.1" 404 454 0.0011 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence13.ts HTTP/1.1" 404 454 0.0011 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence14.ts HTTP/1.1" 404 454 0.0008 127.0.0.1 - - [16/Jul/2013 14:59:33] "GET /fileSequence15.ts HTTP/1.1" 404 454 0.0009 Success dyn-209-2-214-100:tutorial ktran$ ruby server.rb == Sinatra/1.4.3 has taken the stage on 4567 for development with backup from Thin &amp;gt;&amp;gt; Thin web server (v1.5.1 codename Straight Razor) &amp;gt;&amp;gt; Maximum connections set to 1024 &amp;gt;&amp;gt; Listening on localhost:4567, CTRL+C to stop 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET / HTTP/1.1" 200 1204 0.0039 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /prog_index.m3u8 HTTP/1.1" 200 680 0.0011 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /prog_index.m3u8 HTTP/1.1" 200 680 0.0008 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence0.ts HTTP/1.1" 200 2468252 0.0208 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence1.ts HTTP/1.1" 200 5461964 0.0228 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence2.ts HTTP/1.1" 200 6529428 0.0398 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence3.ts HTTP/1.1" 200 5280732 0.0163 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence4.ts HTTP/1.1" 200 5495616 0.0246 127.0.0.1 - - [16/Jul/2013 15:04:18] "GET /fileSequence5.ts HTTP/1.1" 200 8170480 0.0412 127.0.0.1 - - [16/Jul/2013 15:04:33] "GET /fileSequence6.ts HTTP/1.1" 200 4904168 0.0152 127.0.0.1 - - [16/Jul/2013 15:04:43] "GET /fileSequence7.ts HTTP/1.1" 200 6491452 0.0148 127.0.0.1 - - [16/Jul/2013 15:04:53] "GET /fileSequence8.ts HTTP/1.1" 200 10209716 0.0429 127.0.0.1 - - [16/Jul/2013 15:05:03] "GET /fileSequence9.ts HTTP/1.1" 200 9690648 0.0372 127.0.0.1 - - [16/Jul/2013 15:05:13] "GET /fileSequence10.ts HTTP/1.1" 200 6523036 0.0215 127.0.0.1 - - [16/Jul/2013 15:05:22] "GET /fileSequence11.ts HTTP/1.1" 200 5998328 0.0246 127.0.0.1 - - [16/Jul/2013 15:05:33] "GET /fileSequence12.ts HTTP/1.1" 200 8308284 0.0357 127.0.0.1 - - [16/Jul/2013 15:05:42] "GET /fileSequence13.ts HTTP/1.1" 200 6363236 0.0265 127.0.0.1 - - [16/Jul/2013 15:05:53] "GET /fileSequence14.ts HTTP/1.1" 200 7246648 0.0295 127.0.0.1 - - [16/Jul/2013 15:06:02] "GET /fileSequence15.ts HTTP/1.1" 200 255492 0.0037 127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence0.ts HTTP/1.1" 200 2468252 0.0124 127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence1.ts HTTP/1.1" 200 5461964 0.0062 127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence2.ts HTTP/1.1" 200 6529428 0.0151 127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence3.ts HTTP/1.1" 200 5280732 0.0034 127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence4.ts HTTP/1.1" 200 5495616 0.0052 127.0.0.1 - - [16/Jul/2013 15:06:54] "GET /fileSequence5.ts HTTP/1.1" 200 8170480 0.0167 Note: You can't view the movie on multiple browsers at once. Sources:&amp;nbsp;http://www.christopherlavender.com/2012/07/14/http-live-streaming-part-1-setup-segment-stream/</itunes:summary></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-5158175929689958453</guid><pubDate>Mon, 08 Jul 2013 17:33:00 +0000</pubDate><atom:updated>2013-07-28T10:48:51.012-07:00</atom:updated><title>Recursive Interview Questions Tutorial (WIP)</title><description>&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
The most important thing to learn is how to think recursively. This allows you to solve a large class of problems relatively simply. It's important to know for job interviews. I had interviewed at Google six months ago and because I botched an interview question that could have been solved recursively, the interviewer told the recruiter I "lacked fundamental understanding of computer science".&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
To solve a problem recursively:&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
1) &amp;nbsp;Think about how to solve the problem for simple cases (base case).&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
2) &amp;nbsp;Determine how to break down larger cases into smaller instances (recursive decomposition).&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Remember that every recursive algorithm has two components: the base case and the recursive decomposition.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Problem #1 Reverse A String&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Base Case: &amp;nbsp;When the string is the empty string is it the same backwards as it is forwards&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Recursive Decomposition: For strings, to shrink the string to make forward progress is the same as solving the problem for substrings of the string, and then combining the sub-solutions.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;
/* Returns the reverse of the indicated string. */
string reverseString(string line) {
 if (line == "")
  return "";
 else
  return reverseString(line.substr(1)) + line[0];
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Problem #2 Count Spaces in A String&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Base Case: &amp;nbsp;When the string is empty is cannot have a space so the count of spaces is 0.&lt;/div&gt;
&lt;div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Recursive Decomposition: Check character by character by working with substrings of the string, and then sum the counts of the strings.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
/* Returns the count of white spaces in a string*/
int countSpaces(string line){
  if (line.length() == 0)
    return 0;
  else
    return ((isspace(line[0]) ? 1 : 0) + countSpaces(line.substr(1)));
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Problem #3 Find Last&amp;nbsp;Occurrence&amp;nbsp;of Character in String&lt;/div&gt;
&lt;div class="separator" style="clear: both;"&gt;
Base Case: Well if you are at the end of the string and no characters follow, it must be the last occurrence if there is a match.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
Recursive Decomposition: Start at the end of the string and after each call remove the last character.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre&gt;&lt;code&gt;
/* Return the index of the last occurence of a character in the string */
int find_last_occurence(string line, char character){
  if (line[line.length()-1] == character)
    return (int)line.length();
  else if(line.length() == 0)
    return -1;
  else
    return find_last_occurence(line.substr(0,line.length()-1), character);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Spark Notes Article That I Thought Was Useful:&amp;nbsp;&lt;a href="http://www.sparknotes.com/cs/recursion/whatisrecursion/section2.rhtml" target="_blank"&gt;http://www.sparknotes.com/cs/recursion/whatisrecursion/section2.rhtml&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Problem #4 Traversing a Binary Tree. Inorder, preorder, postorder.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Problem #5 Print all subsets of a set.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Problem #6 Print all alphanumeric combinations of a phone number.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
These are the slides that I found on the &lt;a href="http://see.stanford.edu/see/courseinfo.aspx?coll=11f4f422-5670-4b4c-889c-008262e09e4e" target="_blank"&gt;Stanford Engineering Everywhere&lt;/a&gt; site that I found useful to learn more about recursion.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuxf7grFX66ZxixECMsBNuvGWohR8MytjUcESnIC3UZ6rG-KDt-bcXzOp32GB7C1QHPdJEkRSaa9Dzw9Ke3jAFAGH9nR4YGJXCM9F0xB8nexirT-w8Fan7ZVEFDTOfVqrj2y2sGkRDyg/s1600/Slides01-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="479" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuxf7grFX66ZxixECMsBNuvGWohR8MytjUcESnIC3UZ6rG-KDt-bcXzOp32GB7C1QHPdJEkRSaa9Dzw9Ke3jAFAGH9nR4YGJXCM9F0xB8nexirT-w8Fan7ZVEFDTOfVqrj2y2sGkRDyg/s640/Slides01-2.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV1Qeob0qsp_cWhjssxQM1Mce4-c6yJ4NEi8VNqJZfdhMEaNiY3kr-Ep1n_4OGtcYiAch6OUNuwTY-DYYWXgXxGC79kO_mLeYAt2KGDkNpEakvgvIGCCflNGsznYtOPluwXLKiTzoshw/s1600/Slides01-3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV1Qeob0qsp_cWhjssxQM1Mce4-c6yJ4NEi8VNqJZfdhMEaNiY3kr-Ep1n_4OGtcYiAch6OUNuwTY-DYYWXgXxGC79kO_mLeYAt2KGDkNpEakvgvIGCCflNGsznYtOPluwXLKiTzoshw/s640/Slides01-3.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCJo2RJZ2Oi-Cq5RvYWL-ybOVeH4V07rHf3-JmmSx1CYdPyLGeFtJNXd60E4iXd-cz9mD5mUjk7M_Gb8Ye_UBrD0CbTEy-duzjC3mMhVepuR8YIMjHd5XUOJ6i286wCl0T2N81coVdJQ/s1600/Slides01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCJo2RJZ2Oi-Cq5RvYWL-ybOVeH4V07rHf3-JmmSx1CYdPyLGeFtJNXd60E4iXd-cz9mD5mUjk7M_Gb8Ye_UBrD0CbTEy-duzjC3mMhVepuR8YIMjHd5XUOJ6i286wCl0T2N81coVdJQ/s640/Slides01.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAgSCb_WyZ1CzD0m9_ua42vCdxMR4NhOGkrHJJ7RePCR4-9-mOKeukINTz4soLPYufV0_y47t7DDPDyUEeuIZomjKSIu5BWdasffdwN6tmtShvch4Bu3MefUHj4zHiepBM9hY9C4k9-g/s1600/Slides02-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAgSCb_WyZ1CzD0m9_ua42vCdxMR4NhOGkrHJJ7RePCR4-9-mOKeukINTz4soLPYufV0_y47t7DDPDyUEeuIZomjKSIu5BWdasffdwN6tmtShvch4Bu3MefUHj4zHiepBM9hY9C4k9-g/s640/Slides02-2.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKNNCkOutj8pulUOPDFOkC3pXFwtHkhyphenhyphenwcn-sXVY07Pgbn_Y-hkbMP4iA9krYm-EaHkpNvXDowaA_thvA0drKzjWZzUqM3nq96Zjhfcna1k2nS7YVgHSF8PBb01eXe2qiZLppL4ys71w/s1600/Slides02-3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="478" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKNNCkOutj8pulUOPDFOkC3pXFwtHkhyphenhyphenwcn-sXVY07Pgbn_Y-hkbMP4iA9krYm-EaHkpNvXDowaA_thvA0drKzjWZzUqM3nq96Zjhfcna1k2nS7YVgHSF8PBb01eXe2qiZLppL4ys71w/s640/Slides02-3.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwSVEmAU09guvJMUnTUp6lRZQlpaSQCdcopA9CsG6-HeAEZ5SPCN5lMFYJcFHozeZlubSLuoFK18LV64GqtgSNK7-aqiIzaqEFcwTjvgcoZ1zjT3Z-P_w8zDHvUlSAR69qinCD9K6D0A/s1600/Lecture08.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwSVEmAU09guvJMUnTUp6lRZQlpaSQCdcopA9CsG6-HeAEZ5SPCN5lMFYJcFHozeZlubSLuoFK18LV64GqtgSNK7-aqiIzaqEFcwTjvgcoZ1zjT3Z-P_w8zDHvUlSAR69qinCD9K6D0A/s640/Lecture08.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAqCfwBwkFn3N9Uww7-A8NpVBpXouG9xgVUYTWu759OK0iAXJGEnNlx_GMan9G0WSE-Dcg_ixaEyI1bvCUpnQJAm8tabekcpSzpzqNmpCOoqM4qdVQwEmPN2QVBBsm2RDA3r5EusJBuA/s1600/Lecture08-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAqCfwBwkFn3N9Uww7-A8NpVBpXouG9xgVUYTWu759OK0iAXJGEnNlx_GMan9G0WSE-Dcg_ixaEyI1bvCUpnQJAm8tabekcpSzpzqNmpCOoqM4qdVQwEmPN2QVBBsm2RDA3r5EusJBuA/s640/Lecture08-2.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRHzQE_GOcvnDBQ2EPhoASV9w9iQIDLOhD0j0WeB13AGO6N4EojcxBCDHVhm267tMR8uOm3kz-8zvIUC18B6iVTSLdTYrXmY0uxzqd5tdPfp3M-FTKRH5aCGXUrI0QKpSe0f7BbYf_sQ/s1600/Lecture08-3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRHzQE_GOcvnDBQ2EPhoASV9w9iQIDLOhD0j0WeB13AGO6N4EojcxBCDHVhm267tMR8uOm3kz-8zvIUC18B6iVTSLdTYrXmY0uxzqd5tdPfp3M-FTKRH5aCGXUrI0QKpSe0f7BbYf_sQ/s640/Lecture08-3.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-NFAbecKCvlIEr9UOo-AVzyfTszwTVAFGCC46pyFzBCvAR-lpEGVe1554F_yD2_gmewKMZpFr0Gsfn_IoL_GsxIpeI4KfFePufOZQg__n2Uuu0PRm8oYRK-EwQHRcLXp7eQFSoVU9gQ/s1600/Lecture09-1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-NFAbecKCvlIEr9UOo-AVzyfTszwTVAFGCC46pyFzBCvAR-lpEGVe1554F_yD2_gmewKMZpFr0Gsfn_IoL_GsxIpeI4KfFePufOZQg__n2Uuu0PRm8oYRK-EwQHRcLXp7eQFSoVU9gQ/s640/Lecture09-1.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDhbAPBEFyQZH3PyBOq3xJJLTkLmK01SAYaddRQSgrPSXOSwVynr0zX4y31QKL0bUv3Gw5ySZaAfNcRXoAS-4Zeb4V2jiWbGk4HbfThQwtoAMJEXHDBEueq2YbRakIsip7-KHLloPLug/s1600/Lecture09-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDhbAPBEFyQZH3PyBOq3xJJLTkLmK01SAYaddRQSgrPSXOSwVynr0zX4y31QKL0bUv3Gw5ySZaAfNcRXoAS-4Zeb4V2jiWbGk4HbfThQwtoAMJEXHDBEueq2YbRakIsip7-KHLloPLug/s640/Lecture09-2.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvKz0lUbCzCEqr0dmqzoU2LSgscJLshj48cQGB0ENdB66lfL1FCRpU0Y14kdAhsIAKHX3p3pZdYE0UXmNUrHfc4UV-szlNPlYhB0C3katX1KJm9cJGxvwK-RfFzkPi656l7O_HEZGOhg/s1600/Lecture09-3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvKz0lUbCzCEqr0dmqzoU2LSgscJLshj48cQGB0ENdB66lfL1FCRpU0Y14kdAhsIAKHX3p3pZdYE0UXmNUrHfc4UV-szlNPlYhB0C3katX1KJm9cJGxvwK-RfFzkPi656l7O_HEZGOhg/s640/Lecture09-3.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVgwD5ZOgFCTj5WYetGaHDSqym9DgMnWePXufRlYGPWyklbro0iWrmct1h4w5e0jVqdOSXcgUShhrcjnYLm9ihnUM0eS9yC6uRtwBjhGBMvMnxS6JTIlBtiuvGOagAVasvEdPl_AUXtQ/s1600/Lecture09-4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVgwD5ZOgFCTj5WYetGaHDSqym9DgMnWePXufRlYGPWyklbro0iWrmct1h4w5e0jVqdOSXcgUShhrcjnYLm9ihnUM0eS9yC6uRtwBjhGBMvMnxS6JTIlBtiuvGOagAVasvEdPl_AUXtQ/s640/Lecture09-4.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYRmgRRfHyqxkIZW9m9-O9ExJDLTJYMA95FeWJYygiMSw8WVc9rbPZutx1gqNDTiWhCohBVI0CP7eUkDtSHA_2sycTksQlzuRbT-2WKHdrZWL400dX6oplotGA5aSvNVhiFOAEW-u__w/s1600/Lecture10-1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYRmgRRfHyqxkIZW9m9-O9ExJDLTJYMA95FeWJYygiMSw8WVc9rbPZutx1gqNDTiWhCohBVI0CP7eUkDtSHA_2sycTksQlzuRbT-2WKHdrZWL400dX6oplotGA5aSvNVhiFOAEW-u__w/s640/Lecture10-1.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQvFbDWNAXr8pup-YneXavdw7MB1tMdSo5QTgREMK25V7n5eUAcjQtFBNsRFpZ2TGPMIlYAet6W1LlmOp8dEGCZFpQaJQa_2y7aNBo9IU2V1LzSpMmKFgRGp_I8-_poiP7gquBB4XAGw/s1600/Lecture10-2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQvFbDWNAXr8pup-YneXavdw7MB1tMdSo5QTgREMK25V7n5eUAcjQtFBNsRFpZ2TGPMIlYAet6W1LlmOp8dEGCZFpQaJQa_2y7aNBo9IU2V1LzSpMmKFgRGp_I8-_poiP7gquBB4XAGw/s640/Lecture10-2.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-OhMru81Ppa20O13dtSYqpTaYTA8mmFH-2ffGntRq9CqTMx87FH-WeDGRp1r-C3hxyjScUDE_OxAVwpLoA-ItFs5hVCx79IWl5UZyBjvOAMF9NrOBhm4LnKP_xvytkdiVk4Otd6tvnw/s1600/Lecture10-3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-OhMru81Ppa20O13dtSYqpTaYTA8mmFH-2ffGntRq9CqTMx87FH-WeDGRp1r-C3hxyjScUDE_OxAVwpLoA-ItFs5hVCx79IWl5UZyBjvOAMF9NrOBhm4LnKP_xvytkdiVk4Otd6tvnw/s640/Lecture10-3.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</description><link>http://kurrytran.blogspot.com/2013/07/recursive-interview-questions-tutorial.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuxf7grFX66ZxixECMsBNuvGWohR8MytjUcESnIC3UZ6rG-KDt-bcXzOp32GB7C1QHPdJEkRSaa9Dzw9Ke3jAFAGH9nR4YGJXCM9F0xB8nexirT-w8Fan7ZVEFDTOfVqrj2y2sGkRDyg/s72-c/Slides01-2.jpg" width="72"/><thr:total>57</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-5547466385789994462</guid><pubDate>Sat, 06 Jul 2013 16:46:00 +0000</pubDate><atom:updated>2014-12-14T08:20:55.852-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">c++</category><category domain="http://www.blogger.com/atom/ns#">ping</category><category domain="http://www.blogger.com/atom/ns#">server</category><category domain="http://www.blogger.com/atom/ns#">simple server</category><title>A Simple Server in C++</title><description>&lt;h3&gt;
Makefile&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
default:
 g++ server.cpp
 ./a.out
clean:
 rm -f a.out
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
server.cpp&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
//
//  server.cpp
//  SimpleServer
//
//  Created by Kurry Tran on 7/3/13.
//  Copyright (c) 2013 Kurry Tran. All rights reserved.
//

#include &amp;lt;iostream&amp;gt;
#include &amp;lt;fcntl.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;errno.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;netinet/in.h&amp;gt;
#include &amp;lt;resolv.h&amp;gt;
#include &amp;lt;sys/socket.h&amp;gt;
#include &amp;lt;arpa/inet.h&amp;gt;
#include &amp;lt;unistd.h&amp;gt;
#include &amp;lt;pthread.h&amp;gt;
#include &amp;lt;netdb.h&amp;gt;

void* SocketHandler(void*);

int main(int argc, const char * argv[])
{
    int host_port= 1101;
 struct sockaddr_in my_addr;
 int hsock;
 int *p_int;
    
 socklen_t addr_size = 0;
 int* csock;
 sockaddr_in sadr;
 pthread_t thread_id=0;
    
 hsock = socket(AF_INET, SOCK_STREAM, 0);
 if(hsock == -1){
        std::cout &amp;lt;&amp;lt;"Error initializing socket " &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; std::endl;
  goto FINISH;
 }
 p_int = (int*)malloc(sizeof(int));
 *p_int = 1;
    
 if( (setsockopt(hsock, SOL_SOCKET, SO_REUSEADDR, (char*)p_int, sizeof(int)) == -1 )||
       (setsockopt(hsock, SOL_SOCKET, SO_KEEPALIVE, (char*)p_int, sizeof(int)) == -1 ) ){
        std::cout &amp;lt;&amp;lt;"Error setting options " &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; std::endl;
  free(p_int);
  goto FINISH;
 }
 free(p_int);
    
 my_addr.sin_family = AF_INET ;
 my_addr.sin_port = htons(host_port);
 
 memset(&amp;amp;(my_addr.sin_zero), 0, 8);
 my_addr.sin_addr.s_addr = INADDR_ANY ;
 
 if( bind( hsock, (sockaddr*)&amp;amp;my_addr, sizeof(my_addr)) == -1 ){
        std::cerr &amp;lt;&amp;lt; "Error binding to socket, make sure nothing else is listening on this port " &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; std::endl;
  goto FINISH;
 }
    
 if(listen( hsock, 10) == -1 ){
        std::cerr &amp;lt;&amp;lt; "Error listening " &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; std::endl;
  goto FINISH;
 }
    
 addr_size = sizeof(sockaddr_in);
 
 while(true){
        std::cout &amp;lt;&amp;lt;"waiting for a connection on localhost:"&amp;lt;&amp;lt;host_port&amp;lt;&amp;lt; std::endl;
  csock = (int*)malloc(sizeof(int));
  if((*csock = accept( hsock, (sockaddr*)&amp;amp;sadr, &amp;amp;addr_size))!= -1){
            std::cout &amp;lt;&amp;lt;"---------------------\nReceived connection from "&amp;lt;&amp;lt; inet_ntoa(sadr.sin_addr) &amp;lt;&amp;lt; std::endl;
   pthread_create(&amp;amp;thread_id,0,&amp;amp;SocketHandler, (void*)csock );
   pthread_detach(thread_id);
  }
  else{
            std::cerr &amp;lt;&amp;lt; "Error accepting " &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; std::endl;
  }
 }
    
FINISH:
    ;
}

void *SocketHandler(void *lp){
    int *csock = (int *)lp;
    
 char buffer[1024];
 int buffer_len = 1024;
 ssize_t bytecount;
    
 memset(buffer, 0, buffer_len);
 if((bytecount = recv(*csock, buffer, buffer_len, 0))== -1){
        std::cerr &amp;lt;&amp;lt; "Error receiving data " &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; std::endl;
  goto FINISH;
 }
    std::cout &amp;lt;&amp;lt; "Received bytes " &amp;lt;&amp;lt; bytecount &amp;lt;&amp;lt; std::endl &amp;lt;&amp;lt; "Received string "&amp;lt;&amp;lt; buffer &amp;lt;&amp;lt; std::endl;

 if((bytecount = send(*csock, buffer, strlen(buffer), 0))== -1){
        std::cerr &amp;lt;&amp;lt; "Error sending data " &amp;lt;&amp;lt; errno &amp;lt;&amp;lt; std::endl;
  goto FINISH;
 } 
    std::cout &amp;lt;&amp;lt; "Sent bytes " &amp;lt;&amp;lt; bytecount &amp;lt;&amp;lt; std::endl;
    
FINISH:
    close(*csock);
 free(csock);
    return 0;
}


&lt;/code&gt;&lt;/pre&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3-rJtVbvkAF8qwnUg4XEfhwlih3K5irQ8rE6WGXyQpSGq41PCDDaNSshtPbYtKeV-XJER5WiC4uyPsOeKAkFHCr7qZJKABGcZN8A8xD6ECsBqcSejh34tsv8ncYFK7JmQLNbJozCZ7A/s1600/Screen+Shot+2013-07-06+at+12.40.57+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3-rJtVbvkAF8qwnUg4XEfhwlih3K5irQ8rE6WGXyQpSGq41PCDDaNSshtPbYtKeV-XJER5WiC4uyPsOeKAkFHCr7qZJKABGcZN8A8xD6ECsBqcSejh34tsv8ncYFK7JmQLNbJozCZ7A/s1600/Screen+Shot+2013-07-06+at+12.40.57+PM.png" height="265" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
</description><link>http://kurrytran.blogspot.com/2013/07/a-simple-server-in-c.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3-rJtVbvkAF8qwnUg4XEfhwlih3K5irQ8rE6WGXyQpSGq41PCDDaNSshtPbYtKeV-XJER5WiC4uyPsOeKAkFHCr7qZJKABGcZN8A8xD6ECsBqcSejh34tsv8ncYFK7JmQLNbJozCZ7A/s72-c/Screen+Shot+2013-07-06+at+12.40.57+PM.png" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-5757817049511411076</guid><pubDate>Thu, 27 Jun 2013 04:19:00 +0000</pubDate><atom:updated>2013-06-27T16:06:36.737-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">customization</category><category domain="http://www.blogger.com/atom/ns#">iOS</category><category domain="http://www.blogger.com/atom/ns#">objective-c</category><category domain="http://www.blogger.com/atom/ns#">UIKit</category><category domain="http://www.blogger.com/atom/ns#">uitableview</category><category domain="http://www.blogger.com/atom/ns#">UITableViewCell</category><title>How To Make Fast Scrolling UITableViews With Custom Section Headers and Custom UITableViewCells </title><description>&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfWlupbzrgFHy7qg2Dc0jrJ4Wn71cMxE7_AIbmWrPNKIBuLlHLeTf_3oz_XwZRC4e_FjrO9C2T1WOoP2bOKNxXa5HrdpH5gz1rXrsHmOIjwjW5KY6M-tF9XRJN_gUH7SlBGp01KSrS-w/s1136/iOS+Simulator+Screen+shot+Jun+27%252C+2013+11.24.03+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfWlupbzrgFHy7qg2Dc0jrJ4Wn71cMxE7_AIbmWrPNKIBuLlHLeTf_3oz_XwZRC4e_FjrO9C2T1WOoP2bOKNxXa5HrdpH5gz1rXrsHmOIjwjW5KY6M-tF9XRJN_gUH7SlBGp01KSrS-w/s640/iOS+Simulator+Screen+shot+Jun+27%252C+2013+11.24.03+AM.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Create a new master detail application in XCode.&lt;br /&gt;
&lt;br /&gt;
2. To set a custom flat navigation bar color create a two new objective-c categories with the code below and configure the navigation bar by importing the UINavigationBar+FlatUI.h file into your master view controller and calling configureFlatNavigationBarWithColor: on your navigation bar in the viewDidLoad method. You should end up with something like below.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyW6ejPgd36y_Ue9tLuyo4nNJP-K2zIVEH1SqvY0S2b4NzLjkUX5S6adIk3xmX1AIvemPcbs5EHdl_4Tdnhmp5E1nCavgVqovB9-KcS9QRggLXTfk2jNdq7LSw6dmKWM3IIT0UzFJocw/s1600/iOS+Simulator+Screen+shot+Jun+26,+2013+11.02.03+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyW6ejPgd36y_Ue9tLuyo4nNJP-K2zIVEH1SqvY0S2b4NzLjkUX5S6adIk3xmX1AIvemPcbs5EHdl_4Tdnhmp5E1nCavgVqovB9-KcS9QRggLXTfk2jNdq7LSw6dmKWM3IIT0UzFJocw/s640/iOS+Simulator+Screen+shot+Jun+26,+2013+11.02.03+PM.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
// At the Top of the file
#import "UINavigationBar+FlatUI.h" 

- (void)viewDidLoad
{
    [super viewDidLoad];
 // Do any additional setup after loading the view, typically from a nib.
  self.navigationItem.leftBarButtonItem = self.editButtonItem;
  [self.navigationController.navigationBar configureFlatNavigationBarWithColor:[UIColor colorWithRed:44.0f/255.0f green:71.0f/255.0f blue:98.0f/255.0f alpha:1.0f]];
  UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];
  self.navigationItem.rightBarButtonItem = addButton;
}
&lt;/code&gt;
&lt;/pre&gt;
&lt;h3&gt;
UINavigationBar+FlatUI.h&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
//
//  UINavigationBar+FlatUI.h
//  FlatUI
//
//  Created by Jack Flintermann on 5/3/13.
//  Copyright (c) 2013 Jack Flintermann. All rights reserved.
//

#import &amp;lt;UIKit/UIKit.h&amp;gt;

@interface UINavigationBar (FlatUI)

- (void) configureFlatNavigationBarWithColor:(UIColor *)color; UI_APPEARANCE_SELECTOR

@end
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
UINavigationBar+FlatUI.m&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
//
//  UINavigationBar+FlatUI.m
//  FlatUI
//
//  Created by Jack Flintermann on 5/3/13.
//  Copyright (c) 2013 Jack Flintermann. All rights reserved.
//

#import "UINavigationBar+FlatUI.h"
#import "UIImage+FlatUI.h"

@implementation UINavigationBar (FlatUI)

- (void) configureFlatNavigationBarWithColor:(UIColor *)color {
    [self setBackgroundImage:[UIImage imageWithColor:color cornerRadius:0]
               forBarMetrics:UIBarMetricsDefault &amp;amp; UIBarMetricsLandscapePhone];
    NSMutableDictionary *titleTextAttributes = [[self titleTextAttributes] mutableCopy];
    if (!titleTextAttributes) {
        titleTextAttributes = [NSMutableDictionary dictionary];
    }
    [titleTextAttributes setValue:[UIColor clearColor] forKey:UITextAttributeTextShadowColor];
    [titleTextAttributes setValue:[NSValue valueWithUIOffset:UIOffsetMake(0, 0)] forKey:UITextAttributeTextShadowOffset];
    [self setTitleTextAttributes:titleTextAttributes];
    if([self respondsToSelector:@selector(setShadowImage:)])
    {
        [self setShadowImage:[UIImage imageWithColor:[UIColor clearColor] cornerRadius:0]];
    }
}

@end
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
UIImage+Color.h&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
//
//  UIImage+Color.h
//  FlatUI
//
//  Created by Jack Flintermann on 5/3/13.
//  Copyright (c) 2013 Jack Flintermann. All rights reserved.
//

#import &amp;lt;UIKit/UIKit.h&amp;gt;

@interface UIImage (FlatUI)

+ (UIImage *)imageWithColor:(UIColor *)color
               cornerRadius:(CGFloat)cornerRadius;

+ (UIImage *) backButtonImageWithColor:(UIColor *)color
                            barMetrics:(UIBarMetrics) metrics
                          cornerRadius:(CGFloat)cornerRadius;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
UIImage+Color.m&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
+ (UIImage *)imageWithColor:(UIColor *)color
               cornerRadius:(CGFloat)cornerRadius {
    CGFloat minEdgeSize = edgeSizeFromCornerRadius(cornerRadius);
    CGRect rect = CGRectMake(0, 0, minEdgeSize, minEdgeSize);
    UIBezierPath *roundedRect = [UIBezierPath bezierPathWithRoundedRect:rect cornerRadius:cornerRadius];
    roundedRect.lineWidth = 0;
    UIGraphicsBeginImageContextWithOptions(rect.size, NO, 0.0f);
    [color setFill];
    [roundedRect fill];
    [roundedRect stroke];
    [roundedRect addClip];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return [image resizableImageWithCapInsets:UIEdgeInsetsMake(cornerRadius, cornerRadius, cornerRadius, cornerRadius)];
}

+ (UIImage *) backButtonImageWithColor:(UIColor *)color
                            barMetrics:(UIBarMetrics) metrics
                          cornerRadius:(CGFloat)cornerRadius {

    CGSize size;
    if (metrics == UIBarMetricsDefault) {
        size = CGSizeMake(50, 30);
    }
    else {
        size = CGSizeMake(60, 23);
    }
    UIBezierPath *path = [self bezierPathForBackButtonInRect:CGRectMake(0, 0, size.width, size.height) cornerRadius:cornerRadius];
    UIGraphicsBeginImageContextWithOptions(size, NO, 0.0f);
    [color setFill];
    [path addClip];
    [path fill];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return [image resizableImageWithCapInsets:UIEdgeInsetsMake(cornerRadius, 15, cornerRadius, cornerRadius)];
    
}
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
3. Now to make the navigation items look flat we can create another objective-c category to change the appearance. Import UIBarButtonItem+FlatUI.h in your master view controller  Then add the code below to the viewDidLoad method. You should see something like this: &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFq0CcvuOvavpt4cxOeldWecP2uPC5kCa34hUDrHtraTn49NiEWaly_a4OHKllrRaV0QGQohK_FqGkrpaYH4laMVHs5OO4lc8_UHXQF-5rRv-ehLuqATkfb6_mJAtfyuNxo6nQEXI4Hg/s1600/iOS+Simulator+Screen+shot+Jun+26,+2013+11.32.10+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFq0CcvuOvavpt4cxOeldWecP2uPC5kCa34hUDrHtraTn49NiEWaly_a4OHKllrRaV0QGQohK_FqGkrpaYH4laMVHs5OO4lc8_UHXQF-5rRv-ehLuqATkfb6_mJAtfyuNxo6nQEXI4Hg/s640/iOS+Simulator+Screen+shot+Jun+26,+2013+11.32.10+PM.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
- (void)viewDidLoad
{
    [super viewDidLoad];
 // Do any additional setup after loading the view, typically from a nib.
  self.navigationItem.leftBarButtonItem = self.editButtonItem;
  [self.navigationController.navigationBar configureFlatNavigationBarWithColor:[UIColor colorWithRed:44.0f/255.0f green:71.0f/255.0f blue:98.0f/255.0f alpha:1.0f]];
  UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];
  self.navigationItem.rightBarButtonItem = addButton;
  [UIBarButtonItem configureFlatButtonsWithColor:[UIColor colorWithRed:52.0f/255.0f green:152.0f/255.0f blue:219.0f/255.0f alpha:1.0f]
                                highlightedColor:[UIColor colorWithRed:41.0f/255 green:128.0f/255 blue:185.0f/255 alpha:1.0f]
                                    cornerRadius:3];
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
UIBarButtonItem+FlatUI.h&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
//
//  UIBarButtonItem+FlatUI.h
//  FlatUI
//
//  Created by Jack Flintermann on 5/8/13.
//  Copyright (c) 2013 Jack Flintermann. All rights reserved.
//

#import &amp;lt;UIKit/UIKit.h&amp;gt;

@interface UIBarButtonItem (FlatUI)

// styles a single bar button item
- (void) configureFlatButtonWithColor:(UIColor *)color
                     highlightedColor:(UIColor *)highlightedColor
                         cornerRadius:(CGFloat) cornerRadius UI_APPEARANCE_SELECTOR;

// styles all bar button items that exist within a class heirarchy (same as UIAppearanceProxy methods)
+ (void) configureFlatButtonsWithColor:(UIColor *) color
                      highlightedColor:(UIColor *)highlightedColor
                          cornerRadius:(CGFloat) cornerRadius
                       whenContainedIn:(Class &lt;uiappearancecontainer&gt;)containerClass, ... NS_REQUIRES_NIL_TERMINATION;

// styles all bar button items (can be overwritten with the above methods)
+ (void) configureFlatButtonsWithColor:(UIColor *) color
                      highlightedColor:(UIColor *)highlightedColor
                          cornerRadius:(CGFloat) cornerRadius;


// removes the text shadows off a single bar button item (sadly, this can't be easily done for all buttons simultaneously)
- (void) removeTitleShadow;

@end

&lt;/uiappearancecontainer&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
UIBarButtonItem+FlatUI.m&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
//
//  UIBarButtonItem+FlatUI.m
//  FlatUI
//
//  Created by Jack Flintermann on 5/8/13.
//  Copyright (c) 2013 Jack Flintermann. All rights reserved.
//

#import "UIBarButtonItem+FlatUI.h"
#import "UIImage+FlatUI.h"

@implementation UIBarButtonItem (FlatUI)

- (void) configureFlatButtonWithColor:(UIColor *)color
                     highlightedColor:(UIColor *)highlightedColor
                         cornerRadius:(CGFloat) cornerRadius {
  
  [UIBarButtonItem configureItemOrProxy:self forFlatButtonWithColor:color highlightedColor:highlightedColor cornerRadius:cornerRadius];
  
}

+ (void) configureFlatButtonsWithColor:(UIColor *) color
                      highlightedColor:(UIColor *)highlightedColor
                          cornerRadius:(CGFloat) cornerRadius {
  
  [self configureFlatButtonsWithColor:color highlightedColor:highlightedColor cornerRadius:cornerRadius whenContainedIn:[UINavigationBar class], [UINavigationController class], nil];
}

+ (void) configureFlatButtonsWithColor:(UIColor *) color
                      highlightedColor:(UIColor *)highlightedColor
                          cornerRadius:(CGFloat) cornerRadius
                       whenContainedIn:(Class &lt;uiappearancecontainer&gt;)containerClass, ... {
  va_list vl;
  va_start(vl, containerClass);
  id appearance = [UIBarButtonItem appearanceWhenContainedIn:containerClass, nil];
  va_end(vl);
  [UIBarButtonItem configureItemOrProxy:appearance forFlatButtonWithColor:color highlightedColor:highlightedColor cornerRadius:cornerRadius];
}

- (void) removeTitleShadow {
  NSMutableDictionary *titleTextAttributes = [[self titleTextAttributesForState:UIControlStateNormal] mutableCopy];
  if (!titleTextAttributes) {
    titleTextAttributes = [NSMutableDictionary dictionary];
  }
  [titleTextAttributes setValue:[NSValue valueWithUIOffset:UIOffsetMake(0, 0)] forKey:UITextAttributeTextShadowOffset];
  [self setTitleTextAttributes:titleTextAttributes forState:UIControlStateNormal];
}

//helper method, basically a wrapper to allow creating a custom UIAppearance method that doesn't conform to the usual naming style
+ (void) configureItemOrProxy:(id)appearance
       forFlatButtonWithColor:(UIColor *)color
             highlightedColor:(UIColor *)highlightedColor
                 cornerRadius:(CGFloat) cornerRadius {
  UIImage *backButtonPortraitImage = [UIImage backButtonImageWithColor:color
                                                            barMetrics:UIBarMetricsDefault
                                                          cornerRadius:cornerRadius];
  UIImage *highlightedBackButtonPortraitImage = [UIImage backButtonImageWithColor:highlightedColor
                                                                       barMetrics:UIBarMetricsDefault
                                                                     cornerRadius:cornerRadius];
  UIImage *backButtonLandscapeImage = [UIImage backButtonImageWithColor:color
                                                             barMetrics:UIBarMetricsLandscapePhone
                                                           cornerRadius:2];
  UIImage *highlightedBackButtonLandscapeImage = [UIImage backButtonImageWithColor:highlightedColor
                                                                        barMetrics:UIBarMetricsLandscapePhone
                                                                      cornerRadius:2];
  
  [appearance setBackButtonBackgroundImage:backButtonPortraitImage
                                  forState:UIControlStateNormal
                                barMetrics:UIBarMetricsDefault];
  [appearance setBackButtonBackgroundImage:backButtonLandscapeImage
                                  forState:UIControlStateNormal
                                barMetrics:UIBarMetricsLandscapePhone];
  [appearance setBackButtonBackgroundImage:highlightedBackButtonPortraitImage
                                  forState:UIControlStateHighlighted
                                barMetrics:UIBarMetricsDefault];
  [appearance setBackButtonBackgroundImage:highlightedBackButtonLandscapeImage
                                  forState:UIControlStateHighlighted
                                barMetrics:UIBarMetricsLandscapePhone];
  
  [appearance setBackButtonTitlePositionAdjustment:UIOffsetMake(1.0f, 1.0f) forBarMetrics:UIBarMetricsDefault];
  [appearance setBackButtonTitlePositionAdjustment:UIOffsetMake(1.0f, 1.0f) forBarMetrics:UIBarMetricsLandscapePhone];
  
  UIImage *buttonImageNormal       = [UIImage imageWithColor:color cornerRadius:cornerRadius];
  UIImage *buttonImageHightlighted = [UIImage imageWithColor:highlightedColor cornerRadius:cornerRadius];
  [appearance setBackgroundImage:buttonImageNormal forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
  [appearance setBackgroundImage:buttonImageHightlighted forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault];
}

@end
&lt;/uiappearancecontainer&gt;&lt;/code&gt;&lt;/pre&gt;
4. To create custom section header views in your tableview create a new section header view class and add a new category and add the code below to your master view controller. Also add the QuartzCore.Framework to your project. You should end up with something like this. 

&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTu_N-i92tI_yP35Kngk1B3W01hJnNlpCpMrv0GCxk1QKV_MZQePqf1YvsaUEKE0IezWRWtpZNZUOxM0Ddst1M14_nK1No2bAAMrJDvJuTIWUpFhlvXm-T5wbtXLLi4QUHAqJqgm-zXA/s60/search-icon-timeline-translucent@2x.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTu_N-i92tI_yP35Kngk1B3W01hJnNlpCpMrv0GCxk1QKV_MZQePqf1YvsaUEKE0IezWRWtpZNZUOxM0Ddst1M14_nK1No2bAAMrJDvJuTIWUpFhlvXm-T5wbtXLLi4QUHAqJqgm-zXA/s60/search-icon-timeline-translucent@2x.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKoCXeHIAGz-S-pgjYI0sidpea5z55J1XVLpyXh6v4wwm3drDpxbZyjlVw0q9qOz2twPgN90ffVMZel92pMEikYcjr4q_KnpxkBongrExyKf-sieLMTWgM-NZL7nXx5Lic0F92ly6MOw/s1136/o5a8KLm5Wd.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKoCXeHIAGz-S-pgjYI0sidpea5z55J1XVLpyXh6v4wwm3drDpxbZyjlVw0q9qOz2twPgN90ffVMZel92pMEikYcjr4q_KnpxkBongrExyKf-sieLMTWgM-NZL7nXx5Lic0F92ly6MOw/s640/o5a8KLm5Wd.PNG" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
- (void)viewDidLoad
{
    [super viewDidLoad];
 // Do any additional setup after loading the view, typically from a nib.
  self.navigationItem.leftBarButtonItem = self.editButtonItem;
  [self.navigationController.navigationBar configureFlatNavigationBarWithColor:[UIColor colorWithRed:44.0f/255.0f green:71.0f/255.0f blue:98.0f/255.0f alpha:1.0f]];
  UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];
  self.navigationItem.rightBarButtonItem = addButton;
  [UIBarButtonItem configureFlatButtonsWithColor:[UIColor colorWithRed:52.0f/255.0f green:152.0f/255.0f blue:219.0f/255.0f alpha:1.0f]
                                highlightedColor:[UIColor colorWithRed:41.0f/255 green:128.0f/255 blue:185.0f/255 alpha:1.0f]
                                    cornerRadius:3];
  // Add This Line
  self.tableView.sectionHeaderHeight = 46.0f;
}

#pragma mark - Table View

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{ // Change This to Non Zero Number
  return 100;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{ // Change This to Non Zero Number
  return 1;
}

// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }


//  NSDate *object = _objects[indexPath.row];
  cell.textLabel.text = @"";
    return cell;
}

static NSString *SectionHeaderIdentifier = @"SectionHeaderIdentifier";

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
  SectionHeaderView *headerView = [self.tableView dequeueReusableHeaderFooterViewWithIdentifier:SectionHeaderIdentifier];
  if (headerView == nil) {
    headerView = [[SectionHeaderView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(tableView.frame), tableView.sectionHeaderHeight)];
  }
  [headerView setTitle:@"Title" subTitle:@"Subtitle" image:[UIImage imageNamed:@"search-icon-timeline-translucent@2x.png"]];
  return headerView;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
UIColor+LightAndDark.h&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
//
//  UIColor+LightAndDark.h
//  Lua
//
//  Created by Kurry Tran on 12/24/12.
//  Copyright (c) 2012 Lua Technologies. All rights reserved.
//

#import &amp;lt;UIKit/UIKit.h&amp;gt;

@interface UIColor (LightAndDark)
- (UIColor *)lighterColor:(CGFloat)percent;
- (UIColor *)darkerColor:(CGFloat)percent;
@end

&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
UIColor+LightAndDark.m&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
//
//  UIColor+LightAndDark.m
//  Lua
//
//  Created by Kurry Tran on 12/24/12.
//  Copyright (c) 2012 Lua Technologies. All rights reserved.
//

#import "UIColor+LightAndDark.h"

@implementation UIColor (LightAndDark)
//http://stackoverflow.com/questions/11598043/get-slightly-lighter-and-darker-color-from-uicolor

- (UIColor *)lighterColor:(CGFloat)percent
{
  float h, s, b, a;
  if ([self getHue:&amp;amp;h saturation:&amp;amp;s brightness:&amp;amp;b alpha:&amp;amp;a])
    return [UIColor colorWithHue:h
                      saturation:s
                      brightness:MIN(b * (1+percent), 1.0)
                           alpha:a];
  return nil;
}

- (UIColor *)darkerColor:(CGFloat)percent
{
  float h, s, b, a;
  if ([self getHue:&amp;amp;h saturation:&amp;amp;s brightness:&amp;amp;b alpha:&amp;amp;a])
    return [UIColor colorWithHue:h
                      saturation:s
                      brightness:b * (1-percent)
                           alpha:a];
  return nil;
}
@end
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
SectionHeaderView.h&lt;/h3&gt;
&lt;code&gt;&lt;/code&gt;&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;//
//  SectionHeaderView.h
//  FastScrolling-UITableViews
//
//  Created by Kurry L Tran on 6/26/13.
//  Copyright (c) 2013 Kurry L Tran. All rights reserved.
//

#import &amp;lt;UIKit/UIKit.h&amp;gt;

@interface SectionHeaderView : UIView
{
  NSString *_title;
  NSString *_subTitle;
  UIImage *_image;
}
- (void)setTitle:(NSString *)title subTitle:(NSString *)subTitle;
- (void)setTitle:(NSString *)title subTitle:(NSString *)subTitle image:(UIImage *)image;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;
SectionHeaderView.m&lt;/h3&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;//
//  SectionHeaderView.m
//  FastScrolling-UITableViews
//
//  Created by Kurry L Tran on 6/26/13.
//  Copyright (c) 2013 Kurry L Tran. All rights reserved.
//

#import "SectionHeaderView.h"
#import "UIColor+LightAndDark.h"
#import &amp;lt;QuartzCore/QuartzCore.h&amp;gt;

@implementation SectionHeaderView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setTitle:(NSString *)title subTitle:(NSString *)subTitle
{
  _title = title;
  _subTitle = subTitle;
  [self setNeedsDisplay];
}

- (void)setTitle:(NSString *)title subTitle:(NSString *)subTitle image:(UIImage *)image
{
  _title = title;
  _subTitle = subTitle;
  _image = image;
  [self setNeedsDisplay];

}


// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
  // This Creates a White A Black to White Gradient Layer to Blend With the Solid Color
  CAGradientLayer *gradientLayer = [CAGradientLayer layer];
  [gradientLayer setFrame:rect];
  NSArray *colors = [NSArray arrayWithObjects:
                     (id)[[UIColor whiteColor] CGColor],
                     (id)[[[UIColor blackColor] colorWithAlphaComponent:1.0f] CGColor],
                     nil];
  gradientLayer.colors = colors;
  gradientLayer.opacity = 0.09;
  [self.layer addSublayer:gradientLayer];
  
  // This Generates Three Random Numbers between [0,1] to seed random color
  float r = (float)rand()/(float)RAND_MAX;
  float g = (float)rand()/(float)RAND_MAX;
  float b = (float)rand()/(float)RAND_MAX;

  UIColor *baseColor = [UIColor colorWithRed:r green:g blue:b alpha:1.0f];
  UIColor *topBorderColor = [baseColor lighterColor:0.20];
  UIColor *bottomBorderColor = [baseColor darkerColor:0.20];
  
  // This Draws The Background Color
  CGContextRef context = UIGraphicsGetCurrentContext();
  CGContextSetFillColorWithColor(context, baseColor.CGColor);
  CGContextFillRect(context, CGRectMake(0, 0, self.frame.size.width, self.frame.size.height));
  CGContextSaveGState(context);

    // This Draws The Top Border Color
  CGContextMoveToPoint(context, CGRectGetMinX(rect), 0);
  CGContextAddLineToPoint(context, CGRectGetMaxX(rect), 0);
  CGContextSetStrokeColorWithColor(context, topBorderColor.CGColor);
  CGContextSetLineWidth(context, 1);
  CGContextStrokePath(context);
  CGContextRestoreGState(context);
  
  CGContextSaveGState(context);

  // This Draws The Bottom Border Color
  CGContextMoveToPoint(context, CGRectGetMinX(rect), CGRectGetMaxY(rect));
  CGContextAddLineToPoint(context, CGRectGetMaxX(rect), CGRectGetMaxY(rect));
  CGContextSetStrokeColorWithColor(context, bottomBorderColor.CGColor);
  CGContextSetLineWidth(context, 1);
  CGContextStrokePath(context);
  CGContextRestoreGState(context);
  
  CGRect titleLabelFrame = self.bounds;
  titleLabelFrame.origin.x = 69.0;
  titleLabelFrame.origin.y = 8.0;
  
  static UIColor *titleColor;
  titleColor = [UIColor whiteColor];
  static UIColor *subTitleColor;
  subTitleColor = [UIColor whiteColor];
  [titleColor set];
  CGContextSaveGState(context);
  context = UIGraphicsGetCurrentContext();
  CGContextSetBlendMode(context, kCGBlendModeNormal);
  
// Draws Title
  [_title drawAtPoint:CGPointMake(titleLabelFrame.origin.x, titleLabelFrame.origin.y)
            forWidth:200
            withFont:[UIFont boldSystemFontOfSize:17]
            fontSize:17
       lineBreakMode:NSLineBreakByTruncatingTail
  baselineAdjustment:UIBaselineAdjustmentAlignCenters];
  
// Draws SubTitle
  [subTitleColor set];
  [_subTitle drawAtPoint:CGPointMake(69, 25)
               forWidth:200
               withFont:[UIFont systemFontOfSize:13.0]
               fontSize:13
          lineBreakMode:NSLineBreakByTruncatingTail
     baselineAdjustment:UIBaselineAdjustmentAlignCenters];

  [_image drawInRect:CGRectMake(10.0, 10.0, 30.0, 28.0)];
}


@end

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
5. To custom draw fast tableview cells create a subclass of ABTableViewCell: &lt;a href="https://github.com/enormego/ABTableViewCell"&gt;https://github.com/enormego/ABTableViewCell&lt;/a&gt;, which draws the cell with core graphics. You should end up with something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjct9G1v3qjbmkFYnmCmj-4ZvJr8HA6OecDRn5A3DF07kPi8vM-yeXy_6O86sRrHr3K9iE0xittMrkWsDFMqlFGrU16tFEXvlnjOzAJiKZGWW7fuIA4gO4OurLkgGFfeelqjMemr4Z8Jw/s96/placeholder@2x.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjct9G1v3qjbmkFYnmCmj-4ZvJr8HA6OecDRn5A3DF07kPi8vM-yeXy_6O86sRrHr3K9iE0xittMrkWsDFMqlFGrU16tFEXvlnjOzAJiKZGWW7fuIA4gO4OurLkgGFfeelqjMemr4Z8Jw/s96/placeholder@2x.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgBxEGEx4XTNiY_82nneg6GToYdnzDuUYp8R271wKrm_m7tk_CYVvD7B-iSbi5Wd8QCqDP1wLPIqn_3aQj1zK3UcKaMHx8BCvfNmrsEbFoqaO4Pc-jofrCgc7vg4Js2Zl02LC1Co79nw/s1136/iOS+Simulator+Screen+shot+Jun+27,+2013+11.24.03+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgBxEGEx4XTNiY_82nneg6GToYdnzDuUYp8R271wKrm_m7tk_CYVvD7B-iSbi5Wd8QCqDP1wLPIqn_3aQj1zK3UcKaMHx8BCvfNmrsEbFoqaO4Pc-jofrCgc7vg4Js2Zl02LC1Co79nw/s640/iOS+Simulator+Screen+shot+Jun+27,+2013+11.24.03+AM.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWprrrC3_YjaksyRzTBOBo82oxq4Wz3PYwWAvZEq99s6BBNJq9EImTNWIG-wYaQBUA90NIUI_oHbGk6FoIjUGtwCRqXYSHpyod3zgk7kFdSCCDlmUR162fIcSwxDrwVEaKz4HPEPcSuw/s1136/iOS+Simulator+Screen+shot+Jun+27%252C+2013+11.24.05+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWprrrC3_YjaksyRzTBOBo82oxq4Wz3PYwWAvZEq99s6BBNJq9EImTNWIG-wYaQBUA90NIUI_oHbGk6FoIjUGtwCRqXYSHpyod3zgk7kFdSCCDlmUR162fIcSwxDrwVEaKz4HPEPcSuw/s640/iOS+Simulator+Screen+shot+Jun+27%252C+2013+11.24.05+AM.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwx8D5F5U0tLa_gIGR8IccP36C9HtlclzocSBUIA4IvD2cjfr5g7CK63YD9oBDilDeQZ4Z_5cTEeyoBHiwkdTBcIOrm0jiQpK67WRPtphVhMLxECnh5yY8u6J0Q1weVvZpx4P-daQsmg/s1136/iOS+Simulator+Screen+shot+Jun+27,+2013+11.24.28+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwx8D5F5U0tLa_gIGR8IccP36C9HtlclzocSBUIA4IvD2cjfr5g7CK63YD9oBDilDeQZ4Z_5cTEeyoBHiwkdTBcIOrm0jiQpK67WRPtphVhMLxECnh5yY8u6J0Q1weVvZpx4P-daQsmg/s640/iOS+Simulator+Screen+shot+Jun+27,+2013+11.24.28+AM.png" width="360" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
ABTableViewCell.h&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
// Copyright (c) 2008 Loren Brichter
// 
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
// 
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
//
//  ABTableViewCell.h
//
//  Created by Loren Brichter
//  Copyright 2008 Loren Brichter. All rights reserved.
//

#import &amp;lt;UIKit/UIKit.h&amp;gt;

// to use: subclass ABTableViewCell and implement -drawContentView:
@interface ABTableViewCell : UITableViewCell
{
 UIView *contentView;
}

- (void)drawContentView:(CGRect)r; // subclasses should implement

@end
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
ABTableViewCell.m&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
// Copyright (c) 2008 Loren Brichter
// 
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
// 
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
//
//  ABTableViewCell.m
//
//  Created by Loren Brichter
//  Copyright 2008 Loren Brichter. All rights reserved.
// 

#import "ABTableViewCell.h"
@interface ABTableViewCellView : UIView
@end

@implementation ABTableViewCellView

- (void)drawRect:(CGRect)r
{
 [(ABTableViewCell *)[self superview] drawContentView:r];
}

@end



@implementation ABTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
 if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) {
  contentView = [[ABTableViewCellView alloc]initWithFrame:CGRectZero];
  contentView.opaque = YES;
  [self addSubview:contentView];
 }
 return self;
}


- (void)setFrame:(CGRect)f
{
 [super setFrame:f];
 CGRect b = [self bounds];
 //b.size.height -= 1; // leave room for the seperator line
 [contentView setFrame:b];
}

- (void)setNeedsDisplay
{
 [super setNeedsDisplay];
 [contentView setNeedsDisplay];
}

- (void)drawContentView:(CGRect)r
{
 // subclasses should implement this
}

@end
&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;
KTTableViewCell.h&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
//
//  KTTableViewCell.h
//  FastScrolling-UITableViews
//
//  Created by Kurry Tran on 6/27/13.
//  Copyright (c) 2013 Kurry L Tran. All rights reserved.
//

#import "ABTableViewCell.h"

@interface KTTableViewCell : ABTableViewCell
{
    NSString *_title;
    NSString *_subTitle;
    UIImage *_image;
}
- (void)setTitle:(NSString *)title subTitle:(NSString *)subtitle image:(UIImage *)image;
@end

&lt;/code&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
//
//  KTTableViewCell.m
//  FastScrolling-UITableViews
//
//  Created by Kurry Tran on 6/27/13.
//  Copyright (c) 2013 Kurry L Tran. All rights reserved.
//

#import "KTTableViewCell.h"

@implementation KTTableViewCell

- (void)setTitle:(NSString *)title subTitle:(NSString *)subtitle image:(UIImage *)image
{
    _title = title;
    _subTitle = subtitle;
    _image = image;
    [self setNeedsDisplay];
}

-(void) drawContentView:(CGRect)r
{
    static UIColor *textColor;
    textColor = [UIColor blackColor];
    static UIColor *borderColor;
    borderColor = [UIColor colorWithRed:200.0f/255.0f green:200.0f/255.0f blue:200.0f/255.0f alpha:1.0f];
    static UIColor *selectedColor;
    selectedColor = [UIColor colorWithRed:212.0f/255.0f green:212.0f/255.0f blue:212.0f/255.0f alpha:1.0f];
    
    CGContextRef context = UIGraphicsGetCurrentContext();
    
    if(self.highlighted || self.selected)
 {
        r.origin.y -= 1.0f;
        r.size.height += 1.0f;
        CGContextSetFillColorWithColor(context, selectedColor.CGColor);
  CGContextFillRect(context, CGRectMake(0, 0, CGRectGetWidth(r), CGRectGetMaxY(r)));
        CGContextSaveGState(context);
    }
 else
 {
  CGContextSetFillColorWithColor(context, [UIColor whiteColor].CGColor);
  CGContextFillRect(context, CGRectMake(0, 0, r.size.width, r.size.height));
        CGContextSaveGState(context);
        
        CGContextMoveToPoint(context, CGRectGetMinX(r), 0);
        CGContextAddLineToPoint(context, CGRectGetMaxX(r), 0);
        CGContextSetStrokeColorWithColor(context, borderColor.CGColor);
        CGContextSetLineWidth(context, 1);
        CGContextStrokePath(context);
        CGContextRestoreGState(context);
        
        CGContextSaveGState(context);
        
        CGContextMoveToPoint(context, CGRectGetMinX(r), CGRectGetMaxY(r));
        CGContextAddLineToPoint(context, CGRectGetMaxX(r), CGRectGetMaxY(r));
        CGContextSetStrokeColorWithColor(context, borderColor.CGColor);
        CGContextSetLineWidth(context, 1);
        CGContextStrokePath(context);
        CGContextRestoreGState(context);
        [_image drawInRect:CGRectMake(5, 5, 45, 45)];
 }

    [textColor set];
    [_title drawAtPoint:CGPointMake(65.0f, 7.0f)
               forWidth:200
               withFont:[UIFont boldSystemFontOfSize:17]
               fontSize:17
          lineBreakMode:NSLineBreakByTruncatingTail
     baselineAdjustment:UIBaselineAdjustmentAlignCenters];
    
    [_subTitle drawAtPoint:CGPointMake(65.0f, 28.0f)
                  forWidth:200
                  withFont:[UIFont systemFontOfSize:16.0f]
                  fontSize:16
             lineBreakMode:NSLineBreakByTruncatingTail
        baselineAdjustment:UIBaselineAdjustmentAlignCenters];
 
}
@end
&lt;/code&gt;
&lt;/pre&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
// Add This At The Top
#import "KTTableViewCell.h"

- (void)viewDidLoad
{
    [super viewDidLoad];
 // Do any additional setup after loading the view, typically from a nib.
  self.navigationItem.leftBarButtonItem = self.editButtonItem;
  [self.navigationController.navigationBar configureFlatNavigationBarWithColor:[UIColor colorWithRed:44.0f/255.0f green:71.0f/255.0f blue:98.0f/255.0f alpha:1.0f]];
  UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];
  self.navigationItem.rightBarButtonItem = addButton;
  [UIBarButtonItem configureFlatButtonsWithColor:[UIColor colorWithRed:52.0f/255.0f green:152.0f/255.0f blue:219.0f/255.0f alpha:1.0f]
                                highlightedColor:[UIColor colorWithRed:41.0f/255 green:128.0f/255 blue:185.0f/255 alpha:1.0f]
                                    cornerRadius:3];
  
  self.tableView.sectionHeaderHeight = 46.0f;
// Add This Line 
    self.tableView.rowHeight = 56.0f;
}

// Change this to your new subclass
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";
    
    KTTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[KTTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }
    [cell setTitle:@"Title" subTitle:@"Subtitle" image:[UIImage imageNamed:@"placeholder@2x.png"]];

//  NSDate *object = _objects[indexPath.row];
  cell.textLabel.text = @"";
    return cell;
}

&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;Full Source Code Here: &lt;a href="http://db.tt/7E2EBbln"&gt;http://db.tt/7E2EBbln&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;
</description><link>http://kurrytran.blogspot.com/2013/06/fast-scrolling-customized-uitableviews.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfWlupbzrgFHy7qg2Dc0jrJ4Wn71cMxE7_AIbmWrPNKIBuLlHLeTf_3oz_XwZRC4e_FjrO9C2T1WOoP2bOKNxXa5HrdpH5gz1rXrsHmOIjwjW5KY6M-tF9XRJN_gUH7SlBGp01KSrS-w/s72-c/iOS+Simulator+Screen+shot+Jun+27%252C+2013+11.24.03+AM.png" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-6376518257258999537</guid><pubDate>Wed, 26 Jun 2013 03:03:00 +0000</pubDate><atom:updated>2013-06-25T20:05:40.490-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">clang</category><category domain="http://www.blogger.com/atom/ns#">compiling</category><category domain="http://www.blogger.com/atom/ns#">objective-c</category><title>Compiling Objective-C Command Line in OS X Lion and OS X Mountain Lion</title><description>Method two worked on my MacBook Air running OS X Lion, and Method One worked on my MacBook Pro running OS X Mountain Lion.
&lt;br /&gt;
&lt;h3&gt;
Makefile&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
default: method_two

method_one:
 export PATH=$PATH:/System/Library/Frameworks
 clang -fobjc-arc main.m –framework Foundation -o program
 ./program

method_two:
 clang -fobjc-gc /System/Library/Frameworks/Foundation.framework/Foundation  main.m -o program 
 ./program

clean:
 rm -f program
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;
main.m&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
// Remove the \ character -- Google Blogger is Having Problems
#import &amp;lt;\Foundation/Foundation.h\&amp;gt;&lt;foundation oundation.h=""&gt;&lt;foundation oundation.h=""&gt;

int main(int argc, char *argv[])
{
  @autoreleasepool {
 NSLog(@"Hello World!\n");
  }
  return 0;
}
&lt;/foundation&gt;&lt;/foundation&gt;&lt;/code&gt;&lt;/pre&gt;
</description><link>http://kurrytran.blogspot.com/2013/06/compiling-objective-c-command-line-in.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-1081607464482141893</guid><pubDate>Tue, 25 Jun 2013 03:38:00 +0000</pubDate><atom:updated>2013-06-24T20:40:55.554-07:00</atom:updated><title>teehan + lax iOS 7 GUI PSD</title><description>&lt;div style="width: 100%; height: 700px"&gt;&lt;iframe src="http://www.teehanlax.com/tools/ios7/" style="width: 100%; height: 100%"&gt;&lt;/iframe&gt;&lt;/div&gt;</description><link>http://kurrytran.blogspot.com/2013/06/ios-7-gui-psd.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-1594192407343480776</guid><pubDate>Mon, 24 Jun 2013 22:38:00 +0000</pubDate><atom:updated>2013-06-24T15:42:48.987-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">core data</category><category domain="http://www.blogger.com/atom/ns#">customization</category><category domain="http://www.blogger.com/atom/ns#">iOS</category><category domain="http://www.blogger.com/atom/ns#">iOS 5</category><category domain="http://www.blogger.com/atom/ns#">optimization</category><category domain="http://www.blogger.com/atom/ns#">performance</category><category domain="http://www.blogger.com/atom/ns#">testing</category><category domain="http://www.blogger.com/atom/ns#">UIKit</category><category domain="http://www.blogger.com/atom/ns#">xcode</category><title>Hidden Gems in Cocoa Touch / XCode</title><description>1. Open Quickly (Command-Shift-O)&lt;br /&gt;
2. View Related Files From Toolbar&lt;br /&gt;
3. Use breakpoint actions such as log message or play a sound to avoid recompiling.&lt;br /&gt;
4. Use debugDescription.&lt;br /&gt;
5. Use Objective-C Subscripting.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;NSMutableArray *indexedValues = [NSMutableArray array];&lt;br /&gt;
indexedValues[0] = @"One";&lt;br /&gt;
NSLog(@"value: %@", indexedValues[0]);&lt;br /&gt;
NSMutableDictionary *keyedValues = [NSMutableDictionary dictionary];&lt;br /&gt;
keyedValues[@"color"] = [UIColor blueColor];&lt;br /&gt;
NSLog(@"value: %@", keyedValues[@"color"]);&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;
6.&amp;nbsp;Private declarations not necessary since Xcode 4.3&lt;br /&gt;
7.&amp;nbsp;Synthesize not necessary for @property since Xcode 4.4&lt;br /&gt;
8. Reverse arrays quickly inline&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&amp;nbsp;NSArray *numbers = @[ @1, @2, @3 ];&lt;br /&gt;
&amp;nbsp;NSArray *reversed = numbers.reverseObjectEnumerator.allObjects;&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;
9. &amp;nbsp;Guarantee a mutable object&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&amp;nbsp;NSArray *unknown = self.values; // may be nil&lt;br /&gt;
&amp;nbsp;NSMutableArray *newArray = [NSMutableArray arrayWithArray:unknown];&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;
10. Declare and enumerate different collection types&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&amp;nbsp;id&lt;nsfastenumeration&gt; collection = values;&lt;/nsfastenumeration&gt;&lt;br /&gt;
&amp;nbsp;for (id object in collection) {&lt;br /&gt;
... }&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;
11.&amp;nbsp;Remove duplicate values in array without NSSet 
&lt;pre&gt;&lt;code&gt;
[array valueForKeyPath:@"@distinctUnionOfObjects.self"]&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;
12. CAGradientLayer&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
CAGradientLayer *gradient = [CAGradientLayer layer];&lt;br /&gt;
gradient.frame = CGRectMake(150, 250, 500, 500);&lt;br /&gt;
UIColor *c1 = [UIColor colorWithRed:0.09 green:0.70 blue:0.98 alpha:1.0];&lt;br /&gt;
UIColor *c2 = [UIColor colorWithRed:0.07 green:0.41 blue:0.95 alpha:1.0];&lt;br /&gt;
UIColor *c3 = [UIColor colorWithRed:0.81 green:0.46 blue:0.93 alpha:1.0];&lt;br /&gt;
gradient.colors = @[(id)c2.CGColor, (id)c3.CGColor, (id)c3.CGColor];&lt;br /&gt;
CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"colors"];&lt;br /&gt;
anim.toValue = @[(id)c1.CGColor, (id)c2.CGColor, (id)c2.CGColor];&lt;br /&gt;
anim.duration = 4.0;&lt;br /&gt;
anim.autoreverses = YES;&lt;br /&gt;
anim.repeatCount = 1e100;&lt;br /&gt;
[gradient addAnimation:anim forKey:@"colors"];&lt;br /&gt;
[self.view.layer addSublayer:gradient];&lt;br /&gt;
&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;
13. Core Data Private Queue&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
NSManagedObjectContext *bgContext;&lt;br /&gt;
bgContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NSPrivateQueueConcurrencyType];&lt;br /&gt;
[context performBlock:^{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; // (add, remove, change objects.)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; saveCompleted = [context save:&amp;amp; saveError];&lt;br /&gt;
}];&lt;br /&gt;
&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;
14. Core Data&lt;br /&gt;
Really fast fetches&lt;br /&gt;
• Only specific properties&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&amp;nbsp;NSFetchRequest&lt;br /&gt;
&amp;nbsp;fetch.propertiesToFetch = @[@"name", @"phone"];&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;
• Only the raw values&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
fetch.resultType = NSDictionaryResultType 
&lt;/pre&gt;&lt;/code&gt;
• Only the object id&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&amp;nbsp;fetch.resultType = NSManagedObjectIDResultType&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;
• Only the count&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
&amp;nbsp;fetch.resultType = NSCountResultType&lt;br /&gt;
&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;</description><link>http://kurrytran.blogspot.com/2013/06/hidden-gems-in-cocoa-touch-xcode.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-1281235087053998267</guid><pubDate>Mon, 24 Jun 2013 22:24:00 +0000</pubDate><atom:updated>2013-06-24T15:24:01.878-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">core data</category><category domain="http://www.blogger.com/atom/ns#">iOS</category><category domain="http://www.blogger.com/atom/ns#">optimization</category><category domain="http://www.blogger.com/atom/ns#">performance</category><title>WWDC 2013 Core Data Performance - Optimization and Debugging </title><description>These are the things that I thought were most useful to me:&lt;br /&gt;
&lt;br /&gt;
1. Don't fetch more than you need. Only 10 or so rows are visible so set a batch size on your NSFetchRequests.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"Contact"];

request.fetchBatchSize = 20;

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
2. Optimize your data model. Put binary data in separate entities and use external storage. Duplication isn't always a bad thing, if it speeds up your data query.&lt;br /&gt;
&lt;br /&gt;
3. Prefetch relationships if you know you need them.&lt;br /&gt;
&lt;br /&gt;
4. Consider returning dictionaries instead of managed objects.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
NSFetchRequest *request =&amp;nbsp;[NSFetchRequest fetchRequestWithEntityName:@"Quake"];

[request setResultType:NSDictionaryResultType];

[request setPropertiesToFetch:@[@"magnitude"]];

&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
5. Use SQLite to perform your calculations.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
NSFetchRequest *request =&amp;nbsp;[NSFetchRequest fetchRequestWithEntityName:@"Quake"];
NSExpressionDescription *ed = [[NSExpressionDescription alloc] init];
&amp;nbsp;ed.name = @"minimum";
&amp;nbsp;ed.expression = [NSExpression expressionForFunction:@"min:"
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; arguments:@[ [NSExpression expressionForKeyPath:@"magnitude"]]];
[request setPropertiesToFetch:@[ ed ]];


&lt;/code&gt;&lt;/pre&gt;
6. Use SQLite to group your results automatically.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
NSExpressionDescription *ed = [[NSExpressionDescription alloc] init];
&amp;nbsp;ed.name = @"count";
&amp;nbsp;ed.expression = [NSExpression expressionForFunction:@"count:"
arguments:@[ [NSExpression expressionForKeyPath:@"magnitude"]]];
&amp;nbsp;[request setPropertiesToFetch:@[ @"magnitude", ed ]];
&amp;nbsp;[request setPropertiesToGroupBy:@[ @"magnitude" ]];
&lt;/code&gt;&lt;/pre&gt;
7. Use SQL Logging.&lt;br /&gt;
&lt;br /&gt;
Pass argument flags = {1,2,3} on launch:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
-com.apple.CoreData.SQLDebug 1
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
8. Optimize predicates. Text comparisons are expensive. Put numeric comparisons first.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"Contact"];
&lt;/pre&gt;&lt;/code&gt;
Bad:
&lt;pre&gt;&lt;code&gt;

request.predicate = [NSPredicate predicateWithFormat:@"firstName == %@ AND age &amp;gt; %i", @"John", 40];&lt;/pre&gt;&lt;/code&gt;
Good:
&lt;pre&gt;&lt;code&gt;
request.predicate = [NSPredicate predicateWithFormat:@"age &amp;gt; %i &amp;amp;&amp;amp; firstName == %@", 40, @"John"];
&lt;/pre&gt;&lt;/code&gt;
9. Predicate Costs (Low to High):&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
Beginswith/Endswith &amp;lt; Equality &amp;lt; Contains &amp;lt; Matches&lt;br /&gt;
&lt;/pre&gt;&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>http://kurrytran.blogspot.com/2013/06/wwdc-2013-core-data-performance.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-7042968855538270723</guid><pubDate>Mon, 24 Jun 2013 21:48:00 +0000</pubDate><atom:updated>2013-06-24T15:24:47.943-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">core data</category><category domain="http://www.blogger.com/atom/ns#">iOS</category><category domain="http://www.blogger.com/atom/ns#">optimization</category><category domain="http://www.blogger.com/atom/ns#">performance</category><category domain="http://www.blogger.com/atom/ns#">rest</category><category domain="http://www.blogger.com/atom/ns#">restkit</category><title>iOS 5 NSFetchedResultsController Sorting Issues With RestKit</title><description>We were having issues with NSManagedObjects not being sorted correctly after modifying managed objects locally and saving, but we didn't know why so I had to do some research. I found this post: &lt;a href="http://wbyoung.tumblr.com/post/27851725562/core-data-growing-pains"&gt;http://wbyoung.tumblr.com/post/27851725562/core-data-growing-pains&lt;/a&gt; which was helpful, and the code snippet below was what fixed it. The issue in iOS 5 is that the NSFetchedResultsController deadlocks when there are changes in a child context. 

So with RestKit on that particular view controller we just had to switch from using the mainQueueManagedObjectContext to mainQueueManagedObjectContext.parentContext for iOS 5 and it resolved all of our issues.&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
&lt;/code&gt;
&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
  NSManagedObjectContext *newManagedObjectContext;
  if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0")) {
    newManagedObjectContext = [RKObjectManager sharedManager].managedObjectStore.mainQueueManagedObjectContext;
  } else{
    newManagedObjectContext = [RKObjectManager sharedManager].managedObjectStore.mainQueueManagedObjectContext.parentContext;
  }
  NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"Entity"];
  NSFetchedResultsController *newFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:newManagedObjectContext sectionNameKeyPath:nil cacheName:nil];
&lt;/code&gt;
&lt;/pre&gt;
</description><link>http://kurrytran.blogspot.com/2013/06/ios-5-nsfetchedresultscontroller.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-4084796300204767479</guid><pubDate>Tue, 28 May 2013 17:17:00 +0000</pubDate><atom:updated>2013-06-24T20:36:44.927-07:00</atom:updated><title>New Open Source iOS App using FlatUIKit, AFNetworking, SDURLCache, SDWebImage, GMGridView and the Instagram API.</title><description>I made an app that displays Instagram images with the hashtag #groupergram. Sample images below.&lt;br /&gt;
&lt;br /&gt;
Project page link:&amp;nbsp;&lt;a href="http://kurry.github.io/Groupergram" target="_blank"&gt;http://kurry.github.io/Groupergram&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieXv_1pinEgGSIi0GK_kviEVw65nxrqQuzv9LthLuxGcA1Y7ptzFvHSlqfeaXr1ityqQ2c7En03vZaHNs65AZrFFfMziYsuHSWTmgIn4aStxEBpw-9bgMwwSQ_ZpVV8Dj7pD5unYmsTA/s1600/sample-image-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieXv_1pinEgGSIi0GK_kviEVw65nxrqQuzv9LthLuxGcA1Y7ptzFvHSlqfeaXr1ityqQ2c7En03vZaHNs65AZrFFfMziYsuHSWTmgIn4aStxEBpw-9bgMwwSQ_ZpVV8Dj7pD5unYmsTA/s1600/sample-image-1.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQI3kvOnNNTrzCdw95OG-iN8ay2jOntDdR_3AgdrhyZc11uwEljsdTWpw6jpqntn4WovEvMZODlesiDohgUtGjZNLHSKixxXvbdBsb7e3AARu5FWDZ2t9M8_dUDXE1_NLkPeHW_iH05Q/s1600/sample-image-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQI3kvOnNNTrzCdw95OG-iN8ay2jOntDdR_3AgdrhyZc11uwEljsdTWpw6jpqntn4WovEvMZODlesiDohgUtGjZNLHSKixxXvbdBsb7e3AARu5FWDZ2t9M8_dUDXE1_NLkPeHW_iH05Q/s1600/sample-image-3.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV6bHnJaPxStH_j77lCxmuEv4XwAjqQ1cFyqI7_oFBpyZu9Iuw7akUSFqHtCPwwExC0U974bGFMATmr6ysc68-cDHcyxnRjozybxkzgnooSz8wMvy_tsaR92xSPAiQyr1ZrXu4KJqrKQ/s1600/sample-image-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiV6bHnJaPxStH_j77lCxmuEv4XwAjqQ1cFyqI7_oFBpyZu9Iuw7akUSFqHtCPwwExC0U974bGFMATmr6ysc68-cDHcyxnRjozybxkzgnooSz8wMvy_tsaR92xSPAiQyr1ZrXu4KJqrKQ/s1600/sample-image-2.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4J-imAGzq74hAjZyigy31vr3ZqwKkKhATWqQ_Bk_WGy7otYsDz1TOuls8TxQb8Or8IHADLk6s5m3Og-Tab0BE9BXhUjikS3071Bg8xPtUlpI-Xhe73isOjRM85j4znXMFC4nbSnk6cg/s1600/sample-image-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4J-imAGzq74hAjZyigy31vr3ZqwKkKhATWqQ_Bk_WGy7otYsDz1TOuls8TxQb8Or8IHADLk6s5m3Og-Tab0BE9BXhUjikS3071Bg8xPtUlpI-Xhe73isOjRM85j4znXMFC4nbSnk6cg/s1600/sample-image-4.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</description><link>http://kurrytran.blogspot.com/2013/05/new-open-source-ios-app-using-flatuikit.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieXv_1pinEgGSIi0GK_kviEVw65nxrqQuzv9LthLuxGcA1Y7ptzFvHSlqfeaXr1ityqQ2c7En03vZaHNs65AZrFFfMziYsuHSWTmgIn4aStxEBpw-9bgMwwSQ_ZpVV8Dj7pD5unYmsTA/s72-c/sample-image-1.png" width="72"/><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-3400630216302112260</guid><pubDate>Mon, 06 May 2013 19:06:00 +0000</pubDate><atom:updated>2013-05-06T12:06:45.898-07:00</atom:updated><title>How to Get Root Certification Authorities List from Android Phone Connected by USB in Mac OS X</title><description>&lt;div style="word-wrap:break-word;"&gt;
1. Make sure you have adb installed, and if not install it via homebrew.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;$ which adb
/usr/local/bin/adb
&lt;/pre&gt;
or
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;$ brew install adb
&lt;/pre&gt;
Note: You can also determine the Android SDK version of the device by typing:
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;$ adb shell grep ro.build.version.sdk= system/build.prop
ro.build.version.sdk=17
&lt;/pre&gt;
2. Log into the android phone terminal by typing this command in the mac terminal.&lt;br /&gt;
&lt;pre class="prettyprint"&gt;$ adb -d shell
shell@android:/ $
&lt;/pre&gt;
&lt;br /&gt;
3. Navigate to the&amp;nbsp;&lt;span style="background-color: white; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 14.296875px; white-space: pre;"&gt;/system/etc/security/cacerts&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white;"&gt;directory or whatever directory that contains the certificate authority&amp;nbsp;certificates&amp;nbsp;and then you can list the root certification authorities on that phone.&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 13px; line-height: 14.296875px; white-space: pre;"&gt; &lt;/span&gt;
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;$ cd system/etc/security/cacerts/ 
$ ls 
shell@android:/system/etc/security/cacerts $ ls
00673b5b.0
03e16f6c.0
08aef7bb.0
0d188d89.0
10531352.0
111e6273.0
1155c94b.0
119afc2e.0
11a09b38.0
12d55845.0
17b51fe6.0
1920cacb.0
...
&lt;/pre&gt;
&lt;div&gt;
4. Once you've located all of the certificate authorities certificates you can pull then to your local computer by typing this command:
&lt;/div&gt;
&lt;div&gt;Note: I created a folder called android-certs on my local computer and the "." command says to copy all of the files to the current directory.&amp;nbsp;&lt;/div&gt;
&lt;pre class="prettyprint"&gt;
Kurrys-MacBook-Pro:android-certs ktran$ adb pull /system/etc/security/cacerts/ .
pull: building file list...
pull: /system/etc/security/cacerts/ff783690.0 -&gt; ./ff783690.0
pull: /system/etc/security/cacerts/fde84897.0 -&gt; ./fde84897.0
pull: /system/etc/security/cacerts/fb126c6d.0 -&gt; ./fb126c6d.0
pull: /system/etc/security/cacerts/facacbc6.0 -&gt; ./facacbc6.0
pull: /system/etc/security/cacerts/fac084d7.0 -&gt; ./fac084d7.0
pull: /system/etc/security/cacerts/f80cc7f6.0 -&gt; ./f80cc7f6.0
pull: /system/etc/security/cacerts/f61bff45.0 -&gt; ./f61bff45.0
pull: /system/etc/security/cacerts/f58a60fe.0 -&gt; ./f58a60fe.0
pull: /system/etc/security/cacerts/f4996e82.0 -&gt; ./f4996e82.0
pull: /system/etc/security/cacerts/ee7cd6fb.0 -&gt; ./ee7cd6fb.0
pull: /system/etc/security/cacerts/ed524cf5.0 -&gt; ./ed524cf5.0
pull: /system/etc/security/cacerts/ed049835.0 -&gt; ./ed049835.0
...
140 files pulled. 0 files skipped.
2206 KB/s (693383 bytes in 0.306s)
&lt;/pre&gt;

5. Once you have all of the certificates in the folder you can use the command line tool grep to find all issuers. Run this command:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;
$ grep "Issuer" *
&lt;/pre&gt;
You should see something like this:
&lt;br/&gt;
&lt;pre class="prettyprint"&gt;
00673b5b.0:        Issuer: C=US, O=thawte, Inc., OU=Certification Services Division, OU=(c) 2006 thawte, Inc. - For authorized use only, CN=thawte Primary Root CA
03e16f6c.0:        Issuer: OU=Copyright (c) 1997 Microsoft Corp., OU=Microsoft Corporation, CN=Microsoft Root Authority
08aef7bb.0:        Issuer: C=US, O=Wells Fargo WellsSecure, OU=Wells Fargo Bank NA, CN=WellsSecure Public Root Certificate Authority
0d188d89.0:        Issuer: C=TR, O=Elektronik Bilgi Guvenligi A.S., CN=e-Guven Kok Elektronik Sertifika Hizmet Saglayicisi
10531352.0:        Issuer: C=US, ST=Arizona, L=Scottsdale, O=Starfield Technologies, Inc., CN=Starfield Services Root Certificate Authority - G2
111e6273.0:        Issuer: OU=GlobalSign Root CA - R2, O=GlobalSign, CN=GlobalSign
1155c94b.0:        Issuer: C=ES, L=C/ Muntaner 244 Barcelona, CN=Autoridad de Certificacion Firmaprofesional CIF 
...
&lt;/pre&gt;
&lt;/div&gt;</description><link>http://kurrytran.blogspot.com/2013/05/how-to-get-root-certification.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>9</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-2835008943690171033</guid><pubDate>Mon, 29 Apr 2013 22:12:00 +0000</pubDate><atom:updated>2013-04-29T17:21:17.549-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">cocoapods</category><category domain="http://www.blogger.com/atom/ns#">ghunit</category><category domain="http://www.blogger.com/atom/ns#">iOS</category><category domain="http://www.blogger.com/atom/ns#">jenkins</category><category domain="http://www.blogger.com/atom/ns#">testing</category><category domain="http://www.blogger.com/atom/ns#">xcode</category><title>Automated Unit Testing with Jenkins, Cocoapods and GHUnit</title><description>&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1. Install homebrew&amp;nbsp;&lt;a href="http://mxcl.github.io/homebrew/" target="_blank"&gt;link&lt;/a&gt;.&lt;/div&gt;
Or paste the command in terminal:&lt;br /&gt;
&lt;pre class="prettyprint"&gt;$ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
2. Install cocoapods&amp;nbsp;&lt;a href="http://cocoapods.org/" target="_blank"&gt;http://cocoapods.org/&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;$ sudo gem install cocoapods
$ pod setup
&lt;/pre&gt;
&lt;br /&gt;
3. Add GHUnit to your podfile.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;pod 'GHUnitIOS', '~&amp;gt; 0.5.6'
&lt;/pre&gt;
&lt;br /&gt;
Common Error: When I first uploaded my repo to Jenkins, I got an error about Jenkins not being able to clone a submodule for Cocoapods, and if you're having this issue you have to make sure to delete anything related to Cocoapods in your .gitmodules file.&lt;br /&gt;
&lt;br /&gt;
Common Error: We added KIF to our project as a cocoapods dependency, but your app will be rejected if you include it in the build you submit to the app store. The solution is to only include KIF for your test target that uses KIF and not your App Store release version of your app. This can be done in your cocoapods file.&lt;br /&gt;
&lt;br /&gt;
Example:
&lt;br /&gt;
For command line builds XCode defaults to release version (which you can change), and my KIF tests were in the target IntegrationTests.
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;target :release, :exclusive =&amp;gt; true do
  link_with 'IntegrationTests'
 pod 'KIF', '~&amp;gt; 0.0.1'
end
&lt;/pre&gt;
&lt;br /&gt;
KIF.podspec
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;Pod::Spec.new do |s|
  s.name         = "KIF"
  s.version      = "0.0.1"
  s.summary      = "KIF, which stands for Keep It Functional, 
is an iOS integration test framework."
  s.homepage     = "https://github.com/square/KIF"
  s.license  = 'MIT'
  s.author       = 'efirestone', 'jpsim'
  s.source       = { :git =&amp;gt; "https://github.com/square/KIF.git",
 :commit =&amp;gt; "ed057a038f07232e351210e56971fd9440acdd42" }
  s.platform     = :ios, '5.0'
  s.source_files = 'Classes','Additions',
  s.frameworks = 'UIKit', 'Foundation'
end
&lt;/pre&gt;
&lt;br /&gt;
4. Install Jenkins with homebrew:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;$ brew install jenkins
&lt;/pre&gt;
&lt;br /&gt;
5. Add an alias to your .bashrc file and add an alias to start and stop Jenkins.&lt;br /&gt;
&lt;br /&gt;
.bashrc
&lt;br /&gt;
&lt;pre class="prettyprint" style="word-wrap: break-word;"&gt;alias jenkins_start="launchctl load /usr/local/Cellar/jenkins/1.499/homebrew.mxcl.jenkins.plist"
alias jenkins_stop="launchctl unload /usr/local/Cellar/jenkins/1.499/homebrew.mxcl.jenkins.plist"&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-family: Times; white-space: normal;"&gt;
6. Start Jenkins server by typing the command in terminal:&lt;/div&gt;
&lt;div style="font-family: Times; white-space: normal;"&gt;
&lt;/div&gt;
&lt;div style="font-family: Times; white-space: normal;"&gt;
&lt;pre class="prettyprint"&gt;$ jenkins_start
&lt;/pre&gt;
&lt;/div&gt;
&lt;div style="font-family: Times; white-space: normal;"&gt;
&lt;/div&gt;
&lt;div style="font-family: Times; white-space: normal;"&gt;
7. Use this Makefile:&lt;/div&gt;
&lt;pre class="prettyprint" style="word-wrap: break-word;"&gt;default:
 # Set default make action here
 # xcodebuild -target Tests -configuration MyMainTarget -sdk macosx build 

clean:
 -rm -rf build/*

test:
 GHUNIT_CLI=1 WRITE_JUNIT_XML=1 /usr/bin/xcodebuild -target TARGET_NAME -configuration Debug -sdk iphonesimulator build -project PROJECT_FOLDER/PROJECT_NAME.xcodeproj 
&lt;/pre&gt;
&lt;br /&gt;
8. In Jenkins, create a job and execute a shell script with the following command:
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;make test
&lt;/pre&gt;
&lt;br /&gt;
9. Create an output job to publish the JUnit XML output. By default, the XML results are located in the PROJECT_NAME/build/test-results folder. 
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNpv0qolauQRCgTLEmwkkDB1h3lmN_TJI8g0q7mTaegSvf0lciU6HLNZ7MLT5VIIEMU0OQqwET_U1IEHNA4EKPLxU7HzFqBw_UblnB5oJ8jh8y6aPCPF00_ioScWCF6An98_bSdG5hVA/s1600/Screen+Shot+2013-04-29+at+7.32.41+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="434" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNpv0qolauQRCgTLEmwkkDB1h3lmN_TJI8g0q7mTaegSvf0lciU6HLNZ7MLT5VIIEMU0OQqwET_U1IEHNA4EKPLxU7HzFqBw_UblnB5oJ8jh8y6aPCPF00_ioScWCF6An98_bSdG5hVA/s640/Screen+Shot+2013-04-29+at+7.32.41+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
10. Save and apply settings.
&lt;br /&gt;
&lt;div style="font-family: Times; white-space: normal;"&gt;
&lt;/div&gt;
&lt;br /&gt;
11. In XCode, add a Run Script build phase and add these scripts in the folder that contains your Xcode project.
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;sh RunTests.sh
&lt;/pre&gt;
&lt;br /&gt;
RunTests.sh
&lt;br /&gt;
&lt;pre class="prettyprint" style="word-wrap: break-word;"&gt;#!/bin/sh

# If we aren't running from the command line, then exit
if [ "$GHUNIT_CLI" = "" ] &amp;amp;&amp;amp; [ "$GHUNIT_AUTORUN" = "" ]; then
  exit 0
fi

export DYLD_ROOT_PATH="$SDKROOT"
export DYLD_FRAMEWORK_PATH="$CONFIGURATION_BUILD_DIR"
export IPHONE_SIMULATOR_ROOT="$SDKROOT"
#export CFFIXED_USER_HOME="$TEMP_FILES_DIR/iPhone Simulator User Dir" # Be compatible with google-toolbox-for-mac

#if [ -d $"CFFIXED_USER_HOME" ]; then
#  rm -rf "$CFFIXED_USER_HOME"
#fi
#mkdir -p "$CFFIXED_USER_HOME"

export NSDebugEnabled=YES
export NSZombieEnabled=YES
export NSDeallocateZombies=NO
export NSHangOnUncaughtException=YES
export NSAutoreleaseFreedObjectCheckEnabled=YES

export DYLD_FRAMEWORK_PATH="$CONFIGURATION_BUILD_DIR"

TEST_TARGET_EXECUTABLE_PATH="$TARGET_BUILD_DIR/$EXECUTABLE_PATH"

if [ ! -e "$TEST_TARGET_EXECUTABLE_PATH" ]; then
  echo ""
  echo "  ------------------------------------------------------------------------"
  echo "  Missing executable path: "
  echo "     $TEST_TARGET_EXECUTABLE_PATH."
  echo "  The product may have failed to build or could have an old xcodebuild in your path (from 3.x instead of 4.x)."
  echo "  ------------------------------------------------------------------------"
  echo ""
  exit 1
fi

# If trapping fails, make sure we kill any running securityd
#launchctl list | grep GHUNIT_RunIPhoneSecurityd &amp;amp;&amp;amp; launchctl remove GHUNIT_RunIPhoneSecurityd
#SCRIPTS_PATH=`cd $(dirname $0); pwd`
#launchctl submit -l GHUNIT_RunIPhoneSecurityd -- "$SCRIPTS_PATH"/RunIPhoneSecurityd.sh $IPHONE_SIMULATOR_ROOT #$CFFIXED_USER_HOME
#trap "launchctl remove GHUNIT_RunIPhoneSecurityd" EXIT TERM INT

RUN_CMD="\"$TEST_TARGET_EXECUTABLE_PATH\" -RegisterForSystemEvents"

echo "Running: $RUN_CMD"
set +o errexit # Disable exiting on error so script continues if tests fail
eval $RUN_CMD
RETVAL=$?
set -o errexit

unset DYLD_ROOT_PATH
unset DYLD_FRAMEWORK_PATH
unset IPHONE_SIMULATOR_ROOT

if [ -n "$WRITE_JUNIT_XML" ]; then
  MY_TMPDIR=`/usr/bin/getconf DARWIN_USER_TEMP_DIR`
  RESULTS_DIR="${MY_TMPDIR}test-results"

  if [ -d "$RESULTS_DIR" ]; then
 `$CP -r "$RESULTS_DIR" "$BUILD_DIR" &amp;amp;&amp;amp; rm -r "$RESULTS_DIR"`
  fi
fi

exit $RETVAL
&lt;/pre&gt;
&lt;div style="font-family: Times; white-space: normal;"&gt;
&lt;/div&gt;
&lt;br /&gt;
RunIPhoneSecurityd.sh
&lt;br /&gt;
&lt;pre class="prettyprint"&gt;#!/bin/sh

set -e
set -u

export DYLD_ROOT_PATH="$1"
export IPHONE_SIMULATOR_ROOT="$1"
export CFFIXED_USER_HOME="$2"

"$IPHONE_SIMULATOR_ROOT"/usr/libexec/securityd&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div style="word-wrap: break-word;"&gt;
12. Add Cocoapods to the rest of your project see here:&amp;nbsp;&lt;a href="http://nscookbook.com/2013/03/recipe-18-unit-testing-with-ghunit-cocoapods/" target="_blank"&gt;http://nscookbook.com/2013/03/recipe-18-unit-testing-with-ghunit-cocoapods/&lt;/a&gt;. Your project settings should look something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdd8l8tGOXP18qkjBEswzVKvtTCa1at_A1UpLZXnIsbZxF0MhUNXap85cqojnWZydedmCai_9jWEOSx4YFs7RwF6Tp6eTf2jxOSdmjIzB2-ltiqXbZJaIKFSdsW_9vTpKQraCl8AaXzg/s1600/Screen+Shot+2013-04-29+at+7.35.22+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="388" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdd8l8tGOXP18qkjBEswzVKvtTCa1at_A1UpLZXnIsbZxF0MhUNXap85cqojnWZydedmCai_9jWEOSx4YFs7RwF6Tp6eTf2jxOSdmjIzB2-ltiqXbZJaIKFSdsW_9vTpKQraCl8AaXzg/s640/Screen+Shot+2013-04-29+at+7.35.22+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
13. In XCode 4.6.2 I had to change my AppDelegate.m file to this to get everything to the code below to get everything to run correctly.&lt;br /&gt;
&lt;br /&gt;
AppDelegate.m&lt;br /&gt;
&lt;pre class="prettyprint"&gt;//
//  main.m
//  LuaUnitTests
//
//  Created by Kurry Tran on 10/15/12.
//  Copyright (c) 2012 Lua Technologies. All rights reserved.
//
#import &lt;uikit it.h=""&gt;
#import &lt;ghunitios nitiosviewcontroller.h=""&gt;

int main(int argc, char *argv[])
{
  int retVal;
  @autoreleasepool {
    if (getenv("GHUNIT_CLI")) {
      retVal = [GHTestRunner run];
    } else {
      retVal = UIApplicationMain(argc, argv, nil, @"GHUnitIOSAppDelegate");
    }
  }
  return retVal;
}
&lt;/ghunitios&gt;&lt;/uikit&gt;&lt;/pre&gt;
Note: This blog article was very short, but I hope it was helpful.&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;</description><link>http://kurrytran.blogspot.com/2013/04/automated-unit-testing-with-jenkins.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNpv0qolauQRCgTLEmwkkDB1h3lmN_TJI8g0q7mTaegSvf0lciU6HLNZ7MLT5VIIEMU0OQqwET_U1IEHNA4EKPLxU7HzFqBw_UblnB5oJ8jh8y6aPCPF00_ioScWCF6An98_bSdG5hVA/s72-c/Screen+Shot+2013-04-29+at+7.32.41+PM.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-1832290910472422076</guid><pubDate>Thu, 31 Jan 2013 06:10:00 +0000</pubDate><atom:updated>2013-01-30T22:12:49.407-08:00</atom:updated><title>Tutorial: How To Recover Address Book Contacts From an iPhone Backup</title><description>&lt;br /&gt;
All File Required Here: &lt;a href="http://dl.dropbox.com/u/2127556/Tutorials/iPhone-AddressBook-Tutorial-Files.zip"&gt;http://dl.dropbox.com/u/2127556/Tutorials/iPhone-AddressBook-Tutorial-Files.zip&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
1. Go to&amp;nbsp;&lt;a href="http://supercrazyawesome.com/"&gt;http://supercrazyawesome.com/&lt;/a&gt;&amp;nbsp;and download the program.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1wmHl1ag72eKe9j4hFoX8X644hUOXg3sSa8FHrPIuJ1cWjqUuXAtXmva61_frS6zPHrA2MKFzC7Vd4K7pLZGHb5mZFsRaoyM-cz08l6a_TWe1St0Psp19txYxV2KOtl_fa5-eVO_v-Q/s1600/Screen+Shot+2013-01-30+at+11.47.20+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="399" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1wmHl1ag72eKe9j4hFoX8X644hUOXg3sSa8FHrPIuJ1cWjqUuXAtXmva61_frS6zPHrA2MKFzC7Vd4K7pLZGHb5mZFsRaoyM-cz08l6a_TWe1St0Psp19txYxV2KOtl_fa5-eVO_v-Q/s640/Screen+Shot+2013-01-30+at+11.47.20+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
2. Install the program and open it, then click "Read Backups"&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm3VII46VlEJZi76Fr0ZjUIRLv38lM8q0-UzC-b9ywiRehDSzANbJtSQdKze_0HDYLhYhWmgmU72_MwWXwpdz_ouGQwIA8WF-uHucxBZCLqMp7-k0vGWEWi_vg9EhT88un46CG7tkP7A/s1600/Screen+Shot+2013-01-30+at+11.48.57+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="638" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgm3VII46VlEJZi76Fr0ZjUIRLv38lM8q0-UzC-b9ywiRehDSzANbJtSQdKze_0HDYLhYhWmgmU72_MwWXwpdz_ouGQwIA8WF-uHucxBZCLqMp7-k0vGWEWi_vg9EhT88un46CG7tkP7A/s640/Screen+Shot+2013-01-30+at+11.48.57+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE1XctU7MMuMQKBu1hp_G2-vy8sEwHTXnTUGzsS-wTE52xWKAsL3H-V0-oJ_moT4XsvWMz49nrUKU9W6cs2hLoQjxj3G5PLCpsbGFrSpkeCICGum_3RQs-R_BgLaLlkMcuBABbDbVIMA/s1600/Screen+Shot+2013-01-30+at+11.49.56+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="638" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE1XctU7MMuMQKBu1hp_G2-vy8sEwHTXnTUGzsS-wTE52xWKAsL3H-V0-oJ_moT4XsvWMz49nrUKU9W6cs2hLoQjxj3G5PLCpsbGFrSpkeCICGum_3RQs-R_BgLaLlkMcuBABbDbVIMA/s640/Screen+Shot+2013-01-30+at+11.49.56+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
1. Select the device and date of the backup you would like to extract contacts from, and then hit extract.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu2-dpYiNQiAiBsd_oL_HxNrYt-AxYgL2d2TZnR5Ca0hvELtIrskV6cQCpKvgi-KMJBedaeK0djui1_ID_Pd0D2HRl_b8-l57JoYYQukF23b3-_Mg_QUOBMxN5-qI81yp6aQpfBLDxmw/s1600/Screen+Shot+2013-01-30+at+8.22.19+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="638" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiu2-dpYiNQiAiBsd_oL_HxNrYt-AxYgL2d2TZnR5Ca0hvELtIrskV6cQCpKvgi-KMJBedaeK0djui1_ID_Pd0D2HRl_b8-l57JoYYQukF23b3-_Mg_QUOBMxN5-qI81yp6aQpfBLDxmw/s640/Screen+Shot+2013-01-30+at+8.22.19+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;2. Then scroll down and select "iOS Files" and then click "Extract" and then pick a place to save the folder.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM_Oi5N9tJ2C3C80k4Q2N-sIKxWKKLpcO-OqoAiC2DTWZ6MDIHC9oGVWM1lGLOs_eaP2hlWtAQu4B85w41S0-_pkOuljyxoyEcrBURzw8n0lNNTHPLChBIGRxg6qXfQz22nhAAsQz66g/s1600/Screen+Shot+2013-01-30+at+8.22.29+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="638" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM_Oi5N9tJ2C3C80k4Q2N-sIKxWKKLpcO-OqoAiC2DTWZ6MDIHC9oGVWM1lGLOs_eaP2hlWtAQu4B85w41S0-_pkOuljyxoyEcrBURzw8n0lNNTHPLChBIGRxg6qXfQz22nhAAsQz66g/s640/Screen+Shot+2013-01-30+at+8.22.29+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
3. Then open the folder and then locate the file "AddressBook.sqlitedb".&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1_l-ZWojbXoeo4fGsFkEcWvOwOFleFpkNCUre0NyoFwyiSxJ7dwXYN1xQ6bF3xfk-YARsVkw4ilqrvncuaE6LWyfx2VFewuR08vgViTbuAkpgEa_upet70iqiIWP_Fj8NhUwLAXKlqw/s1600/Screen+Shot+2013-01-30+at+11.53.40+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1_l-ZWojbXoeo4fGsFkEcWvOwOFleFpkNCUre0NyoFwyiSxJ7dwXYN1xQ6bF3xfk-YARsVkw4ilqrvncuaE6LWyfx2VFewuR08vgViTbuAkpgEa_upet70iqiIWP_Fj8NhUwLAXKlqw/s640/Screen+Shot+2013-01-30+at+11.53.40+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
4. Make sure the "AddressBook.sqlitedb" and "address-book.sh" file (provided at the beginning of this post) are in the same folder and then open "Terminal". Type "cd" then space, then drag the AddressBook folder onto the Terminal window and hit enter. You should be in the folder as the "address-book.sh" file. Then type "sh address-book.sh".&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzKAEDC4oqq0lJt4zu5QNNzRWiCJQV3VvtJnY4cBcJ_VOpFn9Mpo6EWcTtb8eXyeP2Dc7vOgloFKHpklHn6yNjYijLUxEGERR2tt271wOCFhsvk-lGSpcj5u_O83NNMZPK0oTA5Iiydw/s1600/Screen+Shot+2013-01-31+at+12.44.17+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="304" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzKAEDC4oqq0lJt4zu5QNNzRWiCJQV3VvtJnY4cBcJ_VOpFn9Mpo6EWcTtb8eXyeP2Dc7vOgloFKHpklHn6yNjYijLUxEGERR2tt271wOCFhsvk-lGSpcj5u_O83NNMZPK0oTA5Iiydw/s640/Screen+Shot+2013-01-31+at+12.44.17+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHPH7iwgMBEQ25sKLc6XkeTguUig8E3Kk-DIq96XvMLoMMhbl_AIi1RqnM9WYmg81cbejlw1lcbKGvoZsNzpdg6DJXXEBwwgZCPq8ve5lBy2Yi_rXwEAzIU0r4TIxVm7qN4iS7f3UWZA/s1600/Screen+Shot+2013-01-31+at+1.02.41+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="440" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHPH7iwgMBEQ25sKLc6XkeTguUig8E3Kk-DIq96XvMLoMMhbl_AIi1RqnM9WYmg81cbejlw1lcbKGvoZsNzpdg6DJXXEBwwgZCPq8ve5lBy2Yi_rXwEAzIU0r4TIxVm7qN4iS7f3UWZA/s640/Screen+Shot+2013-01-31+at+1.02.41+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
5. If you now look again in the folder, the folder now contains two files "address_book_long.csv" and &amp;nbsp;"address_book_short.csv" which contains all of your contacts on your phone.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjMHoFOdaaX5NgKlP35qHP0nS9LJLrmdzCIoyV6Owyyeb_9l38CHhgYkjklM7BJ1rXumcJvkE9Qikaeu9RcGL5tL4yjzr7mbWIc-bX7XZdhpDx76bPtwCGcWKIxuY_2elPcwPbo_K_4g/s1600/Screen+Shot+2013-01-31+at+1.05.16+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="304" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjMHoFOdaaX5NgKlP35qHP0nS9LJLrmdzCIoyV6Owyyeb_9l38CHhgYkjklM7BJ1rXumcJvkE9Qikaeu9RcGL5tL4yjzr7mbWIc-bX7XZdhpDx76bPtwCGcWKIxuY_2elPcwPbo_K_4g/s640/Screen+Shot+2013-01-31+at+1.05.16+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
6. Open up the files and view all of your contacts. (Blurred For Privacy)&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifX9nmrzjkEcC-9r6OSODGciqf4XDXYlUNC7ePQgrt9vRlMB6CfgqAxRnb7PHnrLA0QsPoR5BlDTXeO6qKwJMBdyxD_pQm6cGWhu5RP-WWSJDUT5NXRyzHxVCZGq8OG7mjcDVMp8vYNA/s1600/Screen+Shot+2013-01-31+at+1.07.18+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifX9nmrzjkEcC-9r6OSODGciqf4XDXYlUNC7ePQgrt9vRlMB6CfgqAxRnb7PHnrLA0QsPoR5BlDTXeO6qKwJMBdyxD_pQm6cGWhu5RP-WWSJDUT5NXRyzHxVCZGq8OG7mjcDVMp8vYNA/s640/Screen+Shot+2013-01-31+at+1.07.18+AM.png" width="516" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Sources:&lt;br /&gt;
&lt;a href="http://www.iclarified.com/entry/index.php?enid=4974"&gt;http://www.iclarified.com/entry/index.php?enid=4974&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://yogeshd.blog.com/2011/04/10/viewexport-contacts-from-iphone-addressbook-sqlitedb-file/"&gt;http://yogeshd.blog.com/2011/04/10/viewexport-contacts-from-iphone-addressbook-sqlitedb-file/&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://supercrazyawesome.com/"&gt;http://supercrazyawesome.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>http://kurrytran.blogspot.com/2013/01/tutorial-how-to-recover-address-book.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1wmHl1ag72eKe9j4hFoX8X644hUOXg3sSa8FHrPIuJ1cWjqUuXAtXmva61_frS6zPHrA2MKFzC7Vd4K7pLZGHb5mZFsRaoyM-cz08l6a_TWe1St0Psp19txYxV2KOtl_fa5-eVO_v-Q/s72-c/Screen+Shot+2013-01-30+at+11.47.20+PM.png" width="72"/><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-8852256556841431188</guid><pubDate>Mon, 24 Dec 2012 06:15:00 +0000</pubDate><atom:updated>2012-12-23T22:16:06.512-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">extraction</category><category domain="http://www.blogger.com/atom/ns#">ipaexplorer</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>Tutorial: How To Extract iPhone App Artwork Downloaded From iTunes - Example Using Path's iOS App</title><description>1. Search for the app in the iTunes store and download it.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-FCKLQa3_EKGJyu7xoLqC-xD-Mez7Z2wO6vvUGaKc7-TDPJ-cjm2uh6RiT4NP53Nivavp17k1lYY9GNxRciWVJAKh-OKcaI4hAB59IDPnU6LZ2WOdnwmfelKxEqooDOm8GNdUflA0zQ/s1600/Screen+Shot+2012-12-24+at+12.47.59+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="376" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-FCKLQa3_EKGJyu7xoLqC-xD-Mez7Z2wO6vvUGaKc7-TDPJ-cjm2uh6RiT4NP53Nivavp17k1lYY9GNxRciWVJAKh-OKcaI4hAB59IDPnU6LZ2WOdnwmfelKxEqooDOm8GNdUflA0zQ/s640/Screen+Shot+2012-12-24+at+12.47.59+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
2. Click on Apps in the left toolbar and search for the app. Then right click and select "Show in Finder".&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiONVrCjR00WASuMX5JSddqTIAYP2gw5BpWw20ae3bGvnb1dLVQ2pX-QWti7JXb5DPRnuShJdIfYSfDQ16OEsCDtlW4KfJPs8totfQohDVlUAiPwGIAPY09TpzBnkcFqDGDh6Hk3uo6eA/s1600/Screen+Shot+2012-12-24+at+12.50.51+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiONVrCjR00WASuMX5JSddqTIAYP2gw5BpWw20ae3bGvnb1dLVQ2pX-QWti7JXb5DPRnuShJdIfYSfDQ16OEsCDtlW4KfJPs8totfQohDVlUAiPwGIAPY09TpzBnkcFqDGDh6Hk3uo6eA/s640/Screen+Shot+2012-12-24+at+12.50.51+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyKzRdgp5FEQIFQ_G16XHEwQxZgriHWYZwf0PJCaKB3XLpMDfF_k9R7wkUQJUDb2Ry9JxpVUzQBfChj6FW3loveYLxzdceQOfqoQzXj5sEWrHVnfM6uvWg3wHHquTQKquejxjn9UV3Vw/s1600/Screen+Shot+2012-12-24+at+12.51.06+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="576" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyKzRdgp5FEQIFQ_G16XHEwQxZgriHWYZwf0PJCaKB3XLpMDfF_k9R7wkUQJUDb2Ry9JxpVUzQBfChj6FW3loveYLxzdceQOfqoQzXj5sEWrHVnfM6uvWg3wHHquTQKquejxjn9UV3Vw/s640/Screen+Shot+2012-12-24+at+12.51.06+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
3. Open the following web page in Apple's Safari web browser&amp;nbsp;&lt;a href="http://www.raisedtech.com/iphone-ipa-png/index.php?r=site/index"&gt;http://www.raisedtech.com/iphone-ipa-png/index.php?r=site/index&lt;/a&gt;. Then upload the iOS App ipa file to the website. The images stored in the ipa are compressed, and the website searches the ipa archive for all images, decompresses them, and then displays them for you.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIgZ-bDvPuveCoAw3yPI66zFtPSGPmP_9M7FJNV4qnEh4D2qDikmrDV-iavJXy21q3mzAhkKOeDcqSQwVgBzOUF4gpMT01Mrwrp2tcYH4aYz1EUd12nd2WIUDyHPUGBBbP96pNKcUKHw/s1600/Screen+Shot+2012-12-24+at+12.54.50+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="444" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIgZ-bDvPuveCoAw3yPI66zFtPSGPmP_9M7FJNV4qnEh4D2qDikmrDV-iavJXy21q3mzAhkKOeDcqSQwVgBzOUF4gpMT01Mrwrp2tcYH4aYz1EUd12nd2WIUDyHPUGBBbP96pNKcUKHw/s640/Screen+Shot+2012-12-24+at+12.54.50+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2hEsicNsBhfsq_aJ4yUAS8Vin2KT8K_WOK9HMTmiJDeE_f0EN4DB7pqRzAWntkzM0573YsPKx0Jk41Q7OxYBFcDs_kX6VtyGTfjsFsbCRA_eYd1ijUMlUAwrOVRpGMELRN4_kaOh-IQ/s1600/Screen+Shot+2012-12-24+at+12.57.36+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="444" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2hEsicNsBhfsq_aJ4yUAS8Vin2KT8K_WOK9HMTmiJDeE_f0EN4DB7pqRzAWntkzM0573YsPKx0Jk41Q7OxYBFcDs_kX6VtyGTfjsFsbCRA_eYd1ijUMlUAwrOVRpGMELRN4_kaOh-IQ/s640/Screen+Shot+2012-12-24+at+12.57.36+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
4. The file upload and decompression takes a while, so in the mean time create a new folder to download the extracted artwork. I'll call mine "test-artwork".&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
5. Download this web page image downloader script that I made using Mac Automator. It grabs the current page in Safari, retrieves all of the image urls, and then proceeds to download all of the images.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Link: &lt;a href="http://bit.ly/WJv9IS"&gt;http://bit.ly/WJv9IS&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi626xMz9IBXrfL2Xr72t-0rSG7SuNgFfd4op2TiTSRL_M8PaIwaDWY1gybwINUM6u7doxvOeMMpXyooRasIXLayvuJfHsK1UFbDExnyYay_UdQAO_xInFKXckhZr87LKH55-xxhyk1MA/s1600/Screen+Shot+2012-12-24+at+1.03.03+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi626xMz9IBXrfL2Xr72t-0rSG7SuNgFfd4op2TiTSRL_M8PaIwaDWY1gybwINUM6u7doxvOeMMpXyooRasIXLayvuJfHsK1UFbDExnyYay_UdQAO_xInFKXckhZr87LKH55-xxhyk1MA/s640/Screen+Shot+2012-12-24+at+1.03.03+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
6. Once the app is finished uploading, it refreshes the page and here you see all of the artwork for the page.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF-U2BC1f-eTEG-bxadcbb7sSSnpxHeOd8eSK_ZFDc5kS3Tx_pxLS9gg7n7I-HumsP0Z3oSvGi5_-86ZeWOSWdRGdcH-iREeYq6tPaI2pcfuXjNQvI6pEzd9tTWP3V79GLeJ6EG-wiHg/s1600/Screen+Shot+2012-12-24+at+1.04.00+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="444" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF-U2BC1f-eTEG-bxadcbb7sSSnpxHeOd8eSK_ZFDc5kS3Tx_pxLS9gg7n7I-HumsP0Z3oSvGi5_-86ZeWOSWdRGdcH-iREeYq6tPaI2pcfuXjNQvI6pEzd9tTWP3V79GLeJ6EG-wiHg/s640/Screen+Shot+2012-12-24+at+1.04.00+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
7. Open the Mac Automator script downloaded in step 5. Leave the extracted artwork page as the front most Safari page, select the destination folder for the images, and then click run. The image downloads take a while if there are a lot of images.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidtU2ko5kiWTVEARsz3bTF7DD6s6kWP9jubvUEgf2ZjFBRM_rcrSj07SEfwfukrBrm-QhK0D5QAAlZzZ0zbme9o9Rbg3IwZcKokaRVHJV_SgZYDrPY0PbSrq52Um_IVAetL9ZrykXfMQ/s1600/Screen+Shot+2012-12-24+at+1.08.10+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidtU2ko5kiWTVEARsz3bTF7DD6s6kWP9jubvUEgf2ZjFBRM_rcrSj07SEfwfukrBrm-QhK0D5QAAlZzZ0zbme9o9Rbg3IwZcKokaRVHJV_SgZYDrPY0PbSrq52Um_IVAetL9ZrykXfMQ/s640/Screen+Shot+2012-12-24+at+1.08.10+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
8. Complete! Once complete you should see a successful workflow and open the destination folder and there should be images that you can use for research purposes.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifw5RnVPZaaFXd8l3uPhjyvoJaBdns5Jzwr1C8l1HT8YljHlEEk6QKNt6QwUatbUwuiGyaPrsg00YKF5igalazlvfoT5bXVuzeDLzbo69H03tTo86hsftRBNKP4Ku_H32gKm6uvSgQGw/s1600/Screen+Shot+2012-12-24+at+1.09.23+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifw5RnVPZaaFXd8l3uPhjyvoJaBdns5Jzwr1C8l1HT8YljHlEEk6QKNt6QwUatbUwuiGyaPrsg00YKF5igalazlvfoT5bXVuzeDLzbo69H03tTo86hsftRBNKP4Ku_H32gKm6uvSgQGw/s640/Screen+Shot+2012-12-24+at+1.09.23+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZhyphenhyphenMCdqu_tL4GJxmkyc843L9FZco_hn3AzMFiizGh8DAsjt0ctYgbbXxUWruCtdIZlzdJy9O5gFh5UXW_1fWxYhYUJ7Vb-6XFOwv2pAaX0K4_HJBrHvTw7_i3-9mNaVDT2BustVAOMA/s1600/Screen+Shot+2012-12-24+at+1.11.13+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="445" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZhyphenhyphenMCdqu_tL4GJxmkyc843L9FZco_hn3AzMFiizGh8DAsjt0ctYgbbXxUWruCtdIZlzdJy9O5gFh5UXW_1fWxYhYUJ7Vb-6XFOwv2pAaX0K4_HJBrHvTw7_i3-9mNaVDT2BustVAOMA/s640/Screen+Shot+2012-12-24+at+1.11.13+AM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Artwork Here:&amp;nbsp;&lt;a href="http://bit.ly/YDM8g1"&gt;http://bit.ly/YDM8g1&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</description><link>http://kurrytran.blogspot.com/2012/12/tutorial-how-to-extract-iphone-app.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-FCKLQa3_EKGJyu7xoLqC-xD-Mez7Z2wO6vvUGaKc7-TDPJ-cjm2uh6RiT4NP53Nivavp17k1lYY9GNxRciWVJAKh-OKcaI4hAB59IDPnU6LZ2WOdnwmfelKxEqooDOm8GNdUflA0zQ/s72-c/Screen+Shot+2012-12-24+at+12.47.59+AM.png" width="72"/><thr:total>6</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-2488885388218060472</guid><pubDate>Mon, 24 Dec 2012 05:25:00 +0000</pubDate><atom:updated>2012-12-23T22:25:05.159-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">customization</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><category domain="http://www.blogger.com/atom/ns#">UIKit</category><category domain="http://www.blogger.com/atom/ns#">uisearchbar</category><title>Tutorial: Customizing UISearchBar</title><description>&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtIOXNcDLGjLweNcpffycH1uTYZL7CIzzEywjr0WYgabZyaylPpSvyZblf1fTCG2VCpC-2JkOyFdkNn3a0q3KFimBLF6wdJILts4peOfeqF9gj7wylgOQ14nd-w9oXuYxR_aPdG_YmzA/s1600/iOS+Simulator+Screen+shot+Dec+24,+2012+12.20.46+AM.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&amp;nbsp;&lt;/a&gt;Result:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeiYTyCQ0xcC6VEYKeVqQHk6D1DxvRTZyFcYV2OvyNRonw8BKgrQC8UX992LxHhpWoRDgP2zIYEmosZG3n_S06e3B5FhKOOTDdH3ymbdDGNAwO31Yi8LYSa2kphwUVwazlMRqIxz69mQ/s1600/iOS+Simulator+Screen+shot+Dec+24,+2012+1.23.11+AM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeiYTyCQ0xcC6VEYKeVqQHk6D1DxvRTZyFcYV2OvyNRonw8BKgrQC8UX992LxHhpWoRDgP2zIYEmosZG3n_S06e3B5FhKOOTDdH3ymbdDGNAwO31Yi8LYSa2kphwUVwazlMRqIxz69mQ/s1600/iOS+Simulator+Screen+shot+Dec+24,+2012+1.23.11+AM.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
To customize UISearchBar you have to override the layout subviews method. To make it slightly more flexible I used tags to determine which background image to load. You have to define the tag in interface builder in the right side panel shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPgYulFAItis7d2OG7OfRlDEa52WsYjPStpHTHDeT8_JqqNIRFEGGex5662_wQcnBLHHhSYHeT5c-WH79p9LaNhHoXPvjn87CqpinlEfS17Z3vLTRZQ5plT4VYQVhekM-FzHqG9GuVDQ/s1600/Screen+Shot+2012-12-23+at+11.52.32+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPgYulFAItis7d2OG7OfRlDEa52WsYjPStpHTHDeT8_JqqNIRFEGGex5662_wQcnBLHHhSYHeT5c-WH79p9LaNhHoXPvjn87CqpinlEfS17Z3vLTRZQ5plT4VYQVhekM-FzHqG9GuVDQ/s1600/Screen+Shot+2012-12-23+at+11.52.32+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre class="brush: objc;"&gt;//
//  KTSearchBar.h
//  CustomSearchBar
//
//  Created by Kurry L Tran on 12/23/12.
//  Copyright (c) 2012 Kurry L Tran. All rights reserved.
//

#import &lt;uikit it.h="it.h"&gt;

@interface KTSearchBar : UISearchBar
@property (nonatomic, strong) UIView *inputAccessoryView;
@end

&lt;/uikit&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;pre class="brush: objc;"&gt;//
//  KTSearchBar.m
//  CustomSearchBar
//
//  Created by Kurry L Tran on 12/23/12.
//  Copyright (c) 2012 Kurry L Tran. All rights reserved.
//

#import "KTSearchBar.h"
#import &lt;quartzcore uartzcore.h="uartzcore.h"&gt;

#define KEYBOARD_ACCESSORY_HEIGHT 62
#define kBackgroundOneTag 111
#define kBackgroundTwoTag 112
#define kBackgroundThreeTag 113
#define kBackgroundFourTag 114

@implementation KTSearchBar

- (void)awakeFromNib
{
  [[self.subviews objectAtIndex:0] removeFromSuperview];
  UIImageView *backgroundImageView = nil;
  
  self.layer.borderColor = [[self colorWithHex:0x32363c] CGColor];
  NSLog(@"Tag == %d", self.tag);
  if (self.tag == kBackgroundOneTag) {
    backgroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"searchBarBackground@2x.png"]];
    backgroundImageView.frame = CGRectMake(0.0f, 0.0f, 320, 44);
  }else if(self.tag == kBackgroundTwoTag){
    backgroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"search-bg-all@2x.png"]];
    backgroundImageView.frame = CGRectMake(0.0f, 0.0f, 320, 44);
  }else if(self.tag == kBackgroundThreeTag){
    backgroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"searchBar@2x.png"]];
    backgroundImageView.frame = CGRectMake(0.0f, 0.0f, 320, 44);
  }else if(self.tag == kBackgroundFourTag){
    backgroundImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"search-bg-all-dark@2x.png"]];
    backgroundImageView.frame = CGRectMake(0.0f, -1.0f, 320, 44);
  }
  
  [self addSubview:backgroundImageView];
  
}


- (void)layoutSubviews {
  
  [self setShowsCancelButton:NO animated:NO];
  UITextField *searchField;
  NSUInteger numViews = [self.subviews count];
  for(int i = 0; i &amp;lt; numViews; i++) {
    if([[self.subviews objectAtIndex:i] isKindOfClass:[UITextField class]]) { //conform?
      searchField = [self.subviews objectAtIndex:i];
    }
  }
  [self bringSubviewToFront:searchField];
  if(!(searchField == nil)) {
    searchField.textColor = [self colorWithHex:0x8b909c];
    searchField.font = [UIFont fontWithName:@"MyriadPro-It" size:18];
    searchField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
    [searchField setBorderStyle:UITextBorderStyleNone];
    [searchField setBackgroundColor:[UIColor clearColor]];
    [searchField setRightView:nil];
    [searchField setBackground:nil];

    if (self.tag != kBackgroundThreeTag) {
      UIImage *image = [UIImage imageNamed:@"MagnifyingGlassDark"];
      UIImageView *iView = [[UIImageView alloc] initWithImage:image];
      searchField.leftView.opaque = YES;
      searchField.leftView = iView;
    }else
      searchField.leftView  = nil;

  }
  [super layoutSubviews];
}

// http://stackoverflow.com/questions/1560081/how-can-i-create-a-uicolor-from-a-hex-string
- (UIColor *) colorWithHex:(int)hex {
  return [UIColor colorWithRed:((float)((hex &amp;amp; 0xFF0000) &amp;gt;&amp;gt; 16))/255.0
                         green:((float)((hex &amp;amp; 0xFF00) &amp;gt;&amp;gt; 8))/255.0
                          blue:((float)(hex &amp;amp; 0xFF))/255.0 alpha:1.0];
}




@end&lt;/quartzcore&gt;&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;&lt;/pre&gt;
Sample Project: &lt;a href="http://bit.ly/VYuflp"&gt;http://bit.ly/VYuflp&lt;/a&gt;</description><link>http://kurrytran.blogspot.com/2012/12/tutorial-customizing-uisearchbar.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeiYTyCQ0xcC6VEYKeVqQHk6D1DxvRTZyFcYV2OvyNRonw8BKgrQC8UX992LxHhpWoRDgP2zIYEmosZG3n_S06e3B5FhKOOTDdH3ymbdDGNAwO31Yi8LYSa2kphwUVwazlMRqIxz69mQ/s72-c/iOS+Simulator+Screen+shot+Dec+24,+2012+1.23.11+AM.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-2258703348947992703</guid><pubDate>Mon, 24 Dec 2012 03:57:00 +0000</pubDate><atom:updated>2012-12-23T22:18:13.522-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">customization</category><category domain="http://www.blogger.com/atom/ns#">dropshadow</category><category domain="http://www.blogger.com/atom/ns#">tutorial</category><category domain="http://www.blogger.com/atom/ns#">UIKit</category><category domain="http://www.blogger.com/atom/ns#">uitableview</category><category domain="http://www.blogger.com/atom/ns#">UITableViewCell</category><title>Tutorial: Adding a Drop Shadow To Last Row of UITableView</title><description>&lt;br /&gt;
&lt;pre class="brush: objc;"&gt;//
//  UITableViewCell+DropShadow.h
//  TableViewCellDropShadow
//
//  Created by Kurry L Tran on 12/23/12.
//  Copyright (c) 2012 Kurry L Tran. All rights reserved.
//
 
#import &amp;lt;UIKit/UIKit.h&amp;gt;
 
@interface UITableViewCell (DropShadow)
-(void)addDropShadow;
-(void)removeDropShadow;
@end
&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;//
//  UITableViewCell+DropShadow.m
//  TableViewCellDropShadow
//
//  Created by Kurry L Tran on 12/23/12.
//  Copyright (c) 2012 Kurry L Tran. All rights reserved.
//
 
#import "UITableViewCell+DropShadow.h"
#import &amp;lt;QuartzCore/QuartzCore.h&amp;gt;
 
@implementation UITableViewCell (DropShadow)
 
-(void)addDropShadow
{
  self.layer.shadowOffset = CGSizeMake(0, 10);
  self.layer.shadowColor = [[UIColor blackColor] CGColor];
  self.layer.shadowRadius = 3;
  self.layer.shadowOpacity = .75;
  CGRect shadowFrame = self.layer.bounds;
  CGPathRef shadowPath = [UIBezierPath bezierPathWithRect:shadowFrame].CGPath;
  self.layer.shadowPath = shadowPath;
}
 
-(void)removeDropShadow
{
  self.layer.shadowOpacity = 0;
}
@end&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;Example Usage: &lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;// Customize the appearance of table view cells.

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

{
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
       cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    }

  NSDate *object = _objects[indexPath.row];

  cell.textLabel.text = [object description];
  NSInteger numberOfSections = [self numberOfSectionsInTableView:tableView];
  NSInteger numberOfRows = [self tableView:tableView numberOfRowsInSection:(numberOfSections-1)];

  if (indexPath.section == (numberOfSections - 1) &amp;amp;&amp;amp; indexPath.row == (numberOfRows-1))
    [cell addDropShadow];
  else
   [cell removeDropShadow];

  return cell;
}

- (void)viewWillAppear:(BOOL)animated

{
  NSInteger numberOfSections = [self numberOfSectionsInTableView:self.tableView];
  NSInteger numberOfRows = [self tableView:self.tableView numberOfRowsInSection:(numberOfSections-1)];
  NSIndexPath *indexPath = [NSIndexPath indexPathForRow:(numberOfRows -1) inSection:(numberOfSections-1)];
  UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
  [cell addDropShadow];
}

&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;&lt;span style="font-family: Times; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;&lt;div class="p1"&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;&lt;/pre&gt;
&lt;pre class="brush: objc;"&gt;&lt;/pre&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUL4R9IGcXwNUYwaUTrwk5BGKUFqE2FUy23VWVzUyrBql08igH-GF1JUr3o1wIqbXVSk-17MQT8n-FTqc4FHYy6Lrs5uRb1OlD5dL6RRPOqBVPQkhFV1dGZaL9mKFy-dqtzS61FVb0gw/s1600/iOS+Simulator+Screen+shot+Dec+23%252C+2012+9.59.46+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUL4R9IGcXwNUYwaUTrwk5BGKUFqE2FUy23VWVzUyrBql08igH-GF1JUr3o1wIqbXVSk-17MQT8n-FTqc4FHYy6Lrs5uRb1OlD5dL6RRPOqBVPQkhFV1dGZaL9mKFy-dqtzS61FVb0gw/s1600/iOS+Simulator+Screen+shot+Dec+23%252C+2012+9.59.46+PM.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Sample Project :&amp;nbsp;&lt;a href="http://bit.ly/W10XCU"&gt;http://bit.ly/W10XCU&lt;/a&gt;&lt;/div&gt;
</description><link>http://kurrytran.blogspot.com/2012/12/adding-drop-shadow-to-last-row-of.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUL4R9IGcXwNUYwaUTrwk5BGKUFqE2FUy23VWVzUyrBql08igH-GF1JUr3o1wIqbXVSk-17MQT8n-FTqc4FHYy6Lrs5uRb1OlD5dL6RRPOqBVPQkhFV1dGZaL9mKFy-dqtzS61FVb0gw/s72-c/iOS+Simulator+Screen+shot+Dec+23%252C+2012+9.59.46+PM.png" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-7236589539210879469</guid><pubDate>Mon, 24 Dec 2012 02:47:00 +0000</pubDate><atom:updated>2012-12-23T18:47:14.266-08:00</atom:updated><title>Blog Updates</title><description>I decided that I was going to start writing blog posts again. I realized that writing tutorials takes a really long time and causes burnout so I'm going to be posting much shorter, and much more useful posts. All of the posts will be based around one topic, with a point, example, and explanation, with sample code. Mainly, all of the topics will be things that I wish someone had explained to me when I had started programming iPhone apps.</description><link>http://kurrytran.blogspot.com/2012/12/blog-updates.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-1628229399344883833</guid><pubDate>Tue, 11 Sep 2012 04:53:00 +0000</pubDate><atom:updated>2012-09-10T21:53:48.603-07:00</atom:updated><title>Job Posting </title><description>&lt;span style="background-color: white; color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px;"&gt;For anyone looking for a software engineering job based in SF, my friend&amp;nbsp;&lt;/span&gt;&lt;a data-hovercard="/ajax/hovercard/user.php?id=1240830156" href="https://www.facebook.com/McKinleyTennant" style="background-color: white; color: #3b5998; cursor: pointer; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px; text-decoration: none;"&gt;McKinley Tennant&lt;/a&gt;&lt;span style="background-color: white; color: #333333; font-family: 'lucida grande', tahoma, verdana, arial, sans-serif; font-size: 13px; line-height: 17px;"&gt;&amp;nbsp;is hiring at AVOS Systems, an internet company led by YouTube co-founders Chad Hurley and Steve Chen. Check out avos.com and contact mckinley@avos.com if you're interested.&lt;/span&gt;</description><link>http://kurrytran.blogspot.com/2012/09/job-posting.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-6389381528686934324</guid><pubDate>Sun, 17 Jun 2012 19:17:00 +0000</pubDate><atom:updated>2012-12-23T22:18:40.753-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>Tutorial: Concurrency with Core Data Tutorial</title><description>&lt;br /&gt;
I thought that all of the important Core Data articles were scattered in so many places and so I thought I should make a good set of notes. None of the text below reflect my own words, and they are taken directly from the Apple articles in the links. I had set out to start using Core Data in multiple threads, but then I realized my understanding of the theory of Core Data was weak, and so I thought I should build a solid understanding before I started programming.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://developer.apple.com/library/mac/#documentation/DataManagement/Devpedia-CoreData/coreDataOverview.html#//apple_ref/doc/uid/TP40010398-CH28-SW1"&gt;Core Data Core Competencies&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Core Data&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
You use Core Data to manage the model (in the model-view-controller sense of the word) objects in your application. Core Data is an object-graph management and persistence framework. Among other things, it:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;Allows you to efficiently fetch model objects from a persistent store and save changes back to the store.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;Provides an infrastructure for tracking changes to your model objects. It gives you automatic support for undo and redo, and for maintaining reciprocal relationships between objects.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;Allows you to maintain disjoint sets of edits of your model objects. Disjoint sets are useful if you want to, for example, allow the user to make edits in one view that may be discarded without affecting data displayed in another view.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;Allows you to keep just a subset of your model objects in memory at any given time. This is useful for keeping the memory footprint of your application as low as possible.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;Has an infrastructure for data store versioning and migration. This infrastructure lets you easily upgrade an old version of the data file to the current version.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
To support this functionality, Core Data uses a schema called a &lt;i&gt;managed object model&lt;/i&gt; that describes the entities in your application.&amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;b&gt;&lt;u&gt;Core Data Stack&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0.833em;"&gt;
A Core Data stack is composed of the following objects: one or more managed object contexts connected to a single persistent store coordinator which is in turn connected to one or more persistent stores. A stack contains all the Core Data components you need to fetch, create, and manipulate managed objects. Minimally it contains:&lt;/div&gt;
&lt;ul class="ul" style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; list-style-image: initial; list-style-position: outside; margin: 0px 0px 0.833em 1.35em; padding: 0px 0px 0.5em;"&gt;
&lt;li class="li" style="margin-top: 0.583em;"&gt;&lt;div style="display: inline; line-height: 1.6; margin-bottom: 0.833em; margin-top: 0.667em;"&gt;
An external persistent store that contains saved records.&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li" style="margin-top: 0.583em;"&gt;&lt;div style="display: inline; line-height: 1.6; margin-bottom: 0.833em; margin-top: 0.667em;"&gt;
A persistent object store that maps between records in the store and objects in your application.&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li" style="margin-top: 0.583em;"&gt;&lt;div style="display: inline; line-height: 1.6; margin-bottom: 0.833em; margin-top: 0.667em;"&gt;
A persistent store coordinator that aggregates all the stores.&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li" style="margin-top: 0.583em;"&gt;&lt;div style="display: inline; line-height: 1.6; margin-bottom: 0.833em; margin-top: 0.667em;"&gt;
A managed object model that describes the entities in the stores.&lt;/div&gt;
&lt;/li&gt;
&lt;li class="li" style="margin-top: 0.583em;"&gt;&lt;div style="display: inline; line-height: 1.6; margin-bottom: 0.833em; margin-top: 0.667em;"&gt;
A managed object context that provides a scratch pad for managed objects.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: x-small;"&gt;&lt;span style="line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://developer.apple.com/library/mac/documentation/DataManagement/Devpedia-CoreData/Art/single_persistent_stack.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="219" src="http://developer.apple.com/library/mac/documentation/DataManagement/Devpedia-CoreData/Art/single_persistent_stack.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: x-small;"&gt;&lt;span style="line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Managed Object&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;A managed object is a model object (in the model-view-controller sense) that represents a record from a persistent store. A managed object is an instance of&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: white; font-family: Courier, Consolas, monospace; font-size: 13px;"&gt;NSManagedObject&lt;/code&gt;&lt;span style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;&amp;nbsp;or a subclass of&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: white; font-family: Courier, Consolas, monospace; font-size: 13px;"&gt;NSManagedObject&lt;/code&gt;&lt;span style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;. A managed object is registered with a managed object context. In any given context, there is at most one instance of a managed object that corresponds to a given record in a persistent store.&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://developer.apple.com/library/mac/documentation/DataManagement/Devpedia-CoreData/Art/mapping_moc_record.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://developer.apple.com/library/mac/documentation/DataManagement/Devpedia-CoreData/Art/mapping_moc_record.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;span style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;A managed object has a reference to an entity description object that tells it what entity it represents. In this way,&lt;/span&gt;&lt;code style="background-color: white; font-family: Courier, Consolas, monospace; font-size: 13px;"&gt;NSManagedObject&lt;/code&gt;&lt;span style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;&amp;nbsp;can represent any entity—you don’t&amp;nbsp;&lt;/span&gt;&lt;em style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;need&lt;/em&gt;&lt;span style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;&amp;nbsp;a unique subclass per entity. You use a subclass if you want to implement custom behavior, for example to calculate a derived property value, or to implement validation logic.&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; color: #666666; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;Managed Object Context&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0.833em;"&gt;
&lt;b&gt;&lt;i&gt;A managed object context represents a single object space, or scratch pad, in a Core Data application.&lt;/i&gt;&lt;/b&gt; A managed object context is an instance of&amp;nbsp;&lt;code style="font-family: Courier, Consolas, monospace;"&gt;NSManagedObjectContext&lt;/code&gt;. &lt;b&gt;&lt;i&gt;Its primary responsibility is to manage a collection of managed objects. &lt;/i&gt;&lt;/b&gt;These managed objects represent an internally consistent view of one or more persistent stores. The context is a powerful object with a central role in the life-cycle of managed objects, with responsibilities from life-cycle management (including faulting) to validation, inverse relationship handling, and undo/redo.&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0.833em;"&gt;
From your perspective, the context is the central object in the Core Data stack. It’s the object you use to create and fetch managed objects, and to manage undo and redo operations. Within a given context, there is at most one managed object to represent any given record in a persistent store.&lt;/div&gt;
&lt;br /&gt;
&lt;span style="background-color: white; color: #666666; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://developer.apple.com/library/mac/documentation/DataManagement/Devpedia-CoreData/Art/moc_record.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://developer.apple.com/library/mac/documentation/DataManagement/Devpedia-CoreData/Art/moc_record.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style="background-color: white; color: #666666; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0.833em;"&gt;
A context is connected to a parent object store. This is usually a persistent store coordinator, but may be another managed object context. When you fetch objects, the context asks its parent object store to return those objects that match the fetch request. Changes that you make to managed objects are not committed to the parent store until you save the context.&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0.833em;"&gt;
In some applications, you may have just a single context. In others, however, you might have more than one. You might want to maintain discrete sets of managed objects and edits to those objects; or you might want to perform a background operation using one context while allowing the user to interact with objects in another.&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0.833em;"&gt;
&lt;b style="font-family: Times; font-size: medium; line-height: normal;"&gt;&lt;u&gt;Persistent Store Coordinator&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0.833em;"&gt;
&lt;b&gt;&lt;i&gt;A persistent store coordinator associates persistent object stores and a managed object model, and presents a facade to managed object contexts such that a group of persistent stores appears as a single aggregate store.&lt;/i&gt;&lt;/b&gt; A persistent store coordinator is an instance of&amp;nbsp;&lt;code style="font-family: Courier, Consolas, monospace;"&gt;&lt;a href="http://developer.apple.com/library/mac/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSPersistentStoreCoordinator_Class/NSPersistentStoreCoordinator.html#//apple_ref/occ/cl/NSPersistentStoreCoordinator" style="text-decoration: none;" target="_top"&gt;NSPersistentStoreCoordinator&lt;/a&gt;&lt;/code&gt;. It has a reference to a managed object model that describes the entities in the store or stores it manages.&lt;/div&gt;
&lt;div style="background-color: white; margin-bottom: 0.833em;"&gt;
&lt;/div&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0.833em;"&gt;
&lt;b style="font-family: Times; font-size: medium; line-height: normal;"&gt;&lt;u&gt;Fetch Request&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="margin-bottom: 0.833em;"&gt;
&lt;/div&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0.833em;"&gt;
&lt;b&gt;&lt;i&gt;A fetch request tells a managed object context the entity of the managed objects that you want to fetch; optionally, it specifies other aspects such as constraints on the values the objects' properties must have and the order you want the objects returned in.&lt;/i&gt;&lt;/b&gt; A fetch request is an instance of&amp;nbsp;&lt;code style="font-family: Courier, Consolas, monospace;"&gt;NSFetchRequest&lt;/code&gt;. The entity it specifies is represented by an instance of&amp;nbsp;&lt;code style="font-family: Courier, Consolas, monospace;"&gt;NSEntityDescription&lt;/code&gt;; any constraints are represented by an&amp;nbsp;&lt;code style="font-family: Courier, Consolas, monospace;"&gt;NSPredicate&lt;/code&gt;&amp;nbsp;object, and the ordering by an array of one or more instances of&amp;nbsp;&lt;code style="font-family: Courier, Consolas, monospace;"&gt;NSSortDescriptor&lt;/code&gt;. These are akin to the table name, WHERE clause, and ORDER BY clauses of a database SELECT statement respectively.&lt;/div&gt;
&lt;br /&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6;"&gt;
&lt;b style="font-family: Times; font-size: medium; line-height: normal;"&gt;&lt;u&gt;Persistent Store&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6;"&gt;
&lt;b style="line-height: 1.6;"&gt;&lt;i&gt;A persistent store is a repository in which managed objects may be stored.&lt;/i&gt;&lt;/b&gt;&lt;span style="line-height: 1.6;"&gt; You can think of a persistent store as a database data file where individual records each hold the last-saved values of a managed object. Core Data offers three native file types for a persistent store: binary, XML, and SQLite. You can implement your own store type if you want Core Data to interoperate with a custom file format or server. Core Data also provides an in-memory store that lasts no longer than the lifetime of a process.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style="background-color: white; margin-bottom: 0.833em;"&gt;
&lt;/div&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6;"&gt;
&lt;b style="font-family: Times; font-size: medium; line-height: normal;"&gt;&lt;u&gt;Managed Object Model&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6;"&gt;
&lt;b&gt;&lt;i&gt;A managed object model is a set of objects that together form a blueprint describing the managed objects you use in your application. &lt;/i&gt;&lt;/b&gt;A model allows Core Data to map from records in a persistent store to managed objects that you use in your application. It is a collection of entity description objects (instances of&amp;nbsp;&lt;code style="font-family: Courier, Consolas, monospace;"&gt;&lt;a href="http://developer.apple.com/library/mac/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSEntityDescription_Class/NSEntityDescription.html#//apple_ref/occ/cl/NSEntityDescription" style="text-decoration: none;" target="_top"&gt;NSEntityDescription&lt;/a&gt;&lt;/code&gt;). An entity description describes an entity (which you can think of as a table in a database) in terms of its name, the name of the class used to represent the entity in your application, and what properties (attributes and relationships) it has.&lt;/div&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6;"&gt;
&lt;div style="line-height: 1.6;"&gt;
&lt;b style="font-family: Times; font-size: medium; line-height: normal;"&gt;&lt;u&gt;Persistent Object Store&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6; margin-bottom: 0.833em;"&gt;
&lt;b&gt;&lt;i&gt;A persistent object store maps between objects in your application and records in a persistent store. &lt;/i&gt;&lt;/b&gt;There are different classes of persistent object store for the different file types that Core Data supports. You can also implement your own if you want to support a custom file type.&lt;/div&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6;"&gt;
&lt;b style="font-family: Times; font-size: medium; line-height: normal;"&gt;&lt;u&gt;Mapping Model&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6;"&gt;
&lt;b&gt;&lt;i&gt;A Core Data mapping model describes the transformations that are required to migrate data described by a source managed object model to the schema described by a destination model.&lt;/i&gt;&lt;/b&gt; When you make a new version of a managed object model, you need to migrate persistent stores from the old schema to the new.&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: x-small;"&gt;&lt;span style="line-height: 20px;"&gt;&lt;a href="http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreDataVersioning/Articles/Introduction.html#//apple_ref/doc/uid/TP40004399"&gt;&lt;i&gt;Core Data Model Versioning and Data Migration Programming Guide&lt;/i&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.6;"&gt;
&lt;a href="http://developer.apple.com/library/mac/documentation/General/Conceptual/ConcurrencyProgrammingGuide/ConcurrencyProgrammingGuide.pdf" style="background-color: transparent; line-height: 1.6;"&gt;Concurrency Programming Guide&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Summary of Concurrency Programming Guide&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
There needs to be a way for applications to take advantage of a variable number of computer cores. The amount of work performed by a single application also needs to be able to scale dynamically to accommodate changing system conditions. And the solution has to be simple enough so as to not increase the amount of work needed to take advantage of those cores.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;The Move Away from Threads&lt;/u&gt;:&lt;br /&gt;
Instead of relying on threads, Mac OS X and iOS take an asynchronous design approach to solving the concurrency problem. In Mac OS X and iOS allows you to perform any task asynchronously without having to manage the threads yourself.&lt;br /&gt;
&lt;br /&gt;
One of the technologies for starting tasks asynchronously is &lt;b&gt;Grand Central Dispatch (GCD)&lt;/b&gt;. This technology takes the thread management code you would normally write in your own applications and moves that code down to the system level. All you have to do is define the tasks you want to exectute and add them to an appropriate dispatch queue. GCD takes care of creating the needed threads and of scheduling tasks to run on those threads. Because the thread management is now part of the system, GCD provides a holistic approach to task&amp;nbsp;management&amp;nbsp;and execution, providing better efficiency than traditional threads.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Operation queues &lt;/b&gt;are&amp;nbsp;Objective-C objects that act very much like dispatch queues. You define the tasks you want to execute and then add them to an operation queue, which handles the scheduling and execution of those tasks. Like GCD, operation queues handle all of the thread management for you, ensuring that tasks are executed as quickly and efficiently as possible on the system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Dispatch queues &lt;/b&gt;are a C-based mechanism for executing custom tasks. A &lt;b&gt;dispatch queue&lt;/b&gt;&amp;nbsp;executes tasks either serially or concurrently but always in a first-in, first-out order.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-weight: bold;"&gt;
Dispatch queues have other benefits:&lt;/div&gt;
● They provide a straightforward and simple programming interface.&lt;br /&gt;
● They offer automatic and holistic thread pool management.&lt;br /&gt;
● They provide the speed of tuned assembly.&lt;br /&gt;
● They are much more memory efficient (because thread stacks do not linger in application memory).&lt;br /&gt;
● They do not trap to the kernel under load.&lt;br /&gt;
● The asynchronous dispatching of tasks to a dispatch queue cannot deadlock the queue.&lt;br /&gt;
● They scale gracefully under contention.&lt;br /&gt;
● Serial dispatch queues offer a more efficient alternative to locks and other synchronization primitives.&lt;br /&gt;
&lt;br /&gt;
The tasks you submit to a dispatch queue must be encapsulated inside either a function or a block object. &lt;b&gt;Block objects&lt;/b&gt;&amp;nbsp;are a C language feature introduced in Mac OS X v 10.6 and iOS 4.0 that are similar to function pointers conceptually, but have some addition benefits.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Dispatch sources &lt;/b&gt;are a C-based mechanism for processing specific types of system events asynchronously. A dispatch source encapsulates information about particular type of system event and submits a specific block object or function to a dispatch queue whenever the event occurs.&lt;br /&gt;
&lt;br /&gt;
An &lt;b&gt;operation queue &lt;/b&gt;is the Cocoa equivalent of a concurrent dispatch queue and is implemented by the &lt;i&gt;NSOperationQueue&lt;/i&gt; class. Whereas dispatch queues always execute tasks first-in, first-out order, operation queues take other factors into account when determining the execution order of tasks.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;You can use dispatch sources to monitor the following types of events:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
● Timers&lt;br /&gt;
● Signal handlers&lt;br /&gt;
● Descriptor-related events&lt;br /&gt;
● Process-related events&lt;br /&gt;
● Mach port events&lt;br /&gt;
● Custom events that you trigger&lt;br /&gt;
&lt;br /&gt;
Before you even consider redesigning your code to support concurrency, you should ask yourself whether doing so is&amp;nbsp;necessary. Concurrency can improve the responsiveness of your code by ensuring that your main thread is free to respond to user events. It can even improve the efficiency of your code by leveraging more cores to do more work in the same amount of time. &lt;b&gt;However, it also adds overhead and increases the overall complexity of your code, making it harder to write and debug your code.&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Tips for Improving Efficiency:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
● Consider computing values directly within your task if memory usage is a factor.&lt;br /&gt;
●&amp;nbsp;Identify serial tasks early and do what you can to make them more concurrent.&lt;br /&gt;
&lt;div style="display: inline !important;"&gt;
● Avoid using locks.&amp;nbsp;&lt;/div&gt;
&lt;div style="display: inline !important;"&gt;
● Rely on the system frameworks whenever possible.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href="http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/coredata/Articles/cdConcurrency.html#//apple_ref/doc/uid/TP40003385-SW1"&gt;Core Data Programming Guide&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Summary of Core Data Programming Guide&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
1. There are several situations in which performing operating with Core Data on a background thread or thread queues beneficial, in particular if you want to ensure that your application's user interface remain responsive while Core Data is undertaking a long-running task.&lt;br /&gt;
&lt;br /&gt;
The pattern recommended for concurrent programming with Core Data is thread confinement: each thread must have its own entirely private managed object context.&lt;br /&gt;
&lt;br /&gt;
There are two possible ways to adopt the pattern:&lt;br /&gt;
&lt;br /&gt;
1. Create a separate managed object context for each thread and share a single persistent store coordinator.&lt;br /&gt;
&lt;br /&gt;
2. Create a separate managed object context and persistent store coordinator for each thread.&lt;br /&gt;
&lt;br /&gt;
This approach provides for greater concurrency at the expense of greater complexity (particular if you need to communicate changes between different contexts) and increase memory usage.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://developer.apple.com/library/ios/#samplecode/ThreadedCoreData/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010723"&gt;Threaded Core Data&lt;/a&gt;&lt;br /&gt;
Note: You can use threads, serial operations queues, or dispatch queues for concurrency. For the sake of conciseness, this article uses "thread" throughout to refer to refer to any to these.&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Blocks simplify function callbacks.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;*&lt;/b&gt; is a pointer to a function. i.e. int (*cmpr)(int, int)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;^ &lt;/b&gt;is a pointer to a block. i.e. int(^cmpr)(int, int)&lt;/li&gt;
&lt;li&gt;A block is a chunk of executable code. The caret introduces a block literal and the curly braces enclose statements that make up the body of the block. The most common way to use a block is to pass it a method that in turn calls the block.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;In practice, blocks are most useful when you pass them as parameters to methods that in turn call the block.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;In practice, it's more convenient to use inline blocks rather than assigning the block to a typed variable and then passing it to the method.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Great Objective-C Programming Resources Here:&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;&lt;a href="http://www.ict.griffith.edu.au/teaching/2501ICT/content.shtml"&gt;http://www.ict.griffith.edu.au/teaching/2501ICT/content.shtml&lt;/a&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;&lt;a href="http://www.macresearch.org/cocoa-scientists-xxxii-10-uses-blocks-cobjective-c"&gt;http://www.macresearch.org/cocoa-scientists-xxxii-10-uses-blocks-cobjective-c&lt;/a&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Programming Blocks and Uses for Blocks in C/Objective-C&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;Example Code:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href="https://gist.github.com/2945487"&gt;https://gist.github.com/2945487&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Project: &lt;a href="http://bit.ly/P66DdR"&gt;http://bit.ly/P66DdR&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>http://kurrytran.blogspot.com/2012/06/concurrency-with-core-data-tutorial.html</link><author>noreply@blogger.com (Unknown)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7889009576291030100.post-879035959623792104</guid><pubDate>Sat, 25 Feb 2012 19:27:00 +0000</pubDate><atom:updated>2012-12-23T22:18:28.076-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">tutorial</category><title>Tutorial: How To Uninstall Mountain Lion OS X</title><description>Story: I have a problem of downloading and installing any new Apple product once it comes out and so I downloaded and installed Mountain Lion OS X on my main machine (MacBook Air) and then I realized that it had a lot of problems and a lot of my programs were having not compatible with it, so I tried to uninstall it. I ran into a lot of trouble and there was not a lot of good info online and it took me a long time how to figure out (14+ hours), so I thought I would write a blog post so other people wouldn't have to go through the same trouble. This blog post is short because I have a ton of homework and life stuff so I just put the most essential info in it.&lt;br /&gt;
&lt;br /&gt;
1. I first tried to log into my Mac Developer Account and download Mac OS X Lion through the Mac App Store, but the installer will tell you that you can't install Mac OS X Lion because you have a newer version of Mac OS X installed.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeNXKaDN_Vl3Cf7Hk8hXdwhQQRhCMUD-Yl-xrteppGhLqD2wU8MkpeXDpNwgkMiNeBSLlzIKgqTVoi3OM7hvCpi4NjlbHLxY6FbykdPgkCMmCDvDgJ3uDmIzEIt6FgFFeGO4TWoHpe2g/s1600/Screen+Shot+2012-02-25+at+2.04.41+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="497" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeNXKaDN_Vl3Cf7Hk8hXdwhQQRhCMUD-Yl-xrteppGhLqD2wU8MkpeXDpNwgkMiNeBSLlzIKgqTVoi3OM7hvCpi4NjlbHLxY6FbykdPgkCMmCDvDgJ3uDmIzEIt6FgFFeGO4TWoHpe2g/s640/Screen+Shot+2012-02-25+at+2.04.41+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
2. I then obtained the &lt;i&gt;Install Mac OS X Lion &lt;/i&gt;through another means (you should find some way to get this). Note: You have to get Mac OS X Lion 10.7.2 or above.&lt;br /&gt;
&lt;br /&gt;
Once I obtained it if you double click the installer nothing will happen. Right click the app and click show package contents.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOMxi9APCWyIgIONE7CSKhHVO_3NghMRnyvnnGqi2ABjXjFCIMq8e2D-8jpDiOt1QvDw0P_KGFnc_GVN4vEQ_5OaoUeNgwmlFd4WgsMNwsd1329UgiOevJTs1zqu5nKVdPU0xgo5A7VA/s1600/Screen+Shot+2012-02-25+at+2.10.13+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOMxi9APCWyIgIONE7CSKhHVO_3NghMRnyvnnGqi2ABjXjFCIMq8e2D-8jpDiOt1QvDw0P_KGFnc_GVN4vEQ_5OaoUeNgwmlFd4WgsMNwsd1329UgiOevJTs1zqu5nKVdPU0xgo5A7VA/s400/Screen+Shot+2012-02-25+at+2.10.13+PM.png" width="300" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
3. Go to Contents &amp;gt; SharedSupport &amp;gt; OSinstall.mpkg and double click the package and you will get this error.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj310U-KE0u0_KEc_WmH60_etKLXjYmuliachqA2fFtRND23khHTCw4XPKRnGyMYJpw_-V4QRmT5TFq3kP1DyKqItWjLPIairefpZFVPW2Et0VOmR04kxpue8zZGe6tA5pqkJnMHM9QhQ/s1600/Screen+Shot+2012-02-25+at+2.11.55+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="456" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj310U-KE0u0_KEc_WmH60_etKLXjYmuliachqA2fFtRND23khHTCw4XPKRnGyMYJpw_-V4QRmT5TFq3kP1DyKqItWjLPIairefpZFVPW2Et0VOmR04kxpue8zZGe6tA5pqkJnMHM9QhQ/s640/Screen+Shot+2012-02-25+at+2.11.55+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
4. In Finder search for the Disk Utility App and create a partition for Mac OS X Lion.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh8_kiuFcTQjs41p9D9ouRWAaYUfCuHEgcl-edtHdeqsmOyy4MVLFF54HuU8ZGyCnMPdsyklDrwSWjG3cv-Bp3bJi9kz4tuZXgn-irNoDTjB9AyvPo4wtDLpTYiwlG84PRYIK-4mnazQ/s1600/Screen+Shot+2012-02-25+at+2.15.02+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="552" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh8_kiuFcTQjs41p9D9ouRWAaYUfCuHEgcl-edtHdeqsmOyy4MVLFF54HuU8ZGyCnMPdsyklDrwSWjG3cv-Bp3bJi9kz4tuZXgn-irNoDTjB9AyvPo4wtDLpTYiwlG84PRYIK-4mnazQ/s640/Screen+Shot+2012-02-25+at+2.15.02+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
5. Once you create a partition you have to open &lt;i&gt;Terminal &lt;/i&gt;to change the Mac OS X version number so you can install Mac OS X Lion on the partition.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Before:&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJGhxYkc71yuQ51NisJtYJKjTkCwTAPlGcmcgmCULRyhc81RQAI4YFUl9ChUPpzVU8wuBr1uH21IjvHFasQhYidExZB9VlIKTIh9ERYXpGXbk1iJEBvo_79vQWZNF_kU6d696Q3WXofQ/s1600/Screen+Shot+2012-02-25+at+2.17.03+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJGhxYkc71yuQ51NisJtYJKjTkCwTAPlGcmcgmCULRyhc81RQAI4YFUl9ChUPpzVU8wuBr1uH21IjvHFasQhYidExZB9VlIKTIh9ERYXpGXbk1iJEBvo_79vQWZNF_kU6d696Q3WXofQ/s320/Screen+Shot+2012-02-25+at+2.17.03+PM.png" width="263" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
6. To change the Mac OS X version number you have to change the settings of the file &lt;i&gt;/System/Library/CoreServices/SystemVersion.plist&lt;/i&gt; and then modify it in a text editor.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz_-NqsDlZPbOW4HtUoBSKYRX_uzqdq0kh01neIBdcOWIU0UVSHy-Ihuo5FuT8d0CtQXA-Mg2XRkYzGVUkboKbCNOHWLOuH1cs32U45-QoOGfxci9ojXAOdt0h1yyYkRMQa6h8bzBR8A/s1600/Screen+Shot+2012-02-25+at+2.19.59+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="338" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz_-NqsDlZPbOW4HtUoBSKYRX_uzqdq0kh01neIBdcOWIU0UVSHy-Ihuo5FuT8d0CtQXA-Mg2XRkYzGVUkboKbCNOHWLOuH1cs32U45-QoOGfxci9ojXAOdt0h1yyYkRMQa6h8bzBR8A/s640/Screen+Shot+2012-02-25+at+2.19.59+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Before:&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVKz6LAQdtB_5QtuaSl_InLXyvTJD-QF0FET5LbCsiNQwkXmMDO8AOC66qt1JqqJadm76VkHQbVP3JQh1SPfFtfuGMLOxgrQKKxmduT4UX6BL29i0wG23ThvCo_P4xtPARYgjz3oS_rQ/s1600/Screen+Shot+2012-02-25+at+2.19.27+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVKz6LAQdtB_5QtuaSl_InLXyvTJD-QF0FET5LbCsiNQwkXmMDO8AOC66qt1JqqJadm76VkHQbVP3JQh1SPfFtfuGMLOxgrQKKxmduT4UX6BL29i0wG23ThvCo_P4xtPARYgjz3oS_rQ/s640/Screen+Shot+2012-02-25+at+2.19.27+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
After:&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span id="goog_1098614903"&gt;&lt;/span&gt;&lt;span id="goog_1098614904"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgChvEk11WO6-RILff_M0ZoL2duEDx8hc_8YnqxN4hNOyZJ3cOPe3BjT-98uVBblHi-XiwAj0U4ZIsX8DCR-flO1_lZETdck4ATUun0jLuDjwjeTeMZum6XnmXq19nLncyK0PQ7g9wETw/s1600/Screen+Shot+2012-02-25+at+2.19.45+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgChvEk11WO6-RILff_M0ZoL2duEDx8hc_8YnqxN4hNOyZJ3cOPe3BjT-98uVBblHi-XiwAj0U4ZIsX8DCR-flO1_lZETdck4ATUun0jLuDjwjeTeMZum6XnmXq19nLncyK0PQ7g9wETw/s640/Screen+Shot+2012-02-25+at+2.19.45+PM.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglywB54Et_b-MfaHt82_GsiFzC6LgtePgrBztQPvkJasQ0kJsnVRUghlbCxMrInjWTdxlZo8DTZI_EaDZsv0CDZJ3_pfqdilm5NRxXU414wgWnoP70EP5K-YYNZx4QfurZcjVC58CSrg/s1600/Screen+Shot+2012-02-25+at+2.20.09+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglywB54Et_b-MfaHt82_GsiFzC6LgtePgrBztQPvkJasQ0kJsnVRUghlbCxMrInjWTdxlZo8DTZI_EaDZsv0CDZJ3_pfqdilm5NRxXU414wgWnoP70EP5K-YYNZx4QfurZcjVC58CSrg/s400/Screen+Shot+2012-02-25+at+2.20.09+PM.png" width="323" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
7. Then you should be able to run the installer and install Mac OS X Lion on the disk partition. I think this worked for me. If not drag and drop the package contents of the installer app into the new partition and then restart your computer and load the new disk partition. (Restart the computer and hold the &lt;i&gt;option&lt;/i&gt;&amp;nbsp;button and then select the correct disk partition)&amp;nbsp;&lt;b&gt;Do not restore the Mac OS X Lion disk image into the disk partition.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
8. If you could not run the Mac OS X Lion installer from OS X Mountain Lion, mount the disk image and copy the entire contents of that into your new disk partition, and then load that on startup.&amp;nbsp;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ3HlstpAo0QhWdmOrv-WvTeDfjTw2oxreYMRK96pAUpyd8RRe5mArozHqSOLS0B-vOi4_oY7oAMLhmvAcK8LX_CgmgGCF-BJKOYsVbul-df_k8NNZ6YNkTQ0Sy2-NcHpDjJSykjvSaQ/s1600/Screen+Shot+2012-02-25+at+2.49.09+PM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQ3HlstpAo0QhWdmOrv-WvTeDfjTw2oxreYMRK96pAUpyd8RRe5mArozHqSOLS0B-vOi4_oY7oAMLhmvAcK8LX_CgmgGCF-BJKOYsVbul-df_k8NNZ6YNkTQ0Sy2-NcHpDjJSykjvSaQ/s320/Screen+Shot+2012-02-25+at+2.49.09+PM.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;Note: If you get errors about the disk being locked you did something wrong. Create a brand new partition and drag and drop the installer package contents into the new disk partition, and then restart the computer.&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><link>http://kurrytran.blogspot.com/2012/02/how-to-uninstall-mountain-lion-os-x.html</link><author>noreply@blogger.com (Unknown)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeNXKaDN_Vl3Cf7Hk8hXdwhQQRhCMUD-Yl-xrteppGhLqD2wU8MkpeXDpNwgkMiNeBSLlzIKgqTVoi3OM7hvCpi4NjlbHLxY6FbykdPgkCMmCDvDgJ3uDmIzEIt6FgFFeGO4TWoHpe2g/s72-c/Screen+Shot+2012-02-25+at+2.04.41+PM.png" width="72"/><thr:total>11</thr:total></item></channel></rss>