<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Randy Johnson&apos;s Coldfusion Blog - Coldfusion</title>
			<link>http://www.cfedge.com/index.cfm</link>
			<description>Randy Johnson&apos;s Coldfusion Blog</description>
			<language>en-us</language>
			<pubDate>Sat, 31 Jul 2010 14:35:08-0400</pubDate>
			<lastBuildDate>Mon, 12 May 2008 11:40:00-0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>randy@ewebpc.com</managingEditor>
			<webMaster>randy@ewebpc.com</webMaster>
			
			
			
			
			
			<item>
				<title>Quick Note: XmlAttributes</title>
				<link>http://www.cfedge.com/index.cfm/2008/5/12/Quick-Note-XmlAttributes</link>
				<description>
				
				I have to use xml fairly often.  Mostly for connecting to different web services. I haven&apos;t dealt with to many web services that return attributes within the XML like this:

&lt;code&gt;
&lt;day d=&quot;0&quot; t=&quot;Monday&quot; dt=&quot;May 12&quot;&gt;
      &lt;hi&gt;73&lt;/hi&gt;
      &lt;low&gt;52&lt;/low&gt;
      &lt;sunr&gt;6:17 AM&lt;/sunr&gt;
      &lt;suns&gt;8:08 PM&lt;/suns&gt;
      &lt;part p=&quot;d&quot;&gt;
        &lt;icon&gt;30&lt;/icon&gt;
        &lt;t&gt;Partly Cloudy&lt;/t&gt;
        &lt;wind&gt;
          &lt;s&gt;17&lt;/s&gt;
          &lt;gust&gt;N/A&lt;/gust&gt;
          &lt;d&gt;291&lt;/d&gt;
          &lt;t&gt;WNW&lt;/t&gt;
        &lt;/wind&gt;
        &lt;bt&gt;P Cloudy&lt;/bt&gt;
        &lt;ppcp&gt;10&lt;/ppcp&gt;
        &lt;hmid&gt;39&lt;/hmid&gt;
      &lt;/part&gt;
      &lt;part p=&quot;n&quot;&gt;
        &lt;icon&gt;31&lt;/icon&gt;
        &lt;t&gt;Clear&lt;/t&gt;
        &lt;wind&gt;
          &lt;s&gt;16&lt;/s&gt;
          &lt;gust&gt;N/A&lt;/gust&gt;
          &lt;d&gt;337&lt;/d&gt;
          &lt;t&gt;NNW&lt;/t&gt;
        &lt;/wind&gt;
        &lt;bt&gt;Clear&lt;/bt&gt;
        &lt;ppcp&gt;10&lt;/ppcp&gt;
        &lt;hmid&gt;61&lt;/hmid&gt;
      &lt;/part&gt;
    &lt;/day&gt;

&lt;/code&gt;

I seem to always forget how to access the attributes. The attributes in above example are d=&quot;0&quot; t=&quot;Monday&quot; dt = &quot;May 12&quot; as well as p=&quot;d&quot; and p = &quot;n&quot;.

I have decided to blog about it so I remember next time.

To access the above attributes use XmlAttributes.
If the variable containing the above XML was called XMLVar then you would use the following code to access the attributes:

&lt;code&gt;
Day of Week: #XMLVar.day.XmlAttributes.t#
Date: #XMLVar.d.XmlAttributes.dt#
&lt;/code&gt;

Nothing to it really.
				
				</description>
						
				
				<category>BlueDragon</category>				
				
				<category>Coldfusion</category>				
				
				<pubDate>Mon, 12 May 2008 11:40:00-0400</pubDate>
				<guid>http://www.cfedge.com/index.cfm/2008/5/12/Quick-Note-XmlAttributes</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>CFFEED: String index out of range: -1</title>
				<link>http://www.cfedge.com/index.cfm/2008/5/7/CFFEED-String-index-out-of-range-1</link>
				<description>
				
				Today I decided it would be cool to give cffeed a try.   

I read over the documentation and created a script to pull a few different feeds based on a database table of feeds.

My first two rss feeds ran without any problem.

The last two feeds threw an error.

Here is the error I am receiving: 

String index out of range: -1 


Here is the code:
&lt;code&gt;
&lt;cftry&gt;
&lt;cffeed
    source = &quot;http://feeds.sphinn.com/sphinn&quot; query = &quot;theFeed&quot;
   &gt;
&lt;cfcatch&gt;
&lt;cfdump var=&quot;#cfcatch#&quot;&gt;
&lt;/cfcatch&gt;
&lt;/cftry&gt;
&lt;/code&gt;

I updated my CF 8 installation to 8.01 because I thought maybe it was a bug but that didn&apos;t seem to help.

