Skip to content

Instantly share code, notes, and snippets.

View RavuAlHemio's full-sized avatar

Ondřej Hošek RavuAlHemio

View GitHub Profile
@RavuAlHemio
RavuAlHemio / gist:816557
Created February 8, 2011 15:13
GDB backtrace of GWorkspace initialization
(pay no mind to the variable values, please; my debugging information is borked)
#0 0x00007ffff5c15683 in poll () from /lib/libc.so.6
#1 0x00007ffff677c8fe in -[GSRunLoopCtxt pollUntil:within:] (self=<value optimized out>, _cmd=<value optimized out>, milliseconds=<value optimized out>,
contexts=<value optimized out>) at GSRunLoopCtxt.m:424
#2 0x00007ffff66d3fc4 in -[NSRunLoop acceptInputForMode:beforeDate:] (self=<value optimized out>, _cmd=<value optimized out>, mode=<value optimized out>,
limit_date=<value optimized out>) at NSRunLoop.m:1198
#3 0x00007ffff66d4328 in -[NSRunLoop runMode:beforeDate:] (self=<value optimized out>, _cmd=Unhandled dwarf expression opcode 0x0
) at NSRunLoop.m:1266
#4 0x00007ffff6634d9d in -[NSConnection(Private) _getReplyRmc:] (self=0x11801f0, _cmd=0x7ffff6b02b30, sn=0) at NSConnection.m:3186
@RavuAlHemio
RavuAlHemio / IterativeFloodfillOperation.java
Created January 25, 2011 14:06
iterativer Ansatz für die Floodfill-Operation
import java.util.*;
/**
* Ein iterativer Ansatz f&uuml;r die Floodfill-Operation, weil Rekursion
* gern mal zu Stack-Overflows f&uuml;hrt.
*
* Danke an die LVA-Leitung von AlgoDat1, die mir diesen "Trick" beibrachte.
*
* F&uuml;r jeden Punkt, der aus der Queue entnommen wird, werden der Queue vier
* weitere Punkte hinzugef&uuml;gt &ndash; es sei denn, der entnommene Punkt