<?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>Dusty Reagan &#187; Web &amp; Software Development</title>
	<atom:link href="http://dustyreagan.com/category/web-software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://dustyreagan.com</link>
	<description>Another Geek In The Wall</description>
	<lastBuildDate>Tue, 12 Jan 2010 04:21:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing Cassandra on Ubuntu Linux</title>
		<link>http://dustyreagan.com/installing-cassandra-on-ubuntu-linux/</link>
		<comments>http://dustyreagan.com/installing-cassandra-on-ubuntu-linux/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 02:11:08 +0000</pubDate>
		<dc:creator>Dusty</dc:creator>
				<category><![CDATA[IT & Administration]]></category>
		<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[NoSQL]]></category>

		<guid isPermaLink="false">http://dustyreagan.com/?p=175</guid>
		<description><![CDATA[Cassandra is a highly scalable, eventually consistent, distributed, structured key-value store. It&#8217;s an alternative to SQL if you don&#8217;t need relational data structures. The best part is it&#8217;s super fast, and distributed. The worst part is there&#8217;s not much documentation or community, at least compared to MySQL. So, I&#8217;m doing my small part to contribute [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://incubator.apache.org/cassandra/" onclick="javascript:pageTracker._trackPageview ('/outbound/incubator.apache.org');">Cassandra</a> is a highly scalable, eventually consistent, distributed, structured key-value store. It&#8217;s an alternative to SQL if you don&#8217;t need relational data structures. The best part is it&#8217;s super fast, and distributed. The worst part is there&#8217;s not much documentation or community, at least compared to MySQL. So, I&#8217;m doing my small part to contribute to Cassandra. Here&#8217;s how I installed Cassandra on Ubuntu 8.04.2 LTS (hardy), but these directions should work on pretty much any Linux distro.</p>
<p><strong>1. First upgrade your software as is with the following two commands (just for good measure):</strong></p>
<pre><strong></strong>sudo apt-get update
sudo apt-get upgrade</pre>
<p><strong>2. Now, open up your Debian package sources list with Nano for editing using the following command:</strong></p>
<pre>sudo nano /etc/apt/sources.list</pre>
<p><strong>3. Next, add the following sources to your /etc/apt/sources.list file.</strong></p>
<pre>deb http://www.apache.org/dist/incubator/cassandra/debian unstable main
deb-src http://www.apache.org/dist/incubator/cassandra/debian unstable main</pre>
<p>After you add these two lines, press cntrl+X to close Nano. It&#8217;ll ask &#8220;Save modified buffer?&#8221; Press Y. Press Enter when Nano asks &#8220;File Name to Write.&#8221;</p>
<p><strong></strong><strong>4. Run the update to install Casandra with this command:</strong></p>
<pre><strong></strong>sudo apt-get update</pre>
<p><strong>5. ERROR! At this point you receive an error similar to this:</strong></p>
<pre>W: GPG error: http://www.apache.org unstable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F758CE318D77295D</pre>
<p><strong>6. Use the following three commands to ignore the signature error, and continue installing:</strong></p>
<p><strong>NOTE: You must replace the key value &#8216;F758CE318D77295D&#8217; with the key value you received in your error message.</strong></p>
<pre>gpg --keyserver wwwkeys.eu.pgp.net --recv-keys F758CE318D77295D
sudo apt-key add ~/.gnupg/pubring.gpg
sudo apt-get update</pre>
<p><strong>7. Install Cassandra:</strong></p>
<pre>sudo apt-get install cassandra</pre>
<p><strong>8. Next you need to change Cassandra&#8217;s default port number from 8080 to something else, because the 8080 port typically conflicts with SSH terminal connections. Use Nano to open up the Cassandra configuration file using the following command:</strong></p>
<pre>sudo nano /usr/share/cassandra/cassandra.in.sh</pre>
<p><strong>9. Then change the port number 8080 on the following line to 10036, and save the file:</strong></p>
<pre>-Dcom.sun.management.jmxremote.port=10036 \</pre>
<p><strong>10. Start Cassandra with the command:</strong></p>
<pre>/etc/init.d/cassandra start</pre>
<p>Once you have Cassandra running, test it with Cassandra&#8217;s command line tool CLI. Use the example found on the <a href="http://wiki.apache.org/cassandra/CassandraCli" onclick="javascript:pageTracker._trackPageview ('/outbound/wiki.apache.org');">Cassandra Wiki</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/installing-cassandra-on-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to Update Ubuntu Hardy to PHP 5.2.9</title>
		<link>http://dustyreagan.com/how-to-update-ubuntu-hardy-to-php-529/</link>
		<comments>http://dustyreagan.com/how-to-update-ubuntu-hardy-to-php-529/#comments</comments>
		<pubDate>Fri, 24 Apr 2009 09:01:04 +0000</pubDate>
		<dc:creator>Dusty</dc:creator>
				<category><![CDATA[IT & Administration]]></category>
		<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://dustyreagan.com/?p=133</guid>
		<description><![CDATA[First upgrade your software as is.
&#62;&#62; sudo apt-get update
&#62;&#62; sudo apt-get upgrade
Then add the following to your /etc/apt/sources.list file.
&#62;&#62; sudo nano /etc/apt/sources.list
deb http://http.us.debian.org/debian stable all
deb http://security.debian.org/ stable/updates main contrib
deb http://packages.dotdeb.org/ stable all

Finally run the update to install PHP 5.2.9.
&#62;&#62; sudo apt-get update
&#62;&#62; sudo apt-get install php5-cli
&#62;&#62; sudo /etc/init.d/apache2 restart
]]></description>
			<content:encoded><![CDATA[<h3><strong>First</strong> upgrade your software as is.</h3>
<p><code>&gt;&gt; sudo apt-get update</code></p>
<p><code>&gt;&gt; sudo apt-get upgrade</code></p>
<h3><strong>Then</strong> add the following to your /etc/apt/sources.list file.</h3>
<p><code>&gt;&gt; sudo nano /etc/apt/sources.list</code></p>
<pre>deb http://http.us.debian.org/debian stable all
deb http://security.debian.org/ stable/updates main contrib
deb http://packages.dotdeb.org/ stable all</pre>
<h3><strong></p>
<p>Finally</strong> run the update to install PHP 5.2.9.</h3>
<p><code>&gt;&gt; sudo apt-get update</code></p>
<p><code>&gt;&gt; sudo apt-get install php5-cli</code></p>
<p><code>&gt;&gt; sudo /etc/init.d/apache2 restart</code></p>
]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/how-to-update-ubuntu-hardy-to-php-529/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Global page navigation accross WordPress MU blogs</title>
		<link>http://dustyreagan.com/global-page-navigation-accross-wordpress-mu-blogs/</link>
		<comments>http://dustyreagan.com/global-page-navigation-accross-wordpress-mu-blogs/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 09:57:48 +0000</pubDate>
		<dc:creator>Dusty</dc:creator>
				<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WordPress MU]]></category>

		<guid isPermaLink="false">http://dustyreagan.com/?p=72</guid>
		<description><![CDATA[Here&#8217;s the scenario. You have a WordPress MU site with multiple blogs, but for whatever reason, you want every blog to have the same main navigation and pages. Your main site/blog hosts all of your pages. So how do you go about creating a WordPress MU Theme that will use the navigation and pages from [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the scenario. You have a WordPress MU site with multiple blogs, but for whatever reason, you want every blog to have the same main navigation and pages. Your main site/blog hosts all of your pages. So how do you go about creating a WordPress MU Theme that will use the navigation and pages from your main site/blog accross all of your blogs? Well, I&#8217;m here to tell you how I did it.</p>
<p>The WordPress Codex has a function called &#8216;wp_list_pages.&#8217; What I wanted to do is create a new function called &#8216;wp_list_main_pages.&#8217; So I simply searched my WordPress install and copied the &#8216;get_pages&#8217; and &#8216;wp_list_pages&#8217; functions and pasted them into my theme&#8217;s &#8216;functions.php&#8217; file. From here I made a few edits to these functions. To start with, I renamed them &#8216;wp_list_main_pages&#8217; and &#8216;get_main_pages.&#8217;</p>
<p>Below is the final code I&#8217;m using to display the main navigation accross blogs. I made notes in bold to help. Hope this is helpful to you Googling coders. <img src='http://dustyreagan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre><strong>// You can use this function instead of 'wp_list_pages' in your theme</strong>
function wp_list_main_pages($args = '') {
	$defaults = array(
		'depth' => 0, 'show_date' => '',
		'date_format' => get_option('date_format'),
		'child_of' => 0, 'exclude' => '',
		'title_li' => __('Pages'), 'echo' => 1,
		'authors' => '', 'sort_column' => 'menu_order, post_title'
	);

	$r = wp_parse_args( $args, $defaults );
	extract( $r, EXTR_SKIP );

	$output = '';
	$current_page = 0;

	// sanitize, mostly to keep spaces out
	$r['exclude'] = preg_replace('[^0-9,]', '', $r['exclude']);

	// Allow plugins to filter an array of excluded pages
	$r['exclude'] = implode(',', apply_filters('wp_list_pages_excludes', explode(',', $r['exclude'])));

	// Query pages.
	$r['hierarchical'] = 0;
	<strong>// Right here we call our new 'get_main_pages' function</strong>
	$pages = get_main_pages($r);

	if ( !empty($pages) ) {
		if ( $r['title_li'] )
			$output .= '&lt;li class="pagenav">' . $r['title_li'] . '&lt;ul>';

		global $wp_query;
		if ( is_page() || $wp_query->is_posts_page )
			$current_page = $wp_query->get_queried_object_id();
		$output .= walk_page_tree($pages, $r['depth'], $current_page, $r);

		if ( $r['title_li'] )
			$output .= '&lt;/ul>&lt;/li>';
	}

	$output = apply_filters('wp_list_pages', $output);

	<strong>// This line is sloppy and needs improvement.
	// You have to remove the name of the blog your currently on from you global navigation.
	// I'm doing this the simplest but least scalable way here.</strong>
	$output = str_replace("pressroom/", "", $output);

	if ( $r['echo'] )
		echo $output;
	else
		return $output;
}

<strong>// This is essentially a private function</strong>
function &#038;get_main_pages($args = '') {
	global $wpdb;

	<strong>// This is the magic line.
	// Now when the SQL runs to pull your navigation pages, it'll use your main blogs ID.</strong>
	$wpdb->set_blog_id(1);

	<strong>// Notice here I call the original get_pages function and return the results</strong>
	$pages = get_pages($args);
	return $pages;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/global-page-navigation-accross-wordpress-mu-blogs/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>ASP.Net US States Dropdown List</title>
		<link>http://dustyreagan.com/aspnet-us-states-dropdown-list/</link>
		<comments>http://dustyreagan.com/aspnet-us-states-dropdown-list/#comments</comments>
		<pubDate>Wed, 14 May 2008 23:13:04 +0000</pubDate>
		<dc:creator>Dusty</dc:creator>
				<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[ASP.Net]]></category>

		<guid isPermaLink="false">http://dustyreagan.com/aspnet-us-states-dropdown-list/</guid>
		<description><![CDATA[For large projects I usually databind my dropdown lists, but sometimes you just need a no-nonsense dropdown list of US States. For all you folks Googling to save time, here&#8217;s that code. Enjoy!  
&#60;asp:DropDownList ID="DropDownListState" runat="server"&#62;
	&#60;asp:ListItem Value="AL"&#62;Alabama&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="AK"&#62;Alaska&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="AZ"&#62;Arizona&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="AR"&#62;Arkansas&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="CA"&#62;California&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="CO"&#62;Colorado&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="CT"&#62;Connecticut&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="DC"&#62;District of Columbia&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="DE"&#62;Delaware&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="FL"&#62;Florida&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="GA"&#62;Georgia&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="HI"&#62;Hawaii&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="ID"&#62;Idaho&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="IL"&#62;Illinois&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="IN"&#62;Indiana&#60;/asp:ListItem&#62;
	&#60;asp:ListItem Value="IA"&#62;Iowa&#60;/asp:ListItem&#62;
	&#60;asp:ListItem [...]]]></description>
			<content:encoded><![CDATA[<p>For large projects I usually databind my dropdown lists, but sometimes you just need a no-nonsense dropdown list of US States. For all you folks Googling to save time, here&#8217;s that code. Enjoy! <img src='http://dustyreagan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre>&lt;asp:DropDownList ID="DropDownListState" runat="server"&gt;
	&lt;asp:ListItem Value="AL"&gt;Alabama&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="AK"&gt;Alaska&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="AZ"&gt;Arizona&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="AR"&gt;Arkansas&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="CA"&gt;California&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="CO"&gt;Colorado&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="CT"&gt;Connecticut&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="DC"&gt;District of Columbia&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="DE"&gt;Delaware&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="FL"&gt;Florida&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="GA"&gt;Georgia&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="HI"&gt;Hawaii&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="ID"&gt;Idaho&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="IL"&gt;Illinois&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="IN"&gt;Indiana&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="IA"&gt;Iowa&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="KS"&gt;Kansas&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="KY"&gt;Kentucky&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="LA"&gt;Louisiana&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="ME"&gt;Maine&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="MD"&gt;Maryland&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="MA"&gt;Massachusetts&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="MI"&gt;Michigan&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="MN"&gt;Minnesota&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="MS"&gt;Mississippi&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="MO"&gt;Missouri&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="MT"&gt;Montana&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="NE"&gt;Nebraska&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="NV"&gt;Nevada&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="NH"&gt;New Hampshire&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="NJ"&gt;New Jersey&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="NM"&gt;New Mexico&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="NY"&gt;New York&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="NC"&gt;North Carolina&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="ND"&gt;North Dakota&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="OH"&gt;Ohio&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="OK"&gt;Oklahoma&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="OR"&gt;Oregon&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="PA"&gt;Pennsylvania&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="RI"&gt;Rhode Island&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="SC"&gt;South Carolina&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="SD"&gt;South Dakota&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="TN"&gt;Tennessee&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="TX"&gt;Texas&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="UT"&gt;Utah&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="VT"&gt;Vermont&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="VA"&gt;Virginia&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="WA"&gt;Washington&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="WV"&gt;West Virginia&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="WI"&gt;Wisconsin&lt;/asp:ListItem&gt;
	&lt;asp:ListItem Value="WY"&gt;Wyoming&lt;/asp:ListItem&gt;
&lt;/asp:DropDownList&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/aspnet-us-states-dropdown-list/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>C# How to get a QueryString value from the UrlReferrer</title>
		<link>http://dustyreagan.com/c-how-to-get-a-querystring-value-from-the-urlreferrer/</link>
		<comments>http://dustyreagan.com/c-how-to-get-a-querystring-value-from-the-urlreferrer/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 06:25:53 +0000</pubDate>
		<dc:creator>Dusty</dc:creator>
				<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://dustyreagan.com/c-how-to-get-a-querystring-value-from-the-urlreferrer/</guid>
		<description><![CDATA[To get a QueryString value from the previous pages URL (aka: the UrlReferrer) you can use HttpUtility.ParseQueryString.
Like this!
NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(Request.UrlReferrer.Query);
string keyword = nameValueCollection["kw"];
&#8220;And that&#8217;s all I have to say about that.&#8221;
]]></description>
			<content:encoded><![CDATA[<p>To get a QueryString value from the previous pages URL (aka: the UrlReferrer) you can use <strong>HttpUtility.ParseQueryString</strong>.</p>
<p>Like this!</p>
<pre>NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(Request.UrlReferrer.Query);
string keyword = nameValueCollection["kw"];</pre>
<p>&#8220;And that&#8217;s all I have to say about that.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/c-how-to-get-a-querystring-value-from-the-urlreferrer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ActionScript 3.0 &#8211; Global Variable &amp; On Mouse Click Event</title>
		<link>http://dustyreagan.com/actionscript-30-global-variable-on-mouse-click-event/</link>
		<comments>http://dustyreagan.com/actionscript-30-global-variable-on-mouse-click-event/#comments</comments>
		<pubDate>Tue, 22 Apr 2008 07:16:03 +0000</pubDate>
		<dc:creator>Dusty</dc:creator>
				<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://dustyreagan.com/actionscript-30-global-variable-on-mouse-click-event/</guid>
		<description><![CDATA[I got to do a little ActionScript 3.0 work today. I can&#8217;t help but wonder what type of things I could create using Flash and ActionScript. Seems like it could be pretty fun. Do ActionScript programmers make good rates compared to .Net programmers?
Anyways. Here&#8217;s a few examples of some really basic ActionScript 3.0 stuff.
Here&#8217;s an [...]]]></description>
			<content:encoded><![CDATA[<p>I got to do a little ActionScript 3.0 work today. I can&#8217;t help but wonder what type of things I could create using Flash and ActionScript. Seems like it could be pretty fun. Do ActionScript programmers make good rates compared to .Net programmers?</p>
<p>Anyways. Here&#8217;s a few examples of some really basic ActionScript 3.0 stuff.</p>
<p>Here&#8217;s an example of how to create and use a global variable in ActionScript 3.0.</p>
<pre>var intClicks:int = 0;

function showDoves():void {
	++intClicks;
	if(intClicks &gt;= 5){
		_movieDoves.visible = true;
	}
}</pre>
<p>And here is an example of how to add an &#8220;on click&#8221; mouse event listener function in ActionScript 3.0.</p>
<pre>_btnFact1.addEventListener(MouseEvent.CLICK, onClickBtnFact1);

function onClickBtnFact1(evt:MouseEvent):void {
	_fact1.visible = true;
}</pre>
<p>That&#8217;s all I got. I just wanted to document this so I can reference it later. I hope it&#8217;s helpful to you. <img src='http://dustyreagan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/actionscript-30-global-variable-on-mouse-click-event/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why is &#8220;Content-type: text/html&#8221; displayed at the top of my CGI pages?</title>
		<link>http://dustyreagan.com/why-is-content-type-texthtml-displayed-at-the-top-of-my-cgi-pages/</link>
		<comments>http://dustyreagan.com/why-is-content-type-texthtml-displayed-at-the-top-of-my-cgi-pages/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 22:38:07 +0000</pubDate>
		<dc:creator>Dusty</dc:creator>
				<category><![CDATA[IT & Administration]]></category>
		<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[PerlIS]]></category>

		<guid isPermaLink="false">http://dustyreagan.com/why-is-content-type-texthtml-displayed-at-the-top-of-my-cgi-pages/</guid>
		<description><![CDATA[Recently one of my clients was having some issues with a CGI script they purchased. They&#8217;re running IIS on all of their servers, and oddly, this purchased script worked on one of their servers but not the other. On the server where the script wasn&#8217;t running correctly, IE displayed &#8220;Content-type: text/html&#8221; at the top of [...]]]></description>
			<content:encoded><![CDATA[<p>Recently one of my clients was having some issues with a CGI script they purchased. They&#8217;re running IIS on all of their servers, and oddly, this purchased script worked on one of their servers but not the other. On the server where the script wasn&#8217;t running correctly, IE displayed &#8220;Content-type: text/html&#8221; at the top of the CGI page. If I remember correctly FireFox displayed the entire markup of the page in text.</p>
<p>After quite a bit of research I found this excellent <a href="http://www.4images.com/ntperl/Perl_for_Win32_FAQ_7.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.4images.com');">Perl for Win32 FAQ</a> and learned that when you setup Perl for IIS you have two options, you can use &#8220;Perl for Win32&#8243; or you can use &#8220;PerlIS.&#8221; In my client&#8217;s case, they were running Perl for Win32 on the server with the working script and PerlIS on the server with the broken script.</p>
<p>Perl for Win32 = perl.exe<br />
PerlIS = perlis.dll</p>
<p>They are both the same version of Perl, and both come included when you download Perl for Windows. However, even though they are the same version of Perl, they are different &#8220;interpreters.&#8221;</p>
<p>Perl for Win32 and PerlIS are mostly alike, but PerlIS requires that your scripts include the HTTP response status line as well as all headers for the response. Using Perl for Win32 you only need to specify the headers.</p>
<p><a href="http://www.geocities.com/herong_yang/perl/perl_iis.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.geocities.com');">PerlIS is about two times faster than Perl for Win32</a>. However, most CGI script that you purchase, or download for free, do not specify the HTTP response status line. This is because most scripts are not written for PerlIS. (Ok, I can&#8217;t backup that claim, but that seems to be the case in my experience.)</p>
<p>If your Perl scripts are displaying the content-type at the top of the page, try configuring your IIS server to run Perl using perl.exe instead of perlis.dll.</p>
]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/why-is-content-type-texthtml-displayed-at-the-top-of-my-cgi-pages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to delete an entire directory via SSH</title>
		<link>http://dustyreagan.com/how-to-delete-an-entire-directory-via-ssh/</link>
		<comments>http://dustyreagan.com/how-to-delete-an-entire-directory-via-ssh/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 21:30:11 +0000</pubDate>
		<dc:creator>Dusty</dc:creator>
				<category><![CDATA[IT & Administration]]></category>
		<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://dustyreagan.com/how-to-delete-an-entire-directory-via-ssh/</guid>
		<description><![CDATA[I know this is probably common knowledge to Linux and Unix geeks. But every time I need to remove a directory with files in my NearlyFreeSpeech.Net SSH terminal I end up having to google for the command.  So here it is for anyone else who&#8217;s out there googling!

rm -r -f YourDirectory
rm = remove / [...]]]></description>
			<content:encoded><![CDATA[<p>I know this is probably common knowledge to Linux and Unix geeks. But every time I need to remove a directory with files in my <a href="https://www.nearlyfreespeech.net/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.nearlyfreespeech.net');">NearlyFreeSpeech.Net</a> SSH terminal I end up having to google for the command.  So here it is for anyone else who&#8217;s out there <a href="http://en.wikipedia.org/wiki/Google_(verb)" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">googling</a>!</p>
<pre>
rm -r -f YourDirectory</pre>
<p>rm = remove / delete<br />
-r = recursively deletes the directory and all files in it, including subdirectories<br />
-f = will not ask for confirmation before deleting</p>
]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/how-to-delete-an-entire-directory-via-ssh/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Convert from Blogger to Wordpress</title>
		<link>http://dustyreagan.com/convert-from-blogger-to-wordpress/</link>
		<comments>http://dustyreagan.com/convert-from-blogger-to-wordpress/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 08:59:43 +0000</pubDate>
		<dc:creator>Dusty</dc:creator>
				<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[Blogger]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://dustyreagan.com/convert-from-blogger-to-wordpress/</guid>
		<description><![CDATA[I recently converted this blog from Blogger (published via FTP) to Wordpress. It actually turned out to be a whole lot easier than I anticipated. I&#8217;ll lay out the steps I took for you below.
Also, I should note, it was very important to me that all of my old Blogger links do a proper 301 [...]]]></description>
			<content:encoded><![CDATA[<p>I recently converted this blog from <a href="http://www.blogger.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.blogger.com');">Blogger</a> (published via FTP) to <a href="http://wordpress.org/" onclick="javascript:pageTracker._trackPageview ('/outbound/wordpress.org');">Wordpress</a>. It actually turned out to be a whole lot easier than I anticipated. I&#8217;ll lay out the steps I took for you below.</p>
<p>Also, I should note, it was very important to me that all of my old Blogger links do a proper <a href="http://www.webconfs.com/how-to-redirect-a-webpage.php" onclick="javascript:pageTracker._trackPageview ('/outbound/www.webconfs.com');">301 permanent redirect</a> to their new home on my WordPress blog. I cover this below. However, I do not cover how to convert your Blogger template to a WordPress template. I took the transition as an opportunity to create a new look for my blog. So I skipped that process.</p>
<p><strong>Step 1 </strong></p>
<p>First! I installed WordPress on my <a href="https://www.nearlyfreespeech.net/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.nearlyfreespeech.net');">NearlyFreeSpeech.NET</a> hosting account. (Fact: NearlyFreeSpeech.NET is the best web host on the planet.)</p>
<p><strong>Step 2</strong></p>
<p>In Blogger (under Settings -&gt; Publishing) I switched from &#8220;publish via FTP&#8221; to &#8220;publish on blogspot.com.&#8221;</p>
<p><strong>Step 3</strong></p>
<p>Then I used WordPress&#8217;s awesome Blogger Import feature! (Found under Manage -&gt; Import) You&#8217;ll notice that you can not import blogger posts hosted via FTP. This is why I temporarily switched to blogspot.com.</p>
<p><strong>Step 4 </strong></p>
<p>After the successful Import, I installed the &#8220;<a href="http://justinsomnia.org/2006/10/maintain-permalinks-moving-from-blogger-to-wordpress/" onclick="javascript:pageTracker._trackPageview ('/outbound/justinsomnia.org');">Maintain Blogger Permalinks</a>&#8221; plugin. This plugin makes your new Wordpress permalinks match your old Blogger permalinks. You only need to run this plugin once, then you can uninstall it.</p>
<p><strong>Step 5</strong></p>
<p>Now that my imported posts had their old permalinks, I took it a step further. I no longer wanted the archive folders (ie: /2006/03/) in my permalinks. Nor did I want my permalinks to end with the HTML file extension (ie: .html). So I added the following to the top of my <a href="http://en.wikipedia.org/wiki/Htaccess" onclick="javascript:pageTracker._trackPageview ('/outbound/en.wikipedia.org');">.htaccess</a> file.</p>
<pre>&lt;IfModule mod_rewrite.c&gt;
   RewriteEngine On
   RewriteBase /
   RewriteRule ^([0-9]{4})/([0-9]{1,2})/([^/]+)\.html$ $3/ [QSA,R=301,L]
&lt;/IfModule&gt;</pre>
<p><strong>Step 6</strong></p>
<p>To preserve links to your old Blogger archives add the following to the top of your .htaccess file.</p>
<pre>&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /
RewriteRule ^archives/([0-9]{4})_([0-9]{1,2})_([0-9]{1,2})_archive.html$ $1/$2/ [QSA,R=301,L]
&lt;/IfModule&gt;</pre>
<p><strong>Optional Step 7 </strong></p>
<p>During your Blogger import into Wordpress, all of your Blogger &#8220;labels&#8221; are converted into WordPress &#8220;categories.&#8221; So if you want to maintain any old links to your old labels, add the following to the top of your .htaccess file.</p>
<pre>&lt;IfModule mod_rewrite.c&gt;
   RewriteEngine On
   RewriteBase /
   RewriteRule ^(labels)/([^/]+)\.html$ category/$2/ [QSA,R=301,L]
&lt;/IfModule&gt;</pre>
<p>I say this is optional because after I got my posts into Wordpress, I immediately started changing all my categories and tags. So the precaution I took above turned out to be not very helpful. Oh well.</p>
<p><strong>The End!</strong></p>
<p>That about sums it up. It was a pretty easy transition. Of course I&#8217;ve spent hours setting up and tweaking my new template, and I&#8217;ve spent countless more hours playing with all the cool <a href="http://wordpress.org/extend/plugins/" onclick="javascript:pageTracker._trackPageview ('/outbound/wordpress.org');">community created plugins</a>. I just can&#8217;t help myself.</p>
<p>Drop me a comment if this was helpful to you! <img src='http://dustyreagan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/convert-from-blogger-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How To: NHibernate Parent/Child Relationships</title>
		<link>http://dustyreagan.com/how-to-nhibernate-parentchild/</link>
		<comments>http://dustyreagan.com/how-to-nhibernate-parentchild/#comments</comments>
		<pubDate>Sat, 24 Nov 2007 06:46:00 +0000</pubDate>
		<dc:creator>Dusty</dc:creator>
				<category><![CDATA[Web & Software Development]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[NHibernate]]></category>

		<guid isPermaLink="false">http://dev.dustyreagan.com/?p=40</guid>
		<description><![CDATA[So you&#8217;re trying to setup a Parent/Child relationship using NHibernate. This is easy enough when you allow the foreign keys to be null in your database. Of course this is not desirable for data integrity so you disallow nulls. Now NHibernate is pissed because it wants to insert the child row first then update it [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;re trying to setup a Parent/Child relationship using NHibernate. This is easy enough when you allow the foreign keys to be null in your database. Of course this is not desirable for data integrity so you disallow nulls. Now NHibernate is pissed because it wants to insert the child row first then update it with the parent id.</p>
<p>You can fix this by setting up a bi-directional relationship. Simply put, try the following.</p>
<p>In your Parent.hbm.xml add:</p>
<pre>&lt;set name="Children" inverse="true" cascade="all-delete-orphan"&gt;
 &lt;key column="parent_id"/&gt;
 &lt;one-to-many class="Child"/&gt;
&lt;/set&gt;</pre>
<p>In your Child.hbm.xml add:</p>
<pre>&lt;many-to-one name="Parent" column="parent_id" not-null="true"/&gt;</pre>
<p>Now you need to make sure you update the Child class to &#8220;know about&#8221; the Parent. To make this easy add this method to your Parent class:</p>
<pre>public void AddChild(Child c)
{
 c.Parent = this;
 this.Add(c);
}</pre>
<p>Now we can do this:</p>
<pre>Parent p = new Parent();
Child c = new Child();
p.AddChild(c);
session.Flush();</pre>
<p>That&#8217;s the tall and skinny of it. To really understand this concept check out <a href="http://www.hibernate.org/hib_docs/nhibernate/html/example-parentchild.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.hibernate.org');">Chapter 16</a> of the <a href="http://www.hibernate.org/hib_docs/nhibernate/html/index.html" onclick="javascript:pageTracker._trackPageview ('/outbound/www.hibernate.org');">NHibernate Reference Documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dustyreagan.com/how-to-nhibernate-parentchild/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
