April 25th, 2008
I promised an Amazon EC2 AMI with imapsync and a few Gmail migration scripts. See the Gmail to Google Apps Email Migration post for background information. I'll jump right in with a procedure to get you started with your own migration:
Read the rest of this entry »
Posted in Misc | 15 Comments »
March 29th, 2008
I came up with a method for migrating the emails in my personal Gmail (user@gmail.com) email account to my Google Apps (user@thamtech.com) email account. I had a few simple requirements:
- Every email in the @gmail.com account must be migrated into the @thamtech.com account with all attachments intact.
- The read/unread status of each email must be maintained.
- The labels applied to each email must be maintained, whether they were applied by a filter or manually.
- Certain Google-endorsed migration solutions are only able to maintain message labels that were applied automatically by a filter.
- The starred/non-starred status of each email must be maintained.
- The date on migrated emails must be the original date, NOT the date of migration.
- Certain migrations involving Entourage have had this unfortunate result.
- The Recipient column when viewing the list of migrated Sent Mail must show the recipients of the emails, NOT my name or "me".
Also, Gmail normally replaces my name with "me" when displaying the sender/receiver of emails. I prefer that the emails display exactly the same, "me," after being migrated, rather than saying "user@gmail.com". Is this too much to ask? No!
I found a solution using imapsync and Amazon EC2 (I suppose any old computer would do, but this gave me a much higher bandwidth connection to Google's servers than I would have had otherwise). Here's a brief overview of my procedure:
Read the rest of this entry »
Posted in Misc | 37 Comments »
November 7th, 2007
ColdFusion sometimes has trouble assembling the inputs to a web service when the parameters to the web service function are complex. I ran into trouble recently when trying to use the findObjects() method of the API-A interface to a Fedora Commons repository.
There is a discussion of this issue in the adobe forums with a good description of ColdFusion's behavior when preparing parameters for a web service call.
Read the rest of this entry »
Posted in ColdFusion | 1 Comment »
November 7th, 2007
Well, it has been quite a while since I've logged-in and updated anything in here. I just finished updating my book list with more books I've recently read, and also my current selections, Agile Database Techniques and Scripting VMWare.
I am really enjoying Agile Database Techniques. I plan to read it again and take notes before I have to return it to the library! I began reading the book before starting on my new project at work. Shortly after I realized we may be facing an integration (of some sort) with a legacy database, I got to chapter 8: Legacy Databases - Everything You Need to Know But Are Afraid to Deal With. It has been very helpful as I move forward in the planning stages with my co-workers.
Posted in Books | No Comments »
May 12th, 2007
I had been using BlogCFC on a cheap ColdFusion host, but I have now been migrating things to my site hosted by Dreamhost. Dreamhost doesn't have ColdFusion, though, so I had to go with some different blogging software.
Dreamhost offers "One-Click Installs" of various web applications, including the software now running this blog: WordPress. It's written in PHP.
I didn't have very many entries in my blog, so transferring things from the old one to the new one hasn't been very difficult. I have rules in my .htaccess file redirecting the old urls to the new ones.
On the old blog, I was using my own template, but now I'm just using the default WordPress template. Maybe I'll replace it with my own some day when I have more time.
Posted in Misc | No Comments »
December 11th, 2006
There are a number of ways to invoke functions of a ColdFusion component:
Code (coldfusion)
<cfinvoke component="#myCfc#" method="helloworld">
<cfargument name="input" value="Hello World!">
</cfinvoke>
<cfset myCfc.helloworld("Hello World!")>
<a href="/my.cfc?method=helloworld&input=Hello%20World!">Invoke Component Function</a>
<form action="/my.cfc" method="post">
<input type="hidden" name="method" value="helloworld" />
<input type="text" name="input" value="Hello World!" />
<input type="submit" name="submit" value="Invoke Component Function" />
</form>
In addition, you can invoke a function through Flash Remoting or as a Web Service.
I recently discovered that if you invoke a remote function through a URL or a form on a web page, the arguments are automatically URLDecoded for you before the function is invoked.
I had some input in a form that included a '+' character. The browser naturally encoded the '+' into '%2B' before posting to my component function, as it should. Then ColdFusion (behind the scenes) decoded the string back to '+' before calling my function.
The problem was that in my function, which I knew was being called from a form, I immediately called URLDecode() on my input, to convert any instances of '%xx' to the correct character. Well, a '+' represents a [space] in a URL-Encoded string, so the '+' that was in the original input ended up as a [space].
The moral of the story is to be aware that ColdFusion will automatically URLDecode arguments from the URL or form before invoking your remote component method being invoked directly.
Posted in ColdFusion | No Comments »
November 15th, 2006
I developed a nice little web page as an exercise in Google Maps and to help study for a Place Name Exam in one of my classes, GRG 301K. The test is over a set of locations. A map with numbers will be provided and each question will name a location and ask (multiple choice) which location on the map matches that name. My Place Name Exam - Google Map page is a tool to help study for the exam.
The locations are divided up into categories (as provided by the professor). Clicking on a category on the left will bring up markers on the map corresponding to the locations in the category. Clicking a marker will identify the location in an info window/balloon. Clicking a particular location within a category will center the map on the marker for that particular location.
Read the rest of this entry »
Posted in ColdFusion, Google Maps, School | 5 Comments »
November 8th, 2006
The particular order that a child and parent component are instantiated should be noted. The initialization code, that is, the code in a component that is outside cffunction tags, is executed first in the parent. For example, if you have a parent/base component:
Code (coldfusion)
<!--- employee --->
<cfcomponent>
<cfset this.salary = 50000>
<cfset init()>
<cffunction name="init" access="public" returntype="employee">
<cfset this.overtimeSalary = this.salary * otMult()>
</cffunction>
<cffunction name="otMult" access="private">
<cfreturn 1.5>
</cffunction>
</cfcomponent>
and a child component:
Code (coldfusion)
<!--- manager --->
<cfcomponent extends="employee">
<cfset this.salary = 70000>
<cffunction name="init" access="public" returntype="manager">
...
</cffunction>
<cffunction name="otMult" access="private">
<cfreturn 2>
</cffunction>
</cfcomponent>
then instantiating an object of type Manager will have a salary property set to 70000, because the cfset runs in Employee first, and then in Manager.
This makes pretty good sense to me. The values of the child component override the values set in the parent.
This doesn't apply only to variables being set, though (whether it be the public this scope or the private variables scope). If you call a function from the initialization code of a parent component, the function is called as it exists in the parent - the child part of the object has not been instantiated yet.
So with the example components above, the call to init() from within the initialization code of the parent component, Employer, makes a reference to the otMult() function. Since the child part of the object has not been instantiated yet, the otMult() call returns 1.5, instead of the value of 2 you might want if you are instantiating a Manager.
If this becomes a problem for you, I suggest that you NOT try to call your initialization functions from the initialization code block of a component, and instead, put all your initialization code within init functions and call your init() function when you instantiate an object:
Code (coldfusion)
<cfset myManager = CreateObject("component", "Manager").init()>
Happy Coding!
Posted in ColdFusion | No Comments »
November 5th, 2006
I'll be graduating from
The University of Texas at Austin soon. As my schooling is coming to an end - at least for a while - I've been feeling more and more like now my education can finally begin! Lately, I've been coming across a whole bunch of topics I'd like to learn about and books I'd like to read. I've added a page on this site to list some of the
books I'd like to read, and some books I'm currently reading or have recently read. Take a look and read a book! ...Honestly, I didn't mean to make that rhyme, it just came out.
Posted in Books | 1 Comment »
November 3rd, 2006
Welcome to my blog. I've been developing web applications, mostly in ColdFusion, for several years. I hope to use this blog to share lessons learned, tools I've developed that I think others might find useful, and anything else I think up to share. I welcome your comments and hope that someday, someone will find this site useful.
I just threw the template together, so the XHTML and CSS are a little rough. I'll try to get around to cleaning it up a bit some day.
Posted in Misc | 1 Comment »