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

<channel>
	<title>James Border &#187; Uncategorized</title>
	<atom:link href="http://jamesborder.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://jamesborder.com</link>
	<description>Interactive/Mobile/iOS Developer</description>
	<lastBuildDate>Tue, 01 May 2012 21:31:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Objective-C CGrect as constant</title>
		<link>http://jamesborder.com/2011/09/objective-c-cgrect-as-constant/</link>
		<comments>http://jamesborder.com/2011/09/objective-c-cgrect-as-constant/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 18:08:06 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=915</guid>
		<description><![CDATA[in where-ever.h extern const CGRect kMY_RECT; in where-ever.m const CGRect kMY_RECT = { { 0.0f, 39.0f }, { 768.0f, 432.0f } }; use somethingWithA.frame = kMY_RECT;]]></description>
			<content:encoded><![CDATA[<p>in where-ever.h<br />
extern const CGRect kMY_RECT;</p>
<p>in where-ever.m<br />
const CGRect kMY_RECT = { { 0.0f, 39.0f }, { 768.0f, 432.0f } };</p>
<p>use<br />
somethingWithA.frame = kMY_RECT;</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2011/09/objective-c-cgrect-as-constant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create some file and directory if they don&#8217;t exist</title>
		<link>http://jamesborder.com/2011/09/create-some-file-and-directory-if-they-dont-exist/</link>
		<comments>http://jamesborder.com/2011/09/create-some-file-and-directory-if-they-dont-exist/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 20:06:09 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[IOS]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=950</guid>
		<description><![CDATA[BOOL didItWork = [self createDirAndFile:@"index.html" inDir:@"somedirectory"]; NSLog(@&#8221;WAS FILE CREATED? %i&#8221;, didItWork); // methods used -(BOOL)createDirAndFile:(NSString*)fileName inDir:(NSString*)dir { NSString *str = @&#8221;whatever needs to be in the file when created&#8221;; NSData *data=[str dataUsingEncoding:NSUTF8StringEncoding]; NSFileManager *filemgr = [NSFileManager defaultManager]; NSString *documentsDirectoryPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSLog(@&#8221; documentsDirectoryPath = %@&#8221;, documentsDirectoryPath); NSString *targetDir = [documentsDirectoryPath stringByAppendingPathComponent:dir]; NSLog(@&#8221; <a href='http://jamesborder.com/2011/09/create-some-file-and-directory-if-they-dont-exist/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>	BOOL didItWork = [self createDirAndFile:@"index.html" inDir:@"somedirectory"];<br />
	NSLog(@&#8221;WAS FILE CREATED? %i&#8221;, didItWork);</p>
<p>// methods used</p>
<p>-(BOOL)createDirAndFile:(NSString*)fileName inDir:(NSString*)dir {</p>
<p>	NSString *str = @&#8221;whatever needs to be in the file when created&#8221;;<br />
	NSData *data=[str dataUsingEncoding:NSUTF8StringEncoding];</p>
<p>	NSFileManager *filemgr = [NSFileManager defaultManager];</p>
<p>	NSString *documentsDirectoryPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];<br />
	NSLog(@&#8221; documentsDirectoryPath = %@&#8221;, documentsDirectoryPath);</p>
<p>	NSString *targetDir = [documentsDirectoryPath stringByAppendingPathComponent:dir];<br />
	NSLog(@&#8221; targetDir = %@&#8221;, targetDir);</p>
<p>	NSString *targetFile = [targetDir stringByAppendingPathComponent:fileName];<br />
	NSLog(@&#8221; targetFile = %@&#8221;, targetFile);</p>
<p>	BOOL isDir;</p>
<p>    if (![filemgr fileExistsAtPath:targetDir isDirectory:&#038;isDir]) {</p>
<p>		NSLog(@&#8221;Directory did not exist so create it&#8221;);<br />
		[filemgr createDirectoryAtPath:targetDir withIntermediateDirectories:NO attributes:nil error:nil];</p>
<p>		NSLog(@&#8221;If the target directory did not exist the file we are creating certainly did not exist so create it&#8221;);<br />
		return [self createMyFile:targetFile contents:data];</p>
<p>	} else {</p>
<p>		return [self createMyFile:targetFile contents:data];</p>
<p>	}</p>
<p>}</p>
<p>-(BOOL) createMyFile:(NSString*)desiredFile contents:(NSData*)fileContents {</p>
<p>	if ( ![[NSFileManager defaultManager] fileExistsAtPath:desiredFile] ) {</p>
<p>		[[NSFileManager defaultManager] createFileAtPath:desiredFile contents:fileContents attributes:nil];<br />
		return YES;</p>
<p>	}</p>
<p>	return NO;</p>
<p>}</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2011/09/create-some-file-and-directory-if-they-dont-exist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS/Objective-C Dump NSUserDefaults</title>
		<link>http://jamesborder.com/2011/05/iosobjective-c-dump-nsuserdefaults/</link>
		<comments>http://jamesborder.com/2011/05/iosobjective-c-dump-nsuserdefaults/#comments</comments>
		<pubDate>Tue, 10 May 2011 21:41:33 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=813</guid>
		<description><![CDATA[NSLog(@&#8221;NSUserDefaults dump: %@&#8221;, [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]);]]></description>
			<content:encoded><![CDATA[<p>NSLog(@&#8221;NSUserDefaults dump: %@&#8221;, [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]);</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2011/05/iosobjective-c-dump-nsuserdefaults/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So what&#8217;s the latest</title>
		<link>http://jamesborder.com/2011/03/lorem-ipsum-foo/</link>
		<comments>http://jamesborder.com/2011/03/lorem-ipsum-foo/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 07:27:09 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=740</guid>
		<description><![CDATA[So what have I done lately? Check here]]></description>
			<content:encoded><![CDATA[<div style="width:130px; height:125px; float:left;">
<a href="http://itunes.apple.com/us/app/number-farm/id464669749?ls=1&#038;mt=8" target="_blank"><img src="http://jamesborder.com/wp-content/uploads/2012/01/Icon-NumberFarm.png" alt="" title="Number Farm" width="125" height="125" class="alignnone size-full wp-image-821"  style="float:left; padding:5px"/></a>
</div>
<div style="width:130px; height:125px; float:left;">
<a href="http://itunes.apple.com/us/app/the-bungaloo/id441890792?mt=8" target="_blank"><img src="http://jamesborder.com/wp-content/uploads/2011/06/TheBungaloo1-150x150.png" alt="" title="TheBungaloo" width="125" height="125" class="alignnone size-thumbnail wp-image-831" style="float:left; padding:5px"/></a>
</div>
<div style="width:130px; height:125px; float:left;">
<a href="http://itunes.apple.com/us/app/get-organized!-peter-walsh/id470423056?mt=8" target="_blank"><img src="http://jamesborder.com/wp-content/uploads/2011/10/PeterWalsh.png" alt="" title="Getting Organized!" width="125" height="125" class="alignnone size-thumbnail wp-image-831" style="float:left; padding:5px"/></a>
</div>
<div style="width:130px; height:125px; float:left;">
<a href="http://itunes.apple.com/us/app/shock-top/id419030705?mt=8" target="_blank"><img src="http://jamesborder.com/wp-content/uploads/2011/06/logo_shocktop-150x150.png" alt="" title="Shocktop" width="125" height="125" class="alignnone size-thumbnail wp-image-822"  style="float:left; padding:5px"/></a>
</div>
<div style="width:130px; height:125px; float:left;">
<a href="http://itunes.apple.com/us/app/mpiradcalc/id440318973?mt=8" target="_blank"><img src="http://jamesborder.com/wp-content/uploads/2011/06/logo_mpiradcalc.png" alt="" title="MPIRadCalc" width="125" height="125" class="alignnone size-full wp-image-821"  style="float:left; padding:5px"/></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2011/03/lorem-ipsum-foo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective-c simple animation</title>
		<link>http://jamesborder.com/2011/03/objective-c-simple-animation/</link>
		<comments>http://jamesborder.com/2011/03/objective-c-simple-animation/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 19:06:19 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=762</guid>
		<description><![CDATA[NSArray * imageArray = [[[NSArray alloc] initWithObjects: [UIImage imageNamed:@"fr01.png"], [UIImage imageNamed:@"fr02.png"], [UIImage imageNamed:@"fr03.png"], [UIImage imageNamed:@"fr04.png"], [UIImage imageNamed:@"fr05.png"], nil] autorelease]; UIImageView * waveAnime = [[[UIImageView alloc] initWithFrame: CGRectMake(0, 125, 150, 75)] autorelease]; waveAnime.animationImages = imageArray; waveAnime.animationDuration = 2.0; waveAnime.contentMode = UIViewContentModeBottomLeft; [self.view addSubview:waveAnime]; [waveAnime startAnimating];]]></description>
			<content:encoded><![CDATA[<p><code>	NSArray * imageArray  = [[[NSArray alloc] initWithObjects:<br />
							 [UIImage imageNamed:@"fr01.png"],<br />
							 [UIImage imageNamed:@"fr02.png"],<br />
							 [UIImage imageNamed:@"fr03.png"],<br />
							 [UIImage imageNamed:@"fr04.png"],<br />
							 [UIImage imageNamed:@"fr05.png"],<br />
							 nil] autorelease];</p>
<p>	UIImageView * waveAnime = [[[UIImageView alloc] initWithFrame: CGRectMake(0, 125, 150, 75)] autorelease];</p>
<p>	waveAnime.animationImages = imageArray;<br />
	waveAnime.animationDuration = 2.0;<br />
	waveAnime.contentMode = UIViewContentModeBottomLeft;</p>
<p>	[self.view addSubview:waveAnime];</p>
<p>	[waveAnime startAnimating];	</code></p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2011/03/objective-c-simple-animation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The application was not install on iphone because its resources have been modified</title>
		<link>http://jamesborder.com/2011/01/the-application-was-not-install-on-iphone-because-its-resources-have-been-modified/</link>
		<comments>http://jamesborder.com/2011/01/the-application-was-not-install-on-iphone-because-its-resources-have-been-modified/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 04:31:52 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=698</guid>
		<description><![CDATA[Add yet another possible solution for the error: The application was not install on iphone because its resources have been modified I was working off a thumb drive, after trying alot of other solutions I simply removed the project directory off the thumb drive and the problem went away. This probably isn&#8217;t your problem but <a href='http://jamesborder.com/2011/01/the-application-was-not-install-on-iphone-because-its-resources-have-been-modified/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Add yet another possible solution for the error:</p>
<p>The application was not install on iphone because its resources have been modified</p>
<p>I was working off a thumb drive, after trying alot of other solutions I simply removed the project directory off the thumb drive and the problem went away. This probably isn&#8217;t your problem but if your working off of some kind of removable media try moving the project.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2011/01/the-application-was-not-install-on-iphone-because-its-resources-have-been-modified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop blog spam (close comment_status)</title>
		<link>http://jamesborder.com/2010/08/stop-blog-spam-close-comment_status/</link>
		<comments>http://jamesborder.com/2010/08/stop-blog-spam-close-comment_status/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 05:21:25 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=614</guid>
		<description><![CDATA[UPDATE `your_data_base`.`wp_posts` SET `comment_status` = &#8216;closed&#8217;, `ping_status` = &#8216;closed&#8217; WHERE `wp_posts`.`comment_status` LIKE &#8216;open&#8217; Overkill yeah&#8230; but good grief I akismet is spassing out and I just don&#8217;t have time to mess with it.]]></description>
			<content:encoded><![CDATA[<p>UPDATE  `your_data_base`.`wp_posts` SET `comment_status` = &#8216;closed&#8217;, `ping_status` = &#8216;closed&#8217; WHERE `wp_posts`.`comment_status` LIKE &#8216;open&#8217; </p>
<p>Overkill yeah&#8230; but good grief I akismet is spassing out and I just don&#8217;t have time to mess with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/08/stop-blog-spam-close-comment_status/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rotate laptop screen</title>
		<link>http://jamesborder.com/2010/06/rotate-laptop-screen/</link>
		<comments>http://jamesborder.com/2010/06/rotate-laptop-screen/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 02:42:13 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=554</guid>
		<description><![CDATA[With &#8220;xrandr -o right&#8221; you can rotate the screen and hold the laptop like a book. On my laptop my thumb can sit nicely on the up/down arrows for page turning and it feels much more natural for prolonged periods of reading. Just run &#8220;xrand -o normal&#8221; to get back to the normal screen orientation. <a href='http://jamesborder.com/2010/06/rotate-laptop-screen/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>With &#8220;xrandr -o right&#8221; you can rotate the screen and hold the laptop like a book. On my laptop my thumb can sit nicely on the up/down arrows for page turning and it feels much more natural for prolonged periods of reading. Just run &#8220;xrand -o normal&#8221; to get back to the normal screen orientation.</p>
<p>reddit.com > foobster</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/06/rotate-laptop-screen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove the dotted line Firefox puts around links</title>
		<link>http://jamesborder.com/2010/03/remove-the-dotted-line-firefox-puts-around-links/</link>
		<comments>http://jamesborder.com/2010/03/remove-the-dotted-line-firefox-puts-around-links/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 06:02:18 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=498</guid>
		<description><![CDATA[:focus { -moz-outline-style: none; } and/or a { outline: none; }]]></description>
			<content:encoded><![CDATA[<p>:focus {<br />
  -moz-outline-style: none;<br />
}</p>
<p>and/or<br />
a {<br />
  outline: none;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2010/03/remove-the-dotted-line-firefox-puts-around-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql Dump from shell</title>
		<link>http://jamesborder.com/2009/11/mysql-dump-from-shell/</link>
		<comments>http://jamesborder.com/2009/11/mysql-dump-from-shell/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 04:23:40 +0000</pubDate>
		<dc:creator>me</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamesborder.com/?p=437</guid>
		<description><![CDATA[I wouldn&#8217;t deploy this as is but here is a good starting point. Tweek to fit and cron. #!/bin/bash ### MySQL Server Login Info ### MUSER="USER" MPASS="PASSWORD" MHOST="localhost" MYSQL="$(which mysql)" MYSQLDUMP="$(which mysqldump)" BAK="./dumps" GZIP="$(which gzip)" NOW=$(date +"%Y-%m-%d") [ ! -d $BAK ] &#038;&#038; mkdir -p $BAK/$NOW &#124;&#124; /bin/rm -f $BAK/* DBS="$($MYSQL -u $MUSER -h $MHOST <a href='http://jamesborder.com/2009/11/mysql-dump-from-shell/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I wouldn&#8217;t deploy this as is but here is a good starting point. Tweek to fit and cron.<br />
<code>#!/bin/bash</p>
<p>### MySQL Server Login Info ###<br />
MUSER="USER"<br />
MPASS="PASSWORD"<br />
MHOST="localhost"<br />
MYSQL="$(which mysql)"<br />
MYSQLDUMP="$(which mysqldump)"</p>
<p>BAK="./dumps"<br />
GZIP="$(which gzip)"</p>
<p>NOW=$(date +"%Y-%m-%d")</p>
<p>[ ! -d $BAK ] &#038;&#038; mkdir -p $BAK/$NOW || /bin/rm -f $BAK/*</p>
<p>DBS="$($MYSQL -u $MUSER -h $MHOST -p$MPASS -Bse 'show databases')"</p>
<p>for db in $DBS<br />
do</p>
<p>	FILE=$BAK/$NOW/$db.$NOW.gz<br />
	$MYSQLDUMP -u $MUSER -h $MHOST -p$MPASS $db | $GZIP -9 > $FILE</p>
<p>done<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://jamesborder.com/2009/11/mysql-dump-from-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

