Challenge Accepted

Some solutions to web development challenges.

Random 5 to 7

Create a RAND7 generator that relies only on the output from a RAND5 generator.

Your solution should output the integers from 1 to 7, inclusive, with nearly equal frequency.


Generate a linked list

In JS, create a dynamic linked list of arbitrary size.

Allow the user to interactively select the list size.

code image


Given a string, find the longest stretch of unique chars without a repeat.

For example, in "baseball", the longest string with no repeats is "sebal".

code image


Update an array of filenames as follows:

Expand the 2-digit year to a 4-digit year. Pad the ID number with leading zeroes so that all IDs have 6 digits.

e.g. 68MEG444 should become 1968MEG000444

results image
code here


Implement word wrap.

Given a long text as a single string, break the text into lines of any requested length.

code image

Rotation CSS

Just for fun!

This is a mashup of images and CSS from a science article and an office supply site, playing around with animated, rotating images; probably not useful.