This is mostly just a place for me to keep track of code snippets.
Note that the sample code illustrates how to do something; wholesale copy and paste may not work.
Double-clicking a code box will select all of the code.
Links and forms followed byOpens in new window will open in a new window.

§ Most important things to remember

"Keep It Simple Stupid!"  (KISS principle)

"If it ain't broke, don't fix it!"

(Remember, this is mostly for me; I'm not trying to call you stupid.)

0 Comments added to this post

§ Helpful links

When I search google and find myself on the same page... again... I'm putting a link here!

If you're looking at this blog, I hope you are already familiar with these sites...

Read More ...

§ Actiontec M1000 DSL modem security

I used to use an Actiontec GT701 DSL modem.  Since my entire livelihood depends on my internet access, I got a little nervous when some odd things started happening.  As it happened, a friend was having trials with the phone company getting her DSL to work, and was advised to try the Actiontec M1000.  Still no go, so I tested her modem here and it worked nicely.  (That was all the phone company's fault, and after getting escalated a few times, I believe they were a bit embarrassed.)  So I looked around and found a slightly used M1000 (with wireless) for about $30!  (I don't want the wireless - I use Airport.  Being an Apple product, it's actually comprehensible to mere mortals like myself.)  But after a few days, weird things started happening with the M1000...

Read More ...

§ Don't AJAX an image!

Using AJAX is fine when you need it, but I've used AJAX to simply reload CAPTCHA images.  Boy, some people are dumb!  Me, in particular.

UPDATE:  I'm dumber than I thought...

Read More ...

§ Adventures with Ubuntu 9.10 on G4 Yikes!

I have an Apple G4 Yikes! (or PCI Graphics) that I've loved for years.  I ran Jaguar, then Panther, and it currently runs Tiger well enough to suit me.  I got a G5 a while back, so this box got sort of retired, until I picked up some contract work doing websites.  Since I had a whole new set of emails, chat sessions, VOIP, invoices, etc., etc., I turned on my trusty Yikes! and devoted it to all of that stuff for that job.

When I stopped working that contract, my poor old G4 started getting lonely again.  So, the other day I thought maybe I should use it to try Linux again.  I've looked at Linux a number of times through the years, for various reasons, including on old Macs, but never quite got sucked in to being a convert.

"I keep hearing good things about Ubuntu," I thought, "so I think I'll try it; this'll be fun!"

That depends on your definition of fun...

Read More ...

§ Software that leaves a mess

The other day, my WinXP machine kept bringing up the "let's clean up your hard drive" wizard, which I kept closing.  I finally realized that Explorer claimed that I had 0 bytes available on my system drive!  "Impossible," I thought, "what's wrong now?!  A virus?"  Not quite...

Read More ...

§ Simpler adding & removing element classnames

Just use the javascript replace function...

Read More ...

§ Borderless window resizing with WM_NCHITTEST

Want to have a borderless window that can be resized like a normal window?  Use WM_NCHITTEST.

Read More ...

§ TWMSizing record for Delphi

One way to control custom window sizing is to use the WM_SIZING message, but Delphi doesn't give you what you need to do so.

Read More ...

§ Avoid email harvesting with javascript

I don't like to put real email addresses on web pages because "harvesters" look for them to add to their spam list.  However, harvesters probably don't run javascript before searching.

Read More ...

§ IE App Compat VHD

Download Virtual PC VHD files (virtual hard drive) with XP or Vista and IE6, IE7, or IE8 at:

http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en

These expire periodically; the download page tells you when it will expire.  Microsoft links change all the time, so you may have to search instead.

You also need Virtual PC, a free download from Microsoft.

0 Comments added to this post

§ External links to new windows

Ok, there's lots of REALLY HEATED discussions about this topic all over the web.  I'm not looking for arguments; I'm just posting what I do here in this blog.

Read More ...

§ Format apache directory listing

The default directory listing apache shows is controlled by mod_autoindex and it has some options available.

Read More ...

§ My XP startup items

I have a couple of shortcuts in my startup folder.  These are the "Target" lines of the shortcuts.

The first one gets rid of explorer's showing every zip file as a folder.  You know how many zip files I've got?  The /s at the end makes it not show a dialog box when it's finished.

%windir%\system32\regsvr32.exe /u zipfldr.dll /s

The second maps w: to my localhost root.  Good ol' DOS commands!

%windir%\system32\subst.exe w: e:\wamp\www

0 Comments added to this post

§ Simple AJAX request

Almost all of my AJAXing is to simply grab the output of a source and stuff it in in a div.  In previous posts you can see what I've been using for a long time, but I wanted to make a function I wouldn't have to edit every time I used it in a project.

Read More ...

§ Validating email addresses (it's impossible) (Rant Alert!)

Search google for "validate email address" and you'll get about 303,000 results.  I bet all of them are wrong...

Short version:

Why bother?  I'm probably going to enter "example@example.com" anyway.

Read More ...

§ Adding & removing element classnames

Ok, these are just dumb.  See Simpler adding & removing element classnames instead.

 

A couple of ways to change classnames of elements.

Read More ...

§ Table row hover highlight

A bit of javascript to highlight the table row under the cursor.

Read More ...

§ Handling url get string with javascript

Using javascript to handle url get string variables

Read More ...

§ Better tabbed interface

Tabbed interface using get string to set active tab.

Read More ...

More entries...


“If everybody minded their own business,” said the Duchess in a hoarse growl, “the world would go round a deal faster than it does.”
Lewis Carroll, quoted in To Say Nothing of the Dog, Connie Willis