<?xml version="1.0" encoding="utf-8"?>

			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>VCS Blog</title>
			<link>http://blog.vawterconsultingservices.com/index.cfm</link>
			<description>This is the ramblings of Don Vawter of Vawter Consulting Services</description>
			<language>en-us</language>
			<pubDate>Sun, 20 May 2012 20:59:36 -0600</pubDate>
			<lastBuildDate>Sun, 13 May 2012 16:48:00 -0600</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>donvawter@mac.com</managingEditor>
			<webMaster>donvawter@mac.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>donvawter@mac.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			
			<itunes:explicit>no</itunes:explicit>
			
			<item>
				<title>Refresh jQuery Mobile Listview Themes at Runtime</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2012/5/13/Refresh-jQuery-Mobile-Listview-Themes-at-Runtime</link>
				<description>
				
				&lt;p&gt;jQuery mobile&apos;s ListViews are very nice but the framework provides no methods for changing the theme (either of the entire list or an individual element) at run time.&lt;/p&gt;
&lt;p&gt;Quite often I need to change the appearance of an element based on state. For example I use a listview on the left hand side of the page and change the content on the right hand side when the user clicks on a category. I, of course, want the selected category to be a different color than the rest of the list.&lt;/p&gt;
&lt;img src=&quot;http://blog.vawterconsultingservices.com/images/listvieworiginal.png&quot; width=&quot;250&quot; /&gt;
&lt;p&gt;One would think you could just change the &quot;data-theme&quot; attribute of the element you click on and refresh the list view. This doesn&apos;t work because the element you click on doesn&apos;t even have a data-theme attribute (even though you specified it in the original markup).&lt;/p&gt;
&lt;p&gt;This is because the framework places a lot of wrappers around the element(an href) but doesn&apos;t attach the data-theme attribute to it.&lt;/p&gt;
&lt;p&gt;In order to change the theme there are a few steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Determine the current theme&lt;/li&gt;
&lt;li&gt;Remove classes associated with the theme on the ancestors of the element&lt;/li&gt;
&lt;li&gt;Add classes on those elements corresponding to the new theme&lt;/li&gt;
&lt;li&gt;Change the data-theme attribute on the appropriate ancestor&lt;/li&gt;
&lt;li&gt;Refresh the listview&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I have written a simple function to accomplish this:&lt;/p&gt;
&lt;code&gt;
 var changeListViewElementTheme = function(selector, theme){
	try {
		$(selector).each(function(){
			try {
				var btn = $(this);
				var ggpar = btn.parent().parent().parent();
				var gggpar = ggpar.parent();
				var th = ggpar.attr(&quot;data-theme&quot;);
				var nth = theme;
				ggpar.removeClass(&quot;ui-btn-up-&quot; + th).addClass(&quot;ui-btn-up-&quot; + nth);
				ggpar.removeClass(&quot;ui-btn-down-&quot; + th).addClass(&quot;ui-btn-down-&quot; + nth);
				ggpar.attr(&quot;data-theme&quot;, nth);
				gggpar.listview(&quot;refresh&quot;);
			}catch(exignore){
				//silent catch because this will fail for non initialized lists
				//but thats ok
			}
		});
	} 
	catch (ex) {
		alert(ex);
	}
}
&lt;/code&gt;
&lt;p&gt;Notice that the classes you need to change are ui-btn-up-x and ui-btn-down-x, where x is the theme (a,b,c,d,e). These classes and the theme exist on the great grandparent of the href element. The listview is the great great grandparent.&lt;/p&gt;
&lt;p&gt;You can play with the concept &lt;a href=&quot;http://www.icryptogram.com/indexmobile.html&quot; target=&quot;_blank&quot;&gt;here&lt;/p&gt;
				</description>
				
				<category>jQuery</category>
				
				<pubDate>Sun, 13 May 2012 16:48:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2012/5/13/Refresh-jQuery-Mobile-Listview-Themes-at-Runtime</guid>
				
				
			</item>
			
			<item>
				<title>That annoying serializeJSON function</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2012/4/15/That-annoying-serializeJSON-function</link>
				<description>
				
				&lt;p&gt;One annoying aspect of using a weakly typed language like ColdFusion is that  sometimes you really need the type. If you ever have fields which are numeric strings (e.g. phone numbers, ssn, or your database uses varchar for ids which consist only of digits) you have probably had issues if you serialize the data using serializeJSON and send it to the client. SSN&apos;s likely will be expressed in scientific notation and leading zeros will be lost in your id&apos;s and international phone numbers.&lt;/p&gt;
&lt;p&gt;You can always work around this by prepending a &quot;~&quot; to the variable and then stripping it off in javascript but that is kludgy at best.&lt;/p&gt;
&lt;p&gt;I have written a parser which preserves appropriate variables as strings when serialized. Since this only works if you can identify the appropriate fields the parser only preserves numerical strings that are part of a struct. If that is too limiting you can always modify the parser to treat all simple values as strings but that means some javascript conversions are necessary on the client to converts strings back to numbers.&lt;/p&gt;
&lt;p&gt;The concept is to pass a mapping struct to the parser telling it which elements to preserve as strings. If you pass an empty mapping struct you get the normal CF serialization.&lt;/p&gt;
&lt;p&gt;Creating a JSON string for a struct or array is straightforward. The parser I have built id not designed to process multi-dimensional arrays. You just start at the root and recursively call a conversion function until you have processed the entire input.&lt;/p&gt;&lt;code&gt;
component {
	public string function toJSON(any inData,struct inmapping){
		var source=arguments.inData;
		var output=&quot;&quot;;
		useMapping=false;
		mapping={};
		if(structkeyexists(arguments,&quot;inmapping&quot;)){
			useMapping=true;
			mapping=arguments.inmapping;		
		}
		output=convert(source);
		return output;
	}

	private string function  convert(any source,string theMapping=&quot;&quot;){
		var output=&quot;&quot;;
		var boolList=&quot;yes,no,true,false&quot;;
		
		try{
			if(isStruct(source)){
				output=convertStruct(source);
			}
			else if (isArray(source)){
				output=convertArray(source);
			}else if (isDate(source)){
				output=&apos;&quot;&apos; &amp; dateformat(source,&apos;mm/dd/yyyy&apos; ) &amp;&quot; &quot; &amp; timeformat(source,&apos;hh:mm:ss&apos;) &amp; &apos;&quot;&apos;;
			}else if (isSimpleValue(source) &amp;&amp; source!=&quot;&quot; &amp;&amp; ( findnocase(source,boolList)&gt;0)){
				if(source){
					output= &quot;true&quot;;
				} else{
					output=&quot;false&quot;;
				}	
			}else if (isSimpleValue(source)){
					if(isNumeric(source) &amp;&amp; ( !useMapping || !theMapping==&quot;string&quot;)){
								output=val(source);
					}else{
							output= &apos;&quot;&apos; &amp; replace(source,&apos;&quot;&apos;,&apos;\&quot;&apos;,&quot;all&quot;) &amp; &apos;&quot;&apos;; 
					}
					
			}else {
				output= &quot;&apos;Conversion failed&apos;&quot;;
			}
		}catch(any excpt){
			writedump(excpt);
			writedump(source);
		}
		return output;
	}
	private string function convertStruct(struct inData){
		var keyname=&quot;&quot;;
		var output=&quot;{&quot;;
		var structVal=&quot;&quot;;
		var source=arguments.inData;
		var ctr=0;
		for (keyName in source){
			ctr++;
			if(ctr&gt;1){
				output&amp;=&quot;,&quot;;
			}
			output&amp;=&apos;&quot;&apos; &amp; keyName &amp; &apos;&quot;:&apos;;
			structVal=source[keyName];
			if(issimpleValue(structVal) &amp;&amp; useMapping &amp;&amp; structkeyexists(mapping,keyName)){
				theMapping=mapping[keyname];
			}else{
				theMapping=&quot;&quot;;
			}
			output&amp;=convert(structVal,theMapping);
		}
		output&amp;=&quot;}&quot;;
		return output;
	}
	private string function convertArray(array inData){
		var output=&quot;[&quot;;
		var structVal=&quot;&quot;;
		var i=1;
		var source=arguments.inData;
		for (i=1;i&lt;=arraylen(source);i++){
			output&amp;=convert(source[i]);
			if(i&lt;arraylen(source)){
				output&amp;=&quot;,&quot;;
			}
		}
		output&amp;=&quot;]&quot;;
		return output;
	}
}
&lt;/code&gt;
&lt;p&gt;Preservation of type is handled in the convert function (lines 15-48) and the mapping is set in the convertStruct function (62-67)&lt;/p&gt;
&lt;p&gt;To set the mapping we just look to see if the keyname exists in the map and set the type if it is.&lt;/p&gt;
&lt;p&gt;The convert function first checks for dates and bools and then tests for whether the value is numeric. If it is numeric and is mapped to a string we surround it by quotes, if not we just take its value and output it. (You need to take the val(source) to eliminate leading zeros or else javascript will whine that it is not a number).
The order of the tests is important because isNumeric will return true for a bool.
&lt;/p&gt;
&lt;p&gt;Here is a code snippet to test the parser:&lt;/p&gt;
&lt;code&gt;
&lt;cfscript&gt;
	what={};
	what[&quot;first&quot;]={};
	what.first[&quot;a&quot;]=&quot;001234&quot;;
	what[&quot;second&quot;]=now();
	what[&quot;third&quot;]=&quot;1234&quot;;
	what[&quot;fourth&quot;]=[];
	arrayappend(what.fourth,9);
	arrayappend(what.fourth,&quot;This is me.&quot;);
	writedump(what);
	writeoutput(&quot;serialized with CF native serializer: &quot; &amp; serializeJSON(what) &amp; &quot;&lt;br/&gt;&quot;);
	o = new toJSON();
	mapping={};
	mapping[&quot;a&quot;]=&quot;string&quot;;
	out1=o.toJson(what,mapping);
	writedump(&quot;serialized with custom serializer and mapping first[a]] to string: &quot; &amp; out1);
	writeoutput(&quot;&lt;br/&gt;&quot;);
	out=o.toJson(what);
	writedump(&quot;serialized with custom serializer and no mapping: &quot; &amp; out);
	writeoutput(&quot;&lt;br/&gt;&quot;);

