Skip to content

Instantly share code, notes, and snippets.

View silb's full-sized avatar

Stig Inge Lea Bjørnsen silb

View GitHub Profile
@silb
silb / NativeDomEvents.java
Created January 27, 2011 10:53
For registering Java runnables as event listeners on GWT DOM elements
/**
* For registering Java {@link Runnable runnables} as event listeners on GWT DOM elements.
* <p>
* This class allows for registering listeners for all DOM events including those not supported by GWT.
*/
public class NativeDomEvents {
public static native void addEventListener(Element element, String event, Runnable listener) /*-{
var eventListener = function() {
@silb
silb / roman.clj
Created March 20, 2012 19:47
Capgemini Stavanger code dojo 2012-02-7: Integer to roman numeral in Clojure
(ns roman)
(declare test-integer-to-roman)
(def roman-numerals
["I" 1,
"IV" 4,
"V" 5,
"IX" 9,
"X" 10,