LeMoDa top page
Examples
Adaptations
Algorithms
Amazon
Arrays
Assembly language
Basic guides
C
Cairo
CGI
Colours
Command line
Compression
Databases
Dates & times
Directories
Edit distances
Electricity
Encodings
Excel
Files
Flex
Fonts
FreeBSD
Git version control
Go
Gzip::Faster
Hexadecimal
HTML
HTML::Make
HTML parsing
HTTP requests
Illustrated
Image::PNG::Libpng
Image Magick
Images
Information theory
Internet addresses
Japanese signs
Japanese language
JavaScript
JSON
Languages
Line directives
Linked lists
Mathjax
Maths
Memory management
mmap
Unresolved mysteries
Networking
No ads
Numbers
Octave
Pack and unpack
Partial content
Perl
Perl modules
Photographs
PNG
Pointers
Printf
QR codes
Random
Regular expressions
SQLite
stdarg
Strings
Data structures
SVG
Testing
Three phase
Troff
Tutorials
Unicode
Unix
UTF-8
Xlib
XS
X Window System
These pages are examples of various things, mostly computer codes.
Standardise Go function comments
(28 June 2023)
Stopping a web server using a web request
(13 March 2023)
Read directory
(24 November 2022)
Generate gaussian
(2 August 2022)
Dealing with zero-length non-empty form values in Go
(6 June 2022)
Read a file into an array of lines in Go
(17 May 2022)
Redirect os.Stderr in Go
(16 May 2022)
A star pattern in SVG
(12 June 2021)
Net interfaces
(30 March 2021)
Removing elements from the middle of a slice
(24 February 2021)
Generating the illustration for Damerau-Levenshtein explained
(16 April 2020)
C implementation of the Fisher-Yates shuffle
(12 August 2018)
An example of using pipe and fork in C
(18 December 2017)
Initialise and evaluate a map from strings to strings in Go
(28 July 2017)
The Boyer-Moore string matching algorithm in C
(28 May 2017)
Template glob funcs
(18 March 2017)
Parse and create HTTP format timestamps in C
(5 March 2017)
Parse and create HTTP format timestamps in C
(5 March 2017)
An example of atexit in C
(25 February 2017)
Copy chmod permissions from one file to another
(13 February 2017)
Get the line number of a regex match
(10 February 2017)
Distinguish binary and text files in C
(2 February 2017)
Example implementation of the Knuth-Morris-Pratt algorithm in C
(30 January 2017)
Debugging message routine with line directives
(19 January 2017)
How to decode broken doubly-encoded UTF-8 in Perl
(13 January 2017)
Make a list of colours with HTML::Make
(5 January 2017)
Convert JSON to HTML with JSON::Parse and HTML::Make
(5 January 2017)
Wikipedia article titles in different languages
(24 December 2016)
Test the size of integers in the preprocessor
(29 November 2016)
Some examples of Japanese braille or "tenji"
(28 November 2016)
An example of dying with a hash value in Perl XS
(16 November 2016)
A C program which gets information about itself
(20 October 2016)
An example of Cairo and FreeType in C
(6 October 2016)
reCAPTCHA example in Perl
(21 September 2016)
Get the last day of a month
(9 September 2016)
Array of different types
(8 September 2016)
Put a JSON object into map[string]string directly in Go
(8 September 2016)
Get mime type
(31 August 2016)
Override the mime type of the Go HTTP file server
(30 August 2016)
Draw a coloured graph of three phases
(29 August 2016)
Regexp replace pattern
(29 August 2016)
Substitute a URL in text using a regular expression
(26 August 2016)
Extract some of the files from a dump using restore
(25 August 2016)
Delete .xvpics directories safely
(24 August 2016)
Compressing CGI output with Perl and Gzip::Faster
(23 August 2016)
Get the file number associated with a FILE pointer
(14 August 2016)
Get QR code data from a png scalar
(2 August 2016)
Simple C macros for the Test Anything Protocol
(29 July 2016)
An example of using va_copy
(29 July 2016)
Example of reading a PNG file
(23 June 2016)
A file server with sorted directory listing in Go
(1 February 2016)
Gzip handler in Go
(24 January 2016)
Example of calling printf from assembly on FreeBSD
(9 November 2015)
Hello world example in x86 assembly language for FreeBSD
(9 November 2015)
Line directives in Go
(27 October 2015)
Example of a Go program which reads URL parameters and prints them out
(27 October 2015)
Simplest example of web server printing "Hello world" in Go
(27 October 2015)
Get a varargs-like vprintf or vfprintf in Go
(28 September 2015)
Make an error from a string in Go
(13 September 2015)
Pop from slice
(13 September 2015)
C program to delete files which match a pattern
(4 April 2015)
Cgi and file server
(13 August 2014)
Negative numbers and the modulo operator in C
(8 August 2014)
Convert a rune to a string in Go
(3 August 2014)
Testing for an undefined string in Go
(2 August 2014)
Convert type
(31 July 2014)
Raw strings
(31 July 2014)
map of list of strings
(30 July 2014)
Get the first rune of a string in Go
(29 July 2014)
Example of converting hexadecimal to integer in Go
(29 July 2014)
An example of a struct in Go
(29 July 2014)
Example of initializing an array of strings in Go
(27 July 2014)
Sort an array of strings by length
(27 July 2014)
Read a tab-separated file into a map
(26 July 2014)
Example of converting hiragana to katakana in Go
(24 July 2014)
Example of converting utf8 to a rune (integer)
(24 July 2014)
Example of looping over runes in a string in Go
(24 July 2014)
Send an HTTP OPTIONS request
(18 July 2014)
How to split a git repository
(13 April 2014)
How to convert colours from RGB to hue values
(6 January 2014)
Perl Cairo tutorial
(30 September 2013)
Entropy of discrete probabilities in Perl
(27 March 2013)
A variable-length list of arguments in Perl XS
(22 March 2013)
An example of using malloc
(7 March 2013)
Convert an IP address to an integer in C
(25 February 2013)
Examples of right-to-left writing in Japan
(21 February 2013)
C example program for hello world
(7 February 2013)
A basic example of parsing HTML in Perl
(31 January 2013)
Similarities and differences between pointers and arrays in C
(19 November 2012)
Normal probability distribution in Octave
(10 November 2012)
An example of mmap for a read-only file
(3 August 2012)
Using a C structure as a Perl object with XS
(7 July 2012)
Levenshtein edit distance with a maximum
(23 June 2012)
Having a method with the same name as a builtin
(24 May 2012)
Print part of a string with printf
(3 May 2012)
How to skip tests with Test::More
(18 March 2012)
Algorithm to convert katakana to hiragana in UTF-8
(30 September 2011)
Strip leading and trailing space in C
(26 September 2011)
Calculate the Levenshtein edit distance in C
(20 September 2011)
Print today's date in C
(12 September 2011)
An example of pointer arithmetic
(11 September 2011)
Read a compressed file with gzFile, gzopen, and gzread in C
(9 September 2011)
Open and read a gzip compressed file with zlib in C
(9 September 2011)
An example of compressing with zlib in C
(9 September 2011)
Example of insertion sort in C
(8 September 2011)
Example of quicksort in C
(7 September 2011)
Program to reverse a string without using the string library
(7 September 2011)
Calculate Armstrong numbers in C
(19 August 2011)
Convert decimal to binary in C
(19 August 2011)
Find the largest of n numbers in C
(19 August 2011)
Pointers in C with examples
(18 August 2011)
Generate a Fibonacci series in C
(18 August 2011)
List the files in a Unix directory with C
(18 August 2011)
Example program in C to detect palindromes
(18 August 2011)
Get a list of prime numbers in C
(18 August 2011)
Recursively list directories in C
(18 August 2011)
Example of C if statement
(17 August 2011)
Compare strings ignoring case in C
(17 August 2011)
An example of an inline qsort
(17 August 2011)
Example of random number generation in C
(17 August 2011)
Example of command-line arguments in C
(13 August 2011)
Get the size of a file in C
(13 August 2011)
Example of getopt in C
(13 August 2011)
Read a whole file into memory in C
(13 August 2011)
Binary search in C using bsearch
(10 August 2011)
Show the types of all the ASCII characters
(10 August 2011)
Example of a doubly-linked list in C
(10 August 2011)
Find a substring of a string in C
(10 August 2011)
Example of a singly-linked list in C
(10 August 2011)
An example of array initialization in C
(9 August 2011)
Length of array in C
(9 August 2011)
Sort an array of strings in C
(9 August 2011)
Printf, doubles and decimal places
(9 August 2011)
Print hexadecimal versions of numbers in C
(9 August 2011)
Left-justify printf output
(9 August 2011)
Convert a string to a double in C
(9 August 2011)
Convert a string to an integer in C
(9 August 2011)
An example of using regular expressions in Perl XS
(18 June 2011)
The C string library
(30 May 2011)
Make a reentrant parser with Flex and Bison
(26 May 2011)
C macros __LINE__, __FILE__ and __func__
(14 May 2011)
Get a hash value using XS
(30 March 2011)
Split a C string on whitespace
(20 February 2011)
Set the modification time of a PNG
(29 December 2010)
Converting Cairo output to PNG
(28 December 2010)
Create a PNG with text segments
(28 December 2010)
Write a PNG file using C and libpng
(27 December 2010)
Compressing CGI output with Perl
(19 December 2010)
Showing the modified time of an HTML page using JavaScript
(12 December 2010)
Print sizes of all images in a directory
(11 November 2010)
What characters are illegal in a Unix filename?
(9 November 2010)
C function pointer to function with varying number of arguments
(28 October 2010)
Convert X bitmaps (.xbm) to PNG - example of Pozkanzer tools
(12 October 2010)
IPC::Run3 for testing binaries
(10 October 2010)
Xlib window which tells its own position and size
(3 October 2010)
Responding to resize events with Xlib
(3 October 2010)
A simple text window using Xlib
(3 October 2010)
Responding to window deletion messages from the window manager
(3 October 2010)
SQLite C example: bind data
(20 September 2010)
An example of using regular expressions in C
(14 September 2010)
An example of ualarm and setjmp
(12 September 2010)
A simple "die" function for C - example of variable number of arguments
(11 July 2010)
SQLite C example: insert data
(9 June 2010)
SQLite C example: select data
(9 June 2010)
Example of ptrace for FreeBSD
(30 October 2009)
An example of iconv
(9 September 2009)
Visit all cells in an Excel worksheet
(29 August 2009)
Copyright © Ben Bullock 2009-2024
. All rights reserved. For comments, questions, and corrections, please email
Ben Bullock
(
benkasminbullock@gmail.com
). /
Privacy
/
Disclaimer