This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' test.bmx | |
Type Foo {expose} | |
Method Bazzle( obj:Bar ) | |
If obj = Null Then | |
Print "Null obj" | |
Else | |
Print obj.ToString() | |
EndIf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LFE_SRC := $(wildcard src/*.lfe) | |
LFE_BEAM := $(LFE_SRC:src/%.lfe=ebin/%.beam) | |
INCL_DIRS := $(wildcard deps/*/include) include | |
EBIN_DIRS := $(wildcard deps/*/ebin) ebin | |
FLAGS := -noshell -noinput $(INCL_DIRS:%=-I %) $(EBIN_DIRS:%=-pa %) | |
OPTIONS := {outdir,"ebin"} | |
compile: $(LFE_BEAM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)someSetupMethod { | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillShow:) | |
name:UIKeyboardWillShowNotification object:nil]; | |
} | |
- (void)someTeardownMethod { | |
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Fibonacci n-th number (modulo 2^32) | |
; | |
; input: | |
; ecx = n | |
; modifies: | |
; eax, ecx, edx | |
; ouput: | |
; eax = number | |
; size: | |
; 15 bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <stdarg.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
enum type { | |
NIL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
------> HTTPClientWithCache <------ | |
This class is a wrapper around the standard Titanium.Network.HTTPClient(), but it adds a | |
few nice features: | |
* A cache backed by a SQLite database. All HTTPClientWithCache instances use the same database table, with | |
the primary cache key being a hash of the full URL (and any data parameters in a POST) | |
* The cache is automatically pruned before each query | |
* A retry mechanism, so that you can retry a particular query a number of times before failing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Extensions | |
{ | |
public static IObservable<TProperty> ObservePropertyChanged<TNotifier, TProperty>( | |
this TNotifier notifier, | |
Expression<Func<TNotifier, TProperty>> propertyAccessor, | |
bool startWithCurrent = false) | |
where TNotifier : INotifyPropertyChanged | |
{ | |
// Parse the expression to find the correct property name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns wl.core | |
(:use compojure.core, aleph.core, aleph.http, hiccup.core, hiccup.page-helpers) | |
(:require [compojure.route :as route]) | |
(:gen-class)) | |
(def broadcast-channel (channel)) | |
(defn chat-handler [ch handshake] | |
(receive ch | |
(fn [name] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns finger-tree-stats | |
(:use [clojure.data.finger-tree])) | |
(defrecord stats [^double number ^double mean ^double variance]) | |
(def null-stats (stats. 0 0 Double/NaN)) | |
(defn make-stats | |
[^double x] | |
(stats. 1 x 0)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
OlderNewer