Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| # /// script | |
| # requires-python = ">=3.13" | |
| # dependencies = [ | |
| # "jsonnet==0.21.0rc2", | |
| # ] | |
| # /// | |
| import _jsonnet | |
| import os | |
| # WARNING: |
| Charon: | |
| height fractal: HillsCraters2 | |
| colour fractal: Rock | |
| seed: 2191294907 | |
| *** Error in `/home/dv/src/pioneer/src/pioneer': double free or corruption (!prev): 0x0000000002ac5d20 *** | |
| Program received signal SIGABRT, Aborted. | |
| 0x00007ffff5bb3f79 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 | |
| 56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. | |
| (gdb) bt |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| /* Another option which is more reasonable if you're willing to recompile is to insert a call to a trap function | |
| * could be __builtin_trap() for GCC, or DebugBreak/__debugbreak for MSVC, or your own function like this: / | |
| static void PoorMansBreakpoint() { | |
| printf(""); /* stick a breakpoint on this line */ | |
| } | |
| int fugbug(int a, int b) { | |
| return (a + b < 10) | |
| ? 8 |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| int main(int argc, char **argv) { | |
| if (argc < 2) { | |
| fprintf(stderr, "usage: check x|y\n"); | |
| return 1; | |
| } |
| /* WARNING -- THE CODE IN THIS FILE DOESN'T DO ANY ERROR HANDLING! */ | |
| static const char *TXDI_DEFAULT_FAMILY_NAMES[] = { | |
| "monospace", | |
| "sans", | |
| "serif" | |
| }; | |
| TXD_API TxdFont *txd_opendefaultfont(int family, int style, float height, float slant, float outline) { | |
| FcPattern *pat, *match; |
| /* Compiles and works with recent GCC and Clang in C++11 mode. | |
| * $ g++ --version | |
| * g++ (GCC) 4.8.2 20131219 (prerelease) | |
| * | |
| * $ clang++ --version | |
| * clang version 3.4 (tags/RELEASE_34/final) | |
| */ | |
| #include <vector> | |
| #include <iostream> |
| #!/bin/sh | |
| a5=aaaaa | |
| a27="$a5$a5$a5$a5$a5"aa | |
| aq5='a?a?a?a?a?' | |
| aq27="$aq5$aq5$aq5$aq5$aq5"'a?a?' | |
| pattern="$aq27$a27" | |
| input="$a27" |
| #include "nfa.h" | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| int main(void) { | |
| Nfa *nfa; | |
| NfaBuilder builder; | |
| nfa_builder_init(&builder); |
| #include <unistd.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <stdio.h> | |
| static const char MESSAGE[] = "Hello, world!\n"; | |
| int main(void) { | |
| char fname[64]; | |
| int fd; |