<?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>Shaun Ambrose &#187; Web Development</title>
	<atom:link href="http://www.shaunambrose.com/category/web-development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.shaunambrose.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 05 Aug 2010 20:11:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to fix a &#8220;sqlite3.dll missing&#8221; error message in Ruby on Rails</title>
		<link>http://www.shaunambrose.com/how-to-fix-a-sqlite3-dll-missing-error-message-in-ruby-on-rails</link>
		<comments>http://www.shaunambrose.com/how-to-fix-a-sqlite3-dll-missing-error-message-in-ruby-on-rails#comments</comments>
		<pubDate>Thu, 05 Aug 2010 20:10:35 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=433</guid>
		<description><![CDATA[Here&#8217;s a little reminder for myself on how I fixed the &#8220;sqlite3.dll missing&#8221; error message I was getting while setting up a new Ruby on Rails environment. First, I downloaded the latest SQlite3 DLL. (I grabbed the DLL of the SQLite library without the TCL bindings.) Then, I exracted the .dll and .def files to [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little reminder for myself on how I fixed the &#8220;sqlite3.dll missing&#8221; error message I was getting while setting up a new Ruby on Rails environment.<br />
<span id="more-433"></span></p>
<p>First, I downloaded the latest <a href="http://www.sqlite.org/download.html">SQlite3 DLL.</a> (I grabbed the DLL of the SQLite library without the TCL bindings.)</p>
<p>Then, I exracted the .dll and .def files to my C:\ruby\bin directory and that fixed my issue. (You&#8217;ll might have to restart your console session.) </p>
<p>These steps will also fix this error message:<br />
&#8220;The procedure entry point sqlite3_column_database_name could not be located in the dynamic link library sqlite3.dll.&#8221;</p>
<p>Hope this helps someone else running into the same issue.</p>
 <img src="http://www.shaunambrose.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=433" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/how-to-fix-a-sqlite3-dll-missing-error-message-in-ruby-on-rails/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to create migrations in Ruby on Rails that only run in the development enviroment</title>
		<link>http://www.shaunambrose.com/how-to-create-migrations-in-ruby-on-rails-that-only-run-in-the-development-enviroment</link>
		<comments>http://www.shaunambrose.com/how-to-create-migrations-in-ruby-on-rails-that-only-run-in-the-development-enviroment#comments</comments>
		<pubDate>Sat, 13 Feb 2010 06:52:17 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=371</guid>
		<description><![CDATA[This is a reminder for myself for when I want to use a migration to create test data for the development environment only. I thought it would be as easy as using the environment variable ENV['RAILS_ENV'] in the migration to see which environment you&#8217;re in, but this doesn&#8217;t work. After a little searching, it is [...]]]></description>
			<content:encoded><![CDATA[<p>This is a reminder for myself for when I want to use a migration to create test data for the development environment only.<br />
<span id="more-371"></span><br />
I thought it would be as easy as using the environment variable <strong>ENV['RAILS_ENV']</strong> in the migration to see which environment you&#8217;re in, but this doesn&#8217;t work. After a little searching, it is as easy as I thought; you just have to use the constant <strong>RAILS_ENV</strong>. So, your migration would look something like this:</p>
<pre><code>
def self.up
  if RAILS_ENV == 'development'
    # set all of your test data for development...
  end
end
</code></pre>
 <img src="http://www.shaunambrose.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=371" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/how-to-create-migrations-in-ruby-on-rails-that-only-run-in-the-development-enviroment/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add a delay to a jQuery animation</title>
		<link>http://www.shaunambrose.com/how-to-add-a-delay-to-a-jquery-animation</link>
		<comments>http://www.shaunambrose.com/how-to-add-a-delay-to-a-jquery-animation#comments</comments>
		<pubDate>Fri, 15 Jan 2010 21:41:32 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=205</guid>
		<description><![CDATA[A couple of days ago, I was looking for a way to add a pause after an animation was triggered. This was before jQuery 1.4 was released. I found a couple of solutions including using the javascript function setTimeout or some people would imitate a delay by setting an animation for the desired number of [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of days ago, I was looking for a way to add a pause after an animation was triggered. This was before jQuery 1.4 was released. I found a couple of solutions including using the javascript function setTimeout or some people would imitate a delay by setting an animation for the desired number of seconds that doesn&#8217;t change anything. Something like this&#8230;</p>
<p><span id="more-205"></span></p>
<pre>
<code>
$("#box1").fadeTo(1000, 0).fadeTo(3000, 0).fadeTo(1000, 1);
</code>
</pre>
<p>This will fade out an element in 1 second, then it will &#8220;pause&#8221; by setting another animation for 3 seconds that doesn&#8217;t change anything, then it will change it back to 100% opacity. It&#8217;s kind of an awkward way to do it.</p>
<p>But now with jQuery 1.4, things are a lot easier. You just need to just need to use the delay() function. Like so&#8230;</p>
<pre>
<code>
$("#box2").fadeTo(1000, 0).delay(3000).fadeTo(1000, 1);
</code>
</pre>
<div style="width:40px; height:40px; background:#c78b8b; border:1px solid #4f4f4f;" onclick="$(this).fadeTo(1000, 0).delay(3000).fadeTo(1000, 1);"></div>
<p>Click on the box and notice there is a 3 second delay after the box fades out, before it reappears. Visually, the effect looks exactly the same before the delay() function was introduced, but the code is nicer now.</p>
<p><br clear="none" />To set the delay before an animation fires, do this&#8230;</p>
<pre>
<code>
$("#box3").delay(3000).fadeTo(1000, .1);
</code>
</pre>
<p>Now there will be a 3 second delay before the box fades:</p>
<div style="width:40px; height:40px; background:#c78b8b; border:1px solid #4f4f4f;" onclick="$(this).delay(3000).fadeTo(1000, .1);"></div>
<p><br clear="none" />Or if you want to set the delay after an animation fires. Like a delay before your next lines of code are fired, do something like this&#8230; (I&#8217;m not sure if this is the best way, but it&#8217;ll work.)</p>
<pre>
<code>
$("#box4").fadeTo(1000, .1).delay(3000).fadeTo(1, .1);
</code>
</pre>
<p>And that&#8217;s all there is too it. To read more about the delay() function, <a href="http://api.jquery.com/delay/">check out the jQuery documentation.</a></p>
 <img src="http://www.shaunambrose.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=205" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/how-to-add-a-delay-to-a-jquery-animation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to integrate SVN into ANT</title>
		<link>http://www.shaunambrose.com/how-to-integrate-svn-into-ant</link>
		<comments>http://www.shaunambrose.com/how-to-integrate-svn-into-ant#comments</comments>
		<pubDate>Wed, 29 Jul 2009 03:34:34 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=161</guid>
		<description><![CDATA[Here&#8217;s an easy way to checkout code from a Subversion repository (or do any Subversion related task) using Ant. After you have Ant installed, you&#8217;ll need a SVN command line client. You can download a program like Slik SVN for this functionality. After you have both Ant and SVN working. You can do something like [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an easy way to checkout code from a Subversion repository (or do any Subversion related task) using Ant. </p>
<p><span id="more-161"></span><br />
After you have Ant installed, you&#8217;ll need a SVN command line client. You can download a program like <a href="http://www.sliksvn.com/en/">Slik SVN</a> for this functionality. After you have both Ant and SVN working. You can do something like this&#8230;</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;project name="MyProject" basedir="."&gt;
  &lt;description&gt;
    This build file will check out your code from a SVN repository.
  &lt;/description&gt;

  &lt;exec executable="svn"&gt;
    &lt;arg line="checkout http://www.example.com/svn/project/
       --username test --password password"/&gt;
  &lt;/exec&gt;
&lt;/project&gt;
</code></pre>
<p>That&#8217;s all there is to it. Check out the <a href="http://svnbook.red-bean.com/en/1.5/svn.ref.html">Subversion Complete Reference</a> for all the SVN commmands.</p>
 <img src="http://www.shaunambrose.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=161" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/how-to-integrate-svn-into-ant/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Login vs Log In</title>
		<link>http://www.shaunambrose.com/login-vs-log-in</link>
		<comments>http://www.shaunambrose.com/login-vs-log-in#comments</comments>
		<pubDate>Sun, 05 Apr 2009 21:27:25 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=135</guid>
		<description><![CDATA[A lot of popular web apps make the mistake of using the term &#8220;Login,&#8221; when instructing users to log in. Don&#8217;t use the term &#8220;Login,&#8221; that&#8217;s wrong! You want the user to preform an action and &#8220;Login&#8221; is not an action, it&#8217;s a noun. &#8220;Login&#8221; can be used to reference the &#8220;login interface.&#8221; But for [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of popular web apps make the mistake of using the term &#8220;Login,&#8221; when instructing users to log in. Don&#8217;t use the term &#8220;Login,&#8221; that&#8217;s wrong!</p>
<p><span id="more-135"></span><br />
<img src="http://www.shaunambrose.com/wp-content/uploads/2009/04/login.png" alt="Don&#039;t use the term Login." title="Don&#039;t use the term Login." width="375" height="224" class="alignnone size-full wp-image-136" /></p>
<p>You want the user to preform an action and &#8220;Login&#8221; is not an action, it&#8217;s a noun. &#8220;Login&#8221; can be used to reference the &#8220;login interface.&#8221; But for the action of logging in, use the phrase &#8220;Log In&#8221; instead.</p>
<p><img src="http://www.shaunambrose.com/wp-content/uploads/2009/04/log-in.png" alt="Use the term Log In!" title="Use the term Log In!" width="375" height="224" class="alignnone size-full wp-image-137" /></p>
 <img src="http://www.shaunambrose.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=135" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/login-vs-log-in/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add HTML content to the DOM using Prototype</title>
		<link>http://www.shaunambrose.com/how-to-add-html-content-to-the-dom-using-prototype</link>
		<comments>http://www.shaunambrose.com/how-to-add-html-content-to-the-dom-using-prototype#comments</comments>
		<pubDate>Mon, 13 Oct 2008 07:55:02 +0000</pubDate>
		<dc:creator>Shaun</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[howto prototype]]></category>

		<guid isPermaLink="false">http://www.shaunambrose.com/?p=59</guid>
		<description><![CDATA[See that red beetle in the upper-right hand corner? I create that after the page loads, using Prototype. In fact, all the auxillary content in the header is created after the page loads. It&#8217;s not site content and it&#8217;s not navigation; it&#8217;s just for fun, so why load it before the &#8220;real&#8221; content, right?! Ok, [...]]]></description>
			<content:encoded><![CDATA[<p>See that red beetle in the upper-right hand corner? I create that after the page loads, using Prototype. In fact, all the auxillary content in the header is created after the page loads. It&#8217;s not site content and it&#8217;s not navigation; it&#8217;s just for fun, so why load it before the &#8220;real&#8221; content, right?!</p>
<p>Ok, first, to add content using Prototype, I recommend that you already know or have the content you want to add to the DOM. For example, I wanted to add that red beetle to the DOM using Prototype. I already had the HTML coded up and here&#8217;s what it looked like&#8230;</p>
<pre><code>&lt;a href="#" onclick="beetles(); return false;"&gt;
  &lt;img src="/images/beetle1.png" alt="" id="beetle1" border="0" /&gt;
&lt;/a&gt;</code></pre>
<p>It&#8217;s a lot easier if you know and have the HTML code you&#8217;re trying to duplicate in Prototype. So, to add this content to the DOM after the page has loaded, we use the following Prototype functions: <a href="http://prototypejs.org/api/element">Element constructor</a>, <a href="http://prototypejs.org/api/element/insert">Element.insert</a>, <a href="http://prototypejs.org/api/element/update">Element.update</a> and <a href="http://prototypejs.org/api/document/observe">document.observe</a>. And here&#8217;s what the Prototype code looks like&#8230;</p>
<pre><code>document.observe('dom:loaded', function() {
var linkBeetle1 = new Element('a', {
  href: '#',
  onclick: 'beetles(); return false;'
});

var beetle1 = new Element('img', {
  src: '/images/beetle1.png',
  id: 'beetle1',
  alt: '',
  border: '0',
});

linkBeetle1.update(beetle1);
$('header').insert(linkBeetle1);
};
</code></pre>
<p><strong>new Element</strong> &#8211; creates a new HTML element with the provided attributes.</p>
<p><strong>.update</strong> &#8211; updates/replaces the content of the element with the provided content. In this case, we&#8217;re attaching the &lt;img&gt; to the &lt;a href&gt; tag.</p>
<p><strong>.insert</strong> &#8211; attaches the newly created element into the document to the element you specify.</p>
<p><strong>document.observe(&#8216;dom:loaded&#8217;&#8230;</strong> &#8211; this will make it so that the content is loaded after the page has been loaded (but before the images are loaded).</p>
<p>And that&#8217;s all there is to it!</p>
 <img src="http://www.shaunambrose.com/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=59" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://www.shaunambrose.com/how-to-add-html-content-to-the-dom-using-prototype/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
