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
/* 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; |
#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; | |
} |
/* 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 |
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
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 |
-- written for a puzzle presented by John D. Cook: | |
-- http://www.johndcook.com/blog/2012/01/14/roman-numeral-puzzle/ | |
-- | |
-- Copyright (C) 2012, John Bartholomew. | |
-- You may use this code for any purpose, WITHOUT WARRANTY. | |
module Main where | |
import Control.Monad | |
import Data.Char |
#!/bin/bash | |
# codec configuration from | |
# http://code.google.com/p/bencos/source/browse/trunk/out/presets/libx264-lossless_ultrafast.ffpreset?r=156 | |
cat > libx264-lossless_ultrafast.ffpreset <<EOF | |
coder=0 | |
flags=+loop | |
cmp=+chroma | |
partitions=-parti8x8-parti4x4-partp8x8-partp4x4-partb8x8 |
// simplest version | |
struct StateCapturer { | |
StateCapturer() { | |
glPushAttrib(...); | |
glPushMatrix(...); | |
glPushTheWholeDamnWorld(); | |
} | |
~StateCapturer() { |
#include <string.h> | |
#include <stdint.h> | |
/* compiled with: | |
* {gcc,clang} -std=c89 -pedantic -Wall -Wextra -O3 -S -c byte-order-test.c | |
* | |
* Built on and for an x86-64 system. | |
* The full assembly output from both compilers is embedded at the bottom. | |
* | |
* Summary: |
This assumes you have no changes loose in your working copy.
At any point you can run gitk to view the commit history. I use gitk all the time, to view and search through the commit history, find the SHA1 hash of a particular commit, and check the commit graph.
First, make sure master is up to date (it most likely already is, but no harm in checking)
git checkout master
git fetch upstream