-   0   + 

JavaScript

Below are pages with JavaScript. Click on a link and run the JavaScript. View the source code by viewing the HTML source.

The title of this page could have been Program Algorithms and Methods, because many of the JavaScripts below are intended to show just that, and not to show how to write good JavaScript programs. The reason for using JavaScript, is that it is easy to share the source code and to execute it, you only need a (newer) web browser. It is also not so far from C/C++.

CRCCyclic Redundancy Checksum (CRC) calculations
CRC-16 and CRC-32 are very popular checksum methods, used in many protocols and in data storage. They are much safer than simple adding or xoring, but they take longer time to calculate.
CryptEncrypt and decrypt (and also random generator)
Simple and fast cryptation method, useful for internal use within a program (data storage). However, for serious code breakers, this cryptation is no match.
HideHide HTML code from e-mail harvesting agents
Converts HTML code into JavaScript so e-mail harvesting agents (and other agents) will not see the HTML code.
JDNJulian Day Number (JDN) calculations
Day counting (numbering) is a useful method to add and subtract dates, and for data storage of dates. Day counters can easily be changed to counters of seconds or other units.
PermutPermutations of strings (words)
Lists all combinations of all letters in a word.
PrimesPrime numbers
Calculates prime numbers, easy and simple, but slow.
PwdGenPassword generator
Generates random passwords. A user specified pattern or mask is used to create passwords. You should always use random passwords, and not passwords you think up your self (like the name of your dog or wife :-) ).
QSortQuick Sort
Quick sort is a popular sort method. However the recursive algorithm may cause stack overflow. Here is a quick sort method that uses a small stack space.
Copyright © 1996-2010 Scandinavian Digital Systems AB