The (Not So) Useless Code Archive

I write a lot of code. I was joking with a freind of mine that we should start the "useless code archive" and fill it full of scripts that were useful for one particular job but don't seem to have any other application. Well, that actually sounded sort of useful. So I've started posting the code I write for anything that seems even remotely useful. Everything on this page should be distributed under the GPL, and all of my Fltk stuff is under the LGPL. If you have any questions feel free to email me. I really enjoy hearing from people that have used my code in their own projects.

Applications / Tools
Flek 2.25.2000 The Fast Light Environment Kit is a project that I started that intends to duplicate the higher level functionality of Gnome or KDE using the Fltk toolkit, instead of Gtk or Qt. Flek is made possible due to the efforts of a number of programmers. Some things that Flek provides include:
  • Fl_Calendar
    The Fl_Calendar widget provides a graphical wall-style calendar from which a user can select the month day and year.
  • Fl_App_Window
    The Fl_App_Window is a special window that can accept dockable groups.
  • Fl_Dockable_Group
    The Fl_Dockable_Group widget is a group that can be docked into anything that accepts docks (like Fl_App_Window).
  • Fl_Toggle_Tree
    A collapsable tree widget.
  • Fl_Gl_Arcball_Window
    An excellent GL interface that supports arcball style rotation controls with zooming, panning, and dollying.
  • fXml
    A c++ wrapper for libxml.
  • fImage
    An image class that supports reading from file formats like PNM and SGI. Compositing functions like Add, Subtract, Difference, Multiply, Divide, Lighten Only, Darken Only, and Composite are supported.
  • libflek_core (Flek Base Classes)
    A large set of vector, matrix, quaternion, math, and date classes.
  • libflek_gl (OpenGL Wrappers)
    A lot of OpenGL convenience functions that utilize c++ features and Flek's excellent image, quaternion, vector and matrix classes.
