<?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>Repeated Overflows</title>
	<atom:link href="http://code.christophervigliotti.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://code.christophervigliotti.com</link>
	<description>Christopher Vigliotti often speaks in ColdFusion, Flash, SQL, CSS, Java and JavaScript.</description>
	<lastBuildDate>Fri, 03 Sep 2010 18:42:06 +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>jQuery css()</title>
		<link>http://code.christophervigliotti.com/2010/09/jquery-css/</link>
		<comments>http://code.christophervigliotti.com/2010/09/jquery-css/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 18:42:06 +0000</pubDate>
		<dc:creator>Christopher Vigliotti</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://code.christophervigliotti.com/?p=399</guid>
		<description><![CDATA[I am the process of migrating a code base from Prototype + old-school JS to jQuery (the new mayor of Awesome Town), and ran across some code that was replacing some (but not all) styles of an element. This led me to jQuery&#8217;s css() method, one of the many handy CSS-related features in jQuery.. As [...]]]></description>
			<content:encoded><![CDATA[<p>I am the process of migrating a code base from Prototype + old-school JS to jQuery (the new mayor of Awesome Town), and ran across some code that was replacing some (but not all) styles of an element.  This led me to <a href="http://api.jquery.com/css/">jQuery&#8217;s css() method</a>, one of the many handy <a href="http://api.jquery.com/category/css/">CSS-related features</a> in jQuery..  As I often do when tinkering with a new language, library, framework or feature I like to whip up a code sample.  With this example I was able to see that the css() method adds css to an element without replacing other css attributes.  A working example can be found <a href="http://code.christophervigliotti.com/wp-content/uploads/2010/09/styles.htm">here</a>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre></td><td class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">html</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">head</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">title</span><span style="color: #0000FF;">&gt;</span></span>styles<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">title</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">script</span> <span style="color: #0000FF;">src</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;http://code.jquery.com/jquery.min.js&quot;</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;text/javascript&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">script</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">script</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;text/javascript&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	function modColor(){
		jQuery(&quot;#awesometown&quot;).css
			({
				'color':'red'
			});
	}
	function modStyle(){
		jQuery(&quot;#awesometown&quot;).css
			({
				'text-decoration':'underline'
			});				
	}
	function modVis(){
		jQuery(&quot;#awesometown&quot;).css
			({
				'display':'none'
			});
	}
	function modSize(){
		jQuery(&quot;#awesometown&quot;).css
			({
				'color':'black',
				'text-decoration':'none',
				'display':''
			});
	}
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">script</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">head</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">body</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">h1</span> <span style="color: #0000FF;">id</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;awesometown&quot;</span><span style="color: #0000FF;">&gt;</span></span>I Am An H1 Tag On A Page With No Meaningful Content<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">h1</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">em</span><span style="color: #0000FF;">&gt;</span></span>sung to the tune of &quot;Horse With No Name&quot;<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">em</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">hr</span> <span style="color: #0000FF;">/&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">a</span> <span style="color: #0000FF;">href</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;javascript:modColor();&quot;</span><span style="color: #0000FF;">&gt;</span></span>red,<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">a</span><span style="color: #0000FF;">&gt;</span></span> 
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">a</span> <span style="color: #0000FF;">href</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;javascript:modStyle();&quot;</span><span style="color: #0000FF;">&gt;</span></span>underlined,<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">a</span><span style="color: #0000FF;">&gt;</span></span> 
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">a</span> <span style="color: #0000FF;">href</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;javascript:modVis();&quot;</span><span style="color: #0000FF;">&gt;</span></span>gone,<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">a</span><span style="color: #0000FF;">&gt;</span></span> 
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">a</span> <span style="color: #0000FF;">href</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;javascript:modSize();&quot;</span><span style="color: #0000FF;">&gt;</span></span>reset<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">a</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">body</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">html</span><span style="color: #0000FF;">&gt;</span></span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://code.christophervigliotti.com/2010/09/jquery-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Regular Expressions, Reverend Jim Ignatowski and You</title>
		<link>http://code.christophervigliotti.com/2010/07/regular-expressions-reverend-jim-ignatowski-and-you/</link>
		<comments>http://code.christophervigliotti.com/2010/07/regular-expressions-reverend-jim-ignatowski-and-you/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 17:54:48 +0000</pubDate>
		<dc:creator>Christopher Vigliotti</dc:creator>
				<category><![CDATA[Code Sample]]></category>
		<category><![CDATA[Regular Expressions]]></category>

		<guid isPermaLink="false">http://www.codechristophervigliotti.dreamhosters.com/?p=384</guid>
		<description><![CDATA[Regular Expressions I use regular expressions just often enough to have to totally re-learn them every time I need to use them. After a round of Google searches, reading over a few good regex sites (here&#8217;s one) and a bit of head scratching and code tinkering I end up with the code I need. In [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Regular Expressions</strong></p>
<p>I use regular expressions just often enough to have to totally re-learn them every time I need to use them.  After a round of Google searches, reading over a few good regex sites (<a href="http://www.regular-expressions.info">here&#8217;s one</a>) and a bit of head scratching and code tinkering I end up with the code I need.</p>
<p>In this particular case I needed append a variable with punctuation in cases where the variable ended in an alphanumeric character.  Regex to the rescue!</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> variables.question <span style="color: #0000FF;">=</span> <span style="color: #009900;">&quot;what does the yellow light mean&quot;</span> <span style="color: #0000FF;">/&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfif</span> <span style="color: #0000FF;">ReFindNoCase</span><span style="color: #0000FF;">&#40;</span><span style="color: #009900;">&quot;[a-zA-Z0-9]$&quot;</span>, variables.question <span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&gt;</span></span>
     <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfset</span> variables.question <span style="color: #0000FF;">=</span> variables.question <span style="color: #0000FF;">&amp;</span> <span style="color: #009900;">&quot;?&quot;</span> <span style="color: #0000FF;">/&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfif</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span> 
     #variables.question #
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span></pre></td></tr></table></div>

<p><strong>Reverend Jim Ignatowski</strong></p>
<p>This has nothing to do with regular expressions, but it&#8217;s a classic moment from Taxi.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/j6FmbMiIxws&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/j6FmbMiIxws&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p><strong>You</strong></p>
<p>The next time you need some regex help you may want to check out <a href="http://www.regular-expressions.info">http://www.regular-expressions.info</a>. If you have any good regex tips or sites leave them in the comments below.  As usual, spammers will be shot on site.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.christophervigliotti.com/2010/07/regular-expressions-reverend-jim-ignatowski-and-you/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>I&#8217;m Just Sayin&#8217;: Firebug Break Points Are Cool</title>
		<link>http://code.christophervigliotti.com/2010/07/im-just-sayin-firebug-break-points-are-cool/</link>
		<comments>http://code.christophervigliotti.com/2010/07/im-just-sayin-firebug-break-points-are-cool/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 19:15:21 +0000</pubDate>
		<dc:creator>Christopher Vigliotti</dc:creator>
				<category><![CDATA[I'm Just Sayin']]></category>

		<guid isPermaLink="false">http://code.christophervigliotti.com/?p=391</guid>
		<description><![CDATA[http://getfirebug.com/doc/breakpoints/demo.html]]></description>
			<content:encoded><![CDATA[<p><a href="http://getfirebug.com/doc/breakpoints/demo.html">http://getfirebug.com/doc/breakpoints/demo.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://code.christophervigliotti.com/2010/07/im-just-sayin-firebug-break-points-are-cool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox Add-Ons</title>
		<link>http://code.christophervigliotti.com/2010/07/firefox-add-ons/</link>
		<comments>http://code.christophervigliotti.com/2010/07/firefox-add-ons/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 17:55:36 +0000</pubDate>
		<dc:creator>Christopher Vigliotti</dc:creator>
				<category><![CDATA[Firefox]]></category>

		<guid isPermaLink="false">http://code.christophervigliotti.com/?p=388</guid>
		<description><![CDATA[I&#8217;m into my first week at my new job and I&#8217;ve been spending some time getting my workstation setup.  This task includes getting Firefox installed and adding some key Add-Ons.  Here&#8217;s my list&#8230; Adblock Plus http://adblockplus.org/en/ Blocks ads!  &#8216;Nuff said! CF Debug Copy http://cfdebugcopy.riaforge.org/ The days of copying, pasting and reformatting ColdFusion queries are over. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m into my first week at my new job and I&#8217;ve been spending some time getting my workstation setup.  This task includes getting Firefox installed and adding some key Add-Ons.  Here&#8217;s my list&#8230;</p>
<ul>
<li><strong>Adblock Plus</strong><br />
<a href="http://adblockplus.org/en/" target="_blank">http://adblockplus.org/en/</a><br />
Blocks ads!  &#8216;Nuff said!</li>
</ul>
<ul>
<li><strong>CF Debug Copy</strong><br />
<a href="http://cfdebugcopy.riaforge.org/" target="_blank">http://cfdebugcopy.riaforge.org/</a><br />
The days of copying, pasting and reformatting ColdFusion queries are over.</li>
</ul>
<ul>
<li><strong>FaviconizeTab</strong><br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/3780/" target="_blank">https://addons.mozilla.org/en-US/firefox/addon/3780/</a><br />
Allows you to reduce the size of your tabs to just the icon.</li>
</ul>
<ul>
<li><strong>Firebug</strong><br />
<a href="http://getfirebug.com/" target="_blank">http://getfirebug.com/</a><br />
Firebug is a software developers best friend.  I also reccomend the ColdFire extension for Firebug ( <a href="http://getfirebug.com/wiki/index.php/Firebug_Extensions#ColdFire" target="_blank">http://getfirebug.com/wiki/index.php/Firebug_Extensions#ColdFire</a> )</li>
</ul>
<ul>
<li><strong>FireFTP</strong><br />
<a href="http://fireftp.mozdev.org/" target="_blank">http://fireftp.mozdev.org/</a><br />
A decent FTP client that runs in Firefox!</li>
</ul>
<ul>
<li><strong>FireShot</strong><br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/5648/" target="_blank">https://addons.mozilla.org/en-US/firefox/addon/5648/</a><br />
Creates screenshots of your web pages.</li>
</ul>
<ul>
<li><strong>TinyMenu</strong><br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/1455/" target="_blank">https://addons.mozilla.org/en-US/firefox/addon/1455/</a><br />
Collapses the text menu row into a single icon that says &#8216;Menu&#8217;.  Fight toolbar bloat with this add-on.</li>
</ul>
<p>Hopefully you will find some of these helpful.  Have I missed anything cool?  Please post your favorites in the comments section.  Cheers!</p>
<p><strong>UPDATE</strong><br />
<em>August 2nd, 2010</em></p>
<p>Two Firefox Add-Ons that every web software developer should have are <a href="https://addons.mozilla.org/en-US/firefox/addon/5809/">The Firefox Accessibility Extension</a> and <a href="https://addons.mozilla.org/en-US/firefox/addon/2318/">Total Validator</a></p>
]]></content:encoded>
			<wfw:commentRss>http://code.christophervigliotti.com/2010/07/firefox-add-ons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CFUnited</title>
		<link>http://code.christophervigliotti.com/2010/07/cfunited/</link>
		<comments>http://code.christophervigliotti.com/2010/07/cfunited/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 17:51:10 +0000</pubDate>
		<dc:creator>Christopher Vigliotti</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://code.christophervigliotti.com/?p=387</guid>
		<description><![CDATA[It&#8217;s hard to believe, but this year&#8217;s CFUnited will be the last. I had a chance to attend CFUnited a few years ago and found it to be fun and inspiring. I urge my fellow ColdFusion developers to take advantage of CFUnited this year (while it&#8217;s..sniff&#8230;still here).  As always the speaker and topic lineup is [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s hard to believe, but this year&#8217;s CFUnited <a href="http://cfunited.com/blog/index.cfm/2010/6/30/Farewell-to-CFUnited-Early-Bird-Extended">will be the last</a>.  I had a chance to attend <a href="http://cfunited.com/">CFUnited</a> a few years ago and found it to be fun and inspiring.</p>
<p>I urge my fellow ColdFusion developers to take advantage of CFUnited this year (while it&#8217;s..sniff&#8230;still here).   As always the <a href="http://cfunited.com/2010/speakers">speaker</a> and <a href="http://cfunited.com/2010/topics">topic</a> lineup is top notch.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.christophervigliotti.com/2010/07/cfunited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Strategy Pattern</title>
		<link>http://code.christophervigliotti.com/2010/07/the-strategy-pattern/</link>
		<comments>http://code.christophervigliotti.com/2010/07/the-strategy-pattern/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 08:00:08 +0000</pubDate>
		<dc:creator>Christopher Vigliotti</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.codechristophervigliotti.dreamhosters.com/?p=382</guid>
		<description><![CDATA[I&#8217;ve read and coded my way through the first chapter of Head First Design Patterns and enjoyed working with the MiniDuckSimulator sample. The author(s) make a good case for favoring composition over inheritance. I look forward to understanding this concept on a deeper, actionable level as I continue onto Chapter 2. I&#8217;ve included some (but [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve read and coded my way through the first chapter of <a href="http://www.amazon.com/gp/product/0596007124?ie=UTF8&#038;tag=chrisviglivis-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0596007124">Head First Design Patterns</a> and enjoyed working with the MiniDuckSimulator sample. The author(s) make a good case for favoring composition over inheritance.  I look forward to understanding this concept on a deeper, actionable level as I continue onto Chapter 2.  I&#8217;ve included some (but not all) of my code from Chapter 1&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* 
MiniDuckSimulator.java
creates a new instance of MallardDuck and ModelDuck 
and demonstrates the different behaviors of each
*/</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MiniDuckSimulator<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;-- new MallardDuck instance...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>		
&nbsp;
		Duck mallard <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MallardDuck<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		mallard.<span style="color: #006633;">performQuack</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		mallard.<span style="color: #006633;">performFly</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;-- new ModelDuck instance...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>		
&nbsp;
		Duck model <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ModelDuck<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		model.<span style="color: #006633;">performFly</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//		now he can fly!</span>
		model.<span style="color: #006633;">setFlyBehavior</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> FlyRocketPowered<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		model.<span style="color: #006633;">performFly</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* 
MallardDuck.java
a duck that has wings and can quack
*/</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MallardDuck <span style="color: #000000; font-weight: bold;">extends</span> Duck<span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//	constructor</span>
	<span style="color: #000000; font-weight: bold;">public</span> MallardDuck<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		quackBehavior <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Quack<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		flyBehavior <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> FlyWithWings<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* 
ModelDuck.java
a duck that cannot fly
*/</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> ModelDuck <span style="color: #000000; font-weight: bold;">extends</span> Duck<span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//	constructor</span>
	<span style="color: #000000; font-weight: bold;">public</span> ModelDuck<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		flyBehavior <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> FlyNoWay<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		quackBehavior <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Quack<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/*
FlyBehavior.java
the interface!
*/</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">interface</span> FlyBehavior <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> fly<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/*
FlyNoWay.java
implements FlyBehavior
*/</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FlyNoWay <span style="color: #000000; font-weight: bold;">implements</span> FlyBehavior<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> fly<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;I can't fly :(&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/*
FlyRocketPowered.java
implements FlyBehavior
*/</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FlyRocketPowered <span style="color: #000000; font-weight: bold;">implements</span> FlyBehavior<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> fly<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;I'm flying with a rocket&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://code.christophervigliotti.com/2010/07/the-strategy-pattern/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Diving Head First Into Head First Design Patterns</title>
		<link>http://code.christophervigliotti.com/2010/07/diving-head-first-into-head-first-design-patterns/</link>
		<comments>http://code.christophervigliotti.com/2010/07/diving-head-first-into-head-first-design-patterns/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 08:00:13 +0000</pubDate>
		<dc:creator>Christopher Vigliotti</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[O-O]]></category>

		<guid isPermaLink="false">http://www.codechristophervigliotti.dreamhosters.com/?p=381</guid>
		<description><![CDATA[Over the last few days I&#8217;ve been sinking my teeth into Head First Design Patterns. I&#8217;m really enjoying both learning about Design Patterns as well as slinging some Java code.]]></description>
			<content:encoded><![CDATA[<p>Over the last few days I&#8217;ve been sinking my teeth into <a href="http://www.amazon.com/gp/product/0596007124?ie=UTF8&#038;tag=chrisviglivis-20&#038;linkCode=as2&#038;camp=1789&#038;creative=390957&#038;creativeASIN=0596007124">Head First Design Patterns</a><img src="http://www.assoc-amazon.com/e/ir?t=chrisviglivis-20&#038;l=as2&#038;o=1&#038;a=0596007124" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  I&#8217;m really enjoying both learning about Design Patterns as well as slinging some Java code.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.christophervigliotti.com/2010/07/diving-head-first-into-head-first-design-patterns/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Goofing Around With jQuery</title>
		<link>http://code.christophervigliotti.com/2010/06/goofing-around-with-jquery/</link>
		<comments>http://code.christophervigliotti.com/2010/06/goofing-around-with-jquery/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 15:32:55 +0000</pubDate>
		<dc:creator>Christopher Vigliotti</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://code.christophervigliotti.com/?p=340</guid>
		<description><![CDATA[I&#8217;ve been reading a lot about jQuery these days. First my friend and former associate Rick &#8220;American&#8221; Flagg suggested that I check it out, then I took notice of Ray Camden&#8217;s recent posts on jQuery. With the power of suggestion now firmly behind the wheel I headed over to the jQuery website, and worked through [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been reading a lot about jQuery these days.  First my friend and former associate Rick &#8220;American&#8221; Flagg suggested that I check it out, then I took notice of Ray Camden&#8217;s recent posts on jQuery.  With the power of suggestion now firmly behind the wheel I headed over to <a href="http://jquery.com/">the jQuery website</a>, and worked through the first few tutorials.</p>
<p>Now I fancy myself a bit of a JavaScript hack, so after coding the examples in the first two lessons I began to tinker a bit.  I ended up with the following fun and pointless bit of code&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
</pre></td><td class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--- what exactly is a &quot;google a pis&quot;? ---&gt;</span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">script</span></span>
<span style="color: #333333;">  <span style="color: #0000FF;">src</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js&quot;</span></span>
<span style="color: #333333;">  <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;text/javascript&quot;</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">script</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">script</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;text/javascript&quot;</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
// old-school JS stuff
&nbsp;
// declare your variables!
var columnIdsList = &quot;&quot;;
var columnIds = new Array();
var beginRedraw = false;
var i = -1;
var theIntervalId = 0;
&nbsp;
// redraw the table cells
function redrawStuff(){
&nbsp;
	i = i + 1;
	theIntervalId = setInterval(&quot;hiThere()&quot;, 50);
	$(&quot;body&quot;).removeClass(&quot;whiteBkg&quot;);
	$(&quot;body&quot;).addClass(&quot;blackBkg&quot;);
&nbsp;
}
&nbsp;
function hiThere() {
&nbsp;
	//
	//	alert(columnIds.length);
&nbsp;
	if(i <span style="color: #333333;"><span style="color: #0000FF;">&lt;</span> columnIds.length<span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&#123;</span></span>
<span style="color: #333333;">		document.getElementById<span style="color: #0000FF;">&#40;</span>columnIds<span style="color: #0000FF;">&#91;</span>i<span style="color: #0000FF;">&#93;</span><span style="color: #0000FF;">&#41;</span>.className<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;blackTd&quot;</span>;</span>
<span style="color: #333333;">		clearInterval<span style="color: #0000FF;">&#40;</span>theIntervalId<span style="color: #0000FF;">&#41;</span>;</span>
<span style="color: #333333;">		redrawStuff<span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">&#41;</span>;</span>
<span style="color: #333333;">	<span style="color: #0000FF;">&#125;</span><span style="color: #000000; font-weight: bold;">else</span><span style="color: #0000FF;">&#123;</span></span>
<span style="color: #333333;">		clearInterval<span style="color: #0000FF;">&#40;</span>theIntervalId<span style="color: #0000FF;">&#41;</span>;</span>
<span style="color: #333333;">		beginRedraw <span style="color: #0000FF;">=</span> false;</span>
<span style="color: #333333;">		columnIds <span style="color: #0000FF;">=</span> new Array<span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">&#41;</span>;</span>
<span style="color: #333333;">		<span style="color: #808080; font-style: italic;">//	alert(columnIds.length);</span></span>
<span style="color: #333333;">		i <span style="color: #0000FF;">=</span> -<span style="color: #FF0000;">1</span>;</span>
<span style="color: #333333;">		$<span style="color: #0000FF;">&#40;</span><span style="color: #009900;">&quot;body&quot;</span><span style="color: #0000FF;">&#41;</span>.removeClass<span style="color: #0000FF;">&#40;</span><span style="color: #009900;">&quot;blackBkg&quot;</span><span style="color: #0000FF;">&#41;</span>;</span>
<span style="color: #333333;">		$<span style="color: #0000FF;">&#40;</span><span style="color: #009900;">&quot;body&quot;</span><span style="color: #0000FF;">&#41;</span>.addClass<span style="color: #0000FF;">&#40;</span><span style="color: #009900;">&quot;whiteBkg&quot;</span><span style="color: #0000FF;">&#41;</span>;</span>
<span style="color: #333333;">	<span style="color: #0000FF;">&#125;</span></span>
&nbsp;
<span style="color: #333333;"><span style="color: #0000FF;">&#125;</span></span>
&nbsp;
<span style="color: #333333;"><span style="color: #808080; font-style: italic;">// jQuery stuff</span></span>
<span style="color: #333333;">$<span style="color: #0000FF;">&#40;</span>document<span style="color: #0000FF;">&#41;</span>.ready<span style="color: #0000FF;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&#123;</span></span>
&nbsp;
<span style="color: #333333;">	<span style="color: #808080; font-style: italic;">// when you hover over a TD</span></span>
<span style="color: #333333;">	$<span style="color: #0000FF;">&#40;</span><span style="color: #009900;">&quot;td&quot;</span><span style="color: #0000FF;">&#41;</span>.hover<span style="color: #0000FF;">&#40;</span><span style="color: #000000; font-weight: bold;">function</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">&#41;</span> <span style="color: #0000FF;">&#123;</span></span>
&nbsp;
<span style="color: #333333;">		columnIdsList <span style="color: #0000FF;">=</span> columnIds.<span style="color: #0000FF;">toString</span><span style="color: #0000FF;">&#40;</span><span style="color: #0000FF;">&#41;</span>;</span>
&nbsp;
<span style="color: #333333;">		<span style="color: #000000; font-weight: bold;">if</span><span style="color: #0000FF;">&#40;</span>beginRedraw <span style="color: #0000FF;">==</span> false<span style="color: #0000FF;">&#41;</span><span style="color: #0000FF;">&#123;</span></span>
<span style="color: #333333;">			<span style="color: #000000; font-weight: bold;">if</span><span style="color: #0000FF;">&#40;</span>columnIds.length <span style="color: #0000FF;">&gt;</span></span> 15){
&nbsp;
				beginRedraw = true;
				redrawStuff();
&nbsp;
			}else{
				$(this).removeClass(&quot;blackTd&quot;);
				$(this).removeClass(&quot;orangeTd&quot;);
				$(this).addClass(&quot;whiteTd&quot;);
&nbsp;
				// add the columnId to the array
				if(columnIdsList.search(this.id) == -1){
					columnIds.push(this.id);
&nbsp;
				}
			}
		}
	},function(){
&nbsp;
		if(beginRedraw == false){
		  $(this).removeClass(&quot;whiteTd&quot;);
		  $(this).addClass(&quot;orangeTd&quot;);
		}
	});
});
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">script</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">style</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;text/css&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	.blackBkg {
	  background-color: #000000;
	}
	.whiteBkg {
	  background-color: #FFFFFF;
	}
	.blackTd {
	  background-color: #000000;
	  height: 40px;
	  width: 40px;
	  text-align:center;
	}
	.whiteTd{
	  background-color: #FFFFFF;
	  height: 40px;
	  width: 40px;
	  text-align:center;
	}
	.orangeTd{
	  background-color: ORANGE;
	  height: 40px;
	  width: 40px;
	  text-align: center;
	}
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">style</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">table</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> <span style="color: #0000FF;">from</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;1&quot;</span> <span style="color: #0000FF;">to</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;6&quot;</span> <span style="color: #0000FF;">index</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;variables.rowIndex&quot;</span> step<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;1&quot;</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfloop</span> <span style="color: #0000FF;">from</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;1&quot;</span> <span style="color: #0000FF;">to</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;6&quot;</span> <span style="color: #0000FF;">index</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;variables.columnIndex&quot;</span> step<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;1&quot;</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span></span>
<span style="color: #333333;">			  <span style="color: #0000FF;">class</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;blackTd&quot;</span></span>
<span style="color: #333333;">			  <span style="color: #0000FF;">id</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;r#variables.rowIndex#c#variables.columnIndex#&quot;</span></span>
<span style="color: #333333;">			  <span style="color: #0000FF;">&gt;</span></span>r<span style="color: #0000FF;">#variables.rowIndex#</span>c<span style="color: #0000FF;">#variables.columnIndex#</span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfloop</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfloop</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">table</span><span style="color: #0000FF;">&gt;</span></span></pre></td></tr></table></div>

<p>I look forward to continuing to use jQuery a bit more&#8230;perhaps to make something useful <img src='http://code.christophervigliotti.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://code.christophervigliotti.com/2010/06/goofing-around-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We Interrupt This Blog For A Rant About Revision Control</title>
		<link>http://code.christophervigliotti.com/2010/06/we-interrupt-this-blog-for-a-rant-about-revision-control/</link>
		<comments>http://code.christophervigliotti.com/2010/06/we-interrupt-this-blog-for-a-rant-about-revision-control/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 15:24:42 +0000</pubDate>
		<dc:creator>Christopher Vigliotti</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://code.christophervigliotti.com/?p=302</guid>
		<description><![CDATA[Throughout my career as a software developer I&#8217;ve worked at shops that use revision control software. I&#8217;ve worked with systems that implement file locking (Visual Source Safe) as well as systems that implement branching and merging (CVS and Subversion). In my view using any system is better than using none at all. If your organization [...]]]></description>
			<content:encoded><![CDATA[<p>Throughout my career as a software developer I&#8217;ve worked at shops that use <a href="http://en.wikipedia.org/wiki/Revision_control">revision control</a> software.  I&#8217;ve worked with systems that implement file locking (<a href="http://en.wikipedia.org/wiki/Visual_SourceSafe">Visual Source Safe</a>) as well as systems that implement branching and merging (<a href="http://en.wikipedia.org/wiki/Concurrent_Versions_System">CVS</a> and <a href="http://en.wikipedia.org/wiki/Subversion_(software)">Subversion</a>).  In my view using any system is better than using none at all.</p>
<p>If your organization isn&#8217;t using some sort of system for managing / storing your code then you are working in a state of unnecessary risk.  For example, if you are working on a shared development environment, and the server that your code resides on is only backed up every 24 hours, you are one failed hard drive away from losing one day&#8217;s worth of work.  Now imagine that your server&#8217;s backup is corrupted and you are a few months into development you could be looking at losing several months worth of work.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.christophervigliotti.com/2010/06/we-interrupt-this-blog-for-a-rant-about-revision-control/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CFDOCUMENTITEM, Why Hast Thou Forsaken Me</title>
		<link>http://code.christophervigliotti.com/2010/02/cfdocumentitem-why-hast-thou-forsaken-me/</link>
		<comments>http://code.christophervigliotti.com/2010/02/cfdocumentitem-why-hast-thou-forsaken-me/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 19:50:10 +0000</pubDate>
		<dc:creator>Christopher Vigliotti</dc:creator>
				<category><![CDATA[Code Sample]]></category>
		<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://code.christophervigliotti.com/?p=373</guid>
		<description><![CDATA[I&#8217;m working on generating PDF reports in ColdFusion 8 using the quick and easy cfdocument tag, and discovered that I cannot open and close tables using cfdocumentitem headers and footers. Here&#8217;s what I would have liked to do&#8230; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on generating PDF reports in ColdFusion 8 using the quick and easy <a href="http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_d-e_05.html" target="_blank">cfdocument</a> tag, and discovered that I cannot open and close tables using <a href="http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_d-e_06.html" target="_blank">cfdocumentitem</a> headers and footers.  Here&#8217;s what I would have liked to do&#8230;</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfdocument</span> attributecollection<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;#cfdocAttributes#&quot;</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfdocumentitem</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;header&quot;</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">table</span> <span style="color: #0000FF;">border</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;5&quot;</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">th</span><span style="color: #0000FF;">&gt;</span></span>ID<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">th</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">th</span><span style="color: #0000FF;">&gt;</span></span>Name<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">th</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfdocumentitem</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfdocumentitem</span> <span style="color: #0000FF;">type</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;footer&quot;</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">table</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfdocumentitem</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfoutput</span> <span style="color: #0000FF;">query</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;qPeople&quot;</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #0000FF;">#ID#</span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
			<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span><span style="color: #0000FF;">#Name#</span><span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">td</span><span style="color: #0000FF;">&gt;</span></span>
		<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">tr</span><span style="color: #0000FF;">&gt;</span></span>
	<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfdocument</span><span style="color: #0000FF;">&gt;</span></span></pre></td></tr></table></div>

<p>Apparently there is <a href="http://openbd.blog-city.com/cfdocument_support.htm" target="_blank">a work-around</a> for this if one is using Open BlueDragon.  If anyone out there has a ColdFusion 8 solution that they&#8217;d care to share I would appreciate it&#8230;and apparently so would fellow CF developer <a href="http://www.google.com/search?hl=en&#038;client=firefox-a&#038;hs=Eg6&#038;rls=org.mozilla%3Aen-US%3Aofficial&#038;q=%22Renu+Deshpande%22+coldfusion+table+header&#038;aq=f&#038;aqi=&#038;aql=&#038;oq=" target="_blank">Renu Deshpande</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://code.christophervigliotti.com/2010/02/cfdocumentitem-why-hast-thou-forsaken-me/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
