dans.blog


The miscellaneous ramblings and thoughts of Dan G. Switzer, II

Iraqi 'Sleeper Cells' Abroad Foiled, U.S. Aide Says

Two Iraqi sleeper cells planning attacks on U.S. interests have been arrested abroad, a Bush administration official said on Friday, saying one of the groups was taken into custody in the Gulf region.


Rumsfeld vs Media

Maybe it's just me, but I love listening to Rumsfeld when he handles questions from the media. He absolutely cracks me up. He typically does a great job keeping the media at bay and making their questions sound ludicrous (which often they are.) When they try to put words in his mouth, he simple replies: "Those are your words, not mine." I just get a kick out of how well he handles the media.


FlashForward Keynote: "Royale" Sneak Peak

At the end of the FlashForward Keynote this morning, Kevin ran a video from one of the Macromedia engineers who is working on some new technology (code named Royale) that we are working on. He showed a Flash based input form with multiple sections. He then showed the code used to build it, which was written entirely in XML. Not only was the entire Flash application created from the XML file, but so was all of the databinding (SOAP Based), ActionScript and StyleSheets (yes, Cascading Style Sheets).

I sure hope this is based on the XForms spec. It could go a long way to advancing the usage of XForms in the developer community. If this is a properitary XML format, I'll be pretty disappointed since the XForms spec is pretty complete and lays out just about everything you'd want to do with a Form. With all my work on qForms, I've learned one thing—the current HTML implementation of forms leaves a lot to be desired. I'm still not sure I'm sold on the performance of RIA in Flash, but performance does seem to be getting better.


Satellite images: Damage in Baghdad

Here are some interesting satellite photos that were taken on March 27, 2003. You can compare the images to older images to see the difference. As you can tell, it appears the precision of the bombings has been quite precise.

http://www.usatoday.com/news/world/iraq/baghdad-strikes.htm
http://www.digitalglobe.com/gallery/baghdad/


Weekend Trip Planned...

Jennifer and I are headed to her parents house in Niles, OH this weekend. One of her friends is a dog groomer, so we're taking Maddie in for a bath and to get her nails trimmed—her dew claws are like razors!

Oh, and my brother Jeff made a surprise stop by the house last night. He had some business in Columbus yesterday, and stopped by the house before heading back to Springfield. It was a pleasant surprise. We don't get to spend as much time together as I'd like. We hung out for a couple of hours before he headed back home.

NOTE:
Also, for those of you who don't know, he's finally finished at Wright State University! I'm so proud that he graduated, and even prouder of the fact that he's continually made good grades.


British Royal Marine Shot In Head 4 Times...

eric.walderman.helmet.jpg
British Royal Marine Eric Walderman dons a Kevlar helmet that saved his life by withstanding four bullets in the southern Iraqi port of Umm Qasr.


British: Iraqi militia fires on civilians

Iraqi paramilitary forces in Basra fired mortars and machine guns Friday on Iraqi civilians trying to flee the city, British military officials said.


De Villepin refuses to answer which side he's on

French foreign minister Dominique de Villepin gave a talk at London's International Institute for Strategic Studies in his first visit to Britain since the outbreak of war.

During a question and answer session at the end of his speech he refused to answer the question: "Who do you want to win the war?"


Hackers Replace Al-Jazeera Web Site With American Flag

Hackers on Thursday replaced the English-language Web site for Arab satellite television network Al-Jazeera with a U.S. flag and the message "Let Freedom Ring."


UDF: component() for CFMX

Have you ever had the need to invoke an instance of a componet based upon it's relative path? I know I have, so I threw this little UDF together.

To invoke a component, you simply call the component() function using either the standard dot notation or you can specify either a relative or absolute path to the CFC. I tried to make the "type" argument somewhat intelligent and it'll probably work correctly 99% of the time for you, but if you want to be absolutely sure you get the expected behavior, specify the type argument for the function.

/****************************************************************
UDF: component(path, type)
Author: Dan G. Switzer, II
Date: 5/26/2004

Arguments:
path - the path to the component. can be standard
dot notation, relative path or absolute path
type - the type of path specified. "component" uses
the standard CF dot notation. "relative" uses
a relative path the the CFC (including file
extension.) "absolute" indicates your using
the direct OS path to the CFC. By default
this tag will either be set to "component"
(if no dots or no slashes and dots are found)
or it'll be set to "relative". As a shortcut,
you can use just the first letter of the type.
(i.e. "c" for "component, etc.)
Notes:
This is based upon some code that has floated around the
different CF lists.
****************************************************************/

