Skip to content

Instantly share code, notes, and snippets.

View fjakobs's full-sized avatar

Fabian Jakobs fjakobs

View GitHub Profile
@fjakobs
fjakobs / date_serializer.js
Created January 18, 2010 12:15
Date serializer [qx]
var obj = { date: new Date(123)}
Date.prototype.toJSON = function() {
return { $$date$$: this.getTime() }
}
var json = qx.lang.Json.stringify(obj);
console.log(json)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="author" content="Fabian Jakobs">
<!-- Date: 2009-10-15 -->
<style type="text/css" media="screen">
@fjakobs
fjakobs / qooxdoo hello world
Created October 15, 2009 07:40
Mouse Capturing
// Create a button
var button1 = new qx.ui.form.Button("First Button", "icon/22/apps/internet-web-browser.png");
// Document is the application root
var doc = this.getRoot();
// Add button to document at fixed coordinates
doc.add(button1,
{
left : 100,