Any ideas what could be causing this error?
				
				</description>
						
				
				<category>Coldfusion</category>				
				
				<pubDate>Wed, 07 May 2008 10:21:00-0400</pubDate>
				<guid>http://www.cfedge.com/index.cfm/2008/5/7/CFFEED-String-index-out-of-range-1</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Want to see Coldfusion Support for the Google App Engine?</title>
				<link>http://www.cfedge.com/index.cfm/2008/4/11/Want-to-see-Coldfusion-Support-for-the-Google-App-Engine</link>
				<description>
				
				I think it would be great if the Google App Engine supported CFML.  

If you feel the same show your support by visiting the link below and give it a star and a comment.

&lt;a href=&quot;http://code.google.com/p/googleappengine/issues/detail?id=73&quot;&gt;http://code.google.com/p/googleappengine/issues/detail?id=73&lt;/a&gt;
				
				</description>
						
				
				<category>BlueDragon</category>				
				
				<category>Coldfusion</category>				
				
				<pubDate>Fri, 11 Apr 2008 23:24:00-0400</pubDate>
				<guid>http://www.cfedge.com/index.cfm/2008/4/11/Want-to-see-Coldfusion-Support-for-the-Google-App-Engine</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>FCKEditor: Variable Width is Undefined</title>
				<link>http://www.cfedge.com/index.cfm/2007/5/22/FCKEditor-Variable-Width-is-Undefined</link>
				<description>
				
				We use FCKEditor a lot in our backend area coding. Folks on Macs would always complain they were getting the error:
Variable Width is Undefined
I did some research today and was not able to find anything concrete on the error so I went to one of our graphics guys who has a Mac. He received the error too and sent me a screenshot.
Turns out that there in an issue in fckeditor.cfc The width and height variables were not scoped properly.
Here is the bad code from around line 132 of fckeditor.cfc
&lt;code&gt;
&lt;div&gt;
&lt;textarea name=&quot;#this.instanceName#&quot; rows=&quot;4&quot; cols=&quot;40&quot; style=&quot;WIDTH: #width#; HEIGHT: #height#&quot;&gt;#HTMLEditFormat(this.value)#&lt;/textarea&gt;
&lt;/div&gt;
&lt;/code&gt;
I was able to immediately see how to fix it, but to be sure I went to the top of the function to look at any variable declarations:
&lt;code&gt;
&lt;cfparam name=&quot;this.instanceName&quot; type=&quot;string&quot; /&gt;
&lt;cfparam name=&quot;this.width&quot; type=&quot;string&quot; default=&quot;100%&quot; /&gt;
&lt;cfparam name=&quot;this.height&quot; type=&quot;string&quot; default=&quot;200&quot; /&gt;
&lt;cfparam name=&quot;this.toolbarSet&quot; type=&quot;string&quot; default=&quot;Default&quot; /&gt;
&lt;cfparam name=&quot;this.value&quot; type=&quot;string&quot; default=&quot;&quot; /&gt;
&lt;cfparam name=&quot;this.basePath&quot; type=&quot;string&quot; default=&quot;/fckeditor/&quot; /&gt;
&lt;cfparam name=&quot;this.checkBrowser&quot; type=&quot;boolean&quot; default=&quot;true&quot; /&gt;
&lt;cfparam name=&quot;this.config&quot; type=&quot;struct&quot; default=&quot;#structNew()#&quot; /&gt;
&lt;/code&gt;
I changed the width and height variables to be scoped with the This. Scope and everything was A OK.
Here is the corrected code.
&lt;code&gt;
&lt;div&gt;
&lt;textarea name=&quot;#this.instanceName#&quot; rows=&quot;4&quot; cols=&quot;40&quot; style=&quot;WIDTH: #this.width#; HEIGHT: #this.height#&quot;&gt;#HTMLEditFormat(this.value)#&lt;/textarea&gt;
&lt;/div&gt;
&lt;/code&gt;
Also I was able to duplicate the error using Opera.
The question I have is why does it work fine in FireFox and IE, but throws an error inside of Safari and Opera? The error that is thrown is a CF error so it shouldn&apos;t be browser specific.. I received the error as soon as I hit the page.
Also this may be fixed in the latest version of the FCKEditor I did not check.
				
				</description>
						
				
				<category>Coldfusion</category>				
				
				<pubDate>Tue, 22 May 2007 15:35:00-0400</pubDate>
				<guid>http://www.cfedge.com/index.cfm/2007/5/22/FCKEditor-Variable-Width-is-Undefined</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Building an Ecommerce Store from the Ground Up</title>
				<link>http://www.cfedge.com/index.cfm/2007/4/26/Building-an-Ecommerce-Store-from-the-Ground-Up</link>
				<description>
				
				For my day job I am writing an ecommerce store from the ground up. the coding is pretty straight forward for the most part but the amount of typing that goes into it, is quite amazing.    I keep a task list of everything that needs to be done for it.  The task list seems to get bigger and bigger every day.  I cannot complain though. When it is done the company will have a solid ecommerce store that can be used for clients.   I am so glad I get to do it in Coldfusion / CFML rather than using PHP. The problem I see with most shopping carts you can buy is they cram every feature, tons of different layouts etc into the code to make it work for almost everyone.  If you want to make customizations to these stores it is very hard to do.  Often times you have to change code in several spots because of the different templates.  After I get done we won&apos;t have to do that anymore.  

