This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

<< Previous | 1 | 2 | 3 | 4 | Next >> |
Generic Multi-Level Undo and RedoGeneric Multi-Level Undo and Redo
Most modern software applications include undo and redo features. Undo allows one or more activities to be reverted. Redo allows previous undo actions to be reversed. This article explains how to create a generic, multi-level undo and redo class.
Dijkstra&#39;s AlgorithmDijkstra's Algorithm
Graph traversal algorithms are used to process a graph of interconnected nodes, visiting each node by following a set behaviour. Dijkstra's algorithm is such an algorithm. It determines the shortest path from a start point to all other nodes in a graph.
Determining if Values are CoprimeDetermining if Values are Coprime
Two integer values are said to be coprime, or relatively prime, when they share no common divisors other than the number one. This article describes the process for determining whether two positive values are coprime, with C# example code.
Euclid&#39;s AlgorithmEuclid's Algorithm
Euclid's algorithm, also known as the Euclidean algorithm, can be used to efficiently calculate the greatest common divisor (GCD) for two integer values. This article describes the algorithm and provides several C# methods that calculate the GCD.
The XOR Swap AlgorithmThe XOR Swap Algorithm
The XOR Swap algorithm provides a means to swap the values in two integer variables without requiring the use of a third, temporary variable. This algorithm is interesting to know, although its use is unnecessary in high-level languages.
Convert Text to Morse CodeConvert Text to Morse Code
Morse code is a standard encoding for letters, digits and some other characters that is ideally suited to radio transmissions and is used by amateur radio operators and pilots. This article describes a simple C# class for converting text to Morse code.
Displaying Relative TimeDisplaying Relative Time
When developing software that works with time stamped information, it is common to show the date and time at which an item was created or last updated. A user-friendly alternative is to display a relative time, such as "Two Hours Ago".
The Soundex AlgorithmThe Soundex Algorithm
Cultural differences and input errors can lead to words being spelled differently to a user's expectations. This makes it difficult to locate information quickly. The Soundex algorithm can alleviate this by assigning codes based upon the sound of words.
Calculate the Number of Business Days in a RangeCalculate the Number of Business Days in a Range
A common task is to calculate the number of business days that exist within a date range. In most western cultures, these are the days from Monday to Friday and excluding Saturdays and Sundays. The resultant number should also exclude national holidays.
The Chaos Game and the Sierpinski TriangleThe Chaos Game and the Sierpinski Triangle
The chaos game is a method for generating fractal images by plotting randomised points inside a polygon according to a simple set of rules. In this article we will use the chaos game to generate the Sierpinski triangle using C# and Windows Forms.
<< Previous | 1 | 2 | 3 | 4 | Next >> |