Skip to content

Instantly share code, notes, and snippets.

View dreiss's full-sized avatar

David Reiss dreiss

  • Facebook
  • Palo Alto
View GitHub Profile
test3
update_accum(_UID, #contactInfo{presence=0}, Accum) -> Accum;
update_accum(UID, #contactInfo{presence=Presence}, Accum) ->
dict:store(UID, Presence, Accum).
#!/usr/bin/env python
class HashChain(object):
"""A chain of hash values that can be traversed backwards
A hash chain is a sequence of the form H(s), H(H(s)), H(H(H(s))),
where 'H' is a one-way hash function and s is the initial seed.
This class generates a hash chain and allows you to traverse it
in reverse order (e.g., from H(H(H(s))), to H(H(s)), H(s)).
Construction requires O(N) time (where N is the length of the
bin_PROGRAMS = hello
hello_SOURCES = hello.c
#hello_LDADD = @LEXLIB@
#include <tr1/functional>
#include <cstdio>
struct FooSyncIface {
virtual int bar(int arg) = 0;
virtual int baz(int arg) = 0;
};
struct FooAsyncIface {
$ mkdir pytest
$ cd pytest
$ mkdir src
$ mkdir stage
$ mkdir src/mylib
$ touch src/mylib/__init__.py
$ echo 'import mylib' > src/myscript.py
$ cd src
$ zip mypar.zip mylib/__init__.py myscript.py
adding: mylib/__init__.py (stored 0%)
program
*.so
A
/ \
/ \
B C
/ / \
D E F
/
G
#!/bin/bash
set -e
# This script identifies the packages manually installed on your old
# Debian system that are not installed on your new Debian system.
if test "$#" -ne "2" ; then
echo >&2 "usage: $0 /path/to/old/var/lib/dpkg /path/to/old/var/lib/apt"
exit 1
fi
<?xml version="1.0"?>
<project name="test" default="run" basedir=".">
<property environment="env" />
<path id="cpath">
<pathelement path="${env.CLASSPATH}" />
<pathelement location="build" />
</path>
<target name="init" >