Monthly Archives: August 2013

A Barter Session Engine for a Game

The JavaScript code included below implements a simulated barter session for a computer game. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript.  Or, for an online … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Visualizing a Solar System with a Base Plane and Elevations

The JavaScript code below renders a solar system in three dimensions. Each planet’s height above or depth below a reference plane is shown by a perpendicular line that connects it to a grid on the base plane. To see the … Continue reading

Posted in Uncategorized | Tagged , , | 4 Comments

Visualizing a Network of Nodes on the Surface of Sphere

The JavaScript code shown below generates a random network of nodes distributed across the surface of a sphere, connects them together with links, and then renders them as an image. To see the code in action, copy it into an … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Approximating Mathematical Functions with Taylor Series in JavaScript

The JavaScript code below uses Taylor series to approximate the values of several mathematical functions (namely, e^x, sin(x), cos(x), and ln(x)) and displays the results. To see it in action, copy the code into an .html file and open that … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Filtering Images with Convolution Masks in JavaScript

The JavaScript code below runs a given image through a few different filters and displays the results to the screen. To see it in action, copy the code to an .html file, copy an image named “Test.png” to the same … Continue reading

Posted in Uncategorized | Leave a comment

Generating a Random Landscape in JavaScript

The JavaScript code below will generate a random topological map. To see it in action, copy it into an .html file and open that file in a web browser that runs JavaScript.  Or, for an online version, visit http://thiscouldbebetter.neocities.org/landscape.html. When … Continue reading

Posted in Uncategorized | Tagged , , | 2 Comments

Exploring Hashing Algorithms and Hashtables in JavaScript

The code below, when executed, implements a hashtable in JavaScript, inserts several values into it, and then reads them back out. To see it in action, copy the code into an .html file and open that file in a web … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

A Hello World Service in ServiceStack and .NET using SharpDevelop

1. Download and install SharpDevelop. SharpDevelop is a free and open-source development environment for Microsoft .NET. As of this writing, the latest installer is available at the URL “http://www.icsharpcode.net/OpenSource/SD/Download/#SharpDevelop4x“. 2. Download ServiceStack. ServiceStack is an open-source framework for implementing REST … Continue reading

Posted in Uncategorized | Tagged , , , | 3 Comments

Reading ZIP files in JavaScript Using JSZip

The steps below implement a JavaScript program that reads the contents of a couple of text files contained in a test ZIP file and displays them to the screen. It is regrettable that a separate test ZIP must be created, … Continue reading

Posted in Uncategorized | Tagged , , | 3 Comments