Skip to content

Instantly share code, notes, and snippets.

@ndarville
ndarville / diff.mdown
Created July 23, 2012 20:33
Paul Heckel's Diff Algorithm

[Isolating Differences Between Files][paper]

Advantage over Other Algorithms

The diff output is more specific:

[I]f a whole block of text is moved, then all of it, rather than just the beginning and end, is detected as changed.

>The algorithm described here avoids these difficulties. It detects differences that correspond very closely to our intuitive notion of difference.

@sjoerdvisscher
sjoerdvisscher / curry.html
Created July 9, 2012 20:37
Curry and uncurry in JavaScript
<script>
function curry(f)
{
if (typeof f != "function" || f.length < 2)
return f;
return mkHelper(f, []);
}
function mkHelper(f, args)
@amedeo
amedeo / gist:820412
Created February 10, 2011 12:00
CouchDB and multiple tags

CouchDB and multiple tags

The problem

Given a set of documents, each associated with multiple tags, how can I retrieve the documents tagged with an arbitrary set of tags?

My solution