<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6186498</id><updated>2025-05-23T06:16:24.942-06:00</updated><category term="ColdFusion"/><category term="ColdFusion 8"/><category term="ajax"/><category term="ColdFusion 9"/><category term="SQL"/><category term="SQL Server"/><category term="JavaScript"/><category term="General"/><category term="ORM"/><category term="Spry"/><category term="Windows"/><category term="cffile"/><category term="duh"/><category term="64 bit"/><category term="Apple"/><category term="Apple Wireless Keybaord"/><category term="Basics"/><category term="Bluetooth"/><category term="C#"/><category term="CFEclipse"/><category term="CPR"/><category term="Captivate"/><category term="Emergency"/><category term="First Aid"/><category term="IE"/><category term="IE8"/><category term="JVM"/><category term="Java"/><category term="Life Skills"/><category term="Linux"/><category term="MS Access"/><category term="MacBook Pro"/><category term="Samsung"/><category term="Uploading Files"/><category term="Windows 64"/><category term="Windows 7"/><category term="XML"/><category term="bug"/><category term="bugs"/><category term="cfajax"/><category term="cfform"/><category term="cfpresentation"/><category term="iframe"/><category term="workaround"/><title type='text'>Things I&#39;ve Learned</title><subtitle type='html'>My technical blog.  Hard won knowledge, Useful info, and even occasional Wit and Wisdom.  If it takes me a while to figure something out, I will usually post it here and (hopefully) save someone else the trouble.&#xa;-Neil Moncur</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>N M</name><uri>http://www.blogger.com/profile/15652512573072388273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6186498.post-1823559419231439430</id><published>2012-10-10T07:19:00.000-06:00</published><updated>2012-10-10T07:19:30.943-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><category scheme="http://www.blogger.com/atom/ns#" term="Apple Wireless Keybaord"/><category scheme="http://www.blogger.com/atom/ns#" term="Bluetooth"/><category scheme="http://www.blogger.com/atom/ns#" term="MacBook Pro"/><title type='text'>Solved: Difficulty Pairing Apple Wireless Keyboard</title><content type='html'>I have an Apple MacBook Pro, and an Apple Wireless Keyboard. &amp;nbsp;From the very first day the keyboard has been difficult to pair with things. &amp;nbsp;Changing it from the computer to an iPad, or iPhone was always a confusing hassle. &amp;nbsp;The keyboard has only has one button and one status light, and gives almost no feedback. &amp;nbsp;I am surprised at the trouble it has given me as this is not an inexpensive keyboard. &amp;nbsp;Lately this hasn&#39;t been a problem as I have just left it paired with the MacBook Pro&lt;br /&gt;
&lt;br /&gt;
Recently I paired it with an Android phone. &amp;nbsp;When I tried to unpair it from the phone, and repair it with my MacBook Pro, nothing worked. &amp;nbsp;I tried holding down the button, pressing the button and different key combinations, etc. &amp;nbsp;Most of the time the MacBook couldn&#39;t even find it, and if it did, the pairing would fail.&lt;br /&gt;
&lt;br /&gt;
Then I tried to repair it to my Android phone, that didn&#39;t work either. &amp;nbsp;I tried pairing it to another Android phone. &amp;nbsp;Nothing. &amp;nbsp;I changed the batteries for new ones (twice). &amp;nbsp;Most of the time the green light would come on for about two seconds, and then turn off. &amp;nbsp;This was all very aggravating, since pairing is the must fundamental thing that the keyboard needs to do. &amp;nbsp;It is unusuable if you can&#39;t get it to pair.&lt;br /&gt;
&lt;br /&gt;
Finally I found a good idea online. &amp;nbsp;I am documenting it here so that if I ever have this problem again, I will remember the steps that I had to take to repair. &amp;nbsp;I have tried this with both the Android phone, and the MacBook Pro, and it seemed to work with both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Turn on Bluetooth (if it isn&#39;t already turned on).&lt;/li&gt;
&lt;li&gt;Begin scanning for devices.&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;In Mac OSX, click on the little Bluetooth icon at the top of the screen. &amp;nbsp;Click &quot;Setup Bluetooth Device...&quot;.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;After the computer or phone begins scanning, press and hold the power button on the wireless keyboard. &amp;nbsp;This is important. &amp;nbsp;When I tried pressing button first, then scan, nothing happened. &amp;nbsp;You have start the scan first, then press and hold the button.&lt;/li&gt;
&lt;li&gt;At some point the green light usually starts flashing (although not always. &amp;nbsp;weird).&lt;/li&gt;
&lt;li&gt;After a few seconds, it will (finally) notice the keyboard. &amp;nbsp;You may have to click on the keyboard to tell it to pair.&lt;/li&gt;
&lt;li&gt;It will ask you to type a few numbers to verify the pair. &amp;nbsp;At this point you can release the power button.&lt;/li&gt;
&lt;li&gt;Type in the requested numbers.&lt;/li&gt;
&lt;li&gt;The pairing should complete.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Hope this helps someone else out there. &amp;nbsp;I know that at some point in the future I will need to know this information again.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe bordercolor=&quot;#000000&quot; frameborder=&quot;0&quot; height=&quot;150&quot; hspace=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://ad.doubleclick.net/adi/N7433.148119.BLOGGEREN/B6695650.752;sz=180x150;ord=[timestamp]?;lid=41000000024781945;pid=sku6114391;usg=AFHzDLs2MhjD2lUc_hSn55Wv3wl1GZRnZg;adurl=http%253A%252F%252Fwww.samsclub.com%252Fsams%252Fapple-wireless-keyboard-usa%252Fprod5650200.ip%253Fpid%253D_DoubleClick_Affiliates%2526ci_src%253D15781033%2526ci_sku%253Dsku6114391;pubid=584702;price=%2467.45;title=Apple+Wireless+Keyboar...;merc=Sam%27s+Club;imgsrc=http%3A%2F%2Fs7d2.scene7.com%2Fis%2Fimage%2Fsamsclub%2Fs7product%2F0088590951226_A.jpg;width=85;height=85&quot; vspace=&quot;0&quot; width=&quot;180&quot;&gt;&lt;/iframe&gt;&amp;nbsp;&lt;iframe bordercolor=&quot;#000000&quot; frameborder=&quot;0&quot; height=&quot;150&quot; hspace=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://ad.doubleclick.net/adi/N7433.148119.BLOGGEREN/B6533661.1029;sz=180x150;ord=[timestamp]?;lid=41000000026530730;pid=62149;usg=AFHzDLvANV_RDLBIxcXxV2A26ZCX2b7aRQ;adurl=http%253A%252F%252Fwww.abt.com%252Fproduct%252F62149%252FApple-MC975LLA.html;pubid=584702;price=%242199.00;title=Apple+MacBook+Pro+2.3G...;merc=Abt+Electronics+%26+Appliances;imgsrc=http%3A%2F%2Fcontent.abt.com%2Fmedia%2Fimages%2Fproducts%2FBDP_Images%2Fbig_MC975LLA-1.jpg;width=110;height=63&quot; vspace=&quot;0&quot; width=&quot;180&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/1823559419231439430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/1823559419231439430' title='31 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/1823559419231439430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/1823559419231439430'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2012/10/solved-difficulty-pairing-apple.html' title='Solved: Difficulty Pairing Apple Wireless Keyboard'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>31</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-5947959964977267083</id><published>2012-02-29T09:16:00.001-07:00</published><updated>2012-02-29T09:17:33.087-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Basics"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Identifying data type in literals without casting</title><content type='html'>Learning c#. When declaring literals, it turns out there is are some special suffix characters you can use to declare data type. They are:&lt;br /&gt;
&lt;br /&gt;
• M (deciMal)&lt;br /&gt;
• D (Double)&lt;br /&gt;
• F (Float)&lt;br /&gt;
•L (Long)&lt;br /&gt;
&lt;br /&gt;
So, for example, if you do the following:&lt;br /&gt;
&lt;br /&gt;
decimal salesTaxRate = 6.5;&lt;br /&gt;
&lt;br /&gt;
The compiler will interpret the literal &quot;6.5&quot; as a double, and you&#39;re going to have problems. But, just append a&quot;D&quot; and you&#39;re good. Like so:&lt;br /&gt;
&lt;br /&gt;
decimal salesTaxRate = 6.5M;&lt;br /&gt;
&lt;br /&gt;
Now the compiler interprets 6.5 as a fixed-point decimal, instead of a floating point double. &lt;br /&gt;
&lt;br /&gt;
Why the compiler can&#39;t just assume that the double literal needs to be cast to a decimal, I can&#39;t say. Maybe one of the C# experts out there can say?</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/5947959964977267083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/5947959964977267083' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/5947959964977267083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/5947959964977267083'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2012/02/identifying-data-type-in-literals.html' title='Identifying data type in literals without casting'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-5698272853191602120</id><published>2011-07-15T14:15:00.001-06:00</published><updated>2011-07-15T14:16:50.262-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 9"/><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><title type='text'>Saving XML to Database By Way of HTTP Post</title><content type='html'>I&#39;m not sure how to articulate this one in an interesting manner, but for the few people who come up against this, this is important information to know. &amp;nbsp;Here is how to receive XML in an HTTP Post, and put it into the database. &amp;nbsp;Once you know how to do it, it is pretty easy. &amp;nbsp;However, getting it set up is trickier than you&#39;d think.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;I am processing information from a third party.  They hit a specific ColdFusion cfm page with some HTTP Post parameters.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;One of those Post parameters contains some XML. &amp;nbsp;The XML contains the data that I am interested in.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;I get the XML from the HTTP Post parameters using GetHTTPRequestData(). &amp;nbsp;This takes the information from the Post, and puts it into a struct.&lt;br /&gt;
&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&amp;lt;cfset variables.parameter_raw=&quot;getHTTPRequestData()&quot;&amp;gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;I take the XML and pass it into xmlParse(). &amp;nbsp;This parses the XML, and dumps the XML into a very usable struct.&lt;br /&gt;
&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&amp;lt;cfset variables.parameter=&quot;xmlParse(variables.parameter_raw)&quot;&amp;gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Then, before doing anything else, I dump the XML into a log file. &amp;nbsp;This way, even if everything else goes wrong, I still have a copy of the XML for debugging or whatever.&lt;br /&gt;
&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&amp;lt;cflog file=&quot;foo&quot; text=&quot;#serializeJSON(variables.parameter)#&quot;&amp;gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;Then I extract the variables I need from the XML, and pass them into a CFC. &amp;nbsp;This is the tricky part. &amp;nbsp;For some reason, if you try to pass the parameter into the CFC only by name, it will add a bunch of invisible XML stuff to it, making it too long for the database column I want to save it to. &amp;nbsp;So, in order to just get the value, without all the other wacky XML added on, add &quot;.xmlText&quot; to the end. &amp;nbsp;See example below:&lt;br /&gt;
&lt;/li&gt;
&lt;ol&gt;&lt;li&gt;&amp;lt;cfset data_access_object.save_data(data_id=&quot;variables.parameter.data_idb&lt;b&gt;.xmlText&lt;/b&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data_value=variables.parameter.data_value&lt;b&gt;.xmlText,&amp;nbsp;&lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data_code=variables.parameter.data_code&lt;b&gt;.xmlText&lt;/b&gt;)&amp;gt;&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;li&gt;That should do it. &amp;nbsp;That &quot;.xmlText&quot; is really hard to debug in this context if you don&#39;t know about it. &amp;nbsp;Hopefully this will help somebody else out there.&lt;/li&gt;
&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/5698272853191602120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/5698272853191602120' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/5698272853191602120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/5698272853191602120'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2011/07/im-not-sure-how-to-articulate-this-one.html' title='Saving XML to Database By Way of HTTP Post'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-3442503695155281561</id><published>2010-10-03T11:40:00.004-06:00</published><updated>2010-10-04T12:55:25.813-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cffile"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Simple Java to make sure a directory exists before doing a cffile upload</title><content type='html'>&lt;p&gt;Simple Java to make sure that a directory exists before doing a cffile upload:&lt;/p&gt;&lt;p&gt;&amp;lt;cfset CreateObject(&quot;java&quot;, &quot;java.io.File&quot;).init(&quot;C:\Inetpub\wwwroot\myNewDirectory\images&quot;).mkdirs() /&amp;gt;&lt;/p&gt;&lt;p&gt;So, for example, you might do something like this:&lt;/p&gt;&lt;p&gt;&amp;lt;cfset CreateObject(&amp;quot;java&amp;quot;, java.io.File&amp;quot;).init(&amp;quot;c:\uploads\#dateformat(now(), &#39;yyyymmdd&#39;)#&amp;quot;) /&amp;gt;&lt;/p&gt;&lt;p&gt;You can just do the above before every upload.&amp;amp;nbsp; The first time it will create the directory, and every time after that it will just do nothing.&lt;/p&gt;&lt;p&gt;Thanks to cfgears for reminding me how to do this:&lt;/p&gt;&lt;p&gt;http://www.cfgears.com/index.cfm/2009/5/19/Tapping-in-to-ColdFusions-underlying-Java-capabilities&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/3442503695155281561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/3442503695155281561' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/3442503695155281561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/3442503695155281561'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2010/10/simple-java-to-make-sure-directory.html' title='Simple Java to make sure a directory exists before doing a cffile upload'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-3905831652978001017</id><published>2010-09-30T10:25:00.000-06:00</published><updated>2010-09-30T10:25:34.200-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="duh"/><title type='text'>listFind vs. listContains</title><content type='html'>ColdFusion has two functions for finding things in comma-delimited lists, but they behave very differently, and I can never which is which.&amp;nbsp; Today I needed one of them, and so I did a test to figure out which I needed.&amp;nbsp; If figured I would document their usages here, so that I wouldn&#39;t have to go thru this testing process next time.&amp;nbsp; Here are the functions:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;listContainsNoCase(&lt;i&gt;list&lt;/i&gt;, &lt;i&gt;substring&lt;/i&gt;)&lt;/b&gt;&lt;br /&gt;
This function just finds the substring, and tells you which item contains that sub string.&amp;nbsp; It is important to understand that this item is not searching for a list item, just for a sub string.&amp;nbsp; Consider the following example:&lt;br /&gt;
&lt;blockquote&gt;listContainsNoCase(&quot;Date,Decimal,Image,Integer,Long Text,Rich Text,Simple Text&quot;, &quot;Text&quot;)=5&lt;/blockquote&gt;Notice how it found that item number 5 has the word &quot;Text&quot; in it, even though &quot;Text&quot; is not the complete item.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;listFindNoCase(&lt;i&gt;list&lt;/i&gt;, &lt;i&gt;value&lt;/i&gt;)&lt;/b&gt;&lt;br /&gt;
This function finds a value in a list, and tells you which item matches the value.&amp;nbsp; It compares the value to the list item, and only accepts complete matches.&amp;nbsp; So, consider the following examples:&lt;br /&gt;
&lt;blockquote&gt;listFindNoCase(&quot;Date,Decimal,Image,Integer,Long Text,Rich Text,Simple Text&quot;, &quot;Text&quot;)=0&lt;br /&gt;
listFindNoCase(&quot;Date,Decimal,Image,Integer,Long Text,Rich Text,Simple Text&quot;, &quot;Simple Text&quot;)=7&lt;/blockquote&gt;Notice how in the first example above, no item was found.&amp;nbsp; This is because there is no single item with value = &quot;Text&quot;.&amp;nbsp; However, it did find &quot;Simple Text&quot; in the second example above.&lt;br /&gt;
&lt;br /&gt;
Of course the same is true for listFind, and listContains, but those are case-sensitive.&lt;br /&gt;
&lt;br /&gt;
Incidentally, I put this one in the &quot;duh&quot; category, because I think that the names are reversed.&amp;nbsp; The first usage should be named listFind, and the second should be named listContains.&lt;br /&gt;
&lt;br /&gt;
Hope this helps.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/3905831652978001017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/3905831652978001017' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/3905831652978001017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/3905831652978001017'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2010/09/listfind-vs-listcontains.html' title='listFind vs. listContains'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-116432328706285244</id><published>2010-09-13T00:32:00.005-06:00</published><updated>2010-10-04T09:03:47.490-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="64 bit"/><category scheme="http://www.blogger.com/atom/ns#" term="Captivate"/><category scheme="http://www.blogger.com/atom/ns#" term="Samsung"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 64"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 7"/><title type='text'>Resolving Samsung Captivate Windows 7 (64 bit) connection problem</title><content type='html'>&lt;p&gt;&lt;strong&gt;------ NOTE ------&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
 See the updates at the end of this post.  Although many people have reported in comments that this fix worked for them, it actually stopped working for me after a few days.  Consequently I have actually returned my Captivate in favor of a different phone that actually works.&lt;br /&gt; &lt;br /&gt;
 &lt;strong&gt;------ END NOTE ------&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;On Friday I purchased a new Samsung Captivate from Costco.  Before I get into the USB connectivity issues, let me just say that this is a great phone. Great speaker, great microphone, great ambient-noise management, great processor speed, great camera, outstanding screen, tons of memory, the list goes on.  However, I encountered some serious problems getting it to connect to my computer.  It took two days to get the problems resolved.  Amazingly, neither this problem nor the solution is documented online.  So, here is what I learned.  I don&#39;t make any recommendations that you should try this, or any guarantees whatsoever that any of this will work for you, or that it will not damage your phone, etc, etc.  Try it at your own risk, you have been warned.  However, I did eventually get it to work for me, and am now much happier with my phone.  Here&#39;s what I did.&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;First, the computer is a newish, capable, reliable laptop running Windows 7 Home Premium (64 bit).  It is a pretty new install of Windows, and there are no known hardware problems.  When I complained to the guy at the AT&amp;amp;amp;T store, he admitted that other customers have complained about the same problem.  So I don&#39;t think that the problem was with my computer.&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;When I first attempted to connect my phone to my computer, Windows quickly reported that the driver install failed.  I made several attempts, all of which failed.  Next I tried on a Vista (32 bit) box.  The driver install seemed to work OK, but it kept reinstalling over, and over, and over again.  Like every 3 minutes, over and over again, times infinity.  Weird.&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;So, after two days of research, and trial and error, and visiting 2 AT&amp;amp;amp;T stores, here is what I learned.&lt;/p&gt;&lt;p&gt;Samsung Captivate (and I believe other Galaxy class phones) use a software package called Kies to manage your phone&#39;s connection to your computer.  By default, when you connect the Captivate (and probably most Galaxy class phones) to a USB port on Windows, it is only willing to talk to Kies.  If you don&#39;t have Kies on the computer, then the connection will fail.&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;The bad news is that Kies is not available in the U.S. (!?).  I had to download it from Samsung&#39;s Singapore website.  Worse, Kies is kind of lame.  It looks nice, is user friendly, and is a good effort, but isn&#39;t very useful and just got kind of got in the way.&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;The good news is that installing Kies also installs the drivers.  After installing Kies, Windows immediately recognized my phone.  So that&#39;s good.&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;The better news is that it turns out you may not actually have to install Kies at all.  You can change the default USB setting on the device (which I have done).  If you go to settings &amp;amp;gt; Applications &amp;amp;gt; USB settings, you will see that the default USB behavior is set to &amp;quot;Samsung Kies&amp;quot;.  I changed mine to &amp;quot;Mass Storage&amp;quot;.  Now when I connect my Captivate to my computer, it doesn&#39;t try to talk to Kies.  Instead, it just pretends to be an &amp;quot;External Mass Storage&amp;quot; device which Windows has no problem recognizing  (think external hard drive, or thumb drive).&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Next, when I connect my Captivate to the computer, Windows makes that happy little two-tone chime that means something has successfully connected.  Then on the Captivate, I just have to tell it to mount on my computer.  There is a little status bar along the top of the screen.  If you touch that bar and drag it down, there are some useful toggle buttons and a section called &amp;quot;Ongoing&amp;quot;.  Under ongoing there is a &amp;quot;USB connected&amp;quot; entry.  When I click &amp;quot;USB connected&amp;quot;, it asks me if I want to mount my phone on Windows.  If I click &amp;quot;Mount&amp;quot;, then I can access my phone just like an external hard-drive.  I can copy music or pictures directly onto or off of the phone.  Easy-peasy.&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;So, at least now I have a way to get stuff onto and off of my phone, and I don&#39;t have to use Kies.  This is good.  Also, I reformatted the internal SD card (read somewhere online that this helps).&lt;/p&gt;&lt;p&gt;Again, I don&#39;t promise or guarantee or warranty or say that any of this will work for you.  Just that it worked for me.  Good luck!&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Now I would just like to take a moment to talk directly to Samsung.&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Samsung, listen, you are a big company.  You are a respected brand.  You make good products.  You spend millions of dollars advertising them.  But even though your phone is widely available for purchase across the U.S., it cannot connect to Windows 7 without your users going to extensive lengths to research and troubleshoot, and the software for your phone isn&#39;t even available in the U.S.  This is a problem.  It&#39;s not like this is a special advance order phone direct from Japan.  This is a widely advertised, commercially available phone that consumers can buy at any AT&amp;amp;amp;T store, Costco, Sam&#39;s Club, Best But, etc.  Yet they cannot connect their phone to their computers, unless they download software from Singapore, or change unfamiliar settings.&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Please fix this.  Either release your software in the U.S., or include instructions in the packaging or on your website on how to change the USB settings.  Better yet, on your phones sold in the U.S., just default them to &amp;quot;Mass Storage&amp;quot; mode, and include a quick-start paper on how to mount the phone as an external hard drive.&lt;/p&gt;&lt;p&gt;Ok, that&#39;s all for now.  Will report if the situation changes.&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;strong&gt;------ UPDATE 10/3/2010 ------&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
 Unfortunately, the fix described below stopped working for me a few days ago.  That was the last straw.  Although I liked the Samsung Captivate, I decided that I wasn&#39;t going to keep a phone that lacks basic driver support and can&#39;t even figure out how to connect to a computer.  So, I returned my Captivate to Costco, and bought an iPhone instead.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;------ UPDATE 10/4/2010 ------&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
 On 10/2/2010 Anonymous commented: &amp;quot;I cannot believe this phone has been out for now over 3 months and no fix. Shame on Samsung; this is why people turn to macs and iPhones, lazy companies.&amp;quot;&lt;br /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;I agree. Putting the time, effort, and R&amp;amp;amp;D money into building a fabulous phone, and then failing to deliver basic USB drivers (even just simple Mass Storage drivers) is absurd in the extreme. That&#39;s like spending months building a fabulous house, and then failing to include something simple like a door.  Eventually no matter how great the house is, the owner will get tired of climbing into the house through a window, and just buy a house--any house--with a door.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;------ END UPDATES ------ &lt;/strong&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/116432328706285244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/116432328706285244' title='36 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/116432328706285244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/116432328706285244'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2010/09/samsung-captivate-windows-7-64-bit.html' title='Resolving Samsung Captivate Windows 7 (64 bit) connection problem'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>36</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-2866800785514878268</id><published>2010-09-09T15:35:00.004-06:00</published><updated>2010-09-09T15:41:21.115-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 9"/><category scheme="http://www.blogger.com/atom/ns#" term="ORM"/><title type='text'>ORM is not configured for the current application</title><content type='html'>Working on a little app in ColdFusion 9.&amp;nbsp; Was consistently getting a phantom ColdFusion error (especially containers loaded by the built-in ColdFusion.navigate function):&lt;br /&gt;
&lt;blockquote&gt;ORM is not configured for the current application&lt;/blockquote&gt;&lt;br /&gt;
Very mysterious, and took a while to troubleshoot.&amp;nbsp; In my Application.cfc, in the onRequestStart method, there was a &lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;lt;cfset&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;ormreload&lt;/span&gt;()&lt;span style=&quot;color: #cc0000;&quot;&gt;&amp;gt;&lt;/span&gt; .&amp;nbsp; I had put it there thinking that while I was doing some development it would be nice to have the ORM reloading all of time as I make changes.&amp;nbsp; However, it looks like it was interfering with the ORM&#39;s sequencing, and on Ajax page loads it was causing ColdFusion to erroneously report back that the ORM was not loaded.&amp;nbsp; I simply moved the ormReload to onApplicationStart, and the problem seems fixed.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/2866800785514878268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/2866800785514878268' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/2866800785514878268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/2866800785514878268'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2010/09/working-on-little-app-in-coldfusion-9.html' title='ORM is not configured for the current application'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-6475132166148560278</id><published>2010-03-24T14:29:00.008-06:00</published><updated>2010-03-24T16:35:00.719-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CPR"/><category scheme="http://www.blogger.com/atom/ns#" term="Emergency"/><category scheme="http://www.blogger.com/atom/ns#" term="First Aid"/><category scheme="http://www.blogger.com/atom/ns#" term="General"/><category scheme="http://www.blogger.com/atom/ns#" term="Life Skills"/><title type='text'>Knowing What To Do In An Emergency</title><content type='html'>So, I attended a political caucus meeting last night (in my state, this is the step before a primary election), and ended up getting briefly sucked into a medical emergency.  It reinforced the notion that it is important to know what to do in a medical crisis.&lt;br /&gt;&lt;br /&gt;As the various nominees  were talking about their background and qualifications, a man in the audience near me suddenly collapsed.  His knees buckled and he simply sprawled backwards (luckily a half filled box of papers  cushioned his fall).  He was completely inert and unresponsive.&lt;br /&gt;&lt;br /&gt;This was so unexpected.  Most of us in the room knew the man from our neighborhood, one of nature&#39;s authentic nice guys.  There was a collective gasp from the 30-40 people in the room.  Everyone just stood there for a beat or two; it took a few moments to compute what was happening. &lt;br /&gt;&lt;br /&gt;I asked his wife if he is diabetic, she said no.   I got out my phone, dialed 911, and asked if he was breathing.  He wasn&#39;t, so I hit the call button.  As I started talking to the 911 dispatcher, somebody began administering chest compressions. &lt;br /&gt;&lt;br /&gt;Fortunately, a friend had been talking recently about what to say when you call 911.  As soon as the dispatcher answered, I knew exactly what to say:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Me:&lt;/span&gt; I am at ----- ----- Junior High School in &lt;span style=&quot;font-style: italic;&quot;&gt;[city]&lt;/span&gt;.   A 50 year old man has just collapsed and is not breathing.  He is not diabetic.  Someone has started administering CPR.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Dispatcher:&lt;/span&gt;  You say he is not breathing.  Is he having a seizure?&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Me:&lt;/span&gt;  He does not appear to be having a seizure, although his eyes appear to have rolled up into his head.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Dispatcher:&lt;/span&gt;  Stay on the line.  I am going to put you on hold while I get an ambulance.  Could you have someone go to the front of the school to meet the ambulance?&lt;br /&gt;&lt;br /&gt;The good news is the man started to revive while I was on hold.  He seemed surprised to be on the floor, and was totally unaware of the drama that had occured around him.  He assured everyone that he was alright, and left the room to get some fresh air.  His wife declined the ambulance (they are expensive) and everyone went home safely.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Some takeaways from last night&#39;s drama:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1)  When you call 911, &lt;span style=&quot;font-weight: bold; font-style: italic;&quot;&gt;stay calm&lt;/span&gt;.  Clearly express where you are (give the address if you know it, especially if you are on a cell phone), what happened, how old the person is, and any important / relevant details (e.g. &quot;They are performing CPR&quot;, or &quot;The person is bleeding a lot from [this] area&quot;).  Try to give correct information.  Answer questions clearly.&lt;br /&gt;&lt;br /&gt;2)  When the person started administering CPR, he didn&#39;t seem like he was sure what to do.  I don&#39;t know how they determined that the man wasn&#39;t breathing.  I didn&#39;t see anyone feel under his nose, so I am guessing that they just looked at his chest.  Nobody felt for a pulse.  Nobody tried slapping him on the cheek or speaking loudly into his ear.  Someone probably should have done these things before starting CPR.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;(Disclaimer:  I am not a doctor of medical expert in any way.  This is simply my untrained opinion.  Any EMTs out there, please feel free to correct me if I am wrong)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is my understanding that administering CPR to someone whose heart is still beating can cause harm.  Don&#39;t get me wrong; I am glad that somebody was willing to try to step up and help, and I know that hindsight is 20/20.  So, this leads to my third point:&lt;br /&gt;&lt;br /&gt;3)  Know what to do in an emergency.  Even basic knowledge of what to do in an emergency will save lives.  Take &lt;span style=&quot;font-style: italic;&quot;&gt;basic&lt;/span&gt; CPR / First Aid classes.  The American Red Cross offers them on a regular basis for a moderate fee.  Hospitals, colleges, and many large workplaces will occasionally offer the classes for free or for a small fee.  Take advantage of these opportunities to learn.  My workplace is going to offer a 3 hour CPR-AED-First Aid class in a couple of weeks.  I plan on being there.&lt;br /&gt;&lt;br /&gt;Although it can seem unlikely that you will ever need to know this stuff, imagine what it would be like to watch somebody die because you don&#39;t know basic stuff that you could have learned at a couple of evening classes.  Now imaging taking a couple of 2-3 hour classes, and knowing what to do in an emergency, and saving someone&#39;s life.  Less than 10 years ago, I had to give my infant daughter mouth-to-mouth resuscitation after she stopped breathing.  Because I had taken first aid as a 14 year old Boy Scout, I knew how to resuscitate an infant (you cover mouth and nose with your mouth), and possibly saved her life.  I am sure glad that I had a basic understanding of what to do--at least enough to keep her alive until the ambulance got there.  Sign up for a class.  Give up an evening or afternoon (or two) to learn these basic skills.  You may just save a life.  And it may be someone you love.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/6475132166148560278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/6475132166148560278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/6475132166148560278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/6475132166148560278'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2010/03/knowing-what-to-do-in-emergency.html' title='Knowing What To Do In An Emergency'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-795276254819638382</id><published>2010-03-03T14:40:00.004-07:00</published><updated>2010-03-03T14:58:45.874-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="cfajax"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 8"/><category scheme="http://www.blogger.com/atom/ns#" term="IE"/><category scheme="http://www.blogger.com/atom/ns#" term="IE8"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'>KB927917</title><content type='html'>Over the last few months, I have been upgrading some of our websites&#39; login systems.  Today I updated the login system of old internal site that some users still use to update stuff.  The login system that worked great on our newer web apps, wouldn&#39;t load the login screen on the old system.  Here is the order of operations:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li style=&quot;padding-bottom: 15px;&quot;&gt;Main Page starts with style sheets, javascript &amp;amp; ajax library, starting body tag, etc.&lt;/li&gt;&lt;li style=&quot;padding-bottom: 15px;&quot;&gt;Login Management Custom Tag occurs in middle of page, between begin and end body tags.&lt;/li&gt;&lt;li style=&quot;padding-bottom: 15px;&quot;&gt;Login Management Custom Tag launches login cfwindow, navigates window to login form.&lt;br /&gt;&lt;/li&gt;&lt;li style=&quot;padding-bottom: 15px;&quot;&gt;End of page winds things down, includes closing body tag.&lt;/li&gt;&lt;/ul&gt;Everything here works great in Firefox (of course), and on our newer Ajax-driven apps it works in IE.  However, on this old, not-very-ajaxy website, IE 8 shows the cfwindow appears, and then breaks on the navigate saying:  &quot;HTML Parsing Error:  Unable to modify the parent container element before the child element is closed (KB927917); Line: 0; Char: 0; Code: 0&quot;.  Pretty mysterious.&lt;br /&gt;&lt;br /&gt;So, lots of searching, and I found this helpful post:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://blogs.msdn.com/ie/archive/2008/04/23/what-happened-to-operation-aborted.aspx&quot;&gt;http://blogs.msdn.com/ie/archive/2008/04/23/what-happened-to-operation-aborted.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;and additionally this helpful post:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://social.msdn.microsoft.com/Forums/en/iewebdevelopment/thread/db34068c-5307-4ab7-be03-15b86c2604bb&quot;&gt;http://social.msdn.microsoft.com/Forums/en/iewebdevelopment/thread/db34068c-5307-4ab7-be03-15b86c2604bb&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So, I tried moving my custom tag to the end of the page, outside of the body tag, and that worked great.  From what I can tell, the cfwindow, or maybe the ColdFusion.navigate was trying to add elements to the body of the page, before the body had closed.&lt;br /&gt;&lt;br /&gt;Whether or not the reason provided above is exactly correct, it makes some sense.  After all, our new, ajaxy websites launch the cfwindow from within a container (usually cfdiv), meaning that the main-page&#39;s body tag has closed before the cfwindow ever tries to load.&lt;br /&gt;&lt;br /&gt;In any case, whether my diagnosis is right or wrong, the medicine worked.  This one was a tricky one, so I thought that I would share it with the world.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/795276254819638382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/795276254819638382' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/795276254819638382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/795276254819638382'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2010/03/kb927917.html' title='KB927917'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-4748805821788443250</id><published>2009-11-02T15:19:00.004-07:00</published><updated>2009-11-02T16:22:01.317-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="bugs"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 9"/><category scheme="http://www.blogger.com/atom/ns#" term="workaround"/><title type='text'>cfwindow css bug workaround</title><content type='html'>Last week I posted about a bug I found in the ColdFusion 9 Ajax.  In particular it referred to some display errors that were introduced by usage of cfwindow, cflayout-border, or (possibly) other Ajax containers.  After a bit of head scratching and testing today, I have found a workaround.  The workaround is kind of hackish, and doesn&#39;t work will with the CF rich text editor, but it is a start.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The Problem&lt;/span&gt;&lt;br /&gt;Research and testing has shown that the problem was caused by the ext-all.css file.  When you use or import cfwindow or cflayout-border on your page, ColdFusion automatically adds a few css and ajax files into your page&#39;s output HTML.  One of these css files, ext-all.css, appears to be causing the problem.&lt;br /&gt;&lt;br /&gt;If you open ext-all.css, you will find the following towards the very beginning of the file (emphasis and whitespace added for easier viewing):&lt;br /&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;html&lt;/span&gt;, &lt;span style=&quot;font-weight: bold;&quot;&gt;body&lt;/span&gt;, &lt;span style=&quot;font-weight: bold;&quot;&gt;div&lt;/span&gt;, dl, dt, dd, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, p, blockquote, &lt;span style=&quot;font-weight: bold;&quot;&gt;th&lt;/span&gt;, &lt;span style=&quot;font-weight: bold;&quot;&gt;td&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;{margin:0; padding:0;}&lt;/span&gt;&lt;/blockquote&gt;This line appears to be causing the table padding problems.&lt;br /&gt;&lt;br /&gt;Two lines farther down the file, you will find this:&lt;br /&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt;address, caption, cite, code, dfn, &lt;span style=&quot;font-weight: bold;&quot;&gt;em&lt;/span&gt;, &lt;span style=&quot;font-weight: bold;&quot;&gt;strong&lt;/span&gt;, &lt;span style=&quot;font-weight: bold;&quot;&gt;th&lt;/span&gt;, var&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;{font-style:normal; font-weight:normal;}&lt;/span&gt;&lt;/blockquote&gt;This line appears to be causing text surrounded by &lt;span style=&quot;font-style: italic;&quot;&gt;&amp;lt;em&amp;gt;&lt;/span&gt; and &lt;span style=&quot;font-weight: bold;&quot;&gt;&amp;lt;strong&amp;gt;&lt;/span&gt; tags to display as plain text.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The Workaround&lt;br /&gt;&lt;/span&gt;The workaround is simple.  In CSS, which ever style declaration comes last, wins.  So, simply add the following to the bottom of your page:&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt;&amp;lt;style&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt;strong&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;{ font-weight:bold; }&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt;em &lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;{ font-style:italic; }&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt;em.strong&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;{font-weight:bold;}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt;strong.em&lt;/span&gt; &lt;span style=&quot;color: rgb(0, 0, 255);&quot;&gt;{font-style:italic;}&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(153, 51, 153);&quot;&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;Line 1 is a style open tag.&lt;br /&gt;Line 2 modifies the strong tag back to &lt;span style=&quot;font-weight: bold;&quot;&gt;bold&lt;/span&gt;.&lt;br /&gt;Line 3 modifies the em tag back to &lt;span style=&quot;font-style: italic;&quot;&gt;italics&lt;/span&gt;.&lt;br /&gt;Line 6 closes the style tag.&lt;br /&gt;&lt;br /&gt;So what are lines 4 and 5 for?  Simple.  Lines 2 and 3 of the workaround cause text to render bold or italics, but not both.  So, Line 4 allows you to modify an em tag to be both italics &lt;span style=&quot;font-style: italic;&quot;&gt;and &lt;/span&gt;bold.  Line 5 does the same in reverse.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;A Simpler Workaround&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;Incidentally, you probably noticed that there is a simpler (though more extreme) workaround.  You could just remove td, th, strong, and em from the offending lines of ext-all.css .  If you are going to do this, however, you probably want to backup your copy of ext-all.css first; how this will affect the ajax controls and/or pages that use them is unknown.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Why Bother?   Who cares?   Why not just use inline styles?  Who uses strong or em tags anymore anyway?&lt;/span&gt;&lt;br /&gt;Good question.  The answer is: Adobe, or, more importantly, their products.  ColdFusion has the slick CKEditor (formerly called FCKEditor) built into it.  CKEditor uses &lt;span style=&quot;font-weight: bold;&quot;&gt;strong&lt;/span&gt; and &lt;span style=&quot;font-style: italic;&quot;&gt;em&lt;/span&gt; tags to modify text.  This means that any content that you generate using the CKEditor (e.g. in a homegrown CMS), will be rendered plain text by ext-all.css.  &lt;span style=&quot;font-style: italic;&quot;&gt;This is a problem.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Also, when coding with DreamWeaver, if you hit Ctrl-b for bold, or Ctrl-i for italics, DreamWeaver is going to insert em and strong tags to enforce the bold &amp;amp; italics.  If ext-all.css renders that text plain, you now have a lot of pages on your site unexpectedly showing up with a lot of plain text, and unpadded table cells.  &lt;span style=&quot;font-style: italic;&quot;&gt;This is an even bigger problem&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Please Vote&lt;/span&gt;&lt;br /&gt;Workaround notwithstanding, if you think that this bug is as big of a problem as I do, please vote for Adobe to fix it here:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=80530&quot;&gt;h&lt;/a&gt;&lt;a href=&quot;http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=80530&quot;&gt;ttp://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=80530&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also, you may like to vote to have Adobe fix a related bug here:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=80421&quot;&gt;http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=80421&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks for your votes.  I am looking forward to seeing Adobe fix this problem.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/4748805821788443250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/4748805821788443250' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/4748805821788443250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/4748805821788443250'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2009/11/cfwindow-css-bug-workaround.html' title='cfwindow css bug workaround'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-175203697428354784</id><published>2009-10-30T08:42:00.004-06:00</published><updated>2009-10-30T12:33:52.155-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="bug"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 9"/><title type='text'>CF 9 Ajax breaks site CSS and formatting</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;Thesis&lt;/span&gt;&lt;br /&gt;JavaScript/CSS includes for cfwindow, cflayout-border (and possibly others), kill some formatting elements, such as &lt;span style=&quot;font-weight: bold;&quot;&gt;&amp;lt;strong&amp;gt;&lt;/span&gt; &amp;amp; &lt;span style=&quot;font-style: italic;&quot;&gt;&amp;lt;em&amp;gt;&lt;/span&gt; tags, and negatively affects table display such as padding / margins.  &lt;span style=&quot;font-style: italic;&quot;&gt;This is a problem.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;The details&lt;/span&gt;&lt;br /&gt;Consider the following simple cfm page:&lt;br /&gt;&lt;br /&gt;&lt;blockquote  style=&quot;font-family:courier new;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&amp;lt;p&amp;gt;Not Bold&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;&amp;lt;strong&amp;gt;Bold and italics&amp;lt;/strong&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;Not unexpectedly, the above displays one line of plain text, and one line of formatted text.  The above works in both CF8 and CF9, and looks something like this:&lt;br /&gt;&lt;blockquote&gt;Not Bold&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Bold and italics&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;Now we try importing the javascript &amp;amp; css for cfwindow.  Consider the following small but important change:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: courier new;font-size:85%;&quot; &gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&amp;lt;cfajaximport tags=&lt;span style=&quot;color: rgb(51, 102, 255);&quot;&gt;&quot;cfwindow&quot;&lt;/span&gt; /&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;p&amp;gt;Not Bold&amp;lt;/p&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;em&amp;gt;&amp;lt;strong&amp;gt;Bold and italics&amp;lt;/strong&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;In the above, the formatting for the page breaks.  All you get is plain text on both lines, something like this:&lt;br /&gt;&lt;blockquote&gt;Not Bold&lt;br /&gt;Bold and italics&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;The &quot;strongs&quot; and &quot;ems&quot; are completely ignored.  Some testing has shown that this also happens when you import &quot;cflayout-border&quot;.  Worse, it also seems to goof-up table formatting and padding.  Oh, and the same problem occurs when using the &amp;lt;cfwindow&amp;gt; tag directly, instead of just importing the cfwindow ajax and creating thru JavaScript.&lt;br /&gt;&lt;br /&gt;Although I don&#39;t really use strong or em tags anymore, this will break a lot of legacy pages.  Also, since the CKEditor included with ColdFusion uses &amp;lt;strong&amp;gt; and &amp;lt;em&amp;gt; tags instead of inline styles, any pages that use content generated by CKEditor will stop showing formatted text.  This is a problem if you have implemented a homebrew CMS (as we have on a few pages).&lt;br /&gt;&lt;br /&gt;I&#39;ll post a fix/workaround if I find one.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Notes&lt;/span&gt;&lt;br /&gt;I am hesitant to post about this; last time I publicized what I thought was a bug in ColdFusion it turned out that I was just an idiot, and was doing something wrong (duh). So, on the one hand I hope that I am just an idiot (again), and that there is a simple workaround for this. Unfortunately I fear that I may have found a legitimate bug this time, and it complicates our plans (already in progress) to move to CF 9.&lt;br /&gt;&lt;br /&gt;If this is a legitimate bug, I am surprised that something like this could have made it into final release code. It is easy to reproduce, and is immediately apparent in both FireFox and IE. I have read thru the CF 9 release notes, and performed an hour of two of testing, and haven&#39;t found any obvious workarounds. If you have an idea, please let me know.  Otherwise, I think that we are going to have to look at waiting to upgrade to CF 9 for a little while.  Bummer.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/175203697428354784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/175203697428354784' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/175203697428354784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/175203697428354784'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2009/10/cf-9-ajax-breaks-site-css-and.html' title='CF 9 Ajax breaks site CSS and formatting'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-299457933478494546</id><published>2009-10-29T08:54:00.003-06:00</published><updated>2009-10-29T08:59:22.632-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 9"/><category scheme="http://www.blogger.com/atom/ns#" term="ORM"/><title type='text'>ColdFusion 9 ORM One to Many Complete Example</title><content type='html'>Manjukiran (don&#39;t know last name) has posted a great example of how to set up a One To Many relationship using ColdFusion 9 ORM.  It demonstrates all of the moving parts in one place, including both cfcs involved in the relationship, and a cfm page that manipulates data in both tables, using the cfc &amp;amp; hibernate.&lt;br /&gt;&lt;br /&gt;You can find the post here:&lt;br /&gt;&lt;a href=&quot;http://www.manjukiran.net/2009/07/15/coldfusion-orm-define-one-to-many-and-many-to-one-relationships/comment-page-1/#comment-2551&quot;&gt;http://www.manjukiran.net/2009/07/15/coldfusion-orm-define-one-to-many-and-many-to-one-relationships/comment-page-1/#comment-2551&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks Manju!</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/299457933478494546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/299457933478494546' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/299457933478494546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/299457933478494546'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2009/10/coldfusion-9-orm-one-to-many-complete.html' title='ColdFusion 9 ORM One to Many Complete Example'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-9185673868418856915</id><published>2009-08-29T23:30:00.005-06:00</published><updated>2009-08-29T23:40:14.055-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cffile"/><category scheme="http://www.blogger.com/atom/ns#" term="cfform"/><category scheme="http://www.blogger.com/atom/ns#" term="cfpresentation"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 8"/><category scheme="http://www.blogger.com/atom/ns#" term="iframe"/><category scheme="http://www.blogger.com/atom/ns#" term="Uploading Files"/><title type='text'>Getting cffile to work in a cfwindow</title><content type='html'>Figured out how to do a file upload in a cfwindow using cfform.  If you try to receive a file upload in a cfwindow, regardless of the enctype specified in the cfform it will incorrectly receive the form as of type &quot;application/x-www-form-urlencoded&quot;, instead of the more-better &quot;multipart/form-data.  My guess is that this has something to do with the ajax used to submit the form.  This error happens even if the originating form is &lt;span style=&quot;font-style: italic;&quot;&gt;in&lt;/span&gt; the cfwindow.&lt;br /&gt;&lt;br /&gt;Easy work around?  Embed an iframe in the cfwindow, put your form in the iframe, and have the form submit within the iframe using a simple submit button (rather than using ColdFusion.navigate).  If you submit the form using a submit button in an iframe, the form&#39;s enctype will submit properly, and ColdFusion will correctly receive your file and pass it onto cffile.&lt;br /&gt;&lt;br /&gt;This technique will also work with putting a cfpresentation tag in a cfwindow.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/9185673868418856915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/9185673868418856915' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/9185673868418856915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/9185673868418856915'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2009/08/figured-out-how-to-do-file-upload-in.html' title='Getting cffile to work in a cfwindow'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-1232989113519673347</id><published>2008-09-24T10:37:00.003-06:00</published><updated>2008-09-24T11:05:02.845-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 8"/><category scheme="http://www.blogger.com/atom/ns#" term="Spry"/><title type='text'>*Update to previous post* CF-Ajax gets jealous</title><content type='html'>This post modifies the following previous post:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://nm1m.blogspot.com/2008/09/create-spry-data-sets-using-inline-data.html&quot;&gt;Create Spry Data Sets Using Inline Data&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It turns out that the above doesn&#39;t work inside of a bound CFDiv.  For instance, if your Spry dataset lives on a pages called data.cfm, and you include data.cfm on another page using a bound cfdiv, it breaks.  For the below example, you can put the guts of my previous post on this subject (referenced above) into data.cfm if you want.  See the example below:&lt;br /&gt;&lt;br /&gt;&amp;lt;----------- data.cfm -----------&amp;gt;&lt;br /&gt;     ...&lt;br /&gt;Create a spry dataset&lt;br /&gt;     ...&lt;br /&gt;Show dataset in a dynamic region&lt;br /&gt;     ...&lt;br /&gt;&amp;lt;----------- End data.cfm -----------&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;----------- view_data.cfm -----------&amp;gt;&lt;br /&gt;     ...&lt;br /&gt;&amp;lt;cfdiv bind=&quot;url:data.cfm&quot; /&gt;&lt;br /&gt;     ...&lt;br /&gt;&amp;lt;----------- End view_data.cfm -----------&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I have spent almost two entire days trying to get the above to work.  Interestingly, my research into the above with FireBug shows that I can get it to actually create and populate the dataset.  However, try as I might, I can&#39;t get the dynamic region in view_data.cfm to show any data.  I have researched on the web, and found others with the same finding; for example:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.philosophyme.com/index.cfm?blog=102&quot;&gt;Spry + CFDIV = No Love&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I love the CF Ajax goodness, but this is very frustrating and a major limitation.  It makes it so that I can&#39;t use Spry (and possibly other Ajax frameworks) on big apps that include CF-Ajax (especially bound cfdivs).  I work for a government agency, and we write some very large, powerful, complicated apps using ColdFusion.  If the CF-Ajax makes it so that I can&#39;t extend the CF goodness with other Ajax frameworks, then this is a problem&lt;br /&gt;&lt;br /&gt;I am hopeful that Adobe will address these sorts of CF-Ajax quirks in CF 9.  If they don&#39;t, I will probably think twice in the future about using the CF Ajax features in the future.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/1232989113519673347/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/1232989113519673347' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/1232989113519673347'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/1232989113519673347'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2008/09/update-to-previous-post-cf-ajax-gets.html' title='*Update to previous post* CF-Ajax gets jealous'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-5778304467629206295</id><published>2008-09-23T08:32:00.014-06:00</published><updated>2008-09-24T11:29:01.775-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 8"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Spry"/><title type='text'>Create Spry Data Sets Using Inline Data</title><content type='html'>I finally figured out how to create a Spry dataset using inline data.  This is a major step towards usability, and wasn&#39;t posted on any of the Spry examples that I searched thru on Adobe&#39;s site.&lt;br /&gt;&lt;br /&gt;To create a Spry dataset using inline data, you can just create a javascript array, and give the array to the dataset object using the Data Set&#39;s setDataFromArray(array) function.  I have tested it in both FireFox and IE.  You can find more information about the setDataFromArray(array) fuction here:  &lt;a href=&quot;http://labs.adobe.com/technologies/spry/articles/data_api/apis/dataset.html#setdatafromarray&quot;&gt;http://labs.adobe.com/technologies/spry/articles/data_api/apis/dataset.html#setdatafromarray&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The example below uses ColdFusion syntax to get data from the database and to populate the array.  However, this would work with whichever language you like, or even with static data.  See the following example:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(153, 0, 0);&quot;&gt;&amp;lt;cfquery name=&quot;get_users&quot; datasource=&quot;ds&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;   SELECT last_name, first_name, phone, address&lt;br /&gt;    FROM user&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(153, 0, 0);&quot;&gt;&amp;lt;/cfquery&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;Spry_1_6_1_022408/includes/SpryData.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;br /&gt;    user_array = [&amp;lt;cfloop query=&quot;get_users&quot;&amp;gt;{last_name: &quot;#get_users.last_name#&quot;, first_name: &quot;#get_users.first_name#&quot;, phone: &quot;#get_users.phone#&quot;, address:&quot;#get_users.address#&quot;}&amp;lt;cfif currentrow=&quot;&quot; neq recordcount=&quot;&quot;&amp;gt;, &amp;lt;/cfif&amp;gt;&amp;lt;/cfloop&amp;gt;]&lt;br /&gt;&lt;br /&gt;    user_dataset = new Spry.Data.DataSet();&lt;br /&gt;&lt;br /&gt;    user_dataset.setDataFromArray(user_array);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;&amp;lt;div id=&quot;users_region&quot; spry:region=&quot;user_dataset&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(153, 0, 153);&quot;&gt;&amp;lt;table border=&quot;1&quot;&amp;gt;&lt;br /&gt;    &amp;lt;tr&amp;gt;&lt;br /&gt;        &amp;lt;th spry:sort=&quot;last_name&quot;&amp;gt;Name&amp;lt;/th&amp;gt;&lt;br /&gt;        &amp;lt;th spry:sort=&quot;phone&quot;&amp;gt;phone&amp;lt;/th&amp;gt;&lt;br /&gt;        &amp;lt;th spry:sort=&quot;address&quot;&amp;gt;Address&amp;lt;/th&amp;gt;&lt;br /&gt;    &amp;lt;/tr&amp;gt;&lt;br /&gt;    &amp;lt;tr spry:repeat=&quot;personnel_dataset&quot;&amp;gt;&lt;br /&gt;        &amp;lt;td&amp;gt;{last_name}, {first_name}&amp;lt;/td&amp;gt;&lt;br /&gt;        &amp;lt;td&amp;gt;{phone}&amp;lt;/td&amp;gt;&lt;br /&gt;        &amp;lt;td&amp;gt;{address}&amp;lt;/td&amp;gt;&lt;br /&gt;    &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You may have noticed that the above example doesn&#39;t var scope its JavaScript variables.  This was on purpose, and it will still work.  Experience has shown that var scoping variables can make them incompatible with some of the ColdFusion 8 CF-ajax stuff.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/5778304467629206295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/5778304467629206295' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/5778304467629206295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/5778304467629206295'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2008/09/create-spry-data-sets-using-inline-data.html' title='Create Spry Data Sets Using Inline Data'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-1796789404092552737</id><published>2008-05-01T13:16:00.004-06:00</published><updated>2010-08-12T20:53:34.375-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 8"/><title type='text'>ColdFusion Ajax Functions</title><content type='html'>Tired of looking up the syntax for the ColdFusion 8.0 Ajax functions?  Me too.  So, I created the following.  You can thank me later.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://acrobat.com/#d=0xInJpmQt0NgwOGzthNHuQ&quot;&gt;https://acrobat.com/#d=0xInJpmQt0NgwOGzthNHuQ&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/1796789404092552737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/1796789404092552737' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/1796789404092552737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/1796789404092552737'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2008/05/coldfusion-ajax-functions.html' title='ColdFusion Ajax Functions'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-7818477132716837921</id><published>2008-04-07T13:26:00.001-06:00</published><updated>2008-04-07T13:32:12.207-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="duh"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'>More JavaScript, More &quot;duh&quot;</title><content type='html'>Another JavaScript &quot;duh&quot; moment.  (You can see my previous JavaScript &quot;duh&quot; moment from last week here:  &lt;a href=&quot;http://nm1m.blogspot.com/2008/04/javascript-duh-moment.html&quot;&gt;http://nm1m.blogspot.com/2008/04/javascript-duh-moment.html&lt;/a&gt; ).  A lot of times I want links to fire off JavaScript events, but to still look / taste / feel like links.  Previously I have done it like this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;lt;a href=&quot;#&quot; onClick=&quot;ColdFusion.Window.create(&#39;etc&#39;, &#39;etc.cfm&#39;);&quot;&amp;gt;&lt;/blockquote&gt;The upshot to this technique is that you get a link that looks and acts like a link.  The minus is that when you click it, it appends a hash mark (#) to the end of your url.  Not a big deal, but still.&lt;br /&gt;&lt;br /&gt;On Friday, at the fabulous Salt Lake RIA Dev Shed, I learned another little &quot;duh&quot; JavaScript technique.  Rather than trying to explain it, I will just show.  You can do the same thing as the above like this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;lt;a href=&quot;javascript:ColdFusion.Window.create(&#39;etc&#39;, &#39;etc.cfm&#39;;&quot;&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;Huzzah for cheap little JavaScript tricks!</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/7818477132716837921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/7818477132716837921' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/7818477132716837921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/7818477132716837921'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2008/04/more-javascript-more-duh.html' title='More JavaScript, More &quot;duh&quot;'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-1139082938355896352</id><published>2008-03-27T14:12:00.002-06:00</published><updated>2008-03-27T14:15:25.295-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CFEclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><title type='text'>CFEclipse Newbie questions answered</title><content type='html'>David McGuigan, member of the Salt Lake ColdFusion User Group has posted a useful list of CFEclipse newbie tips.  If you use CFEclipse, you might find this list helpful.&lt;br /&gt;&lt;br /&gt;You can find it here:  &lt;a href=&quot;http://www.slcfug.org/fusetalk/messageview.cfm?catid=5&amp;amp;threadid=639&quot;&gt;http://www.slcfug.org/fusetalk/messageview.cfm?catid=5&amp;amp;threadid=639&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/1139082938355896352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/1139082938355896352' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/1139082938355896352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/1139082938355896352'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2008/03/cfeclipse-newbie-questions-answered.html' title='CFEclipse Newbie questions answered'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-202645421934165952</id><published>2008-03-03T14:34:00.002-07:00</published><updated>2008-03-03T14:46:49.296-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 8"/><category scheme="http://www.blogger.com/atom/ns#" term="JVM"/><title type='text'>Coldfusion Application Server service terminated with service-specific error 2</title><content type='html'>Sometime last week, one of our main ColdFusion servers needed a bit of a pick-me-up, and one of our server guys juiced it with 2 more gigs of RAM.  After the new RAM was installed, I went into the ColdFusion administrator, and upped the MAX Heap Size.  I changed it from 1024 to 2048 and saved.  It gave me a polite message stating that the change would take effect after the ColdFusion server restarted.  I moved on with life, not restarting the server or service at that time; the work day had begun, people were already hitting our server, best to leave well-enough alone.&lt;br /&gt;&lt;br /&gt;This morning I checked the cool new ColdFusion Server Monitor included with CF8.  I saw several hung threads, which are a sure sign that your server is inching towards becoming unresponsive (the more hung threads, the fewer resources available to working threads).  I decided that rather than waiting for our server to stall in the afternoon, I would restart the ColdFusion service right then, and the hung threads would evaporate.  So I did.  And the service never restarted.&lt;br /&gt;&lt;br /&gt;Our main server guy was out of town, and the other server guys were busy, so I dug in to try to figure out what was going wrong myself.  I did some research.&lt;br /&gt;&lt;br /&gt;In the Event Viewer, I found an error that looked something like this:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&quot;Coldfusion Application Server service terminated with service-specific error 2&quot;&lt;/blockquote&gt;A bit of time on Google taught me that one of the causes of this error is services starting too slowly.  This can be mitigated by giving them more generous timeouts.  For more information, see the below:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_18799&quot;&gt;http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_18799&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I did what it said there (adjusting for ColdFusion 8), restarted the server, and nothing changed.  The ColdFusion service still didn&#39;t come up.  By now I started to suspect that my JVM Heap changes of the previous week had precipitated the problem.  Some more time spent with Google, and I found this useful link:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.coldfusionmuse.com/index.cfm/2005/10/28/jvm.gc&quot;&gt;http://www.coldfusionmuse.com/index.cfm/2005/10/28/jvm.gc&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This little gem teaches you how to go into the server&#39;s jvm.config and adjust JVM args directly, including the Max and Min Heap sizes.  Server restart, and problem solved.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/202645421934165952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/202645421934165952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/202645421934165952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/202645421934165952'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2008/03/coldfusion-application-server-service.html' title='Coldfusion Application Server service terminated with service-specific error 2'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-7449593364521856553</id><published>2008-01-15T12:15:00.000-07:00</published><updated>2008-01-15T12:29:29.824-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 8"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>Getting dates to appear correctly in an HTML cfgrid</title><content type='html'>&lt;span style=&quot;font-family:arial;&quot;&gt;A little while ago, I posted &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://nm1m.blogspot.com/2007/11/sql-server-date-formatting.html&quot;&gt;this&lt;/a&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; to my blog, however I didn&#39;t give much context, I just dumped a pair of links to fairly dense articles.  What do these links tell you?  They tell you how to have SQL Server format things for you (in this case dates), similar to using the dateFormat function in ColdFusion.  This can come in very handy when working with cfgrids.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Although the Adobe livedocs say that you can mask / format values that go into a grid, I haven&#39;t had much success with getting it to work; especially in the case of HTML grids.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;A great work-around is just to use the SQL Server &lt;/span&gt;&lt;span style=&quot;font-style: italic;font-family:arial;&quot; &gt;CONVERT&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; function.  How?  If you plug a date/time/timestamp column name into &lt;/span&gt;&lt;span style=&quot;font-style: italic;font-family:arial;&quot; &gt;CONVERT&lt;/span&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;, and tell it what you want to convert it to, it will change the data-type of the date/time column (just in the resulting recordset, not in the actual table) to the data-type of your choice, and format the date for you to one of many predefined formats.  Lots of examples of this and other techniques here:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://www.oreilly.com/news/sqlnut_1200.html&quot;&gt;http://www.oreilly.com/news/sqlnut_1200.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;For a list of predefined formats, and some more (not very useful) examples, look here:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://msdn2.microsoft.com/en-us/library/ms187928.aspx&quot;&gt;http://msdn2.microsoft.com/en-us/library/ms187928.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;So, if you need to use a date/time column in a cfgrid, just preformat it in the actual query like so:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;SELECT    CONVERT(VARCHAR(11),  date_column, 102) AS formatted_date &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;FROM    table &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;...etc.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;I hope that makes more sense.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/7449593364521856553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/7449593364521856553' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/7449593364521856553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/7449593364521856553'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2008/01/getting-dates-to-appear-correctly-in.html' title='Getting dates to appear correctly in an HTML cfgrid'/><author><name>N M</name><uri>http://www.blogger.com/profile/15652512573072388273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-4887303235085814616</id><published>2008-01-09T11:27:00.001-07:00</published><updated>2008-01-09T11:35:58.145-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 8"/><title type='text'>Binding to an HTML cfgrid</title><content type='html'>Wanna bind to an HTML cfgrid, and having trouble finding the correct syntax?  Here it is:&lt;br /&gt;&lt;br /&gt;bind=&quot;{gridName.columnName}&quot;&lt;br /&gt;&lt;br /&gt;I searched for a couple of hours, and could only find the flash forms syntax.  Then I found it documented here:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=ajaxui_5.html#1137151&quot;&gt;http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=ajaxui_5.html#1137151&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is an example using cfinput to bind to the cfgrid :&lt;br /&gt;&lt;br /&gt;&amp;lt;cfgrid name=&quot;user_grid&quot; query=&quot;get_users&quot;&amp;gt;&lt;br /&gt;&amp;lt;cfgridcolumn name=&quot;last_name&quot;&amp;gt;&lt;br /&gt;&amp;lt;cfgridcolumn name=&quot;first_name&quot;&amp;gt;&lt;br /&gt;&amp;lt;cfgridcolumn name=&quot;age&quot;&amp;gt;&lt;br /&gt;&amp;lt;/cfgridcolumn&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;cfinput type=&quot;text&quot; name=&quot;the_last_name&quot; bind=&quot;{user_grid.last_name}&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;There you go.  Enjoy.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/4887303235085814616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/4887303235085814616' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/4887303235085814616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/4887303235085814616'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2008/01/binding-to-html-cfgrid.html' title='Binding to an HTML cfgrid'/><author><name>Neil</name><uri>http://www.blogger.com/profile/12928763985799363545</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-2725028564217931148</id><published>2007-11-06T22:04:00.000-07:00</published><updated>2007-11-06T22:07:17.131-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>SQL Server / Date Formatting</title><content type='html'>Too tired to do a full write up.  But here are some helpful links if you are trying to do date formatting / masking on SQL Server:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SQL Server Syntax&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://www.oreilly.com/news/sqlnut_1200.html&quot;&gt;http://www.oreilly.com/news/sqlnut_1200.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;SQL Server Conversion Codes&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/ms187928.aspx&quot;&gt;http://msdn2.microsoft.com/en-us/library/ms187928.aspx&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/2725028564217931148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/2725028564217931148' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/2725028564217931148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/2725028564217931148'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2007/11/sql-server-date-formatting.html' title='SQL Server / Date Formatting'/><author><name>N M</name><uri>http://www.blogger.com/profile/15652512573072388273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-8620414297844903523</id><published>2007-11-06T19:34:00.002-07:00</published><updated>2008-04-07T13:41:24.606-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><title type='text'>SQL Server, Nulls, and SET CONCAT_NULL_YIELDS_NULL</title><content type='html'>When you try to concatenate string columns in SQL Server, if any of the columns have &lt;span style=&quot;font-style: italic;&quot;&gt;null&lt;/span&gt; as a value, by default the result of the broader concatenation will be &lt;span style=&quot;font-style: italic;&quot;&gt;null&lt;/span&gt;.  You can get around this by entering the following:&lt;br /&gt;&lt;br /&gt;SET CONCAT_NULL_YIELDS_NULL OFF&lt;br /&gt;&lt;br /&gt;For example, consider the following query:&lt;br /&gt;&lt;br /&gt;SELECT last_name + &#39;, &#39; + first_name + &#39; &#39; + middle_name AS full_name&lt;br /&gt;FROM    person&lt;br /&gt;WHERE person_id = 12345&lt;br /&gt;&lt;br /&gt;If person 12345 doesn&#39;t have a middle name, and person 12345&#39;s &lt;span style=&quot;font-style: italic;&quot;&gt;middle_name&lt;/span&gt; is set to &lt;span style=&quot;font-style: italic;&quot;&gt;null&lt;/span&gt; in the database, then the entire concatenation will resolve to &lt;span style=&quot;font-style: italic;&quot;&gt;null&lt;/span&gt;, and &lt;span style=&quot;font-style: italic;&quot;&gt;full_name&lt;/span&gt; will result in an null / empty string.&lt;br /&gt;&lt;br /&gt;However, if you do this:&lt;br /&gt;&lt;br /&gt;SET CONCAT_NULL_YIELDS_NULL OFF&lt;br /&gt;SELECT last_name + &#39;, &#39; + first_name + &#39; &#39; + middle_name AS full_name&lt;br /&gt;FROM    person&lt;br /&gt;WHERE person_id = 12345&lt;br /&gt;&lt;br /&gt;Then the result will be something like:&lt;br /&gt;&lt;br /&gt;-----------------------&lt;br /&gt;Doe, John&lt;br /&gt;-----------------------&lt;br /&gt;&lt;br /&gt;By the way, this solution works just fine in ColdFusion too.  For example:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(153, 0, 0);&quot;&gt;&amp;lt;cfquery name=&quot;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;&quot;get_name&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(153, 0, 0);&quot;&gt; datasource=&lt;/span&gt;&lt;span style=&quot;color: rgb(51, 51, 255);&quot;&gt;&quot;ds&quot;&lt;/span&gt;&lt;span style=&quot;color: rgb(153, 0, 0);&quot;&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;SET CONCAT_NULL_YIELDS_NULL OFF&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;SELECT last_name + &#39;, &#39; + first_name + &#39; &#39; + middle_name AS full_name&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;FROM    person&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;WHERE person_id = 12345&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;/span&gt;&amp;lt;/cfquery&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;This is especially useful when using cfgrid.  CFgrid won&#39;t allow you to compose columns that represent more than one database field.  For instance, you would have to use one cfgridcolumn for &lt;span style=&quot;font-style: italic;&quot;&gt;first_name&lt;/span&gt;, and a second for &lt;span style=&quot;font-style: italic;&quot;&gt;last_name&lt;/span&gt;.  You can&#39;t just have both in one column called &quot;Full Name&quot;.  Unless, that is, you use the above example to create the &lt;span style=&quot;font-style: italic;&quot;&gt;full_name&lt;/span&gt; column thru the database.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/8620414297844903523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/8620414297844903523' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/8620414297844903523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/8620414297844903523'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2007/11/sql-server-nulls-and-set.html' title='SQL Server, Nulls, and SET CONCAT_NULL_YIELDS_NULL'/><author><name>N M</name><uri>http://www.blogger.com/profile/15652512573072388273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-9212385752975191667</id><published>2007-10-10T10:34:00.002-06:00</published><updated>2009-10-29T14:08:06.086-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MS Access"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Multiple LEFT JOINs in MS Access</title><content type='html'>I had forgotten about this one. In Microsoft Access, if you want to do more than one LEFT JOIN, you have to use parenthesis in the FROM clause. So, for example, instead of just plain old:&lt;br /&gt;&lt;br /&gt;SELECT a.columna, b.columnb, c.columnc&lt;br /&gt;FROM tablea AS a LEFT JOIN tableb AS b ON a.id = b.id LEFT JOIN tablec AS c ON a.id = c.id&lt;br /&gt;&lt;br /&gt;you would have to do the following:&lt;br /&gt;&lt;br /&gt;SELECT a.columna, b.columnb, c.columnc&lt;br /&gt;FROM ((tablea AS a) LEFT JOIN tableb AS b ON a.id = b.id) LEFT JOIN tablec AS c ON a.id = c.id&lt;br /&gt;&lt;br /&gt;Otherwise, you get a &quot;Missing Operator&quot; error.  Stupid Access.&lt;br /&gt;&lt;br /&gt;--Update 10/29/2009--&lt;br /&gt;Incidentally, this should work with other sorts of joins as well.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/9212385752975191667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/9212385752975191667' title='157 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/9212385752975191667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/9212385752975191667'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2007/10/multiple-left-joins-in-ms-access.html' title='Multiple LEFT JOINs in MS Access'/><author><name>N M</name><uri>http://www.blogger.com/profile/15652512573072388273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>157</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6186498.post-7814415253154352879</id><published>2007-08-31T08:03:00.000-06:00</published><updated>2007-08-31T08:53:34.880-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion"/><category scheme="http://www.blogger.com/atom/ns#" term="ColdFusion 8"/><title type='text'>cfwindow source and cfdiv URL bind strip out &amp;lt;script&amp;gt; tags</title><content type='html'>This just in.  When you use cfwindow or cfdiv to load content dynamically (e.g. thru cfwindow&#39;s source attribute, cfdiv&#39;s bind attribute (e.g. bind=&quot;url:foo.cfm&quot;), or ColdFusion.navigate(&#39;foo.cfm&#39;)), when the content loads in your window/div, all &amp;lt;script&gt; tags will be stripped from your code.&lt;br /&gt;&lt;br /&gt;Consider the following:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;lt;!-------- page.cfm --------&gt;&lt;br /&gt;&amp;lt;cfwindow name=&quot;myWindow&quot; source=&quot;content.cfm&quot; /&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input type=&quot;button&quot; onClick=&quot;ColdFusion.Window.show(&#39;myWindow&#39;)&quot; value=&quot;Show the Window&quot;&gt;&lt;br /&gt;&amp;lt;!-------- End page.cfm --------&gt;&lt;/blockquote&gt;&lt;br /&gt;And the following content page, called by page.cfm&lt;br /&gt;&lt;blockquote&gt;&amp;lt;!-------- content.cfm --------&gt;&lt;br /&gt;&amp;lt;script&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;function&lt;/span&gt; tellMeSomething (somethingToTell) {&lt;br /&gt;&lt;br /&gt;  alert(&#39;somethingToTell&#39;);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input type=&quot;button&quot; onClick=&quot; tellMeSomething(&#39;yadda-yadda-yadda&#39;); &quot; value=&quot;Tell me Something.&quot;&gt;&lt;br /&gt;&amp;lt;!-------- End content.cfm --------&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;When page.cfm tells the cfwindow to load conten.cfm, here is the HTML that will be sent to the browser for content.cfm&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&amp;lt;div style=&quot;overflow: auto; height: 253px; width: 474px;&quot; id=&quot;myWindow_body&quot; class=&quot;x-dlg-bd&quot;&gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;input onclick=&quot; tellMeSomething(&#39;yadda-yadda-yadda&#39;); &quot; type=&quot;button&quot; value=&quot;Tell me Something.&quot;&gt;&lt;br /&gt;&amp;lt;/div&gt;&lt;/blockquote&gt;Notice that the &amp;lt;script tag and its associated function was completely stripped out.&lt;br /&gt;&lt;br /&gt;Obviously, this is a problem if the page that you are loading needs to call a JavaScript function.  There is a workaround, albeit a very imperfect one.  If you put your JavaScript in the calling page (i.e. in the example above, you would put it in page.cfm), it will work.&lt;br /&gt;&lt;br /&gt;The problem with the above workaround is that it encourages poor programming practices, and very high coupling between page.cfm and content.cfm.</content><link rel='replies' type='application/atom+xml' href='http://nm1m.blogspot.com/feeds/7814415253154352879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/6186498/7814415253154352879' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/7814415253154352879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6186498/posts/default/7814415253154352879'/><link rel='alternate' type='text/html' href='http://nm1m.blogspot.com/2007/08/cfwindow-source-and-cfdiv-url-bind.html' title='cfwindow source and cfdiv URL bind strip out &amp;lt;script&amp;gt; tags'/><author><name>N M</name><uri>http://www.blogger.com/profile/15652512573072388273</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>