It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
var digits = Digits.Create("093884765"); | |
var digitsOfLength3 = Digits3.Create("007"); | |
Console.WriteLine($"digits: [{digits}] digitsOfLength3: [{digitsOfLength3}]"); | |
} | |
static class DigitsDef | |
{ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
(A book that I might eventually write!)
Gary Bernhardt
I imagine each of these chapters being about 2,000 words, making the whole book about the size of a small novel. For comparison, articles in large papers like the New York Times average about 1,200 words. Each topic gets whatever level of detail I can fit into that space. For simple topics, that's a lot of space: I can probably walk through a very basic, but working, implementation of the IP protocol.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A C macro for easily defining lambda functions. | |
* | |
* Source: http://stackoverflow.com/a/3378514/1146898 | |
* | |
* Usage: | |
* | |
* int (*max)(int, int) = lambda (int, (int x, int y) { return x > y ? x : y; }); | |
*/ | |
#define lambda(return_type, function_body) \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ctypes import * | |
from ctypes.wintypes import * | |
WNDPROCTYPE = WINFUNCTYPE(c_int, HWND, c_uint, WPARAM, LPARAM) | |
WS_EX_APPWINDOW = 0x40000 | |
WS_OVERLAPPEDWINDOW = 0xcf0000 | |
WS_CAPTION = 0xc00000 |