Code, Strings, and Keys

    • About Thomas Powell
    • Account
    • It’s been [0] days since [program] last updated
    • Login
    • Password Reset
    • Pianist / Accompanist / Music Director Resume
    • Reading List 2025
    • Register
    • Running Gear – Shoes, Treadmill, and Bandages
    • Site Map
Illustration of a bird flying.
  • (g)awk script to remove last dir from PATH

    This script chops off the last dir off of the PATH (still need to assign back to PATH) echo $PATH | gawk -F’:’ ‘{ for(i=1; i<NF; i++) { if(i) { printf (":"); } printf("%s", $i); }}’

    April 26, 2007
  • Writing an onLoad function that includes a delay.

    This code was written out of desperation when I could not use an embedded APPLET’s isActive() function to check if the APPLET was loaded. Instead, I waited for 500 milliseconds. Hopefully, there are better uses for this code. <SCRIPT>function OnLoadFunction(milliseconds_time){ setTimeout(“delayedOnLoadFunction()”, milliseconds_time);}function delayedOnLoadFunction(){ /* Function body */}</SCRIPT><body onLoad=”OnLoadFunction(500)”>

    April 17, 2007
  • Insert archive parameter into HTML applet tag.

    Under Linux:This code, named replace_applet.sh, adds a archive parameter (classes.jar) to all applet tags for *.htm files in a directory. ls *.htm | while read x do cat $x | sed -e ‘/<APPLET/ { s/<APPLET /<APPLET archive=”classes.jar”/}’ > $x.$$ cp $x.$$ $x rm $x.$$done

    March 29, 2007
←Previous Page
1 … 286 287 288 289 290 … 310
Next Page→

Code, Strings, and Keys

Proudly powered by WordPress