The CF shop I work in during the day is not object oriented so I am writing the shopping cart in a procedural manner.  When I get done writing it in that fashion I am going to take a few days off and then in my spare time (haha) I am going to create it in an Object Oriented manner.   When done it will be cool to see how many lines each of the applications have, as well as doing comparisons.
				
				</description>
						
				
				<category>Coldfusion</category>				
				
				<pubDate>Thu, 26 Apr 2007 20:28:00-0400</pubDate>
				<guid>http://www.cfedge.com/index.cfm/2007/4/26/Building-an-Ecommerce-Store-from-the-Ground-Up</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Windows CHM File For Coldfusion Documentation</title>
				<link>http://www.cfedge.com/index.cfm/2007/4/25/Windows-CHM-File-For-Coldfusion-Documentation</link>
				<description>
				
				I was in the MySQL site a couple weeks ago and downloaded the CHM Help File so I could easily search through the documentation on MySQL commands.  Today I thought to myself &quot;Wouldn&apos;t it be cool to have the Coldfusion Documentation in a windows help file for easy reading and finding stuff.&quot; so I started searching my computer and Google some.  Nothing was available in the cfusionmx folder.  I then remembered about Dreamweaver having Coldfusion Documentation.  Sure enough the Dreamweaver/Help folder contained a cfbooks.cfm file which contains all the cfdocs.   This is going to be a tremendous time saver.
				
				</description>
						
				
				<category>Coldfusion</category>				
				
				<pubDate>Wed, 25 Apr 2007 17:48:00-0400</pubDate>
				<guid>http://www.cfedge.com/index.cfm/2007/4/25/Windows-CHM-File-For-Coldfusion-Documentation</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Using Coldfusion to Help Generate Batch Files</title>
				<link>http://www.cfedge.com/index.cfm/2007/4/25/Using-Coldfusion-to-Help-Generate-Batch-Files</link>
				<description>
				
				From time to time I have to do server related tasks. I do not like to, because it takes away from Coldfusion programming time. I try to incorporate CF as much as possible. Here are a couple examples:
1. I needed to create a script that would backup MySQL databases. I created a Coldfusion script that would extract all the databases using SHOW DATABASES;, looped through and created the mysqladmin line to allow the databases to be backed up to their own file. I then used another program to create an exe out of the batch file so you cannot see the password.
2. We had to switch up servers. I used Coldfusion to hit every one of our websites 1 time on the new server so website logs were generated. I then used Coldfusion to match up the directory structures and was able to create the batch file to transfer over the old log files into the new directory. For those of you who do not know, IIS created a W3SVC directory for each domain. We used IIS Export to transfer all the domains, but it didn&apos;t work as planned. So CF was to the rescue and allowed me to do something automatically that would have been a nightmare to have to do by hand.
These two examples were the most recent. Coldfusion can take the repetition out of creating batch files. I have used a list before to generate batch files so it&apos;s not just limited to database related items either.
				
				</description>
						
				
				<category>Coldfusion</category>				
				
				<pubDate>Wed, 25 Apr 2007 17:46:00-0400</pubDate>
				<guid>http://www.cfedge.com/index.cfm/2007/4/25/Using-Coldfusion-to-Help-Generate-Batch-Files</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Backing Up CF Scheduled Tasks</title>
				<link>http://www.cfedge.com/index.cfm/2007/4/25/Backing-Up-CF-Scheduled-Tasks</link>
				<description>
				
				Today I set out how to find scheduled tasks. I created a scheduled task on my development machine with a name of great444
