<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Aarrgghh!!: ColdFusion</title>
<link>http://www.numtopia.com/terry/blog/</link>
<description>The Internet Home of Terrence Ryan.</description>
<language>en</language>
<copyright>Copyright 2009</copyright>
<lastBuildDate>Thu, 06 Nov 2008 15:05:58 -0500</lastBuildDate>
<generator>http://www.movabletype.org/?v=4.0</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs> 


<item>
<title>Moving to a New Site</title>
<description><![CDATA[<p>For several and various reasons, I am moving all of my professional content over to a new site: <a href="http://www.terrenceryan.com/">TerrenceRyan.com</a>.  If you're subscribing to this site for web development, ColdFusion or other web development matters, please point your RSS readers and aggregators to <a href="http://www.terrenceryan.com/">TerrenceRyan.com</a>.  
</p><p>Basically, I was looking to do a redesign and purge a bunch of outdated content. I also wanted to divorce some of my personal content from my professional image. I've also gotten a few complaints from my friends that they have ceased to understand any of what I'm talking about.   I've had TerrenceRyan.com for awhile, and figured it was time to put it to use.
</p><p>Part of the move was also a switch to <a href="http://www.mangoblog.org/">Mango Blog</a> from <a href="http://www.movabletype.org/">MovableType</a>. I have to say <a href="http://www.asfusion.com/">AsFusion</a> have done a great job with it - it's so easy to configure and customize. 
</p><p>Anyway, switch over, and for those that like my personal nonsense there should be more of it coming.   For those of you looking for CF information more is coming on that front too. </p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/11/moving_to_a_new_site.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/11/moving_to_a_new_site.cfm</guid>
<category>Web Development</category>
<pubDate>Thu, 06 Nov 2008 15:05:58 -0500</pubDate>
</item>

<item>
<title>Windows 2008 NLB with 2 NICs</title>
<description><![CDATA[<p>I ran into a problem with our standard configuration for web servers, and couldn't find the real solution documented anywhere, so here it does.
</p><p>We run our ColdFusion servers on dual node Windows Network Load Balancing (NLB) servers running in IGMP multicast mode. We run it on machines with two network cards. The cluster address is on one NIC and the nodes answer on another. It's the configuration we've come to like after years of working with NLB and port flooding and other anomalies. 
</p><p>I'm installing a new production NLB cluster for Knowledge@Wharton.  To future proof it, and avoid upgrades down the road, I'm going with ColdFusion 8 64 bit on Windows 2008 64 bit. I ran through the configuration steps that I always take setting up an NLB cluster, and it worked&#133; sort of.  See the cluster address answered if you called it from another host on the subnet that the cluster was installed on. However, if you were off subnet it didn't answer.  This is suboptimal for a web server. 
</p><p>I worked with our networking team, and they figured out (from this post: <a href="http://social.technet.microsoft.com/Forums/en-US/winserverClustering/thread/0afdb0fc-2adf-4864-b164-87e24451f875/">http://social.technet.microsoft.com/Forums/en-US/winserverClustering/thread/0afdb0fc-2adf-4864-b164-87e24451f875/</a> ) that if you added a gateway to the cluster NIC, it would work. This is counter to the way NLB has worked before, and generally not best practice. So we opened a support case with Microsoft. After a few tries, I finally got an engineer that was an expert on NLB in 2008, he had the exact cause and solution for this problem: by default IP Forwarding is not enable in Windows 2008.  This is the feature of Windows networking that, in the context of NLB, allows responses to requests sent to one NIC to be routed out the other. It's fixed by using one specific command line option.
</p><p> (Make sure you are using a command prompt with administrative privlidges)
</p><p>netsh interface ipv4 set int "[name of the NIC]" forwarding=enabled
</p><p>That's it. 
</p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/10/windows_2008_nlb_with_2_nics.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/10/windows_2008_nlb_with_2_nics.cfm</guid>
<category>ColdFusion</category>
<pubDate>Wed, 29 Oct 2008 13:19:11 -0500</pubDate>
</item>

<item>
<title>Unfuddlecfc </title>
<description><![CDATA[<p>A few weeks ago, I went searching for a provider for hosted SVN, I tried a few different services, and in the end went with <a href="http://unfuddle.com/">Unfuddle.com</a>. Over the course of the past few weeks, my team has grown dependent on Unfuddle as part of our work flow, and I have grown to absolutely love the service.  
</p><p>One of the only caveats is that we aren't used to relying on outside services for that sort of mission critical part of our environment.  So the thought of our information out a server that we didn't control started disaster recovery talk, and one of the important things to make sure we had was a backup of our content from Unfuddle.  Now, they were one step ahead of us, they include the ability to ask for backups, which include svn dumps, as part of the service. They go one step further, and actually have this as part of their API. 
</p><p>Being the automator that I am, I automated requesting a backup, checking to see if it was finished, and downloading it, so that we now have fresh copies of our data every week. In the course of doing that I created an Unfuddle.cfc that provided hooks into their API.  I decided to share it, and the backup application on <a href="http://www.riaforge.org/">RIAForge</a> for a few reasons:
</p><ul><li>I know a few CF'ers are using Unfuddle.
</li><li>I figured some non-CF'ers might want to functionality enough to give CF a try
</li></ul><p>It's not a complete implementation yet.  I've gotten done as much I need for the backup application.  I'm then starting to fill out the features.  If there is a feature you would like from the Unfuddle API, please let me know.  In any case, check out <a href="http://unfuddlecfc.riaforge.org/">Unfuddlecfc</a>.
</p><p>Another thing I have to say is that the Unfuddle guys did an awesome job writing this API (at least as far as I've coded).  There are just all of these little details that make it very easy to use. It's really easy to pass queries, and options to the various REST commands, because it takes those options a few different ways.  The other thing they did was make sure that responses are very uniform, so it was really easy to write rules for processing their results.  Between the API and the app itself, the crew at Unfuddle is a real credit to Ruby on Rails. </p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/09/unfuddlecfc.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/09/unfuddlecfc.cfm</guid>
<category>Web Development</category>
<pubDate>Tue, 30 Sep 2008 16:58:04 -0500</pubDate>
</item>

<item>
<title>Squidhead Still Swimming</title>
<description><![CDATA[<p>I'm pleased to announce that <a href="http://squidhead.riaforge.org/">Squidhead</a> is getting some more chefs.  I'm pleased to announce that <a href="http://www.mischefamily.com/nathan/index.cfm">Nathan Mische</a> and <a href="http://www.lifelikeweeds.com/">Dave Konopka</a> are joining the effort. I'm excited about both additions.  Dave was working with me when I first wrote Squidhead and has already contributed some code. Nathan is, of course, the lead developer on <a href="http://coldfire.riaforge.org/">ColdFire</a>.
</p><p>We're still working out what's coming down the pike, but improvements will include: 
</p><ul><li>A more organized and useful API to the database introspection piece.
</li><li>A better template system
</li><li>A configuration creator and editor
</li></ul><p>It's all towards making Squidhead more useful and extendable. Expect new releases soon.
</p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/09/squidhead_still_swimming.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/09/squidhead_still_swimming.cfm</guid>
<category>Web Development</category>
<pubDate>Thu, 25 Sep 2008 23:01:52 -0500</pubDate>
</item>

<item>
<title>Knowledge@Wharton High School Coming Soon</title>
<description><![CDATA[<p>I'm pleased to report that the <a href="http://knowledge.wharton.upenn.edu/">Knowledge@Wharton</a> team launched a pre-release site for the upcoming <a href="http://kwhs.wharton.upenn.edu/">Knowledge@Wharton High School</a>. If you are, or know any high school students send them along.  We're launching in February 2009, and as part of that, are holding an essay contest with prizes. I don't think we've spelled out what those prizes are, but from discussions I've heard, they're pretty awesome.
</p><p>It's powered by ColdFusion 8, and Flash Video.  I worked on the backend details: hosting, network configuration, database CRUD.  My co-worker Sanjay did the design and UI, and my boss Dave, did the Flash video setup.  The time it took us to go from mockup to finished product was very short - we did this much quicker than I had done before for non-personal project. I know it isn't a huge site, but after years of working on nothing but backend systems that never get seen by the public, it was extremely satisfying to work on something that wasn't behind a corporate login.  
</p><p>A couple other things make me happy about this. <a href="http://squidhead.riaforge.org/">Squidhead</a> powered backend development, which made dealing with last minute schema changes a snap. It also used the core application framework that I've been developing for Knowledge. It was the first project we did with the new one click build process. It uses <a href="http://squidhead.riaforge.org/">unfuddle.com</a>, SVN commit hooks, ANT, and ColdFusion calling ANT to allow for:
</p><ul><li>Automatic publishing of SVN checked-in content to a shared development server
</li><li>1 Click publishing of checked in content to a shared development server (In case automatic is too slow)
</li><li>1 Click publishing of shared development space to staging
</li><li>1 Click publishing of staging to production
</li><li>1 Click publishing of SVN checked-in content to development to staging to production
</li></ul><p>This new model allowed for both a thoughtful develop and review process during development, and was flexible enough to allow for rapid content updates when we were rolling out production.  
</p><p>All in all, it was awesome to use all of the stuff I learned about over the past two years at <a href="http://www.cfobjective.com/">cf.Objective</a> to do my job.</p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/09/knowledgewharton_high_school_coming_soon.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/09/knowledgewharton_high_school_coming_soon.cfm</guid>
<category>Web Development</category>
<pubDate>Thu, 25 Sep 2008 11:05:09 -0500</pubDate>
</item>

<item>
<title>Override URLSessionFormat </title>
<description><![CDATA[<p>I received an interesting challenge today from my boss. 
</p><p>We recently switched from requiring people to be logged into the site to read our articles to being open, and only requiring logins to comment. Because of the previous restriction and a large amount of our audience being corporate users with cookies disabled, we have URLSessionFormat wrapping all of our internal links spread out over a few template pages, over a few of our sites. Now that we don't have to be as careful about checking logins it would be better to make sure all of our urls are cleaner (i.e. not having the session information appended to it).  My boss wanted to avoid having to edit all of those files. So that challenge to me was to figure out how to override c and make sure our urls were clean. 
</p><p>After fiddling with getPageContext to no avail I settled on this solution:
</p><ul><li>Grab the page content in Application.cfc:onRequest()
</li><li>Replace any reference to the jsessionid in the page.
</li><li>Output the page as intended
</li></ul><p><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cffunction</span><span style="color: black;">
			</span><span style="color: maroon;">name=</span><span style="color: blue;">"onRequest"</span><span style="color: black;">
			</span><span style="color: maroon;">output=</span><span style="color: blue;">"TRUE"</span><span style="color: black;">
			</span><span style="color: maroon;">access=</span><span style="color: blue;">"public"</span><span style="color: black;">
			</span><span style="color: maroon;">&gt;</span><span style="color: black;"><br /></span>&nbsp;&nbsp; <span style="color: maroon;">&lt;cfargument</span><span style="color: black;">
			</span><span style="color: maroon;">name=</span><span style="color: blue;">"thePage"</span><span style="color: black;">
			</span><span style="color: maroon;">type=</span><span style="color: blue;">"string"</span><span style="color: black;">
			</span><span style="color: maroon;">required=</span><span style="color: blue;">"true"</span><span style="color: maroon;">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;cfset</span><span style="color: black;">
			</span><span style="color: blue;">var</span><span style="color: black;"> pageContent = </span><span style="color: blue;">""</span><span style="color: black;">&gt;<br /></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: maroon;">&lt;cfset</span><span style="color: black;">
			</span><span style="color: blue;">var</span><span style="color: black;"> token = </span><span style="color: blue;">";jsessionid=#session.sessionid#"</span><span style="color: maroon;">&gt;</span>
		</span></p><p><span style="font-family: Consolas; font-size: 10pt;"><span style="color: black;"></span><span style="color: black;"></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: maroon;">&lt;cfsavecontent</span><span style="color: black;">
			</span><span style="color: maroon;">variable=</span><span style="color: blue;">"pageContent"</span><span style="color: maroon;">&gt;</span><span style="color: black;"></span><span style="color: maroon;"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;cfinclude</span><span style="color: black;">
			</span><span style="color: maroon;">template=</span><span style="color: blue;">"#arguments.thePage#"</span><span style="color: maroon;">&gt;</span><span style="color: black;"><br /></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: maroon;">&lt;/cfsavecontent&gt;</span><span style="color: black;"></span> <br /></span></p><p><span style="font-family: Consolas; font-size: 10pt;"><span style="color: black;"></span>&nbsp;&nbsp; <span style="color: maroon;">&lt;cfset</span><span style="color: black;"> pageContent = </span><span style="color: rgb(0, 0, 102);">Replace</span><span style="color: black;">(pageContent, token, </span><span style="color: blue;">""</span><span style="color: black;">, </span><span style="color: blue;">"ALL"</span><span style="color: black;">) </span><span style="color: maroon;">/&gt;</span>
		</span></p><p><span style="font-family: Consolas; font-size: 10pt;">&nbsp;&nbsp; <span style="color: maroon;">&lt;cfoutput&gt;</span><span style="color: black;">#pageContent#</span><span style="color: maroon;">&lt;/cfoutput&gt;</span>
		</span></p><p><span style="font-size: 10pt;"><span style="color: maroon; font-family: Consolas;">&lt;/cffunction&gt;</span>
		</span></p><p>It's not bad, and it doesn't add a tremendous amount of overhead to every page, and would have worked if this was imperative to do.  We decided however that string processing every single request was probably not preferable to just finding and replacing all of the URLSessionFormat() references.
</p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/09/override_urlsessionformat.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/09/override_urlsessionformat.cfm</guid>
<category>Web Development</category>
<pubDate>Fri, 19 Sep 2008 13:47:13 -0500</pubDate>
</item>

<item>
<title>Confused About the Economy?</title>
<description><![CDATA[<p>The current economic crisis is catching many people flat-footed and confused:  
</p><ul><li>Why did financial entities that survived the Great Depression go belly up this week?  
</li><li>What do the two campaigns really have to say about the economy?
</li><li>What's going to happen next? 
</li></ul><p>If only there was some sort of site that took that sort of economic information from academic and industry experts and distilled it to the answers that you need&#133; Wait a minute, I just happen to work for such a group&#133;
</p><p>This is my round about way of telling you all that <a href="http://knowledge.wharton.upenn.edu/">Knowledge@Wharton</a> (My current employer) has a special section this week on the Financial Crisis, and it's powered by ColdFusion and Flash Video. </p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/09/confused_about_the_economy.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/09/confused_about_the_economy.cfm</guid>
<category>Web Development</category>
<pubDate>Wed, 17 Sep 2008 22:15:30 -0500</pubDate>
</item>

<item>
<title>Cigar BOF at Max 2008</title>
<description><![CDATA[<p>Kevin Hoyt has a <a href="http://blog.kevinhoyt.org/2008/09/16/ignite-denver-and-a-cigar-bof-at-max/">post over on his blog about the possibility of a Cigar BOF at this year's MAX</a>.  He's trying to gauge interest.  In the name of all that is holy, drop him a comment. I'm looking at you <a href="http://mxunit.org/">MXUnit</a> crew!  Or Chris and Brian. 
</p><p>This is, of course, a combination of two of my personal passions, Adobe Geekery and Cigars, and I just hope it happens.  </p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/09/cigar_bof_at_max_2008.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/09/cigar_bof_at_max_2008.cfm</guid>
<category>Web Development</category>
<pubDate>Wed, 17 Sep 2008 01:58:18 -0500</pubDate>
</item>

<item>
<title>CFLocation and Safari </title>
<description><![CDATA[<p>I had a weird issue today , and I thought I'd share. 
</p><p>I was having trouble reproducing an issue that a client was reporting in the flow of a page that was posting back to itself. No matter what I did I couldn't get it to occur on my machine.  
</p><p>I then went over a dump of the cgi scope and noticed they were using Safari.  I gave it a try, and BOOM, same problem. 
</p><p>I looked at what was happened, and it looked like the querystring of the last request was added to the querystring of where I was trying to cflocate. 
</p><p>So I was posting to "?method=delete_process&amp;id=1" and cflocating to "?method=list" when I was done.  Firefox tried to cflocate to "?method=list" but Safari posted to  "?method=delete_process&amp;id=1?method=list". This caused the error, as id=1 was already deleted, and even if it wasn't id=1? was invalid.
</p><p>The fix was to prepend "#cgi.script_name#" before the question mark. 
</p><p>After a quick search, it turns out that this has come up in Forum over on Ray's site (<a href="http://www.coldfusionjedi.com/forums/messages.cfm?threadid=8E3A0955-FFC8-9C78-D6DF6273A00249F0">cflocation &amp; safari</a>). </p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/09/cflocation_and_safari.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/09/cflocation_and_safari.cfm</guid>
<category>Web Development</category>
<pubDate>Wed, 17 Sep 2008 00:07:38 -0500</pubDate>
</item>

<item>
<title>Knowledge@Wharton interviews Adobe Co-founder</title>
<description><![CDATA[<p>Last week's issue of <a href="http://knowledge.wharton.upenn.edu/index.cfm" title="Knowledge@Wharton">Knowledge@Wharton</a> (my current employer) featured a pretty cool <a href="http://knowledge.wharton.upenn.edu/article.cfm?articleid=2038">interview with Charles Geschke</a>, one of the co-founders of <a href="http://www.adobe.com/">Adobe</a>. There's a lot of great content, from stories about Steve Jobs and the beginning of Adobe, and the story of how they dealt with a hostile takeover attempt from Quark.  
</p><p>One of things I found was interesting was the inclusion of an internal document that outlined Adobe's corporate values.  It was a pretty interesting window into their overall philosophy, and a clear sign that as a company they are discouraged from wasting people's times in meetings.
</p><p>Check it out - <a href="http://knowledge.wharton.upenn.edu/article.cfm?articleid=2038">Driving Adobe: Co-founder Charles Geschke on Challenges, Change and Values</a>.</p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/09/knowledgewharton_interviews_adobe_cofounder.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/09/knowledgewharton_interviews_adobe_cofounder.cfm</guid>
<category>Web Development</category>
<pubDate>Tue, 09 Sep 2008 17:36:08 -0500</pubDate>
</item>

<item>
<title>Aarrgghh on Wheels</title>
<description><![CDATA[<cfinvoke component="terry.cfc.image" method="linkImage">
	<cfinvokeargument name="image" value="aarrgghhcar.jpg" />
</cfinvoke>
<p><a href="http://www.nodans.com/">Dan Wilson</a> sent this to me the other night. It made me laugh. Evidently, this guy is just as pirate-y as me.</p>
<p>Thanks Dan.</p>
]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/08/aarrgghh_on_wheels.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/08/aarrgghh_on_wheels.cfm</guid>
<category>Personal</category>
<pubDate>Wed, 13 Aug 2008 10:57:03 -0500</pubDate>
</item>

<item>
<title>Speaking at ColdFusion Unconference at Max</title>
<description><![CDATA[<p>Thanks to being quick on the old reply key I got myself on the speakers list for the <a href="http://www.coldfusionjedi.com/page.cfm/ColdFusion-Unconference">ColdFusion Unconference</a>. I'll be speaking on Wednesday Morning at 9:30.</p>
<p>My session is on Formal Code reviews. I've spoken on them before, so I think I'm going to add a twist to achieve the whole "unconference" vibe. I think after I give my presentation which outlines how to go about code reviews, we're going to go through that process with a piece of code. Granted it won't be a full blown application, but it should give people a chance to actually feel how it works when you're doing it the way I call right.</p>
<p>If anyone has anything they would like to hear or see discussed, let me know.</p>
]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/08/speaking_at_coldfusion_unconference_at_max.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/08/speaking_at_coldfusion_unconference_at_max.cfm</guid>
<category>Web Development</category>
<pubDate>Sat, 02 Aug 2008 11:31:29 -0500</pubDate>
</item>

<item>
<title>Starting a New Job</title>
<description><![CDATA[<p>So once again, I'm moving jobs. I'm still with the Wharton School. However, now I will be working for <a href="http://knowledge.wharton.upenn.edu/">Knowledge@Wharton</a>. I'll be working on small and medium sized projects, working on growing the backend platform, and anything else they tell me to do.</p>
<p>I'm pretty excited about the move. I'll be joining a great team, it gives me an opportunity to work for a former boss again, and it's a lot easier to point someone to a public site like Knowledge as an explanation of what I do.</p>
<p>I start Tuesday, after a visit to DC this weekend.</p>
]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/07/starting_a_new_job.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/07/starting_a_new_job.cfm</guid>
<category>Personal</category>
<pubDate>Thu, 31 Jul 2008 11:19:35 -0500</pubDate>
</item>

<item>
<title>Unit Testing PDF Page Size in ColdFusion</title>
<description><![CDATA[<p>I ran into a difficult Unit testing problem the other day.  I had trouble determining the correct test to write, and finally did so. I thought that perhaps someone else might benefit from an exploration of testing strategy. 
</p><p>As you might know, we create pdf's using ColdFusion for <a href="http://www.exportreports.com/">ExportReports.com</a>. One of the new features we are adding is the ability to set the page size (legal, letter, A4&#133; etc.) As page size is a feature, I need to test it.  So I need to create a pdf file then determine what its page size is.  At first I explored &lt;cfpdf&gt; and its ability to get at PDF metadata.  No joy - it turned out that page size isn't one of the things returned in the metadata.   Then I looked at &lt;cfpdf&gt;'s ability to get thumbnails of the pages in the pdf.   I could use &lt;cfimage&gt; to get the information about height and width of the image files, put that was in pixels and hard to translate to inches. (I tried assuming 300dpi, it did not yield good results.) Then it dawned on me that ratio of height to width could yield helpful answers.  I found the dimensions in millimeters for the various page types, created ratios from them, and compared them to the ratio of the dimensions of the thumbnails.  Then I had to correct a bit for precision, and it yielded me a solution.  Here's what it looked like in code:
</p><p>
		<span style="font-family: Consolas; font-size: 10pt;"><span style="color: gray;">&lt;!--- Grab a processable view of the pdf ---&gt;</span><br /><span style="color: maroon;">&lt;cfpdf</span><span style="color: black;">
			</span><span style="color: maroon;">action=</span><span style="color: blue;">"thumbnail"</span><span style="color: black;"><br /></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: maroon;">source=</span><span style="color: blue;">"#pdfQuery.directory#/#pdfQuery.name#"</span><span style="color: black;"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: maroon;">destination=</span><span style="color: blue;">"#dirreports#tn"</span><span style="color: black;"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: maroon;">scale=</span><span style="color: blue;">"100"</span><span style="color: black;">
			</span><span style="color: maroon;">overwrite=</span><span style="color: blue;">"TRUE"</span><span style="color: maroon;">/&gt;</span>
		</span></p><p><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cfdirectory</span><span style="color: black;">
			</span><span style="color: maroon;">action=</span><span style="color: blue;">"list"</span><span style="color: black;"><br /></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: maroon;">name=</span><span style="color: blue;">"thumbnailQuery"</span><span style="color: black;"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: maroon;">directory=</span><span style="color: blue;">"#dirreports#tn"</span><span style="color: black;"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: maroon;">filter=</span><span style="color: blue;">"*.jpg"</span><span style="color: black;">
			</span><span style="color: maroon;">/&gt;</span><span style="color: black;"></span></span></p><p><span style="font-family: Consolas; font-size: 10pt;"><span style="color: black;"></span><span style="color: maroon;">&lt;cfimage</span><span style="color: black;">
			</span><span style="color: maroon;">action=</span><span style="color: blue;">"info"</span><span style="color: black;"><br /></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: maroon;">source=</span><span style="color: blue;">"#thumbnailQuery.directory#/#thumbnailQuery.name#"</span><span style="color: black;"><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: maroon;">structName=</span><span style="color: blue;">"pInfo"</span><span style="color: maroon;">&gt;</span>
		</span></p><p><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cfset</span><span style="color: black;"> assertTRUE(validatePaperSize(width=pInfo.width, height=pInfo.height, pageType=</span><span style="color: blue;">'legal'</span><span style="color: black;">))</span><span style="color: maroon;">/&gt;</span>
		</span></p><p><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cffunction</span><span style="color: black;">
			</span><span style="color: maroon;">name=</span><span style="color: blue;">"validatePaperSize"</span><span style="color: black;"> </span><span style="color: maroon;">access=</span><span style="color: blue;">"private"</span><span style="color: black;">
			</span><span style="color: maroon;">output=</span><span style="color: blue;">"false"</span><span style="color: black;"> </span><span style="color: maroon;">returntype=</span><span style="color: blue;">"boolean"</span><span style="color: black;">
			</span><span style="color: maroon;">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;cfargument</span><span style="color: black;">
			</span><span style="color: maroon;">name=</span><span style="color: blue;">"width"</span><span style="color: black;">
			</span><span style="color: maroon;">type=</span><span style="color: blue;">"string"</span><span style="color: black;">
			</span><span style="color: maroon;">required=</span><span style="color: blue;">"yes"</span><span style="color: black;">
			</span><span style="color: maroon;">/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;cfargument</span><span style="color: black;">
			</span><span style="color: maroon;">name=</span><span style="color: blue;">"height"</span><span style="color: black;">
			</span><span style="color: maroon;">type=</span><span style="color: blue;">"string"</span><span style="color: black;">
			</span><span style="color: maroon;">required=</span><span style="color: blue;">"yes"</span><span style="color: black;">
			</span><span style="color: maroon;">/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;cfargument</span><span style="color: black;">
			</span><span style="color: maroon;">name=</span><span style="color: blue;">"pageType"</span><span style="color: black;">
			</span><span style="color: maroon;">type=</span><span style="color: blue;">"string"</span><span style="color: black;">
			</span><span style="color: maroon;">required=</span><span style="color: blue;">"yes"</span><span style="color: black;">
			</span><span style="color: maroon;">/&gt;</span>
		</span></p><p><span style="font-family: Consolas; font-size: 10pt;"><span style="color: black;">&nbsp;&nbsp;&nbsp;&nbsp;</span>
		<span style="color: maroon;">&lt;cfset</span><span style="color: black;">
			</span><span style="color: blue;">var</span><span style="color: black;"> ratios = </span><span style="color: rgb(0, 0, 102);">structNew</span><span style="color: black;">() </span><span style="color: maroon;">/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp; &lt;cfset</span><span style="color: black;">
			</span><span style="color: blue;">var</span><span style="color: black;"> ratioToTest = </span><span style="color: rgb(0, 0, 102);">NumberFormat</span><span style="color: black;">(height/width, </span><span style="color: blue;">"_.___"</span><span style="color: black;">) </span><span style="color: maroon;">/&gt;</span>
		</span></p><p><span style="font-family: Consolas; font-size: 10pt;"><span style="color: gray;">&lt;!--- These ratios were derived by using sizes in millimeters<br />listed here: http://en.wikipedia.org/wiki/Paper_size ---&gt;</span>
		</span></p><p><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&nbsp;&nbsp;&nbsp;&nbsp; &lt;cfset</span><span style="color: black;"> ratios[</span><span style="color: blue;">'letter'</span><span style="color: black;">] = </span><span style="color: rgb(0, 0, 102);">NumberFormat</span><span style="color: black;">(</span><span style="color: rgb(255, 10, 10);">279</span><span style="color: black;">/</span><span style="color: rgb(255, 10, 10);">216</span><span style="color: black;">, </span><span style="color: blue;">"_.___"</span><span style="color: black;">) </span><span style="color: maroon;">/&gt;<br /></span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cfset</span><span style="color: black;"> ratios[</span><span style="color: blue;">'legal'</span><span style="color: black;">] = </span><span style="color: rgb(0, 0, 102);">NumberFormat</span><span style="color: black;">(</span><span style="color: rgb(255, 10, 10);">356</span><span style="color: black;">/</span><span style="color: rgb(255, 10, 10);">216</span><span style="color: black;">, </span><span style="color: blue;">"_.___"</span><span style="color: black;">) </span><span style="color: maroon;">/&gt;<br /></span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cfset</span><span style="color: black;"> ratios[</span><span style="color: blue;">'A4'</span><span style="color: black;">] = </span><span style="color: rgb(0, 0, 102);">NumberFormat</span><span style="color: black;">(</span><span style="color: rgb(255, 10, 10);">297</span><span style="color: black;">/</span><span style="color: rgb(255, 10, 10);">210</span><span style="color: black;">, </span><span style="color: blue;">"_.___"</span><span style="color: black;">) </span><span style="color: maroon;">/&gt;<br /></span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cfset</span><span style="color: black;"> ratios[</span><span style="color: blue;">'A5'</span><span style="color: black;">] = </span><span style="color: rgb(0, 0, 102);">NumberFormat</span><span style="color: black;">(</span><span style="color: rgb(255, 10, 10);">210</span><span style="color: black;">/</span><span style="color: rgb(255, 10, 10);">148</span><span style="color: black;">, </span><span style="color: blue;">"_.___"</span><span style="color: black;">) </span><span style="color: maroon;">/&gt;<br /></span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cfset</span><span style="color: black;"> ratios[</span><span style="color: blue;">'B4'</span><span style="color: black;">] = </span><span style="color: rgb(0, 0, 102);">NumberFormat</span><span style="color: black;">(</span><span style="color: rgb(255, 10, 10);">353</span><span style="color: black;">/</span><span style="color: rgb(255, 10, 10);">250</span><span style="color: black;">, </span><span style="color: blue;">"_.___"</span><span style="color: black;">) </span><span style="color: maroon;">/&gt;<br /></span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cfset</span><span style="color: black;"> ratios[</span><span style="color: blue;">'B5'</span><span style="color: black;">] = </span><span style="color: rgb(0, 0, 102);">NumberFormat</span><span style="color: black;">(</span><span style="color: rgb(255, 10, 10);">250</span><span style="color: black;">/</span><span style="color: rgb(255, 10, 10);">176</span><span style="color: black;">, </span><span style="color: blue;">"_.___"</span><span style="color: black;">) </span><span style="color: maroon;">/&gt;</span>
		</span></p><p><span style="font-family: Consolas; font-size: 10pt;"><span style="color: gray;">&nbsp;&nbsp;&nbsp;&nbsp; &lt;!--- Fudge precision ---&gt;</span><br /><span style="color: maroon;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cfif</span><span style="color: black;">
			</span><span style="color: rgb(0, 0, 102);">Abs</span><span style="color: black;">(ratioToTest - ratios[arguments.pageType]) </span><span style="color: blue;">lt</span><span style="color: black;"> .</span><span style="color: rgb(255, 10, 10);">005</span><span style="color: black;">
			</span><span style="color: maroon;">&gt;</span><br /><span style="color: black;">&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cfreturn</span><span style="color: black;">
			</span><span style="color: blue;">true</span><span style="color: black;">
			</span><span style="color: maroon;">/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cfelse&gt;</span><br /><span style="color: black;">&nbsp;&nbsp;&nbsp;&nbsp;</span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;cfreturn</span><span style="color: black;">
			</span><span style="color: blue;">false</span><span style="color: black;">
			</span><span style="color: maroon;">/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-family: Consolas; font-size: 10pt;"><span style="color: maroon;">&lt;/cfif&gt;</span><span style="color: black;">&nbsp;&nbsp;&nbsp;&nbsp;</span>
		</span></p><p><span style="color: maroon; font-family: Consolas; font-size: 10pt;">&lt;/cffunction&gt;
</span></p><p>So it might not be perfect, but it works for me.  Of course, I could just file a feature request with Adobe to add page size to PDF metadata. </p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/07/unit_testing_pdf_page_size_in_coldfusion.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/07/unit_testing_pdf_page_size_in_coldfusion.cfm</guid>
<category>Web Development</category>
<pubDate>Tue, 15 Jul 2008 14:43:01 -0500</pubDate>
</item>

<item>
<title>Speaking at Max 2008</title>
<description><![CDATA[<p>I found out last week, that I was accepted to speak at <a href="http://max.adobe.com/">Max 2008</a> North America.  I'll be talking about using ColdFusion to act as middleware for enterprise applications.  That may not be clear from the title of my session: <em>ColdFusion as Enterprise Middleware</em>.
</p><p>I'm pretty excited about the whole thing, and very grateful to the crew at Adobe, especially <a href="http://www.adrocknaphobia.com/">Adam Lehman</a>, for giving me a shot to speak. 
</p><p>If anyone has any suggestions, or content they would like to hear about, feel free to drop me a line.  I don't guarantee I'll do what you say, but I will definitely will listen. </p>]]></description>
<link>http://www.numtopia.com/terry/blog/archives/2008/07/speaking_at_max_2008.cfm</link>
<guid>http://www.numtopia.com/terry/blog/archives/2008/07/speaking_at_max_2008.cfm</guid>
<category>ColdFusion</category>
<pubDate>Tue, 15 Jul 2008 10:19:59 -0500</pubDate>
</item>


</channel>
</rss>
