Friday, August 22, 2008

Clipboard caching utilities

Over the past year or so, I have become dependent upon clipboard caching utilities. These are programs that run in the background that keep track of EVERYTHING copied (ctr-c). I wonder why this functionality is not built into any mainstream operating system. Maybe because Clippy ("one of the worst software design blunders in the annals of computing" -Smithsonian Magazine) was our first taste of clipboard caching.

I have been using CLCL which has been working fairly well for me. I have its cache limit set at 100 copies, which goes back a few days (which is suprising for how much I copy!).

But lately my copy function will randomly stop working until I restart. Which brings up two questions I have.
  1. Does anyone know if this is related to CLCL?
  2. If so, does the restarting every couple days diminish the productivity gained via the utility?
Anyone have any thoughts? What other utilities do you use?

Monday, August 4, 2008

XSLT example template that returns boolean

In XSLT you can create templates that act as boolean functions.

<xsl:template match="/">
<!-- create variable named cat to store boolean value -->
<xsl:variable name="cat">
<xsl:call-template name="HasCat"/>
</xsl:variable>

<xsl:when test="$cat= 'true'" >
<!-- do something because it has a child element named cat -->
</xsl:when>
</xsl:template>


<xsl:template name="HasCat">
<xsl:choose>
<xsl:when test="count(descendant-or-self::*[contains(local-name(), 'Cat')]) > 0">
<xsl:value-of select="true()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="false()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>