Source Code Samples

curve

For a living I write source code in either software programming langugaes or hardware description languages. The best examples of my work were created under contract for employers who own the intellectual property rights to the code. I am not at liberty to publish such source code samples on the web page.

Below is the source code for some projects that I have done on my own. I will add more samples to this page once I finish some works in progress. The source code on this page is distributed and available to the public under the terms of this license agreement.

Rand Sig

I created this elegant Perl program for the purpose of randomly selecting an email signature from a text file containing a long list of choices. This enables me to have a random "quote of the day" at the end of my emails. This perl program could just as well be used for any of a range of similar applications requiring the random selection of a segment of text from a text file.

For this program to work as written, the email signatures in the source text file must each be separated by a double carriage return (i.e. a blank line between each signature).

Source code: rand_sig.pl

Example command line: rand_sig.pl sig_list.txt > email_sig.txt

HTML Auto Run

If you include a file named autorun.inf in the root (top level) directory of a CD-ROM then most computers will automatically run the program specified by the file when the CD-ROM is inserted. See this page for documentation on autorun.inf syntax.

It would be nice if you could specify a target file (for example, a web page as an HTML file) in autorun.inf and the computer would open it with its associated program. Unfortunately, that is not supported by the conventional autorun system. Instead, this HTMLAutorun program can be compiled to target a particular file. The code provided here targets index.html and this program can be invoked by the autorun system in order to open the desired HTML or any other file using the associated program.

For this code to work, as provide here without modification, the root (top level) directory of the CD-ROM must include autorun.inf, HTMLAutorun.exe, and index.html.

Source code: HTMLAutorun.cpp

Executable: HTMLAutorun.exe

Example autorun.inf: autorun.inf

This source code has only been tested as a console application project in Microsoft Visual C++, compiled for Windows for x86 processors.


© Copyright 2004-2006 Jonah Probell