dans.blog


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

Bill Gate's Farewell Video...

At CES 2008 Microsoft showed off a "Bill Gate's Farewell Video." I just now watched it for the first time and it's pretty darn funny. Lots of cameos (Steven Spielberg, Bono, George Clooney, etc) and several really funny scenes.

Funny stuff!


Display ColdFusion JDBC Drivers on Windows

Today I ran across an interesting post on cfSearching on how to display the ColdFusion JDBC driver versions on Windows. Knowing this could be useful debugging information, I decided to save the code snippet for future use. However, I quickly released it was targeted directly for ColdFusion MX 7 and also had some hard coded paths that would need to be changed in order to run it on every system.

Since I wanted to be able to run this on any version of ColdFusion, I decided to modify the code a bit so it would work with any version of ColdFusion v6.1 or higher and it shouldn't require changing any of the path information.

Here's my modified version of the code:

<!---//
    getJDBCDriverInfo.cfm
    Description:
    This template will display the JDBC information contained in your ColdFusion
    installation.
//--->

<h1>
    <cfoutput>
        #Server.ColdFusion.ProductName#
        #Server.ColdFusion.ProductLevel#
        v#replace(Server.ColdFusion.ProductVersion, ",", ".", "all")#
    </cfoutput>
</h1>
<cfset driverInfo = arrayNew(1) >
<cfset pathToJava = Server.ColdFusion.RootDir & "\runtime\jre\bin">
<cfset pathToDriverJar = Server.ColdFusion.RootDir & "\lib\macromedia_drivers.jar">
<cfset drivernames = "macromedia.jdbc.oracle.OracleDriver, macromedia.jdbc.db2.DB2Driver, macromedia.jdbc.informix.InformixDriver, macromedia.jdbc.sequelink.SequeLinkDriver, macromedia.jdbc.sqlserver.SQLServerDriver, macromedia.jdbc.sybase.SybaseDriver">
<cfloop list="#driverNames#" index="driver">
    <cfexecute
        name="cmd.exe"
        arguments="/c #pathToJava#\java -cp #pathToDriverJar# #driver# 2>&1"
        variable="out"
        timeout="6"
            />

    <cfif IsDefined("out")>
        <cfset data = structNew()>
        <cfset data.class = driver>
        <cfset data.version = out>
        <cfset arrayAppend(driverInfo, data)>
    </cfif>
</cfloop>
<cfdump var="#driverInfo#">

I also modified the original code to output the version of ColdFusion that's running on the server. Credit goes to cfSearching for the original code.


jQuery celebrates 2nd Birthday with v1.2.2 release!

jQuery turned 2 years old today. To celebrate turning two, John Resig and gang released jQuery v1.2.2. Some of the key changes are:

  • 300% Speed Improvements to $(DOMElement)
  • $.ready() Overhaul — this is supposedly fix several bugs and provide even more consistent behavior across platforms. (NOTE: For those unfamiliar with the $.ready() function, it's designed to replace the window.onload event and fire immediately after the DOM is ready and not wait for all images to finish loading.)
  • New .bind(”mouseenter”) / .bind(”mouseleave”) events — these events are improvements on the typical mouseover/mouseout events as they don't fire when entering children elements (which is generally not the desired behavior.)
  • New .bind(”mousewheel”) event — this new event allows you to bind events to the mouse wheel.
  • The :not() selector now supports complex expressions
  • New AJAX "Accept Headers" added to XHR requests
  • Over 120 bug fixes
  • Test suite now includes over 1157 unit tests