Projects


Javascript Sparklines Library

This is an unobtrusive implementation of Sparklines, done in Javascript using the new Canvas element. It has been confirmed to work in the new Firefox betas, at the very least. Until the Canvas element becomes more widely accepted, this is more of a 'fun demo' at best.

How To Use:

To use, place your data points within your HTML, like so:

<span class="sparkline">10,8,20,5...</span>

(Note: Any HTML element with a class of 'sparkline' is checked)

Then, in your CSS, you might want to have the rule:

.sparkline { display: none; }

so that non-compatible browsers don't see a huge pile of numbers.

Finally, include the library in your header, like so:

<script language="javascript" src="jspark.js"></script>

Demo

An example of this code, in action, can be found here: Demo.

Download

The JSpark library: jspark.js

This work is licensed under a Creative Commons Attribution 2.5 License.

Tags: canvas, javascript, firefox, cool

Lazy Sheep Bookmarklet

Lazy Sheep is a del.icio.us bookmarklet that auto-tags and auto-describes your bookmarks.

Using the tags and descriptions shared by other del.icio.us users, Lazy Sheep makes tagging a page a one-click operation. In order to best suit any user, Lazy Sheep also includes a comprehensive set of options that can be configured to your exact specifications.

Visit

Tags: javascript, bookmarklet, delicious, cool, popular

Javascript Diff Algorithm

Using an idea grabbed from a mailing list post, I implemented the diff algorithm discussed in the following paper (free registration required):

P. Heckel, A technique for isolating differences between files
Comm. ACM, 21, (4), 264--268 (1978).

The implementation, itself, has two functions, one of which is recommended for use:

diffString( String oldFile, String newFile )
This method takes two strings and calculates the differences in each. The final result is the 'newFile' marked up with HTML (to signify both deletions from the oldFile and additions to the newFile).

Sample Code

document.body.innerHTML = diffString(
   "The red brown fox jumped over the rolling log.",
   "The brown spotted fox leaped over the rolling log"
);

Sample Output

The red brown spotted fox jumped leaped over the rolling log.

Projects Using this Code:

Downloads

Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 License.

Tags: algorithm, diff, javascript, papers, cool, popular

AniWiki

This is my entry into the Waxy.org Automated Wikipedia Contest. There's still a number of bugs to squish, but I'm working on them. A summary of the features:

Download

  • AniWiki.user.js - This is a greasemonkey script. To use, you must be using Mozilla or Firefox and have the Greasemonkey extension installed (version 0.33, minimum).

Tags: wiki, wikipedia, javascript, animation, cool, popular

Del.icio.us Auto-Complete

A Greasemonkey extension that adds tag auto-complete capabilities to the traditional del.icio.us posting areas. This is a powerful extension which can greatly increase your del.icio.us posting speed. I've spent some time playing around with it, thus far, and it's been helping me out significantly.

The premise behind this extension is that it goes through your existing 'Post' page, takes the tag data from within the page and gives you auto-completion capabilites of it. This is how the current interfaces are supported:

  • The traditional posting interface (Screenshot) is fully supported. Additionally, the tags are also sorted by popularity.
  • The 'experimental' interface (Screenshot) is supported, but tag results are sorted alphabetically.
  • The popup posting interface is currently not supported as it does not contain any tag data.

It appears that another auto-complete hack was done a while back, but no longer exists. After doing some more digging around I was able to find an implementation of that specific piece of code. Upon inspection, however, it appears as if all tag data is hard-coded into the javascript (which is highly inefficient).

Features

  • Tag Auto-Completion
  • Sorting by popularity (Traditional interface only).
  • Tags can be completed using the right arrow, tab, enter, or escape keys.
  • To view alternate tag suggestions, hit the 'up' or 'down' arrow.

Known Bugs

  • Will only complete the last tag being entered (not tags in the middle of the text area).
  • Sometimes if you type really fast it will complete the tag automatically.

Updates

  • Version 3 (2005-03-27): Any non-space character is valid in a tag.
  • Version 2 (2005-03-26): Is now capitalization agnostic. You can type in both upper and lower case and auto-complete words which are both upper and lower case.
  • Version 1 (2005-03-25): Initial release.

Downloads

Tags: javascript, greasemonkey, delicious, tags, popular, cool

DOM Snap

This is a modification of Younpup's Dom-Drag which adds 'snapping' functionality to DOM objects. For example, if a user moves an object close to the edge of another object, it will 'attach' and remain connected until broken free. Anyone familiar with Winamp will recognize this functionality. I'm still in the process of cleaning up the code, and once it's done, I'll release a proper package for it.

Links

Tags: javascript, dom, dhtml, cool

AI::Markov

An implementation of a Markov Model written while I was on co-op in the Lab for Applied Computing. Main differences between other Perl implementations and this one is the addition of sequences (being able to chain a history of events together to predict the next event) and Global models (aggregating the results from a number of personal models into one master model). The package includes a script that you can modify to process a large file of sequences and turn them into active, testable, models.

Downloads

Tags: imscan, module, perl, cool

Latent Semantic Indexing

An implementation of Latent Semantic Indexing in Perl. Runs rather fast and places all output in a variety of text files, indexed alphabetically. This was written for the Winter 2003 quarter of Data Mining class at RIT, with Dr. Teredesai. My teammate, Darrin, and I created a very fast search engine which utilized this particular indexing scheme. Included in the file is a nice english stop word list.

Downloads

Tags: search, school, perl, cool, data_mining

· « Previous entries

Current Projects

jQuery JavaScript Library

jQuery

Comprehensive DOM, Event, Animation, and Ajax JavaScript Library.

Recent Projects

Pro JavaScript Techniques

JavaScript Book

The best techniques for professional JavaScript. Published by Apress.