&lt;/cfscript&gt;
&lt;script language=&quot;JavaScript&quot;&gt;
var o=&apos;&lt;cfoutput&gt;#out1#&lt;/cfoutput&gt;&apos;;
console.log(o);
var out=JSON.parse(o);
console.log(out);
for(i in out){
	console.log(i +typeof(out[i]));
}
var o=&apos;&lt;cfoutput&gt;#out#&lt;/cfoutput&gt;&apos;;
console.log(o);
var out=JSON.parse(o);
console.log(out);
for(i in out){
	console.log(i +typeof(out[i]));
}
d=new Date(out[&quot;second&quot;])
console.log(d+&quot; &quot; +d.getTime()+&quot; &quot;+typeof(d.getTime()));

&lt;/script&gt;
&lt;/code&gt;
&lt;p&gt;The screen output of the test&lt;/p&gt;


&lt;img src=&quot;http://blog.vawterconsultingservices.com/images/serializer1.png&quot; width=&quot;850&quot; /&gt;
&lt;p&gt;If this is useful feel free to use and/or modify it.&lt;/p&gt;
				</description>
				
				<category>ColdFusion</category>
				
				<pubDate>Sun, 15 Apr 2012 16:21:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2012/4/15/That-annoying-serializeJSON-function</guid>
				
				
			</item>
			
			<item>
				<title>A Tricky Problem With a Simple Solution</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2012/3/18/A-Tricky-Problem-With-a-Simple-Solution</link>
				<description>
				
				&lt;img src=&quot;http://blog.vawterconsultingservices.com/images/spacerdiv.png&quot; width=&quot;500&quot; /&gt;

&lt;p&gt;I have a app where the &quot;words&quot; are actually divs and I would like them to flow as if they were words. That is pretty easy to do, just make the word container float left. The problem comes when the page reflows because the user changes the text size or resizes the browser. The browser reflows perfectly except that sometimes the &quot;spacer div&quot; then becomes the first element on a new line which looks bad.&lt;/p&gt;
&lt;p&gt;The question was how to eliminate that? After a bit of head scratching I found a very simple solution.&lt;/p&gt;
&lt;code&gt;
var fixLeadingSpaces =function(){
	$(&quot;.wordspace&quot;).show();
	$(&quot;.wordspace&quot;).each(function(){
		var t=$(this).offset().top;
		var pt=$(this).parent().prev().offset().top;
		if(pt &lt; t){ 
			$(this).hide();
		}
	});
}
&lt;/code&gt;
&lt;p&gt;All the spacer divs have a class &quot;wordspace&quot;. I just iterate over that class and determine its position compared to the previous word. If the top of the spacer is greater than that of the previous word then it must be on a new line so I just hide it. I already eliminate adjacent spaces so the previous word is always either a real word or punctuation. I have to use the parent container because the wordspace element is wrapped by another container.&lt;/p&gt;
&lt;p&gt;Ya gotta love jQuery&lt;/p&gt;
				</description>
				
				<category>jQuery</category>
				
				<pubDate>Sun, 18 Mar 2012 13:00:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2012/3/18/A-Tricky-Problem-With-a-Simple-Solution</guid>
				
				
			</item>
			
			<item>
				<title>Generation of ApplicationCache Manifest Files</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2012/3/16/Generation-of-ApplicationCache-Manifest-Files</link>
				<description>
				
				&lt;p&gt;In order to make an application  available offline one has to create a manifest file telling the browser which files it can cache and which files require connectivity. Unfortunately, as far as I know, the browser cannot use wildcards for this so we need to list files explicitly.&lt;/p&gt;
&lt;p&gt;I, for one, certainly have no interest in hardcoding that list and trying to keep it up to date.&lt;/p&gt;
&lt;p&gt;The manifest file format:&lt;br/&gt;
&lt;pre&gt;
CACHE MANIFEST
#Thu Mar 15 16:13:49 MDT 2012
#Total Files: 54
#Explicitly cached files
css/icryptogramplay.css
css/images/ui-icons_ffffff_256x240.png
js/cachelogging.js
...
NETWORK:
#files which require connectivity
setting_debug.cfm
cfcProxy.cfc
Application.cfc
...
OFFLINE:
&lt;online file&gt;    &lt;offline replacement&gt;
....
&lt;/pre&gt;
&lt;p&gt;# are comments which are ignored by the browser&lt;/p&gt;
&lt;p&gt;Because I am too lazy to maintain a hardcoded file I have written a bash script to generate it for me. The idea is to get a list of files in the web root, get a list of required files, eliminate the required files from the first list and generate the file.&lt;/p&gt; 
&lt;p&gt;Here is the script&lt;/p&gt;&lt;code&gt;
#!/bin/bash

