Saturday, July 30, 2011
Monday, April 25, 2011
Wednesday, February 9, 2011
Gas Station Philosophy
My office-mate's father once saw these instructions inscribed on a humble tire pressure gauge, and I thought it just had to be shared with the world:
Too little pressure causes poor performance, too much pressure causes blowouts.Remember that as you motor on down the Highway of Life.
Thursday, December 2, 2010
Thursday, October 28, 2010
Friday, September 17, 2010
Keyboards
I don't understand why most generic PC keyboards, you know the kind that plug into a USB port on your PC, lack on-board USB ports themselves. It would be so convenient for things like keyboard lights. Back in the day, my Mac keyboard had Apple Desktop Bus ports, so I could plug the mouse directly into the keyboard.
Monday, September 13, 2010
Compute length of a string in a batch file
set myvar="some string"
rem compute the length of a string
set #=%myvar%
set length=0
:loop
if defined # (
rem shorten string by one character
set #=%#:~1%
rem increment the string count variable %length%
set /A length += 1
rem repeat until string is null
goto loop
)
echo myvar is %length% characters long!
rem compute the length of a string
set #=%myvar%
set length=0
:loop
if defined # (
rem shorten string by one character
set #=%#:~1%
rem increment the string count variable %length%
set /A length += 1
rem repeat until string is null
goto loop
)
echo myvar is %length% characters long!
Thanks to poster Secret_Doom on computing.net
Subscribe to:
Posts (Atom)