(home page)
Extreme Wave 07.20.1999 My magnum opus in progress. When complete, Extreme Wave will be an extensible 3d modelling and animation system. Extreme Wave development is more or less on hold until Flek reaches a better state of usability.
(home page)
guile-fltk 10.11.1999 This guile module is a scheme binding for the Fltk C++ widget library. Aproximately 95% of the fltk classes, methods and functions are currently implemented. The programming interface is very intuitive and the package includes an extended version of fluid (the Fltk user interface designer) that can generate scheme code. For more information check the home page.
(home page)
Black Ink 12.14.1999 Black Ink is the first Flek'ed application. It's a check book program that (in part) is desgined to show off some of the features of Flek.
(home page, screen shot)
Fl_ToggleTree 07.20.1999 Maarten de Boer is the primary / original author and maintainer of this "toggle tree" widget for Fltk. I've made a number of changes to it since he first released it, and now help him maintain it.
(source code, screen shot 1, screen shot 2)
JPronoun 07.20.1998
no longer
maintained
I wrote a hueristic based program to associate pronouns with proper nouns they identify for any given sample of natural language text. I did this as a 485 to get a c programming credit I had somehow overlooked. The web interface is written in perl.
(source code, proposal, paper, example)
CE 07.20.1997
proprietary
In 1997 I wrote a rather complex configuration editor for a proprietary data logging program used at LeTourneau Inc. The code and software is obviously not available, but you can read a description and see some screenshots.
(description and screenshots)
Robotics 452 Fall 1997 Long before Lego Mind Storm there was CSCI 452. My final project in 452 was to build a a line following robot that did obstacle collision detection and avoidance with an array of diverse sensors.
(description and screenshots)
Web and CGI Applications
Name Release Description
JSWISHI 12.11.1999 This is a front end to SWISH-E and SWISH++ (indexed search engines). It is "feature laden" to say the least. It supports multiple index sources for searches, multiple indexes for parallel searches (i.e. one search for images and another for documents), and uses a type of skin file for some serious configurability. All of the examples below use the same script, with different skin files.
( source code, example 1, example 2, example 3 )
Concentration 07.21.1998 Also known as "Tiger Marmalade Concentration", I originally wrote this game for National Agriculture Week in early 1998 but have continued to add new features. It is listed on a few CGI code archives, so I have a page dedicated to it with a lot of really cool example. Concentration requires Perl 5 and CGI.pm.
( source code, example, home page )
JAnalog 03.31.1999
no longer
maintained
Analog is a statistics program for http log files. It comes with a CGI interface called analform, but this interface lacked a lot features I needed on the sites I work with. I wrote this interface (JAnalog) which works in a fundamentally different way. Recently, the author of Analog rewrote Analog's form interface ( inspired in part by my code), so I have stopped maintaining mine and recommend using the interface that now comes with recent versions of Analog.
( source code, example )
JCGI 08.17.1998
no longer
maintained
JCGI is a CGI object for use with Small Eiffel, that I wrote when I was learning Eiffel. There is another CGI object for Eiffel, but it is not free (thus, I have never used it). This CGI module has been inspired by the Perl CGI.PM API. JCGI requires Small Eiffel -.80.
( source code )
FileUpload 07.20.1998
no longer
maintained
As if there aren't enough web file upload utilities I had to go and write another one. What makes this one different is that it uses Expect to actually log in as the user who is uploading the file, so that the file has the correct permissions and can be put in non-world writeable areas. If you have an SSL capable web server, this can be an extremely secure (and easy) way of letting users upload files to their accounts. I think there are some better alternatives now, so I don't reccomend using this anymore as it is a bit kludgey.
( source code )
Ag Calendar 07.20.1998 The Ag Calendar is made up of two perl scripts that read and write from a mysql database. All events are entered into the database by the user who wants to publicize his or her event. The moderator can then edit this event or make it in/visible. All maintenance is done via the web. I have provided the source in case some of it is useful. This is not a "general purpose" event database.
( source code (pt 1), source code (pt 2), example )
Time Sheets 07.20.1998 Time Sheets is another web based database that I designed. The web interface summarizes the employees and the hours they have spent working on certain tasks. Another form lets the employees edit this information and make comments on their work. The code is in a rather miserable state and it doesn't look like it will be used again, so I doubt I will release it.
(example)
Ag Week Game 97 07.20.1997 A "Silly Story" (madlib) game for AgWeek 97. When I wrote this, I couldn't find any madlib games that worked like this one. Now there are quite a few, so I haven't bothered to put the source in a presentable form.
(example)
AgNews Poster 07.20.1997 One of my most useful scripts. I was originally hired by the Texas A&M Agricultural Communications department in 1996. My main task was to code news stories and update links for these stories. Instead, I wrote a script that does it for me. Bwahaha.. All the news content on agnews.tamu.edu is the result of this program. (I've got a great job -- I basically just write lots of web utilities.)
( source code (pt 1), ( source code (pt 2) )
Text Editor Tools / Extensions
XML / XHTML
Mode for Jed
04.05.2000 This mode began as an extension to Jed's html mode, but I have recently ressurected it as an xml/xhtml mode. It is more like emacs' html mode than it is like Jed's. It includes tab-style tag indentation and lots of utility functions.
( source code )
cr2lf 10.30.1998
no longer
maintained
This is a small slang function for Jed that converts carriage returns to line feeds within the current buffer.
( source code )
Code Snippets
replace 02.25.2000 This bit of code walks a directory tree applying a perl subroutine called "process" on any files that have certain file extensions. The process function currently updates one phone number area code with another, and gives a very verbose log. Of course you can change the process function to do whatever you like. The bit of code that walks directories is a fairly useful little code snippet.
( source code )
renumber 04.20.2000 This script renumbers files that have numbers in their names. It was especially designed for working with video frames. Ever had 100 files named "frame__001" ... "frame_100", that needed to be named "frame.0001.jpg" ... "frame.0100.jpg"? Or need to renumber frames 65-70 to 95-100? This script makes an often painful task very easy.
( source code )


James Dean Palmer
http://www.tiger-marmalade.com/~james