Code

implode_assoc

I was fiddling around on a project and created this associative array implosion function that incorporates several of the ideas from the php.net documentation's entry on implode, but which also adds a whack of nifty options. Documentation and examples are included in-line.

Zend Framework: Validate Identical Field

This little object is a canned and generic validator for Zend Framework. It is intended for use with Form Elements, but it should work fairly broadly. The basic need it addresses is to validate that one field value matches another (e.g. password/email an associated validation field, a captcha challenge, etc.). I looked hard for a ready made answer to this issue, but after much searching and failed experimentation with other canned solutions I decided to write my OWN generic answer to the problem.

CRC Emulation

I coded this assignment to perform CRC calculations against arbitrary data strings using standard polynomials and r values as can be seen in this screenshot. One may also select the Custom option to enter other calculation values. The textbox allows the user to enter strings to run the CRC against. For fun, I setup displays in binary, decimal, and hex for the polynomial and result values. In the documentation that follows, I explain the code that performs the calculations, but the full source code may be downloaded via the link at the top of the page.

Detect and / or Delete Duplicates

Ok - I got tired of repeatedly modifying my favorite duplicate deletion algorithm for whatever table I happen to be working with at the time. This code is the result of that frustration. It provides hassle free locating and reporting (or deletion) of duplicate rows in a SQL table based on the uniqueness of a column or columns that the user provides with a few nifty hands-off features. The actual deletion method employed is a correlated subquery, so I must locate or create a column of unique values.

Parse Phone Info

This function accepts a phone number as a string and does its best to tear it apart and return the various pieces (e.g. area code, last four, etc.) It returns the phone number in a format specified by the parameters passed in.

Drip

Well... When I was a younger lad, one of my favorite jokes to play on folks was to install a program called 'Drip'. This was an 'invisible' TSR that would act at random (but decreasing) time intervals, selecting a character from the screen-map and 'dripping' it down the screen until just before it contacted another character. Of course, this didn't hurt anything, but certainly caused some humorous reactions (e.g. "EEEK! My screen is melting!!").

Simon Says

A simple Simon Says style game for use on a Moterolla HC11 processor.

Link This Page

I required a method of reliably providing a "Link To This Page" in a cross browser and cross OS environment. After searching around on the web, I decided nothing quite fit and so created my own solution. This code should reliably work in Mozilla, IE, and Opera browsers, but should also fail gracefully in any environment where it errors out or cannot find and appropriate "hook".

Syndicate content