This file contains hidden or 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 <stdio.h> | |
int main() { | |
int *p = 0; | |
char line[1024]; | |
printf("> "); | |
fgets(line, 1024, stdin); | |
*p = 12; |
This file contains hidden or 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 five = require('johnny-five'); | |
var board = new five.Board(); | |
board.on("ready", function () { | |
var leds = new Array(5); | |
for (var i = 0; i < 5; i++) { | |
leds[i] = new five.Led({pin: i + 5}); | |
} |
This file contains hidden or 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
;;; Hy tumblr printer. | |
;;; Copyright (c) Paul R. Tagliamonte, 2013, MIT/Expat license. | |
(import [urllib2 [urlopen]] | |
[lxml [etree]] | |
[sys [argv]]) | |
(defn get-rss-feed-name [tumblr] |
This file contains hidden or 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
# fast json library for R. | |
# drop in replacement for rjson (another library) | |
# use whatever you prefer | |
library(RJSONIO) | |
## hardcoded for this test | |
ny.json <- fromJSON("/Users/protonk/dev/R/nomnom/data.json") | |
unflatten <- function(json) { |
This file contains hidden or 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 five = require("./lib/johnny-five.js"), | |
board, slider; | |
board = new five.Board(); | |
board.on("ready", function() { | |
var accel = new five.Accelerometer({ | |
pins: [ "I0", "I1" ], | |
freq: 100 |
This file contains hidden or 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
exampleWithNumber: x | |
"A method that illustrates every part of Smalltalk method syntax | |
except primitives. It has unary, binary, and keyword messages, | |
declares arguments and temporaries, accesses a global variable | |
(but not and instance variable), uses literals (array, character, | |
symbol, string, integer, float), uses the pseudo variables | |
true false, nil, self, and super, and has sequence, assignment, | |
return and cascade. It has both zero argument and one argument blocks." |
This file contains hidden or 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
class Mapping { | |
// Subclasses define at least @@iterator(). | |
@@iterator() { | |
throw TypeError("abstract operation") | |
} | |
// Mutable subclasses also define set() and delete(). | |
set(key, value) { | |
throw TypeError("mapping is not mutable"); | |
} |
This file contains hidden or 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
struct Point { | |
function void Point(double x, double y) { | |
this->x = x; | |
this->y = y; | |
} | |
double x, y; | |
} | |
function int add1(int x) { |
This file contains hidden or 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
// assumes little endian | |
// constants taken from http://nikic.github.com/2012/02/02/Pointer-magic-for-efficient-dynamic-value-representations.html | |
var MAXDOUBLE = 0xfff80000, | |
INT32TAG = 0xfff90000, | |
BOOLTAG = 0xfffa0000; | |
var heap = new ArrayBuffer(24), | |
f64 = new Float64Array(heap), | |
ui32 = new Uint32Array(heap), |
This file contains hidden or 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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |