July 14, 2004

A SQL Statement with the Resultset Flopped

I got a request from a developer the other day to produce a SQL statement with the resultset flopped. In other words, he wanted the rows to appear as columns and the columns to appear as rows. What’s more, he wanted the names of the rows to appear in the

Create an Easy to Use Clamp Template for Constraining Values

Often, in code, you find yourself constraining values doing something like: if(val < MIN) val = MIN;else if(val > MAX) val = MAX; This simple template function will do that for you. The template uses two types, so that the in value doesn’t have to be the same type as

Single Sign-On: The High Cost of Convenience

ow many times have you left your computer without locking it down? Sure, some people have a screensaver that locks the computer automatically after some elapsed period; most people set it to 20 minutes or more because shorter durations are irritating. I’m sure most developers are conscientious about security, but