I then did a search on the whole CFusionMX7 directory and found out that the Scheduled tasks are stored in the neo-cron.xml file. I am happy to have learned this. It will save me some typing and clicking.
				
				</description>
						
				
				<category>Coldfusion</category>				
				
				<pubDate>Wed, 25 Apr 2007 17:46:00-0400</pubDate>
				<guid>http://www.cfedge.com/index.cfm/2007/4/25/Backing-Up-CF-Scheduled-Tasks</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Using CFPOP to Connect to Gmail Using Stunnel</title>
				<link>http://www.cfedge.com/index.cfm/2007/4/25/Using-CFPOP-to-Connect-to-Gmail-Using-Stunnel</link>
				<description>
				
				Finally I had a chance today to work on a project that I had put on the back burner only to find out that cfpop doesn&apos;t appear to work with SSL. I wanted to use cfpop to connect to one of my gmail accounts. I started by typing in all the information into cfpop as directed by &lt;a href=&quot;http://mail.google.com/support/bin/answer.py?answer=13287&quot; target=&quot;_blank&quot;&gt;Google.&lt;/a&gt; I put my code into a try / catch with a cfdump of the mail query name. I made sure to pop only 1 message for testing. My cfm page choked. It timed out without a successful connection. At this point I was not worried, I did what every resourceful programmer would do--Read The Docs. I went to my trusty &lt;a href=&quot;http://www.cfedge.com/index.cfm/2007/1/4/Windows-CHM-File-For-Coldfusion-Documentation&quot; target=&quot;_blank&quot;&gt;Windows CFM File of the Coldfusion Documentation &lt;/a&gt; and start poking around. The documentation didn&apos;t have anything so I then went to Google and did a search. The only entries at first were links to a custom tag that cost money to make ssl connections to pop accounts. That wasn&apos;t a good solution because I didn&apos;t want to have to spend money, after all this wasn&apos;t for a client, it was just a little project.
&lt;p&gt;What to do... Wait! I know.. &lt;/p&gt;
&lt;p&gt;Yesterday I had installed the &lt;a href=&quot;http://www.pmail.com/overviews/ovw_winpmail.htm&quot;&gt;Mercury Mail Transport Program&lt;/a&gt; on my local machine to test some mailer cfm pages I had been working on. I had remembered seeing a feature in the program that would go out and pop outside accounts and put them in a local box on the server. This I thought to be a good idea. I could user Mercury Mail Server to pop Gmail and then I could just pop the local account in my cfm page. Well wouldn&apos;t you know it, Mercury Mail Server won&apos;t pop ssl boxes either. I then went back to Google and looked to see if there was a way to configure the Mercury Mail to do what I needed it to do. I read a post that talked about using Stunnel to connect to an pop3 ssl account. &lt;/p&gt;
&lt;p&gt;You can probably guess what I did next... &lt;/p&gt;
&lt;p&gt;I did a search on Stunnel and wound up &lt;a href=&quot;http://www.stunnel.org/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. I installed the windows version of Stunnel. I quickly realized I was not going to be able to click a button and have it work right off the get go. I also thought to myself, there isn&apos;t any reason why I shouldn&apos;t be able to use Stunnel to connect my cfpop cfm page to Gmail. I went back to Google and did a search for &amp;quot;Stunnel Gmail&amp;quot;. It lead me to a cool tutorial on &lt;a href=&quot;http://spampal.sanesecurity.com/manual_eng/servers/stunnel/stunnel.htm#config42&quot; target=&quot;_blank&quot;&gt;SpamPal&lt;/a&gt;. The tutorial shows how to configure Stunnel to connect to Gmail and your email client to connect to Stunnel. With some trial and error I was able to get my cfpop cfm page to connect to Gmail using SSL. YES! I did it. &lt;/p&gt;
&lt;p&gt;That is where I am right now. It took a lot longer than I would have liked. Now my project will have to wait till another day, but I can be happy that I was able to accomplish something, that it doesn&apos;t look like a lot of programmers have been able to do. My cfpop code is below for you to see how it works. &lt;/p&gt;
&lt;p&gt;NOTE: I did have to turn off my firewall and turn it back on to get it to prompt me to allow Stunnel to connect to the outside world.&lt;/p&gt;
&lt;p&gt;NOTE 2: I did not follow the tutorial exactly when it came to the configuration. I found that I did not have to put the @127.0.0.1:1109 after the username&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;code&gt;
&lt;cftry&gt;
&lt;cfpop
server = &quot;127.0.0.1&quot;
port = &quot;1109&quot;
username = &quot;youremail@gmail.com&quot;
password = &quot;yourPassword&quot;
action = &quot;getAll&quot;
name = &quot;popMail&quot;
attachmentPath = &quot;#ExpandPath(&apos;./attachments&apos;)#&quot;
timeout = &quot;60&quot;
maxRows = &quot;1&quot;
startRow = &quot;1&quot;
generateUniqueFilenames = &quot;yes&quot;
&gt;
&lt;cfcatch type=&quot;any&quot;&gt;
&lt;cfdump var=&quot;#cfcatch#&quot;&gt;
&lt;cfabort&gt;
&lt;/cfcatch&gt;
&lt;/cftry&gt;
&lt;cfdump var=&quot;#popMail#&quot;&gt;
&lt;/code&gt;
				
				</description>
						
				
				<category>Coldfusion</category>				
				
				<pubDate>Wed, 25 Apr 2007 17:44:00-0400</pubDate>
				<guid>http://www.cfedge.com/index.cfm/2007/4/25/Using-CFPOP-to-Connect-to-Gmail-Using-Stunnel</guid>
				
			</item>
			
		 	
			</channel></rss>