function component(path){
    var sPath=Arguments.path;var oProxy="";var oFile="";var sType="";var sProxyPath = "";
    if( arrayLen(Arguments) gt 1 ) sType = lCase(Arguments[2]);

    // determine a default type
    if( len(sType) eq 0 ){
        if( (sPath DOES NOT CONTAIN ".") OR ((sPath CONTAINS ".") AND (sPath DOES NOT CONTAIN "/") AND (sPath DOES NOT CONTAIN "\")) ) sType = "component";
        else sType = "relative";
    }

    // create the component
    switch( left(sType,1) ){
        case "c":
            return createObject("component", sPath);
        break;

        default:
            if( left(sType, 1) neq "a" ) sPath = expandPath(sPath);
            // updated to work w/CFMX v6.1 and v6.0
            // if this code breaks, MACR has either moved the TemplateProxy
            // again or simply prevented it from being publically accessed
            if( left(server.coldFusion.productVersion, 3) eq "6,0") sProxyPath = "coldfusion.runtime.TemplateProxy";
            else sProxyPath = "coldfusion.runtime.TemplateProxyFactory";
            try {
                oProxy = createObject("java", sProxyPath);
                oFile = createObject("java", "java.io.File");
                oFile.init(sPath);
                return oProxy.resolveFile(getPageContext(), oFile);
            }
            catch(Any exception){
                writeOutput("An error occured initializing the component #arguments.path#.");
                return;
            }
        break;
    }
}

more…


UDF: xslt() for CFMX

I wrote this CFMX-based UDF a while ago, and I thought I'd share it. One of my big gripes about the xslTransform() function in CFMX is that it doesn't support passing parameters to the transformation engine.

Passing parameters can be extremely useful, as it'll allow you to do some conditional operations on in your XSL sheets based upon values determined by the ColdFusion.

In a nutshell, this UDF accomplish this by parsing the XSL stylesheet and looking for instances of the <xsl:param> tag name attributes that match the key in the structure you passed in. Once it's looped through the entire "Params" structure, it'll use the modified XSL stylesheet to do the transformation. Basically, it just temporarily hard codes those values in the param for you.

more…


IE and funkiness w/innerHTML property

Today I noticed a strange thing with Internet Explorer v6.x. It appears when using the innerHTML property to read the contents of an element, it must be doing some parsing to the entire DOM tree that the current element resides in. Here's how I noticed the problem.

First, it appeared that the larger the DOM tree was, the longer it took to recieve the value for an element. In my test loop, it took an average of 4 seconds to parse a table by looping through all the rows in the table retrieving the value of firstChild property for each cell. The speed increased dramatically to the range of about 36 seconds by just invoking the innerHMTL property instead of firstChild property.

Second, I noticed it would get faster as I removed elements from the table I was parsing. If I removed each row after processing the contents, it would get faster and faster as less elements where found in the DOM branch. I found this extremely odd and the combination of both points leads me to believe that retrieving the value of the innerHTML property of an element does more than just reads the value.

more…


"Where is Raed?" I Say "Where is Salam Pax?"

Many of you may have seen this link already, it's been floating around the net, if not I recommend checking out Salam Pax's blog at http://dearraed.blogspot.com/.

I've been following his blog for about a week. According to his blog, he's a young man living in downtown Baghdad. It's interesting reading a viewpoint which is coming from someone who's in Iraq. Essentially I get the feeling that the Iraq people are just plain scared—they'd prefer to stay anonymous to avoid standing out. It seems standing out just gets you in trouble.

Is this blog legit? I can't say, that's up for you to decide.


Blog May Be Erraditic...

If my blog is temporarily down (you get an error or anything else strange happens,) don't fear—I'm probably just updating the code. I'll be working to add more features and tighten up the code. I wrote this blog software *very* quickly.


Let Your Voices Be Heard!

You should now be able to leave comments on my blogs. I still have some things to work out and if you have any problems posting your thoughts, please send me e-mail.