find . |egrep -v &apos;\/\.&apos; | cut -c3- |egrep &apos;\.&apos;|egrep -v &apos;(~|#)&apos; &gt;filesystemfiles
find . |egrep &apos;\.cf(c|m)$&apos; | cut -c3- &gt; requiredfiles
awk &apos;{{a[$0]++}}END{for(i in a){if(a[i]&lt;2)print(i)}}&apos; requiredfiles filesystemfiles excludedfiles &gt;cachedfiles
cat &gt;manifest.manifest &lt;&lt;EOF
CACHE MANIFEST
#`date`
#Total Files: `cat cachedfiles|wc -l`
#Explicitly cached files
`cat cachedfiles`
NETWORK:
`cat requiredfiles`
EOF
&lt;/code&gt;
&lt;p&gt;&lt;i&gt;find&lt;/i&gt; will give a list of all the files in the file system but it will also give us . and all the directories. Here is a typical result of &lt;i&gt;find&lt;/i&gt; .&lt;/p&gt;
&lt;code&gt;
.
./.DS_Store
./.project
./.settings
./.settings/.svn
./.settings/.svn/all-wcprops
./.settings/.svn/entries
./.svn/tmp/text-base
./Application.cfc
./assets
./assets/.svn
./assets/.svn/all-wcprops
./cachedfiles
./cfcProxy.cfc
./controller
./controller/.svn
./controller/.svn/all-wcprops
./css
./css/.svn
./css/.svn/tmp/text-base
./css/bootstrap-responsive.css
./css/bootstrap-responsive.min.css
./css/bootstrap.css
./css/bootstrap.min.css
./css/icryptogramplay.css
./css/images
./css/images/.svn
./css/images/.svn/all-wcprops
./css/images/ui-bg_diagonals-thick_18_b81900_40x40.png
./css/images/ui-bg_diagonals-thick_20_666666_40x40.png
./css/images/ui-bg_flat_10_000000_40x100.png
./excludedfiles
./filesystemfiles
./js
./js/bootstrap-button.js
./js/bootstrap-carousel.js
./js/bootstrap-collapse.js
./js/bootstrap-dropdown.js
./js/bootstrap-modal.js
./js/bootstrap-popover.js
./model
./view
&lt;/code&gt;

&lt;p&gt;The first &lt;i&gt;find&lt;/i&gt; finds the files and cleans them up. There are a few assumptions in that line.&lt;br&gt;
&lt;ol&gt;
 &lt;li&gt;Hidden files should not be listed (such as .svn files)&lt;/li&gt;
&lt;li&gt;Directories shouldn&apos;t be listed. In my case I never use . in directories so I eliminate any entry which doesn&apos;t contain a period. &lt;/li&gt;
&lt;li&gt;I want to eliminate remnants left over by editors which tack on ~ or # to the file name&lt;/li&gt;
&lt;li&gt;The &lt;i&gt;cut&lt;/i&gt; just strips the leading ./ from the list&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For the required files we certainly must eliminate any cfc&apos;s in our web root. In my case I also want to eliminate .cfm files but that is probably unique to my application.&lt;/p&gt;
&lt;p&gt;The first two lines create the files &quot;filesystemfiles&quot; and &quot;requiredfiles&quot;. We want to eliminate the required files from the filesystemfiles list. &lt;i&gt;awk&lt;/i&gt; has a very simple way to do this. It reads the files line by line and increments an associative array that uses the file name as the key. If it reads both files then when it gets done any required file will have a count of 2 because it occurs in both lists so we only print results with a value of 1. That is all done in the third line. We also process excludefiles, if present, which is just a list of files to exclude that are not in the generated required files.&lt;/p&gt;
&lt;p&gt;The remainder of the script just spits out the results to our manifest.manifest file and makes use of &lt;a href=&quot;http://tldp.org/LDP/abs/html/here-docs.html&quot; target-&quot;_new&quot;&gt;Here documents&lt;/a&gt; redirection.&lt;/p&gt;
&lt;p&gt;I am sure the above script will need modification for different environments but it certainly is easier for me than maintaining a hardcoded file and hopefully can serve as a jumping off point for others.&lt;/p&gt;
				</description>
				
				<category>jQuery</category>
				
				<category>ColdFusion</category>
				
				<pubDate>Fri, 16 Mar 2012 13:00:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2012/3/16/Generation-of-ApplicationCache-Manifest-Files</guid>
				
				
			</item>
			
			<item>
				<title>A jQuery plugin for Zooming.</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2012/3/2/jZoom</link>
				<description>
				
				&lt;div id=&quot;flash_movie_1&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function showMovie(){
    swfobject.embedSWF(&quot;/enclosures/ZoomDemo.swf&quot;, &quot;flash_movie_1&quot;, &quot;600&quot;, &quot;450&quot;, &quot;10.0.0&quot;);
}
function hideMovie(){
   var target=$(&quot;#flash_movie_1&quot;);
    target.replaceWith(&quot;&lt;div id=&apos;flash_movie_1&apos;&gt;&lt;/div&gt;&quot;);
}
&lt;/script&gt;
&lt;br/&gt;
&lt;p&gt;I have worked on a jQuery plugin to allow a user to pan over a low res image and zoom in on the same position in a hi res image.
The code is entirely client-side and depends on both low and high res images being available. There is no resampling of the image.The plugin may be applied to multiple images on a page. Before delving into the code let&apos;s take a look at an example. (The video seems to hang at a couple of points. Toggling the pause button will allow the video to continue.)&lt;/p&gt;
&lt;input type=&quot;button&quot; onclick=&quot;showMovie()&quot; value=&quot;Show Video&quot;&gt;
&lt;input type=&quot;button&quot; onclick=&quot;hideMovie()&quot; value=&quot;Hide Video&quot;&gt;
&lt;p&gt;Let&apos;s look at the code in the rendering page.&lt;/p&gt;&lt;code&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jzoom.js&quot;&gt;&lt;/script&gt;
&lt;script language=&quot;JavaScript&quot;&gt;
&lt;cfif url.styleit&gt;
$(document).ready(function(){
	$(&quot;#view2&quot;).hide();

        $(&quot;#second&quot;).jzoom(&quot;init&quot;,src:&quot;coinhires.jpg&quot;,id:&quot;view2&quot;,width:600,height:400,wrapperClass:&quot;wrapperstyle&quot;,hideOnExit:false});
	$(&quot;#first&quot;).jzoom(&quot;init&quot;,{src:&quot;hires.jpg&quot;,id:&quot;view2&quot;,width:400,height:400,wrapperClass:&quot;wrapperstyle2&quot;,hideOnExit:true});
})
&lt;cfelse&gt;
$(document).ready(function(){
	$(&quot;#view2&quot;).hide();
	$(&quot;#second&quot;).jzoom(&quot;init&quot;,{src:&quot;coinhires.jpg&quot;,id:&quot;view2&quot;,width:600,height:400,hideOnExit:false});
	$(&quot;#first&quot;).jzoom(&quot;init&quot;,{src:&quot;hires.jpg&quot;,id:&quot;view2&quot;,width:400,height:400,hideOnExit:true});
})
&lt;/cfif&gt;
&lt;/script&gt;
&lt;/code&gt;
&lt;p&gt;ColdFusion is not necessary for this to work. It is only used as a convenience here so I can show different behavior depending on the url parameter. The plugin works fine in a pure html/javascript page.&lt;/p&gt;
&lt;p&gt; Other than loading jquery and the jzoom plugin you only have one line of javascript per image to be zoomed. The call to the init method on the plugin initializes the code and binds the mouse events. We will look at the options in a bit.&lt;/p&gt;
&lt;code&gt;
&lt;img id=&quot;first&quot; src=&quot;lores.jpg&quot;&gt;
&lt;img id=&quot;second&quot; src=&quot;coinlores.jpg&quot;&gt;
&lt;div id=&quot;container&quot;&gt;
&lt;img id=&quot;view2&quot; class=&quot;foobar&quot; style=&quot;display:none&quot; src=&quot;&quot; &gt;
&lt;/div&gt;
&lt;/code&gt;
&lt;p&gt;The html code very simple. Two img tags for the lores images and an img tag (with an empty src) for the hires display. It is not necessary to surround the hires image with a div, but doing so (with the surrounding div having position:absolute) will prevent the page from reflowing when the hires image is toggled between shown and hidden.&lt;/p&gt;

&lt;pre&gt;
    Options:
    Name              Default Value         Purpose
    src               &quot;&quot;                    The src of the hires image
    id                &quot;&quot;                    The id of the img tag of the hires image
    width             400                   The width of the viewport
    height            300                   The height of the viewport
    wrapperClass      &quot;&quot;                    The class of a generated div which will surround the hires image.
                                              Necessary if you want a border around the hires image.
    hideOnExit        true                  If true the hires image will be hidden when you mouse out of the lores image
 
			
      Methods:
    init           Initializes the plugin, sets options and binds mouse events
    remove         Removes the wrappers around the hires image, unbinds the mouse events, displays the entire hires image
 			 
      Usage:
 	$(selector).jzoom(method,options)
 	      where selector is the id of the lores image, options is an object containing the options.
 			 	
        Example 1:
 			 	
        $(&quot;#second&quot;).jzoom(&quot;init&quot;,{src:&quot;coinhires.jpg&quot;,id:&quot;view2&quot;,width:600,height:400,wrapperClass:&quot;wrapperstyle&quot;,hideOnExit:false});

     The lores image has an id of &quot;second&quot;, coinhires.jpg is the src of the hires image which has an id of &quot;view2&quot;, 
     a 600x400 portion of the hires image will be displayed. This portion will have the style &quot;wrapperstyle&quot; applied to the
     surrounding div and the image will not be hidden when you mouse out of the lores image.

       Example 2:
 			 	
       $(&quot;#second&quot;).jzoom(&quot;remove&quot;);

       The entire hires image will display and mousing over the lores image will no longer have any effect. 
       If you want to enable zooming again you would have to initialize the plugin again.
&lt;/pre&gt; 
&lt;p&gt;The options and sample usage are shown above.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;How does the plugin work?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The plugin wraps the target hires image tag in two divs. One to clip the image(overflow:hidden) and another to position the hires image so that the appropriate portion is shown. Thanks to the folks at ajaxBlender.com (developers of jclip). I have modified the process used in jclip to have the position based on the mouse position in the lores image.&lt;p&gt;
&lt;p&gt;Let&apos;s look at the firebug output which shows the html after the init function runs.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/enclosures/firebug.png&quot;&gt;&lt;/p&gt;
&lt;p&gt;Suggestions welcome. The plugin is &lt;a href=&quot;/enclosures/jzoom.js&quot; target=&quot;_new&quot;&gt;here&lt;/a&gt;.
&lt;br/&gt;
				</description>
				
				<category>jQuery</category>
				
				<pubDate>Fri, 02 Mar 2012 13:00:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2012/3/2/jZoom</guid>
				
				
				<enclosure url="http://blog.vawterconsultingservices.com/enclosures/jzoom.js" length="6335" type="application/x-javascript"/>
				
			</item>
			
			<item>
				<title>Progressive filtering using jQuery</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2012/2/28/Progressive-filtering-using-jQuery</link>
				<description>
				
				&lt;div id=&quot;flash_movie_1&quot;&gt;&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function showMovie(){
    swfobject.embedSWF(&quot;/enclosures/ProgressiveDemo.swf&quot;, &quot;flash_movie_1&quot;, &quot;600&quot;, &quot;450&quot;, &quot;10.0.0&quot;);
}
function hideMovie(){
   var target=$(&quot;#flash_movie_1&quot;);
    target.replaceWith(&quot;&lt;div id=&apos;flash_movie_1&apos;&gt;&lt;/div&gt;&quot;);
}
&lt;/script&gt;
&lt;input type=&quot;button&quot; onclick=&quot;showMovie()&quot; value=&quot;Show Video&quot;&gt;
&lt;input type=&quot;button&quot; onclick=&quot;hideMovie()&quot; value=&quot;Hide Video&quot;&gt;
&lt;br/&gt;
&lt;p&gt;Here is a simple plugin to filter a result set using jQuery&lt;/p&gt;
&lt;p&gt;You &quot;attach&quot; the plugin to a text field and then as you type in that field only the matching records are shown&lt;p&gt;&lt;code&gt;
&lt;html&gt;
&lt;head&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jprogressive.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;dumpObject.js&quot;&gt;&lt;/script&gt;
&lt;style&gt;
.jp{display:none;}
&lt;/style&gt;
&lt;script language=&quot;JavaScript&quot;&gt;
&lt;cfparam name=&quot;url.startsWith&quot; default=&quot;true&quot;&gt;
$(document).ready(function(){
	$(&quot;.jp&quot;).hide(); //hide all records first
        //attach the plugin to text field myinput
	$(&quot;#myinput&quot;).jprogressive({attribute:&quot;value&quot;,dataclass:&quot;jp&quot;,startsWith:&lt;cfoutput&gt;#lcase(url.startsWith)#&lt;/cfoutput&gt;});
	// has nothing to do with plugin we just want to see which words user has selected
        $(&quot;#mySelect&quot;).bind(&quot;click&quot;,function(){
		foo=[];
		$(&quot;.jp &gt;:checked&quot;).each(function(){
			foo.push(this.value);	
		});
		alert(foo);
	});
})
&lt;/script&gt;
&lt;body&gt;
&lt;!-- Just getting some words to choose from --&gt;
&lt;cfquery name=&quot;q&quot;datasource=&quot;cryptogram&quot; maxrows=&quot;500&quot;&gt;
Select word from tbl_dictionary
where id%10=0
&lt;/cfquery&gt;
&lt;input type=&quot;button&quot; value=&quot;Select&quot; id=&quot;mySelect&quot;&gt;
&lt;input type=&quot;text&quot; id=&quot;myinput&quot;&gt; &lt;!-- this is where we type our filter criteria
&lt;!-- Notice that we give all the divs a common class--&gt;
&lt;cfoutput query=&quot;q&quot;&gt;
&lt;div class=&quot;jp&quot; value=&quot;#q.word#&quot;&gt;#q.word#&lt;input type=&quot;checkbox&quot; value=&quot;#q.word#&quot;&gt;&lt;/div&gt;
&lt;/cfoutput&gt;

&lt;/body&gt;
&lt;/html&gt;
&lt;/code&gt;
&lt;p&gt;Here is the plugin&lt;/p&gt;
&lt;code&gt;
(function($){
	$.fn.extend({
  		jprogressive:function(_options){
  			var options={};
			var config={
				attribute:&quot;value&quot;,
				dataclass:&quot;jprogressive&quot;,
				startsWith:true
				};
			//entry point	
			options=$.extend(options,config);
			options=$.extend(options,_options);
			return this.each(function(){		
				$(this).bind(&quot;keyup&quot;,function(){
					$(&quot;.&quot; + options.dataclass).hide(); //hide everything and then show matches
					if ($(this).val() != &quot;&quot;) {
						if (options.startsWith) {
							$(&quot;.&quot; + options.dataclass + &quot;[&quot; + options.attribute + &quot;^=&quot; + $(this).val() + &quot;]&quot;).show();
						}
						else {
							$(&quot;.&quot; + options.dataclass + &quot;[&quot; + options.attribute + &quot;*=&quot; + $(this).val() + &quot;]&quot;).show();
						}
					}
				});		
			});
		}
	})
})(jQuery);

&lt;/code&gt;
&lt;p&gt;The query has three options:
&lt;ol&gt;
&lt;li&gt;attribute: The attribute  we look for in the displayed elements. The default is &quot;value&quot; It could be &quot;name&quot; or whatever else you choose&lt;/li&gt;
&lt;li&gt;dataclass: This is the class which characterises all your display elements. In our example we use &quot;jp&quot;&lt;/li&gt;
&lt;li&gt;startsWith: if true we look for elements whose attribute value &quot;starts with&quot; the filter, else the value &quot;contains&quot; the filter&lt;/li&gt;
&lt;p&gt;Feel free to copy and use the above snippets. There is no error checking etc but you may find it useful.&lt;/p&gt;
&lt;a href=&quot;http://develop.dailycrypto.com/test/testprogressive.cfm&quot; target=&quot;_new&quot;&gt;Try it here&lt;/a&gt;
				</description>
				
				<category>jQuery</category>
				
				<pubDate>Tue, 28 Feb 2012 13:00:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2012/2/28/Progressive-filtering-using-jQuery</guid>
				
				
				<enclosure url="http://blog.vawterconsultingservices.com/enclosures/ProgressiveDemo1.swf" length="1561753" type="application/x-shockwave-flash"/>
				
			</item>
			
			<item>
				<title>ColdFusion Directory Watcher Gateway</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2012/2/12/ColdFusion-Directory-Watcher-Gateway</link>
				<description>
				
				&lt;p&gt;On a daily basis I have my websites backed up and send the tarball via ftp to my local machine. I was interested in automatically copying those files to an external hard drive. I found a simple way to do this using an instance of ColdFusion Directory Watcher Gateway. One could write a component that scans the directory and looks for differences between that and the archive directory on the external drive and copy any changed or added files and run that as a scheduled task. It is far easier to use a gateway instance rather than reinvent the wheel.&lt;/p&gt;&lt;p&gt;The gateway fires when any of three events occur:
&lt;ol&gt;
&lt;li&gt;A file is added&lt;/li&gt;
&lt;li&gt;A file is deleted&lt;/li&gt;
&lt;li&gt;A file is changed&lt;/li&gt;
&lt;/li&gt;
&lt;p&gt;In order to use the gateway you must have a cfc which responds to those events.&lt;/p&gt;
&lt;p&gt;Here is the cfc I use&lt;/p&gt;
&lt;code&gt;
component{
	public  function init(){
		variables.outDir=&quot;/Volumes/VPSBackups/vpsbackup/&quot;;
		return this;
	}
	public function onAdd(struct CFEvent){
		onAlter(arguments.CFEvent,&quot;add&quot;);
	}
	public function onChange(struct CFEvent){
		onAlter(arguments.CFEvent,&quot;change&quot;);
	}
	private function onAlter(struct CFEvent,string source){
		try{
			if(!structkeyexists(variables,&quot;outDir&quot;)){
				this.init();
			}
			variables.lm={};
			variables.lm.message=&quot;&quot;;
			var s=arguments.CFEvent.data.filename;
			var d=listlast(s,&quot;/&quot;);
			d=variables.outDir &amp; d;
			fileCopy(s,d);
			variables.lm.message&amp;=&quot;watch&quot;;
			if(arguments.source==&quot;change&quot;){
				variables.lm.message&amp;=&quot; file&quot; &amp; s &amp;&quot; has changed and was copied to &quot; &amp; d ;
			}else{
				variables.lm.message&amp;=&quot; file&quot; &amp; s &amp;&quot; was added and copied to &quot; &amp; d ;
			}
		}catch(any ex){
			variables.lm.message&amp;=&quot;watch&quot;;
			variables.lm.message&amp;=&quot; an exception was thrown #ex.message# &quot;;
			writedump(ex,&quot;/Users/don/ex.log&quot;,&quot;text&quot;);	
		}finally{
			writelog(text=variables.lm.message,application =false,file=&quot;mygateway&quot;);
		}
	}
}	
&lt;/code&gt;
&lt;p&gt;The CFEvent struct is passed by the gateway and has the following structure:
&lt;code&gt;
CFCMETHOD: onChange
CFCPATH: /Users/don/workspace/dirwatcher/com/vawter/vpsbackupnew.cfc
DATA:  
	[struct]
	FILENAME: /Users/don/vpsbackup/another2.tar
	LASTMODIFIED: {ts &apos;2012-02-12 09:57:35&apos;}
	TYPE: CHANGE
GATEWAYID: vpsbu
GATEWAYTYPE: FileWatcher
ORIGINATORID: [empty string]
&lt;/code&gt;
&lt;p&gt;The cfc is very simple. We pull the file name from CFEvent and copy it to a new location, and log the event. Since we want to copy the file whether it is added or changed we do that in a common method (onAlter). The only difference between the events is the message we log.&lt;/p&gt;
&lt;p&gt;One gotcha is that when the gateway instantiates the cfc &lt;b&gt;it does not fire the init method.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;We do not provide an onDelete method because we have nothing to do for that event.&lt;/p&gt;
&lt;p&gt;The remaining steps are to configure the gateway instance in CFAdministrator&lt;/p&gt;
&lt;/div&gt;

&lt;img src=&quot;http://blog.vawterconsultingservices.com/images/dirwatcher.png&quot; /&gt;
&lt;p&gt;Here is the config file&lt;/p&gt;
&lt;code&gt;
#
# DirectoryWatcherGateway configuration file
#

# The directory you want to watch.  If you are entering a Windows path
# either use forward slashes (C:/mydir) or escape the back slashes (C:\\mydir).
directory=/Users/don/vpsbackup

# Should we watch the directory and all subdirectories too
# Default is no.  Set to &apos;yes&apos; to do the recursion.
recurse=no

# The interval between checks, in miliseconds
# Default is 60 seconds
interval=60000

# The comma separated list of extensions to match.
# Default is * - all files
extensions=*

# CFC Function for file Change events
# Default is onChange, set to nothing if you don&apos;t want to see these events
changeFunction=onChange

# CFC Function for file Add events
# Default is onAdd, set to nothing if you don&apos;t want to see these events
addFunction=onAdd

# CFC Function for file Delete events
# Default is onDelete, set to nothing if you don&apos;t want to see these events
deleteFunction=
&lt;/code&gt;
&lt;p&gt;When I am testing I set the interval to 1 minute because I am impatient. Setting it to a few hours makes more sense for my use case. If you are receiving a large file and checking every minute the gateway will fire several times which is rather wasteful of resources and it results in copying an incomplete file the first few times.&lt;/p&gt;
&lt;p&gt;The Directory Watcher is one of the simplest gateways to implement. I think the next gateway I will explore is the CFML gateway which allows for asynchronus calls to cfcs.&lt;/p&gt;
				</description>
				
				<category>ColdFusion</category>
				
				<pubDate>Sun, 12 Feb 2012 15:31:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2012/2/12/ColdFusion-Directory-Watcher-Gateway</guid>
				
				
			</item>
			
			<item>
				<title>Generating Components From Tables and Queries</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2012/2/12/Generating-Components-From-Tables-and-Queries</link>
				<description>
				
				&lt;p&gt;Quite often I find it useful to have a ColdFusion object which reflects the data in the row of a query or database table.&lt;/p&gt;
&lt;p&gt;I have a written a generator to accomplish this. Please note that this is CF 9 specific. But wait, you say, CF 9 has ORM built in why not just use that. There are two limitations of Hibernate as implemented in CF 9 which rule it out for my use. 1)It is limited to a single datasource and 2) it will not work on an arbitrary query.&lt;/p&gt;
&lt;p&gt;We have an application for which different clients have different datasources. The database schema is the same for each client but the database instance, and hence datasource  is different.&lt;/p&gt;
&lt;p&gt;Also, we often move data returned by a query around the application and to the client side to be used by jQuery. It is much easier to use an object for this than using queries directly.&lt;p&gt;&lt;h2 align=&quot;center&quot;&gt;The Generator&lt;/h2&gt;
&lt;p&gt;The generator retrieves information about the table or query, and creates a cfc reflecting that structure and writes it to the appropriate location in the file system. The generator is designed to be run once and need not be run again unless the schema changes. If it is rerun it respects changes made to the cfc by the developer and does not overwrite them.&lt;p&gt;
&lt;p&gt;I will discuss the generator code a bit later but lets look at a typical cfc that is generated first. After all if you don&apos;t find the generated cfc useful why would you care about how it is generated?&lt;/p&gt;
&lt;h2 align=&quot;center&quot;&gt;Sample cfc of the artists table in cfartgallery&lt;/h2&gt;
&lt;code&gt;
component datasource=&apos;cfartgallery&apos;  primarykey=&apos;ARTISTID&apos;  pkIsIdentity=&apos;true&apos;  extends=&quot;com.vawter.utilities.baseTableClass&quot;  accessors=true  {
/*************Properties generated: Oct 9, 2011 Do not modify. If schema changes rerun generator *************/
	property type=&apos;numeric&apos; name=&apos;ARTISTID&apos;  datatype=&apos;CF_SQL_INTEGER&apos; ;
	property type=&apos;string&apos; name=&apos;FIRSTNAME&apos;  datatype=&apos;CF_SQL_VARCHAR&apos; ;
	property type=&apos;string&apos; name=&apos;LASTNAME&apos;  datatype=&apos;CF_SQL_VARCHAR&apos; ;
	property type=&apos;string&apos; name=&apos;ADDRESS&apos;  datatype=&apos;CF_SQL_VARCHAR&apos; ;
	property type=&apos;string&apos; name=&apos;CITY&apos;  datatype=&apos;CF_SQL_VARCHAR&apos; ;
	property type=&apos;string&apos; name=&apos;STATE&apos;  datatype=&apos;CF_SQL_VARCHAR&apos; ;
	property type=&apos;string&apos; name=&apos;POSTALCODE&apos;  datatype=&apos;CF_SQL_VARCHAR&apos; ;
	property type=&apos;string&apos; name=&apos;EMAIL&apos;  datatype=&apos;CF_SQL_VARCHAR&apos; ;
	property type=&apos;string&apos; name=&apos;PHONE&apos;  datatype=&apos;CF_SQL_VARCHAR&apos; ;
	property type=&apos;string&apos; name=&apos;FAX&apos;  datatype=&apos;CF_SQL_VARCHAR&apos; ;
	property type=&apos;string&apos; name=&apos;THEPASSWORD&apos;  datatype=&apos;CF_SQL_VARCHAR&apos; ;
/************init generated: Oct 9, 2011 Do not modify here. Modify in usercode************/
	public com.vawter.databaseobjects.artists function init(
		numeric ARTISTID= 0, 
		string FIRSTNAME= &quot;&quot;, 
		string LASTNAME= &quot;&quot;, 
		string ADDRESS= &quot;&quot;, 
		string CITY= &quot;&quot;, 
		string STATE= &quot;&quot;, 
		string POSTALCODE= &quot;&quot;, 
		string EMAIL= &quot;&quot;, 
		string PHONE= &quot;&quot;, 
		string FAX= &quot;&quot;, 
		string THEPASSWORD= &quot;&quot;
	){
		super.init(argumentCollection=arguments);
		return this;
	} //end init
/************Start User Code*************/
/****Code placed here will not be changed if you run generator again.***/
/**** You may override the update,add,delete,read,save methods here.***/
/*** You may also define any new methods or overide the init method. ***/
/*** If you override the init method be sure to call the super.init method ***/
/************End User Code*/

} //end component
&lt;/code&gt;
&lt;p&gt;Notice the metadata attached to the component: datasource, primary key, pkIsIdentity. These were collected by the generator when it was run and are used when interacting with the database. The datasource is the datasource used when the component was generated. It is used by default but you may set a new datasource at runtime if necessary.&lt;/p&gt;
&lt;p&gt;Also notice that accessors is set to true. When CF sees this it generates getters and setters automatically. If the developer overrides one of the accessors in the &quot;usercode&quot; section the code &quot;getter=false or setter=false&quot; is added to the appropriate property when the generator is rerun.&lt;/p&gt;
&lt;p&gt;The first thing you may notice is that the code contains no useful methods. It is basically a list of properties reflecting the structure of the table. Notice that these properties incorporate the database type from the database.
The component extends com.vawter.utilities.baseTableClass which contains all the methods and does the heavy lifting.&lt;/p&gt;
&lt;p&gt;Methods inherited from the superclass:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;setDatsource(string ds)&lt;/li&gt;
&lt;li&gt;getDatasource()&lt;/li&gt;
&lt;li&gt;add()&lt;/li&gt;
&lt;li&gt;update()&lt;/li&gt;
&lt;li&gt;delete()&lt;/li&gt;
&lt;li&gt;read()&lt;/li&gt;
&lt;li&gt;save()&lt;/li&gt;
&lt;li&gt;fillFromQuery(query q)&lt;/li&gt;
&lt;li&gt;fillObjectFromQueryRow(query q,numeric row)&lt;/li&gt;
&lt;li&gt;fillObjectFromStruct(struct inStruct)&lt;/li&gt;
&lt;li&gt;getJson()&lt;/li&gt;
&lt;li&gt;getJsonFromArray(array aObj)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The purpose of the first two methods is to change the datasource. The next five should be obvious. They are just the standard CRUD operations.&lt;/p&gt;&lt;p&gt; The next three are methods for populating the object. fillFromQuery is a little different. It creates an array of objects, one for each row of the supplied query. Each instance is of the same type as the calling object.&lt;/p&gt;&lt;p&gt;getJson returns a string of the serialized data in the object and getJsonFromArray returns a string of the serialized data from an array of objects (usually from fillFromQuery).&lt;/p&gt;
&lt;p&gt;All the methods except 1,2,11,12 return a struct with elements result and errormessage. Result is true or false and if false errormessage is the reason. fillFromQuery returns an additional element &quot;records&quot; which is an array of objects populated from the query.&lt;/p&gt;
&lt;p&gt;To use the read method you first populate the object with the pk you want to fetch and then call read. The method queries the database for that record and updates the object. Values other than the pk which were in the original object are ignored.&lt;/p&gt;
&lt;p&gt;The CRUD methods are only useful for tables and views. It makes no sense to &quot;add&quot; to the database if the object reflects the data from an arbitrary query. Also the table must have a primary key or the CRUD operations will fail.&lt;/p&gt;
&lt;h2 align=&quot;center&quot;&gt;Sample usage of the generated code&lt;/h2&gt;
&lt;code&gt;
local.o=new com.vawter.databaseobjects.artists(email=&apos;johnny@squirrel.com&apos;,firstname=&quot;Johnny&quot;,lastname=&quot;Squirrel&quot;);
	local.o.setState(&quot;CO&quot;);
	iocal.o.save();
	
	The above creates an instance of artists, setting values for email, firstname,lastname and state and then saves it to the database.
	Since we have not specified the pk this will actually do an insert into the database.
	
	local.o=new com.vawter.databaseobjects.artists();
	local.o.setArtistId(12);
	local.res=o.read();
	
	If local.res.result is true then local.o now contains the data for artistid=17 from the database.
	
	local.o=new com.vawter.databaseobjects.artists();
	local.res=local.o.fillFromQuery(q);
	
	If local.res.result  is true then local.res.results is an array of objects of type artists, one element for each row in query q.
	
	local.o=new com.vawter.databaseobjects.artists();
	local.st=local.o.getJson();
	
	local.st now contains the serialized string of the data contained in local.o 
	(obviously you would populate local.o before calling this method or you will just get the default values)

	local.o=new com.vawter.databaseobjects.artists();
	local.res=local.o.fillFromQuery(q);
	local.st= o.getJsonFromArray(local.res.records);
	
	local.st now contains the serialized string for all the data from the objects created from the query q

&lt;/code&gt;


&lt;h2 align=&quot;center&quot;&gt;The Generator Code&lt;/h2&gt;
&lt;p&gt;The generator code is straightforward. After collecting necessary file locations and the desired component path, it collects the metadata for the table or query and information about the defaults, generates the code and writes it to the file system.&lt;/p&gt;
&lt;h3&gt;Collecting metadata for tables and views&lt;/h3&gt;
&lt;p&gt;The &lt;cfdbinfo&gt; tag provides information about the table structure and default values.&lt;/p&gt;
&lt;code&gt;
private struct function getColumnInfo(ds,ta){
		variables._datasource=arguments.ds;
		variables._tablename=arguments.ta;
		variables._action=&quot;columns&quot;;
		include &quot;incdbinfo.cfm&quot; ;
		var q= variables.resultQuery;
...
&lt;/code&gt;
&lt;p&gt;Unfortunately cfscript does not have an equivalent for cfdbinfo. To use it and retain script notation we use an include statement: include &quot;incdbinfo.cfm&quot;. incdbinfo.cfm is very simple:&lt;/p&gt;
&lt;code&gt;
&lt;cfparam name=&quot;variables._datasource&quot; default=&quot;&quot;&gt;
&lt;cfparam name=&quot;variables._action&quot; default=&quot;columns&quot;&gt;
&lt;cfparam name=&quot;variables._tablename&quot; default=&quot;&quot;&gt;
&lt;cfif not variables._tablename eq &quot;&quot;&gt;
	&lt;cfdbinfo datasource=&quot;#variables._datasource#&quot; name=&quot;variables.resultQuery&quot; table=&quot;#variables._tablename#&quot; type=&quot;#variables._action#&quot;&gt;
&lt;cfelse&gt;
	&lt;cfdbinfo datasource=&quot;#variables._datasource#&quot; name=&quot;variables.resultQuery&quot;  type=&quot;#variables._action#&quot;&gt;
&lt;/cfif&gt;
&lt;/code&gt;
&lt;p&gt;If one had an action other than &quot;columns&quot; one would not have a table name, hence the if statement.&lt;/p&gt;
&lt;h4&gt;Collecting metadata for a supplied query&lt;/h4&gt;
&lt;p&gt;For a query, dbinfo is not available. We can, however collect information on the columns and data types by executing the query and then using the metadata.&lt;/p&gt;
&lt;code&gt;
private array function getMetaDataForTable(required string datasource,required string table,string qSQL=&quot;&quot;){
		try{
			var q=new query();
			q.setDatasource(arguments.datasource);
			var	tablename=arguments.table;
			if(arguments.qSQL==&quot;&quot;){
				q.setSQL(&quot;SELECT * FROM &quot; &amp; tablename &amp; &quot; where 1 = 0&quot;);
			}else{
				q.setSQL(arguments.qSQL);
			}
			var qResult=q.execute();
			var md=getMetadata(qResult.getResult());
		}catch(any ex){
			writedump(ex);
		}
		return duplicate(md);
	}
&lt;/code&gt;
&lt;p&gt;For queries qSQL is the developer supplied sql. Since this generator should not live in a production environment we are not overly concerned about sql injection.&lt;/p&gt;
&lt;p&gt;Notice the &quot;where 1 = 0&quot; statement. We need no records in the result set to get the metadata so we insure that none are returned.&lt;/p&gt;
&lt;p&gt;The metadata returned is an array of structs, one for each column. The struct contains the column name, the column data type, and whether the data is case sensitive. The column names are the same case as the database. For the examples in this post they are all upper case but in the general case they are not. We preserve the case when generating code so our properties reflect the underlying database case. This makes reading the code much easier and means that when we pass the data to javascript we are certain of the case of the variable names. Of course within CF the case of the property is not important.&lt;/p&gt;
&lt;h2 align=&quot;center&quot;&gt;Sample Usage of Generator&lt;/h2&gt;
&lt;code&gt;
local.o=new com.vawter.utilities.DBObjects(&apos;cfartgallery&apos;);
local.res=local.o.tableToObject(componentpath=&quot;com.vawter.databaseobjects&quot;,table=&quot;artists&quot;);
&lt;/code&gt;
&lt;p&gt;local.res will return a struct with 3 elements a)result(true|false), b)errormessage c) the text of the cfc generated
The text of the cfc generated is just for informational purposes. The real code is written to the file system
You will probably want to import the generated code into your version control system.
&lt;/p&gt;
&lt;h2 align=&quot;center&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;It is easy to create objects representing tables or queries. The components generated are simple with all the methods containe in a common superclass.&lt;/p&gt;	
&lt;p&gt;You may download the code for the generator &lt;a href=&quot;http://develop.dailycrypto.com/downloads/generator.zip&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.
&lt;p&gt;In a future post I will discuss moving objects to and from the client using jQuery.&lt;/p&gt;
&lt;p&gt;Comments and suggestions welcomed,&lt;/p&gt;
				</description>
				
				<category>ColdFusion</category>
				
				<pubDate>Sun, 12 Feb 2012 13:00:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2012/2/12/Generating-Components-From-Tables-and-Queries</guid>
				
				
			</item>
			
			<item>
				<title>Overriding OS alerts and confirms using jQuery</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2011/11/16/Overriding-OS-alerts-and-confirms-using-jQuery</link>
				<description>
				
				&lt;p&gt;I have recently been tasked with unifying the look and feel of a large application. The application makes use of the jQuery dialog for notifications as ajax operations process but there are a large number of places where the application uses OS alerts and confirms.&lt;/p&gt;
&lt;p&gt;You cannot just replace these calls with a dialog because displaying the dialog does not stop downstream processing like alerts and confirms do. In the alert case this is usually not important unless you have code like:

&lt;pre&gt;
alert(&quot;Sending you to google&quot;);
location.href=&quot;http://www.google.com&quot;;
&lt;/pre&gt;

&lt;p&gt;In the above case you will go toodling off to google before the replacement for the alert has been dismissed. Fortunately in our application this use case doesn&apos;t occur so replacing the alert with a dialog works fine.&lt;/p&gt;&lt;h3&gt;Replacing the alert window&lt;/h3&gt;

The following will replace the native alert with a jQuery dialog (jqwindow is a plugin wrapper for the dialog):
&lt;pre&gt;
$(document).ready(function (){
	window.alert=function(mess){
		$(&quot;#modal&quot;).jqwindow(&quot;alert&quot;,mess);
	};
     }
);

&lt;/pre&gt;
&lt;p&gt;Unfortunately the above approach does not work in IE. IE will not let you override the native alert function so you have to change all the alerts in your code line with a new function like jqAlert.&lt;/p&gt;

&lt;h3&gt;Replacing the confirm window&lt;/h3&gt;
&lt;p&gt;The confirm window is more complicated because we absolutely have to stop processing until the user responds to the dialog. Fortunately we can use queuing in jQuery by:
&lt;ol&gt;
     &lt;li&gt;pushing the dialog onto the queue&lt;/li&gt;
     &lt;li&gt;pushing the function to be executed when the dialog closes onto the queue&lt;/li&gt;
    &lt;li&gt;dequeuing the dialog when it closes&lt;/li&gt;
     &lt;li&gt;dequeuing the next function after it executes.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;Sample code&lt;/h4&gt;
&lt;pre&gt;
$(document).ready(function (){
   $(&quot;.confirm&quot;).click(function(){
     $(&quot;#modal3&quot;).jqwindow(&quot;confirm&quot;,{message:&quot;After this dialog is confirmed an alert will fire&quot;,nextFunction:function(){
        $(this).dequeue();
	if($(this).data(&quot;returnValue&quot;)){   //the wrapper will set the user response in the data of the element
	  $(&quot;#modal3&quot;).jqwindow(&quot;alert&quot;,&quot;Confirmation ACK&quot;);
	}else{
	   $(&quot;#modal3&quot;).jqwindow(&quot;alert&quot;,&quot;NACK on confirmation&quot;);
	}
     }
    }
   );  //closes jqwindow call
  });  //closes onclick definition
}); //closes document.ready
      
&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.dailycryptogram.com/test/testChain.cfm&quot; target=&quot;_new&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.dailycryptogram.com/js/jquery.jqwindow.js&quot;&gt;The jqwindow plug-in&lt;/a&gt; (right click save as)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Comments or suggestions appreciated.&lt;/p&gt;
				</description>
				
				<category>jQuery</category>
				
				<pubDate>Wed, 16 Nov 2011 13:00:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2011/11/16/Overriding-OS-alerts-and-confirms-using-jQuery</guid>
				
				
			</item>
			
			<item>
				<title>Roasted Cauliflower and Garlic Soup</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2010/5/16/Roasted-Cauliflower-and-Garlic-Soup</link>
				<description>
				
				I decided to try something different and make soup but roast the cauliflower first.

Ingredients:

2 slices bacon&lt;br /&gt;
1 onion diced&lt;br /&gt;
1 cauliflower cut into individual florets.&lt;br /&gt;
  olive oil&lt;br /&gt;
1 potato diced&lt;br /&gt;
1 head garlic&lt;br /&gt;
2 qts chicken stock&lt;br /&gt;
salt and pepper&lt;br /&gt;Roasting cauliflower&lt;br /&gt;
   Rub the cauliflower with olive oil and place on a sheet pan. Roast at 425 F until golden brown. About 30-40 mins.

Roasting garlic;&lt;br /&gt;
   Remove the paperlike skin off a head of garlic. Do not separate or peel the individual cloves.&lt;br /&gt; Cut the top off the head and rub the 
entire head with olive oil. Wrap in aluminum foil and put on the sheet pan with the cauliflower.&lt;br /&gt; They should both be done about the same time.

Soup:
   In a large heavy pot render the bacon over a medium heat. When it is crispy, remove and dice. Don&apos;t discard the fat.&lt;br /&gt;
   Sautee the onions in the bacon fat until tender.&lt;br /&gt;
   Add the chicken stock, potato, and cauliflower.&lt;br /&gt;
   In order to use the garlic, take each clove and squeeze. The garlic will pop out. Add it to the soup.&lt;br /&gt;
   Bring to a boil and season with salt and pepper and reduce to a simmer. Note that you will need to reseason&lt;br /&gt;
   after cooking because the cauliflower and garlic flavors aren&apos;t yet blended into the soup.&lt;br /&gt;

   Puree the soup to the desired texture using an immersion blender. If one is not available just use a blender.&lt;br /&gt;
   Simmer for at least 1/2 hour and longer if you are not starving.&lt;br /&gt;
   

   The result should be a nice earthy soup with the bacon and garlic flavors coming through nicely. &lt;br /&gt;Don&apos;t worry that the 
   recipe calls for an entire head of garlic. After roasting it is nice and sweet not strong.
				</description>
				
				<category>Foodie Stuff</category>
				
				<pubDate>Sun, 16 May 2010 13:00:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2010/5/16/Roasted-Cauliflower-and-Garlic-Soup</guid>
				
				
			</item>
			
			<item>
				<title>Using  .data  in jQuery</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2010/4/11/Using--data--in-jQuery</link>
				<description>
				
				&lt;p&gt;I am working on a redesign of a cryptogram site. &lt;a href=&quot;http://www.dailycryptogram.com&quot; target=&quot;_new&quot;&gt; (http://www.dailycryptogram.com)&lt;/a&gt;. The old version works but has a lot of cumbersome javascript written long before jQuery was available. The handlers for keypress are complex and refreshing the display involves looping over the arrays of the encrypted, unencrypted, used, and available letters. There has to be an easier way.&lt;/p&gt;
&lt;p&gt;What have I chosen is to add attributes to the DOM elements where the letters are displayed so the event handlers have all the information necessary without looking it up:&lt;/p&gt;&lt;pre&gt;
 $(&quot;.enc_&quot;+el).data(&quot;encLetter&quot;,el);
 $(&quot;.enc_&quot;+el).data(&quot;solLetter&quot;,sl);
 $(&quot;.enc_&quot;+el).data(&quot;dspLetter&quot;,&quot;&quot;);
&lt;/pre&gt;
&lt;p&gt;The event handlers become much simpler:&lt;/p&gt;
&lt;pre&gt;
   $(&quot;.chosen&quot;).live(&quot;click&quot;,function(){
     try{
	if($(this).data(&quot;dspLetter&quot;)!=&quot;&quot;){    //we are replacing letter so show original as available
	   $(&quot;.choice.&quot;+$(this).data(&quot;dspLetter&quot;)).show();
	}
	if($.chosenLetter==&quot;&quot;){ //if no letter is chosen make sure textbox is empty
	    $(&quot;.enc_&quot;+$(this).data(&quot;encLetter&quot;)+&quot;&gt;.letterbox&quot;).attr(&quot;value&quot;,&quot;&quot;);
	}
	else{    //fill the textbox and remove the letter from the available pool
	    $(&quot;.enc_&quot;+$(this).data(&quot;encLetter&quot;)+&quot;&gt;.letterbox&quot;).attr(&quot;value&quot;,$.chosenLetter);
	    $(&quot;.&quot;+$.chosenLetter).hide();
	}
        $(&quot;.enc_&quot;+$(this).data(&quot;encLetter&quot;)).data(&quot;dspLetter&quot;,$.chosenLetter);//update data on all occurences of the letter			
	$.isSolved();
	$.chosenLetter=&quot;&quot;;
	$.destinationLetter=&quot;&quot;;
    }catch(except){alert(except)}
});
&lt;/pre&gt;
&lt;p&gt;Also checking for a correct solution is quite easy:&lt;/p&gt;
&lt;pre&gt;
$.isSolved=function(){
   var solved=true;
   $(&quot;.bb&gt;.chosen&quot;).each(function(i){ // elements of the bb class holds the data infomation
	solved=solved &amp;&amp; ($(this).data(&quot;solLetter&quot;)==$(this).data(&quot;dspLetter&quot;));
   });
   if(solved){
	$(&quot;.letterbox&quot;).addClass(&quot;greenboxes&quot;).removeClass(&quot;letterbox&quot;);
   }
}
&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;http://www.dailycryptogram.com/test/testClasses.cfm&quot; target=&quot;_new&quot;&gt;Demo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The demo source gives more detais. To solve the cryptogram you can either drag an available letter(red) into the textbox or just type in the textbox. To remove a letter just click on it. You will not be able to enter a letter twice.&lt;/p&gt;
&lt;p&gt;Attaching data to a DOM element is quite useful and simple to do. The old way of attaching a primary key to the id of a table row no longer is necessary. Attaching the pk to the data of the row is just as easy and avoids the worry of making sure the id is unique on the page.&lt;/p&gt;
				</description>
				
				<category>jQuery</category>
				
				<category>ColdFusion</category>
				
				<pubDate>Sun, 11 Apr 2010 12:13:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2010/4/11/Using--data--in-jQuery</guid>
				
				
			</item>
			
			<item>
				<title>Trace and ajax in CF9</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2010/2/2/Trace-and-ajax-in-CF9</link>
				<description>
				
				&lt;p&gt;I was having an issue with an ajax call failing. Of course I thought there was something wrong in the cfc so I added  a few more trace statements which didn&apos;t help. I finally decided to examine the stacktrace and it pointed (eventually) to the line where the trace occured. I removed that trace and the exception moved to the next trace line. I know I may be in the slow group but I see a pattern here. After removing all the trace statements the code worked fine.&lt;/p&gt;
&lt;p&gt;It is a bit ironic that one&apos;s first impulse is to add some trace statements to troubleshoot which only exacerbates the problem!&lt;/p&gt;&lt;p&gt;Changing the inline attribute to false had no effect.&lt;/p&gt;
&lt;p&gt;If you uncheck the debug setting: &quot;Enable request debugging output&quot; in CFAdministrator the ajax call works fine but the output from the trace is not written to the trace.log file&lt;/p&gt;
&lt;p&gt;If you surround the trace with a try catch you will see the exception message is: Variable DEBUGGER is undefined.&lt;/p&gt;

Code to duplicate:

testtrace_cfc.cfc
&lt;pre&gt;
component {
	remote string function doesitfail( String input)
		returnformat=&quot;JSON&quot; {
		try{
			trace( text=&quot;#arguments.input#&quot; inline=&quot;false&quot; );
			writelog( file=&quot;mylog&quot; text=&quot;#arguments.input# was entered&quot;);
		} 
		catch( any ex){
			writelog(file=&quot;mylog&quot; text=&quot;#ex.message#&quot;);
		}
		return ucase(arguments.input);

	}
}
&lt;/pre&gt;
Calling Template:
&lt;pre&gt;
&lt;cfparam name=&quot;url.inString&quot; default=&quot;No input&quot;&gt;
&lt;cfajaxproxy cfc=&quot;com.vawter.testtrace_cfc&quot;  jsclassname=&quot;testTrace&quot;&gt;
	&lt;script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;&gt;
	     oT=new testTrace();
	     oT.setCallbackHandler(successh);
	     oT.setErrorHandler(errorh);
	     
             function successh(data){
		alert(data);
	     }
	     function errorh(data){
	       alert(&quot;failed &quot;+data);
	     }
	&lt;/script&gt;
	
	&lt;cfoutput&gt;&lt;a href=&quot;##&quot; onclick=&apos;oT.doesitfail(&quot;#url.instring#&quot;);return false;&apos;&gt;click me&lt;/a&gt;&lt;/cfoutput&gt;
&lt;/pre&gt;
 
&lt;p&gt;For the above code the ajax call succeeds because the exception is caught and the return statement is executed despite the error.&lt;/p&gt;

&lt;p&gt;Workaround:&lt;/p&gt;
&lt;p&gt;Use writelog instead of trace&lt;/p&gt;
&lt;p&gt;The problem also occurs in CF8.
				</description>
				
				<category>ColdFusion</category>
				
				<pubDate>Tue, 02 Feb 2010 23:08:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2010/2/2/Trace-and-ajax-in-CF9</guid>
				
				
			</item>
			
			<item>
				<title>Inheritance and cfproperty Tags</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2010/1/5/Inheritance-and-cfproperty-Tags</link>
				<description>
				
				I have an application that uses value objects. In order to avoid public instance variables we use cfproperty tags to determine   instance variables. When you extend the value object the property tags are not inherited.

To circumvent this what I have done is create an array in the variables scope:

variables.objprops



 In the value objects init method I grab the properties using

 props=getMetaData(this).properties

 I then check for the existence of variables[&apos;objprops&apos;] and if it doesn&apos;t exist create it as an empty array.

 I loop through the array (props) and append them to variables[&apos;objprops&apos;].

 Since a subclass may override a property in the parent class I replace rather than append if a property of the same name exists in the array. Since the init method of the parent class is called first this effectively overrides property in the parent class.

We use the onMissingMethod function to create implicit setters and getters but that is a topic for another post.
				</description>
				
				<category>ColdFusion</category>
				
				<pubDate>Tue, 05 Jan 2010 23:31:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2010/1/5/Inheritance-and-cfproperty-Tags</guid>
				
				
			</item>
			
			<item>
				<title>Bread Pudding</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2009/10/13/Bread-Pudding</link>
				<description>
				
				&lt;p&gt;I had a bit of the hazelnut raisin bread left that was starting to go stale so I decided to make bread pudding.&lt;/p&gt;
&lt;p&gt;The quantities of ingredients aren&apos;t critical. As long as there is enough liquid to cover the bread it is going to wind up being bread pudding. Also the flavoring ingredients can be altered to suit your palate.&lt;/p&gt;
&lt;h3&gt;Ingredients&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;3 or four slices of stale bread cut into chunks&lt;/p&gt;
&lt;li&gt;1 cup milk&lt;/li&gt;
&lt;li&gt;2 lightly beaten eggs&lt;/li&gt;
&lt;li&gt;1/4 cup sugar&lt;/li&gt;
&lt;li&gt;orange zest&lt;/li&gt;
&lt;li&gt;1/2 tsp cinnamon&lt;li&gt;
&lt;li&gt;1/8 tsp freshly ground nutmeg&lt;/li&gt;
&lt;li&gt;1/4 cup sweetened coconut&lt;/li&gt;
&lt;li&gt;1/4 cup chokecherry syrup (any fruit flavored syrup should work)&lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;Procedure&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Preheat oven to 375 F.&lt;/li&gt;
&lt;li&gt;Fill four small buttered ramekins with the bread.&lt;/li&gt;
&lt;li&gt;Mix the remaining ingredients in a large bowl (reserve 1/2 of the syrup and half of the cocconut).&lt;li&gt;
&lt;li&gt;Pour the liquid over the ramekins, squishing down the bread to soak. The liquid should cover the bread.&lt;/li&gt;
&lt;li&gt;Sprinkle the reserved cocconut on top so it will toast.&lt;/li&gt;
&lt;li&gt;Place the ramekins in a water bath and bake until the filling sets (about 45 mins).&lt;/li&gt;
&lt;li&gt;Drizzle the remainder of the syrup over the top and serve warm.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Many thanks to my cousin&apos;s wife, Claire, for giving me the wonderful homemade chokecherry syrup.&lt;/p&gt;
&lt;p&gt;This is an easy and forgiving recipe and it sure tastes better than stale bread.&lt;/p&gt;


&lt;img src=&quot;http://blog.vawterconsultingservices.com/images/breadpudding.jpg&quot; width=&quot;500&quot; /&gt;
				</description>
				
				<category>Foodie Stuff</category>
				
				<pubDate>Tue, 13 Oct 2009 16:45:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2009/10/13/Bread-Pudding</guid>
				
				
			</item>
			
			<item>
				<title>Hazelnut Raisin Bread</title>
				<link>http://blog.vawterconsultingservices.com/index.cfm/2009/10/12/Hazelnut-Raisin-Bread</link>
				<description>
				
				&lt;p&gt;I made an interesting bread over the weekend and thought I would share the recipe. I weigh the flours and liquids so some conversion will be necessary if you use volume measurements: 1 Cup of bread flour is about 130 gm and 10 oz of water is about 300 gm.&lt;/p&gt;
&lt;h2&gt;Ingredients&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;500 gm bread flour&lt;/li&gt;
&lt;li&gt;300 gm water room temp&lt;/li&gt;
&lt;li&gt;toasted and chopped hazelnuts. The amount depends on how nutty you want it.&lt;/li&gt;
&lt;li&gt;raisins. Again quantity is your choice. I soaked them in Ouzo but water would work ok also&lt;/li&gt;
&lt;li&gt;1 tsp salt&lt;/li&gt;
&lt;li&gt;1 Tbs honey&lt;/li&gt;
&lt;li&gt;2 tsp yeast. about 1 pkg&lt;/li&gt;
&lt;li&gt;unsalted butter to brush on top&lt;/ul&gt;&lt;h2&gt;Procedure&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Mix the flour and salt in the bowl of a stand mixer&lt;/li&gt;
&lt;li&gt;Pour the water gently in the center of the bowl&lt;/li&gt;
&lt;li&gt;Add the honey and yeast to the pool of water and stir the pool gently&lt;/li&gt;
&lt;li&gt;Let the yeast proof for 5 - 10 minutes&lt;/li&gt;
&lt;li&gt;Process the mixture in the mixer with a dough hook for 10 mins. Near the end of the time add in the raisins and hazelnuts.&lt;/li&gt;
&lt;li&gt;Form the dough into a ball and let it rise until doubled in bulk&lt;/li&gt;
&lt;li&gt;Pound the dough with your knuckles into a flat sheet and let it rest for 10 minutes&lt;/li&gt;
&lt;li&gt;Form the dough into a ball and place on a lightly floured pizza stone&lt;/li&gt;
&lt;li&gt;Let the dough rise again until nearly doubled in bulk&lt;/li&gt;
&lt;li&gt;Brush the top with melted butter&lt;/li&gt;
&lt;li&gt;Bake for 10 minutes in an oven preheated to 475 F.&lt;/li&gt;
&lt;li&gt;Reduce temp to 375 and continue baking until bread reaches an internal temp of 195F&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As with most breads you may need to adjust the flour and/or water until the dough forms a nice consistency. It should cling to the dough hook and clean the side of the mixing bowl and be slightly sticky to the touch after kneading&lt;/p&gt;
&lt;p&gt;I rarely keep track of time when baking because I find the internal temp to be a much better indicator. I think this was in the oven for about 1/2 hour.&lt;/p&gt;

&lt;img src=&quot;http://blog.vawterconsultingservices.com/images/raisinhazelnutbread.jpg&quot; width=&quot;500&quot; /&gt;
				</description>
				
				<category>Foodie Stuff</category>
				
				<pubDate>Mon, 12 Oct 2009 16:57:00 -0600</pubDate>
				<guid>http://blog.vawterconsultingservices.com/index.cfm/2009/10/12/Hazelnut-Raisin-Bread</guid>
				
				
			</item>
			</channel></rss>
