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

<channel>
	<title>Icicles</title>
	<atom:link href="http://deshartman.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://deshartman.wordpress.com</link>
	<description>My randon discoveries</description>
	<lastBuildDate>Wed, 18 Jan 2012 22:32:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='deshartman.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Icicles</title>
		<link>http://deshartman.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://deshartman.wordpress.com/osd.xml" title="Icicles" />
	<atom:link rel='hub' href='http://deshartman.wordpress.com/?pushpress=hub'/>
		<item>
		<title>NSFetchedResultsController</title>
		<link>http://deshartman.wordpress.com/2012/01/19/nsfetchedresultscontroller/</link>
		<comments>http://deshartman.wordpress.com/2012/01/19/nsfetchedresultscontroller/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 21:31:41 +0000</pubDate>
		<dc:creator>deshartman</dc:creator>
				<category><![CDATA[OSX]]></category>
		<category><![CDATA[XCode]]></category>

		<guid isPermaLink="false">http://deshartman.wordpress.com/2012/01/19/nsfetchedresultscontroller/</guid>
		<description><![CDATA[Instead of using the usual NSFetchRequest *request = [NSFetchRequestfetchRequestWithEntityName:@"SomeClass"]; which is prone to String typos, rather use NSFetchRequest *request = [NSFetchRequestfetchRequestWithEntityName:NSStringFromClass([SomeClassclass])]; This is a neat way to tie the name of the class to the entity. Of course you have to make sure that you have done the whole CoreData DataModel and create entity based [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=189&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Instead of using the usual</p>
<blockquote><p><span style="color:#888888;">NSFetchRequest *request = [<span class="Apple-style-span">NSFetchRequest</span><span class="Apple-style-span">fetchRequestWithEntityName</span>:<span class="Apple-style-span">@"SomeClass"</span>];</span></p></blockquote>
<p>which is prone to String typos, rather use</p>
<blockquote><p><span style="color:#888888;">NSFetchRequest *request = [NSFetchRequestfetchRequestWithEntityName:NSStringFromClass([SomeClassclass])];</span></p></blockquote>
<p>This is a neat way to tie the name of the class to the entity.</p>
<p>Of course you have to make sure that you have done the whole CoreData DataModel and create entity based on the entities created in the model.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/deshartman.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/deshartman.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/deshartman.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/deshartman.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/deshartman.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/deshartman.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/deshartman.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/deshartman.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/deshartman.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/deshartman.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/deshartman.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/deshartman.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/deshartman.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/deshartman.wordpress.com/189/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=189&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://deshartman.wordpress.com/2012/01/19/nsfetchedresultscontroller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36bad68a69adf51203731b8ae7f82e15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">deshartman</media:title>
		</media:content>
	</item>
		<item>
		<title>Empty trash gets stuck</title>
		<link>http://deshartman.wordpress.com/2011/11/24/empty-trash-gets-stuck/</link>
		<comments>http://deshartman.wordpress.com/2011/11/24/empty-trash-gets-stuck/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 00:32:26 +0000</pubDate>
		<dc:creator>deshartman</dc:creator>
				<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://deshartman.wordpress.com/?p=175</guid>
		<description><![CDATA[Ever had the issue that you click empty trash and it just hangs? Found this useful method here Go to Finder and select Finder » Secure Empty Trash. If this operation gets stuck, open the Activity Monitor utility and force quit the Locum process. Enter your admin password when requested. Go back to Finder and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=175&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ever had the issue that you click empty trash and it just hangs? Found this useful method <a title="here" href="http://lifehacker.com/5739657/fix-trash-cannot-be-emptied-problems-in-os-x" target="_blank">here</a></p>
<blockquote>
<ul>
<li>Go to Finder and select Finder » Secure Empty Trash.</li>
<ul>
<li>If this operation gets stuck, open the Activity Monitor utility and force quit the Locum process. Enter your admin password when requested.</li>
</ul>
<li>Go back to Finder and select Finder » Empty Trash.</li>
</ul>
</blockquote>
<p> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/deshartman.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/deshartman.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/deshartman.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/deshartman.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/deshartman.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/deshartman.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/deshartman.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/deshartman.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/deshartman.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/deshartman.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/deshartman.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/deshartman.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/deshartman.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/deshartman.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=175&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://deshartman.wordpress.com/2011/11/24/empty-trash-gets-stuck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36bad68a69adf51203731b8ae7f82e15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">deshartman</media:title>
		</media:content>
	</item>
		<item>
		<title>Configuring SBJSON-framework for XCode 4.2</title>
		<link>http://deshartman.wordpress.com/2011/09/02/configuring-sbjson-framework-for-xcode-4-2/</link>
		<comments>http://deshartman.wordpress.com/2011/09/02/configuring-sbjson-framework-for-xcode-4-2/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 05:53:41 +0000</pubDate>
		<dc:creator>deshartman</dc:creator>
				<category><![CDATA[JSON]]></category>
		<category><![CDATA[XCode]]></category>

		<guid isPermaLink="false">http://deshartman.wordpress.com/?p=176</guid>
		<description><![CDATA[Procedure to use json-framework in XCode 4.2 1) Open or create your project 2) Open the SBJSON XCode project file &#8220;SBJson.xcodeproj &#160; Now drag the SBJson application to you project. There seems to be a bug in the XCode I am using in that it does not display as shown below. Close the project and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=176&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Procedure to use json-framework in XCode 4.2</p>
<p>1) Open or create your project<br />
2) Open the SBJSON XCode project file &#8220;SBJson.xcodeproj</p>
<div id="attachment_177" class="wp-caption alignnone" style="width: 350px"><a href="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-1.png"><img class="size-full wp-image-177" title="pastedgraphic 1" src="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-1.png?w=460" alt=""   /></a><p class="wp-caption-text">pastedgraphic 1</p></div>
<p>&nbsp;</p>
<p>Now drag the SBJson application to you project. There seems to be a bug in the XCode I am using in that it does not display as shown below. Close the project and open it again and it will work.</p>
<p>&nbsp;</p>
<p><a href="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-3.png"><img class="alignnone size-full wp-image-179" title="pastedgraphic 3" src="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-3.png?w=460&#038;h=171" alt="" width="460" height="171" /></a></p>
<p>Now strap it in.</p>
<p>Click on your project file<br />
Click the Targets section<br />
Click the Build Phases</p>
<p><a href="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-4.png"><img class="alignnone size-full wp-image-180" title="pastedgraphic 4" src="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-4.png?w=460&#038;h=142" alt="" width="460" height="142" /></a></p>
<p>Expand target Dependencies<br />
Click the &#8220;+&#8221; to add a dependency<br />
Choose &#8220;sbjson-ios&#8221; under the SBJson project</p>
<p><a href="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-5.png"><img class="alignnone size-full wp-image-181" title="pastedgraphic 5" src="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-5.png?w=460&#038;h=318" alt="" width="460" height="318" /></a></p>
<p>Now expand the &#8220;Link Binary with Libraries&#8221;, click + and add &#8220;libsbjson-ios.a&#8221;</p>
<p><a href="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-6.png"><img class="alignnone size-full wp-image-182" title="pastedgraphic 6" src="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-6.png?w=460&#038;h=308" alt="" width="460" height="308" /></a></p>
<p>That&#8217;s it. All done</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/deshartman.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/deshartman.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/deshartman.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/deshartman.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/deshartman.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/deshartman.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/deshartman.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/deshartman.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/deshartman.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/deshartman.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/deshartman.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/deshartman.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/deshartman.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/deshartman.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=176&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://deshartman.wordpress.com/2011/09/02/configuring-sbjson-framework-for-xcode-4-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36bad68a69adf51203731b8ae7f82e15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">deshartman</media:title>
		</media:content>

		<media:content url="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-1.png" medium="image">
			<media:title type="html">pastedgraphic 1</media:title>
		</media:content>

		<media:content url="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-3.png" medium="image">
			<media:title type="html">pastedgraphic 3</media:title>
		</media:content>

		<media:content url="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-4.png" medium="image">
			<media:title type="html">pastedgraphic 4</media:title>
		</media:content>

		<media:content url="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-5.png" medium="image">
			<media:title type="html">pastedgraphic 5</media:title>
		</media:content>

		<media:content url="http://deshartman.files.wordpress.com/2011/09/pastedgraphic-6.png" medium="image">
			<media:title type="html">pastedgraphic 6</media:title>
		</media:content>
	</item>
		<item>
		<title>Transfer database from one server to another</title>
		<link>http://deshartman.wordpress.com/2011/08/25/transfer-database-from-one-server-to-another/</link>
		<comments>http://deshartman.wordpress.com/2011/08/25/transfer-database-from-one-server-to-another/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 23:57:23 +0000</pubDate>
		<dc:creator>deshartman</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://deshartman.wordpress.com/?p=171</guid>
		<description><![CDATA[Some times you want to copy a database from one server to another. This is painful and found a easy way to do it from a few other blogs &#160; $ mysqldump -u username -p'password' db-name &#124; ssh user@remote.box.com mysql -u username -p'password db-name &#160; &#160;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=171&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some times you want to copy a database from one server to another. This is painful and found a easy way to do it from a few other blogs</p>
<p>&nbsp;</p>
<blockquote><p><code>$ mysqldump -u username -p'password' db-name | ssh user@remote.box.com mysql -u username -p'password db-name</code></p></blockquote>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/deshartman.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/deshartman.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/deshartman.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/deshartman.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/deshartman.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/deshartman.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/deshartman.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/deshartman.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/deshartman.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/deshartman.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/deshartman.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/deshartman.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/deshartman.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/deshartman.wordpress.com/171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=171&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://deshartman.wordpress.com/2011/08/25/transfer-database-from-one-server-to-another/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36bad68a69adf51203731b8ae7f82e15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">deshartman</media:title>
		</media:content>
	</item>
		<item>
		<title>Change MySQL inno dB to file per table</title>
		<link>http://deshartman.wordpress.com/2011/04/27/change-mysql-inno-db-to-file-per-table/</link>
		<comments>http://deshartman.wordpress.com/2011/04/27/change-mysql-inno-db-to-file-per-table/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 06:33:02 +0000</pubDate>
		<dc:creator>deshartman</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://deshartman.wordpress.com/?p=167</guid>
		<description><![CDATA[This will create a file per table instead of just one big inno db file cd /usr/local/mysql/support-files/ sudo cp my-huge.cnf /etc/my.cnf sudo vi /etc/my.cnf add this under [mysqld] innodb_file_per_table Now create the tables as required after restarting MySQL<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=167&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This will create a file per table instead of just one big inno db file</p>
<blockquote><p>cd /usr/local/mysql/support-files/<br />
sudo cp my-huge.cnf /etc/my.cnf<br />
sudo vi /etc/my.cnf</p></blockquote>
<p>add this under [mysqld]</p>
<blockquote><p>innodb_file_per_table</p></blockquote>
<p>Now create the tables as required after restarting MySQL</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/deshartman.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/deshartman.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/deshartman.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/deshartman.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/deshartman.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/deshartman.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/deshartman.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/deshartman.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/deshartman.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/deshartman.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/deshartman.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/deshartman.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/deshartman.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/deshartman.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=167&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://deshartman.wordpress.com/2011/04/27/change-mysql-inno-db-to-file-per-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36bad68a69adf51203731b8ae7f82e15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">deshartman</media:title>
		</media:content>
	</item>
		<item>
		<title>Eclipse Java Heap Memory size</title>
		<link>http://deshartman.wordpress.com/2010/12/13/eclipse-java-heap-memory-size/</link>
		<comments>http://deshartman.wordpress.com/2010/12/13/eclipse-java-heap-memory-size/#comments</comments>
		<pubDate>Mon, 13 Dec 2010 02:05:55 +0000</pubDate>
		<dc:creator>deshartman</dc:creator>
				<category><![CDATA[Eclipse]]></category>

		<guid isPermaLink="false">http://deshartman.wordpress.com/?p=164</guid>
		<description><![CDATA[Getting the Out of Memory error when running eclipse? Increase heap space using eclipse -vmargs -Xmx&#60;memory size&#62; but how do you do this in OSX? Surprisingly difficult to find out how to do this in OSX, but here it is: If you are using Mac OS X, and launch eclipse using the Finder, the eclipse.ini in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=164&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Getting the Out of Memory error when running eclipse? Increase heap space using</p>
<blockquote><p>eclipse -vmargs -Xmx&lt;memory size&gt;</p></blockquote>
<p>but how do you do this in OSX? Surprisingly difficult to find out how to do this in OSX, but here it is:</p>
<p>If you are using Mac OS X, and launch eclipse using the Finder, the eclipse.ini in eclipse folder doesn’t have any effect. You need to open the Eclipse package (right click, show package content), open the Max OS folder, and edit the eclipse ini located there.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/deshartman.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/deshartman.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/deshartman.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/deshartman.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/deshartman.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/deshartman.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/deshartman.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/deshartman.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/deshartman.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/deshartman.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/deshartman.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/deshartman.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/deshartman.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/deshartman.wordpress.com/164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=164&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://deshartman.wordpress.com/2010/12/13/eclipse-java-heap-memory-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36bad68a69adf51203731b8ae7f82e15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">deshartman</media:title>
		</media:content>
	</item>
		<item>
		<title>FlexUnit4 Async Testing Events</title>
		<link>http://deshartman.wordpress.com/2010/10/04/flexunit4-async-testing-events/</link>
		<comments>http://deshartman.wordpress.com/2010/10/04/flexunit4-async-testing-events/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 23:26:23 +0000</pubDate>
		<dc:creator>deshartman</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[FlexUnit]]></category>

		<guid isPermaLink="false">http://deshartman.wordpress.com/?p=161</guid>
		<description><![CDATA[When doing Unit testing in FlexUnit 4, you can test Async event firing. This is a tricky test if there are multiple events being fired. The reason it gets tricky is because of the single threaded nature of Flex. When you simply dispatch one event ofter the other, they are added to the display stack [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=161&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When doing Unit testing in FlexUnit 4, you can test Async event firing. This is a tricky test if there are multiple events being fired. The reason it gets tricky is because of the single threaded nature of Flex.</p>
<p>When you simply dispatch one event ofter the other, they are added to the display stack and thus handled in REVERSE order when removed from the stack. However, if you are using remote calls, the stack is given a change to execute, while the remote call is sent off and thus Async events happen in NORMAL order. What makes this really tricky is if you have a combination of local events (reverse order) and remote events (normal order)</p>
<p>Here are some high level examples:</p>
<p><strong>Example 1</strong></p>
<p>dispatchEvent(Event1)</p>
<p>dispatchEvent(Event2)</p>
<p>dispatchEvent(Event3)</p>
<p>Correct Async testing is now done in reverse order, since each event is added to the display stack</p>
<p>Async.proceedOnEvent(this, someEventDispatcher, Event<strong>3</strong>, checkVars3, 500, null, noEventFired);</p>
<p>Async.proceedOnEvent(this, someEventDispatcher, Event<strong>2</strong>, checkVars2, 500, null, noEventFired);</p>
<p>Async.proceedOnEvent(this, someEventDispatcher, Event<strong>1</strong>, checkVars1, 500, null, noEventFired);</p>
<p>Notice the order of the Async.proceedOnEvent is reversed</p>
<p><strong>Example 2</strong></p>
<p>remote call(Event1)</p>
<p>dispatchEvent(Event2)</p>
<p>dispatchEvent(Event3)</p>
<p>Async.proceedOnEvent(this, someEventDispatcher, Event<strong>1</strong>, checkVars1, 500, null, noEventFired);</p>
<p>Async.proceedOnEvent(this, someEventDispatcher, Event<strong>3</strong>, checkVars3, 500, null, noEventFired);</p>
<p>Async.proceedOnEvent(this, someEventDispatcher, Event<strong>2</strong>, checkVars2, 500, null, noEventFired);</p>
<p>Notice the remote call clears properly, but the local calls are reverse order.</p>
<p>So the only way to do this is to understand that if a remote call is executed, you check for it and that if there are any local events, they are placed on a stack until no more events or a remote event takes place and then checked in reverse order.</p>
<p>Tricky&#8230;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/deshartman.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/deshartman.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/deshartman.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/deshartman.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/deshartman.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/deshartman.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/deshartman.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/deshartman.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/deshartman.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/deshartman.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/deshartman.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/deshartman.wordpress.com/161/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/deshartman.wordpress.com/161/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/deshartman.wordpress.com/161/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=161&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://deshartman.wordpress.com/2010/10/04/flexunit4-async-testing-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36bad68a69adf51203731b8ae7f82e15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">deshartman</media:title>
		</media:content>
	</item>
		<item>
		<title>Redirect Tomcat ROOT index.html to your site app</title>
		<link>http://deshartman.wordpress.com/2010/09/10/redirect-tomcar-root-index-html-to-your-site-app/</link>
		<comments>http://deshartman.wordpress.com/2010/09/10/redirect-tomcar-root-index-html-to-your-site-app/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 13:19:46 +0000</pubDate>
		<dc:creator>deshartman</dc:creator>
				<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://deshartman.wordpress.com/?p=156</guid>
		<description><![CDATA[If I have a app at https://abc.com/server/client.html, I want to redirect traffic going to https://abc.com to the same app and not the default Tomcat root page. Put this in the &#8230;/webaps/ROOT/index.html &#60;html&#62; &#60;head&#62; &#60;meta http-equiv=&#8221;refresh&#8221; content=&#8221;0;URL=http[s]://abc.com/server/client.html&#8221;&#62; &#60;/head&#62; &#60;body&#62; &#60;/body&#62; &#60;/html&#62;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=156&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If I have a app at https://abc.com/server/client.html, I want to redirect traffic going to https://abc.com to the same app and not the default Tomcat root page.</p>
<p>Put this in the &#8230;/webaps/ROOT/index.html</p>
<blockquote><p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;refresh&#8221; content=&#8221;0;URL=http[s]://abc.com/server/client.html&#8221;&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/deshartman.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/deshartman.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/deshartman.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/deshartman.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/deshartman.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/deshartman.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/deshartman.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/deshartman.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/deshartman.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/deshartman.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/deshartman.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/deshartman.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/deshartman.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/deshartman.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=156&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://deshartman.wordpress.com/2010/09/10/redirect-tomcar-root-index-html-to-your-site-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36bad68a69adf51203731b8ae7f82e15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">deshartman</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex DateTimeValidator</title>
		<link>http://deshartman.wordpress.com/2010/09/02/flex-datetimevalidator/</link>
		<comments>http://deshartman.wordpress.com/2010/09/02/flex-datetimevalidator/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 23:18:16 +0000</pubDate>
		<dc:creator>deshartman</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://deshartman.wordpress.com/?p=153</guid>
		<description><![CDATA[I wrote the first version of a Date &#38; Time validator for Flex. This version extends DateValidator and adds optional time. At the moment the time format is fixed to HH:MM:SS using &#8220;:&#8221; separator. I may update this later. Enjoy ﻿ package com.helper { import mx.validators.DateValidator; import mx.validators.ValidationResult; import mx.validators.Validator; public class DateTimeValidator extends DateValidator [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=153&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I wrote the first version of a Date &amp; Time validator for Flex. This version extends DateValidator and adds optional time. At the moment the time format is fixed to HH:MM:SS using &#8220;:&#8221; separator. I may update this later.</p>
<p>Enjoy</p>
<blockquote><p>﻿</p>
<div id="_mcePaste">package com.helper</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">import mx.validators.DateValidator;</div>
<div id="_mcePaste">import mx.validators.ValidationResult;</div>
<div id="_mcePaste">import mx.validators.Validator;</div>
<div id="_mcePaste">public class DateTimeValidator extends DateValidator</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">// Define Array for the return value of doValidation().</div>
<div id="_mcePaste">private var results:Array;</div>
<div id="_mcePaste">private var timeArray:Array = new Array();</div>
<div id="_mcePaste">public static const RANGE_ERROR:String = &#8220;RangeError&#8221;;</div>
<div id="_mcePaste">public static const FORMAT_ERROR:String = &#8220;FormatError&#8221;;</div>
<div id="_mcePaste">public static const MAX_EXCEEDED_ERROR:String = &#8220;MaxValueExceeded&#8221;;</div>
<div id="_mcePaste">public static const MIN_EXCEEDED_ERROR:String = &#8220;MinValuesExceeded&#8221;;</div>
<div id="_mcePaste">public static const INVALID_HOUR_ERROR:String = &#8220;INVALID_HOUR_ERROR&#8221;;</div>
<div id="_mcePaste">public static const INVALID_MIN_ERROR:String = &#8220;INVALID_MIN_ERROR&#8221;;</div>
<div id="_mcePaste">public static const INVALID_SEC_ERROR:String = &#8220;INVALID_SEC_ERROR&#8221;;</div>
<div id="_mcePaste">public static const INVALID_TIME_ERROR:String = &#8220;INVALID_TIME_ERROR&#8221;;</div>
<div id="_mcePaste">public static const INVALID_SEPARATOR_ERROR:String = &#8220;INVALID_SEPARATOR_ERROR&#8221;;</div>
<div id="_mcePaste">private var _wrongHour:String;</div>
<div id="_mcePaste">private var _wrongMinute:String;</div>
<div id="_mcePaste">private var _wrongSecond:String;</div>
<div id="_mcePaste">public function DateTimeValidator()</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">super();</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">// Define the doValidation() method.</div>
<div id="_mcePaste">override protected function doValidation(value:Object):Array</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">var dateTimeArray:Array = new Array();</div>
<div id="_mcePaste">// Clear results Array.</div>
<div id="_mcePaste">results = [];</div>
<div id="_mcePaste">var dateString:String = String(value);</div>
<div id="_mcePaste">// Assume Date is now DATE[ TIME]</div>
<div id="_mcePaste">dateTimeArray = String(dateString).split(&#8221; &#8220;);</div>
<div id="_mcePaste">if(dateTimeArray.length &gt; 0 &amp;&amp; String(dateTimeArray[0]).length != 0)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">// Call the parent Date Validator to validate the date part</div>
<div id="_mcePaste">results = super.doValidation(dateTimeArray[0]);</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">// Return if there are errors.</div>
<div id="_mcePaste">if (results.length &gt; 0)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">return results;</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">// Now validate the time part if there is one</div>
<div id="_mcePaste">if(dateTimeArray.length &gt; 1)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">// Expecting HH:MM:SS String. Split the String</div>
<div id="_mcePaste">timeArray = String(dateTimeArray[1]).split(&#8220;:&#8221;);</div>
<div id="_mcePaste">if(timeArray.length == 3)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">var hour:int = Number(timeArray[0]);</div>
<div id="_mcePaste">var minute:int = Number(timeArray[1]);</div>
<div id="_mcePaste">var second:int = Number(timeArray[2]);</div>
<div id="_mcePaste">/////</div>
<div id="_mcePaste">// Now check the hour values</div>
<div id="_mcePaste">if(hour &gt;= 0 &amp;&amp; hour &lt;= 23)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">} else {</div>
<div id="_mcePaste">results.push(new ValidationResult(true,&#8221;hour&#8221;,RANGE_ERROR,&#8221;Hours need to be between 00 and 23&#8243;));</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">// Now check the minute values</div>
<div id="_mcePaste">if(minute &gt;= 0 &amp;&amp; minute &lt;= 59)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">} else {</div>
<div id="_mcePaste">results.push(new ValidationResult(true,&#8221;minute&#8221;,RANGE_ERROR,&#8221;Minutes need to be between 00 and 59&#8243;));</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">// Now check the minute values</div>
<div id="_mcePaste">if(second &gt;= 0 &amp;&amp; second &lt;= 59)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">} else {</div>
<div id="_mcePaste">results.push(new ValidationResult(true,&#8221;second&#8221;,RANGE_ERROR,&#8221;Seconds need to be between 00 and 59&#8243;));</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">} else {</div>
<div id="_mcePaste">results.push(new ValidationResult(true,&#8221;format&#8221;, FORMAT_ERROR, &#8220;Please enter the time as HH:MM:SS&#8221;));</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">// Return if there are errors.</div>
<div id="_mcePaste">if (results.length &gt; 0)</div>
<div id="_mcePaste">{</div>
<div id="_mcePaste">return results;</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">return results;</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">}</div>
<div id="_mcePaste">}</div>
</blockquote>
<div></div>
<div>And just for kicks, here is the FlexUnit testing of the code:</div>
<div></div>
<blockquote>
<div>
<div>package com.helper</div>
<div>{</div>
<div><span style="white-space:pre;"> </span>import com.helper.DateTimeValidator;</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>import flexunit.framework.Assert;</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>import mx.events.ValidationResultEvent;</div>
<div></div>
<div><span style="white-space:pre;"> </span>public class DateTimeValidatorTests</div>
<div><span style="white-space:pre;"> </span>{<span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>private var fixture:DateTimeValidator</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>[Before]</div>
<div><span style="white-space:pre;"> </span>public function runBeforeEveryTest():void</div>
<div><span style="white-space:pre;"> </span>{</div>
<div><span style="white-space:pre;"> </span>fixture = new DateTimeValidator();</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>fixture.inputFormat =  &#8221;YYYY/MM/DD&#8221;;</div>
<div><span style="white-space:pre;"> </span>fixture.allowedFormatChars = &#8220;/-.&#8221;;</div>
<div><span style="white-space:pre;"> </span>}</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>[After]</div>
<div><span style="white-space:pre;"> </span>public function runAfterEveryTest():void</div>
<div><span style="white-space:pre;"> </span>{</div>
<div><span style="white-space:pre;"> </span>fixture = null;</div>
<div><span style="white-space:pre;"> </span>}</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>[Test]</div>
<div><span style="white-space:pre;"> </span>public function formatDateTimeTests():void</div>
<div><span style="white-space:pre;"> </span>{</div>
<div><span style="white-space:pre;"> </span>fixture.inputFormat = &#8220;YYYY/MM/DD&#8221;;</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 00:00:00&#8243;, ValidationResultEvent.VALID, fixture.validate(&#8220;2010/12/31 00:00:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;31/12/2010 00:00:00&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;31/12/2010 00:00:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;12/31/2010 00:00:00&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;12/31/2010 00:00:00&#8243;).type);</div>
<div></div>
<div><span style="white-space:pre;"> </span>fixture.inputFormat = &#8220;DD/MM/YYYY&#8221;;</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 00:00:00&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 00:00:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;31/12/2010 00:00:00&#8243;, ValidationResultEvent.VALID, fixture.validate(&#8220;31/12/2010 00:00:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;12/31/2010 00:00:00&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;12/31/2010 00:00:00&#8243;).type);</div>
<div></div>
<div><span style="white-space:pre;"> </span>fixture.inputFormat = &#8220;MM/DD/YYYY&#8221;;</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 00:00:00&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 00:00:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;31/12/2010 00:00:00&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;31/12/2010 00:00:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;12/31/2010 00:00:00&#8243;, ValidationResultEvent.VALID, fixture.validate(&#8220;12/31/2010 00:00:00&#8243;).type);</div>
<div></div>
<div><span style="white-space:pre;"> </span>}</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>[Test]</div>
<div><span style="white-space:pre;"> </span>public function validDateTimeTests():void</div>
<div><span style="white-space:pre;"> </span>{</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31&#8243;, ValidationResultEvent.VALID, fixture.validate(&#8220;2010/12/31&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010-12-31&#8243;, ValidationResultEvent.VALID, fixture.validate(&#8220;2010-12-31&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010.12.31&#8243;, ValidationResultEvent.VALID, fixture.validate(&#8220;2010.12.31&#8243;).type);</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 00:00:00&#8243;, ValidationResultEvent.VALID, fixture.validate(&#8220;2010/12/31 00:00:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 23:59:59&#8243;, ValidationResultEvent.VALID, fixture.validate(&#8220;2010/12/31 23:59:59&#8243;).type);</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 01:09:09&#8243;, ValidationResultEvent.VALID, fixture.validate(&#8220;2010/12/31 01:09:09&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 2:3:4&#8243;, ValidationResultEvent.VALID, fixture.validate(&#8220;2010/12/31 2:3:4&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>}</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>[Test]</div>
<div><span style="white-space:pre;"> </span>public function invalidDateTimeTests():void</div>
<div><span style="white-space:pre;"> </span>{</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;99/12/31&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;99/12/31&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;12/31&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;12/31&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;31&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;31&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/22/31&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/22/31&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/55&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/55&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;-2010/12/31&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;-2010/12/31&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/-12/31&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/-12/31&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/-31&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/-31&#8243;).type);</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 -1:00:00&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 -1:00:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 00:-1:00&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 00:-1:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 00:00:-1&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 00:-1:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 00:00&#8243;, <span style="white-space:pre;"> </span>ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 00:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 00&#8243;, <span style="white-space:pre;"> </span>ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 25:00:00&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 25:00:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 00:60:00&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 00:60:00&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 00:00:60&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 00:00:60&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 25:60:60&#8243;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 25:60:60&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 00:00 AM&#8221;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 00:00 AM&#8221;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 00:00 PM&#8221;, ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 00:00 PM&#8221;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(&#8220;2010/12/31 3654567&#8243;, <span style="white-space:pre;"> </span>ValidationResultEvent.INVALID, fixture.validate(&#8220;2010/12/31 3654567&#8243;).type);</div>
<div><span style="white-space:pre;"> </span>Assert.assertEquals(3654567, <span style="white-space:pre;"> </span>ValidationResultEvent.INVALID, fixture.validate(3654567).type);</div>
<div><span style="white-space:pre;"> </span>}</div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span></div>
<div><span style="white-space:pre;"> </span>}</div>
<div>}</div>
</div>
</blockquote>
<blockquote></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/deshartman.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/deshartman.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/deshartman.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/deshartman.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/deshartman.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/deshartman.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/deshartman.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/deshartman.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/deshartman.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/deshartman.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/deshartman.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/deshartman.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/deshartman.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/deshartman.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=153&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://deshartman.wordpress.com/2010/09/02/flex-datetimevalidator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36bad68a69adf51203731b8ae7f82e15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">deshartman</media:title>
		</media:content>
	</item>
		<item>
		<title>Site Certificate (HTTPS)</title>
		<link>http://deshartman.wordpress.com/2010/08/29/site-certificate/</link>
		<comments>http://deshartman.wordpress.com/2010/08/29/site-certificate/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 23:27:46 +0000</pubDate>
		<dc:creator>deshartman</dc:creator>
				<category><![CDATA[Apache 2]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://deshartman.wordpress.com/?p=144</guid>
		<description><![CDATA[Setting up a certificate for your site. First some background: An RSA private key file is a digital file that you can use to decrypt messages sent to you. It has a public component which you distribute (via your Certificate file) which allows people to encrypt those messages to you. A Certificate Signing Request (CSR) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=144&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Setting up a certificate for your site.</p>
<p>First some background:</p>
<p style="line-height:1.3em;margin:0 0 1em;padding:0;">An RSA private key file is a digital file that you can use to decrypt messages sent to you. It has a public component which you distribute (via your Certificate file) which allows people to encrypt those messages to you.</p>
<p style="line-height:1.3em;margin:0 0 1em;padding:0;">A Certificate Signing Request (CSR) is a digital file which contains your public key and your name. You send the CSR to a Certifying Authority (CA), who will convert it into a real Certificate, by signing it.</p>
<p style="line-height:1.3em;margin:0 0 1em;padding:0;">A Certificate contains your RSA public key, your name, the name of the CA, and is digitally signed by the CA. Browsers that know the CA can verify the signature on that Certificate, thereby obtaining your RSA public key. That enables them to send messages which only you can decrypt.</p>
<p>1) First thing is set the host name. The hostname needs to be what you will be using in the common name (see below) in the certificate.</p>
<blockquote><p>$ sudo vi /etc/hostname</p></blockquote>
<p>Once done, check the name with:</p>
<blockquote><p>$ hostname</p></blockquote>
<p>It should be the new value. in this case domain.com.</p>
<p>2) Now create your private key file. Change to Apache ssl directory if you want, but do it as root</p>
<blockquote><p>$ sudo openssl genrsa -des3 -out domain.com.key 2048</p></blockquote>
<p>Enter a passphrase to keep it safe</p>
<p>3) Create a .csr (Certificate Request)  file. This is a certificate request, that will be sent to a CA (GoDaddy) to verify who you are.</p>
<blockquote><p>$ sudo openssl req -new -key domain.com.key -out domain.com.csr</p></blockquote>
<p>Fill in the details with whatever you want. The only important part is the common name. This <strong><span style="text-decoration:underline;">HAS</span></strong> to be the domain name. If you have done this for a single domain, then use &#8220;domain.com&#8221; and if you get a wildcard domain use &#8220;*domain.com&#8221;. HEre is an example:</p>
<blockquote><p>sudo openssl req -new -key www.domain.com.key -out www.domain.com.csr</p>
<p>Enter pass phrase for www.domain.com.key:</p>
<p>You are about to be asked to enter information that will be incorporated</p>
<p>into your certificate request.</p>
<p>What you are about to enter is what is called a Distinguished Name or a DN.</p>
<p>There are quite a few fields but you can leave some blank</p>
<p>For some fields there will be a default value,</p>
<p>If you enter &#8216;.&#8217;, the field will be left blank.</p>
<p>&#8212;&#8211;</p>
<p>Country Name (2 letter code) [AU]:</p>
<p>State or Province Name (full name) [Some-State]:NSW</p>
<p>Locality Name (eg, city) []:Sydney</p>
<p>Organization Name (eg, company) [Internet Widgits Pty Ltd]:My Domain</p>
<p>Organizational Unit Name (eg, section) []:</p>
<p>Common Name (eg, YOUR name) []:<strong>domain.com</strong></p>
<p>Email Address []:support@domain.com</p>
<p>Please enter the following &#8216;extra&#8217; attributes</p>
<p>to be sent with your certificate request</p>
<p>A challenge password []:</p>
<p>An optional company name []:</p></blockquote>
<p>4) Next you need to get your certificates from from your provider (GoDaddy in my case). For goDaddy they will ask you for your  CSR (Certificate Request) details. This is the file you generated in step 3 above. Get the certificate request to them as follows:</p>
<blockquote><p>sudo cat domain.com.csr</p></blockquote>
<p>Go to the web site. Under certificates, click re-key and paste the detail inclusive of  the &#8220;&#8212;&#8211;BEGIN CERTIFICATE&#8230;..&#8221; and &#8220;&#8230;. &#8212;-END CERTIFICATE REQUEST&#8212;&#8212;&#8221; parts.</p>
<p>5) Once provided you can download you Certificate File (CRT) and their bundle file. This comes in a zip file for the particular server you use. In my case Apache2. Download the file locally.</p>
<p>6) Next upload the Godaddy supplied cert zip file to your server. Put it in the /etc/apache2/ssl directory and unzip.</p>
<p>7) Before starting the server, make sure the new certificate lines up with you key&#8217;s public identity. In each file the &#8220;modulus&#8221; needs to match. Check this by comparing the output of these two commands:</p>
<blockquote><p>sudo openssl rsa -noout -modulus -in domain.com.key</p>
<p>sudo openssl x509 -noout -modulus -in domain.com.crt</p></blockquote>
<p>The outputted Modulus value needs to be identical!</p>
<p>8)Remove the password on the private key. This is required so that the server can restart without you having to put in the password each time.</p>
<blockquote><p>sudo cp domain.com.key domain.com.pass.key</p>
<p>sudo openssl rsa -in domain.com.pass.key -out domain.com.key</p></blockquote>
<p>9) Change the permissions on all these files now to secure them.</p>
<blockquote><p>sudo chmod 400 *</p></blockquote>
<p>10)Edit the /etc/apache2/site-enabled/ssl file and change the following:</p>
<blockquote>
<div id="_mcePaste">SSLEngine On</div>
<div id="_mcePaste">SSLCertificateKeyFile /etc/apache2/ssl/domain.com.key</div>
<div id="_mcePaste">SSLCertificateFile /etc/apache2/ssl/domain.com.crt</div>
<div id="_mcePaste">SSLCertificateChainFile /etc/apache2/ssl/gd_bundle.crt</div>
</blockquote>
<div>11) Restart your server and check the error log files</div>
<blockquote>
<div>
<div>sudo /etc/init.d/apache2 restart; tail -20 /var/log/apache2/error.log</div>
</div>
</blockquote>
<div>If all went well the server should start without any problems.</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/deshartman.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/deshartman.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/deshartman.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/deshartman.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/deshartman.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/deshartman.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/deshartman.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/deshartman.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/deshartman.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/deshartman.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/deshartman.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/deshartman.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/deshartman.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/deshartman.wordpress.com/144/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=deshartman.wordpress.com&amp;blog=9273572&amp;post=144&amp;subd=deshartman&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://deshartman.wordpress.com/2010/08/29/site-certificate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/36bad68a69adf51203731b8ae7f82e15?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">deshartman</media:title>
		</media:content>
	</item>
	</channel>
</rss>
