Thursday, November 30, 2006

Do what Technorati tells you to...

Oh, great. I think I just got suckered into another one of those linking schemes by accidentally creating a Technorati Profile so that I could post my picture somewhere or something.


Do what the interweb tells you to

So I'm reading Larry O'Brien's blog and he tells me (well, not me personally, but you know what I mean) to not only click on a link, but also to link to it in my own blog. The destination page says the same, plus:

Ask your readers to do the same. Beg them. Relate sob stories about poor graduate students in desperate circumstances. Imply I'm one of them. (Do whatever you have to. If that fails, try whatever it takes.)

...who am I to resist orders from the internet and random blogs?

Wednesday, November 29, 2006

$how me the Shatner!

This show called Show Me The Money recently came out on ABC. It is hosted by William Shatner and feels like a cross between Who Wants to Be a Millionaire and Deal or No Deal.

Unsurprisingly - and appropriately enough but most likely on purpose - WFS feels like a cross between Regis Philbin and Howie Mandel.! You!

Hacking the Microsoft Natural Ergonomic Keyboard 4000, redux

Earlier I wrote about hacking IntelliType's commands.xml file to enable the use of the "Zoom slider" as a "Scroll slider". Having recently repaved my computer, I found myself installing the latest version of Microsoft IntelliType Pro (version 6.02, a.k.a. 6.02.303.0) and trying to apply the patch I posted earlier:

C:\Program Files\Microsoft IntelliType Pro>patch -p0 < command.patch
patching file `commands.xml'
Hunk #1 FAILED at 1606.
Hunk #2 FAILED at 1694.
Hunk #3 FAILED at 2122.
Hunk #4 FAILED at 2134.
Hunk #5 FAILED at 2152.
Hunk #6 FAILED at 2182.
patch unexpectedly ends in middle of line
Hunk #7 FAILED at 2224.
7 out of 7 hunks FAILED -- saving rejects to commands.xml.rej

B'oh! Err... I mean: D'oh! Ok, time for plan B: Zoom2Scroll.xsl

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="" version="1.0">

<xsl:output method="xml" encoding="UTF-8" indent="yes" />

<!-- Pass-through (identity transform) template -->
<xsl:template match="* | @* | node()">
<xsl:apply-templates select="* | @* | node()" />

<xsl:template match="C319">
<C319 Type="6" Activator="ScrollUp" />

<xsl:template match="C320">
<C320 Type="6" Activator="ScrollDown" />


There. A quick trip to the command-line with my trusty xsl.exe:

C:\Program Files\Microsoft IntelliType Pro>xsl commands.old Zoom2Scroll.xsl commands.xml

C:\Program Files\Microsoft IntelliType Pro>

...and killing the IType.exe process, then re-launching that EXE again... it works! In your face, Larry Wall!

Oh, right. This post wouldn't be complete without the source code to xsl.exe. It's a JScript.NET program:

import System.Xml;
import System.Xml.Schema;

var src : String = System.Environment.GetCommandLineArgs()[1];

var transformer : System.Xml.Xsl.XslTransform = new System.Xml.Xsl.XslTransform ( );
var stylesheet : String = System.Environment.GetCommandLineArgs()[2];
transformer.Load ( stylesheet );

transformer.Transform ( src, System.Environment.GetCommandLineArgs()[3], null );

...which you can compile as follows:

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322>jsc /nologo xsl.jsn

Thanks go out to the folks at Cute Overload for providing me with a [semi-]random web page to test the [new] scrolling capabilities of my "slider" in Internet Explorer.