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
class Variable | |
def initialize(domain) | |
@domain = domain | |
end | |
def fixed? | |
if @domain.length == 1 | |
@domain[0] | |
else | |
false |
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 <regex.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char** argv) { | |
regex_t* preg; | |
int reti; | |
char* linebuf; | |
char insection; |
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
keycode 10 = exclam 1 exclam 1 onesuperior exclamdown onesuperior | |
keycode 11 = quotedbl 2 quotedbl 2 twosuperior oneeighth twosuperior | |
keycode 12 = sterling 3 sterling 3 threesuperior sterling threesuperior | |
keycode 13 = dollar 4 dollar 4 EuroSign onequarter EuroSign | |
keycode 14 = percent 5 percent 5 onehalf threeeighths onehalf | |
keycode 15 = asciicircum 6 asciicircum 6 threequarters fiveeighths threequarters | |
keycode 16 = ampersand 7 ampersand 7 braceleft seveneighths braceleft | |
keycode 17 = asterisk 8 asterisk 8 bracketleft trademark bracketleft | |
keycode 18 = parenleft 9 parenleft 9 bracketright plusminus bracketright | |
keycode 19 = parenright 0 parenright 0 braceright degree braceright |
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
#!/usr/bin/ucblogo | |
print [Hello, World!] | |
bye |
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
be "bad". | |
outer is unary { | |
inner is nonary { | |
POST | |
}, | |
export inner ' This is going to end in failure. | |
}. | |
outer 4. |
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
s is need "stdio". | |
f is nonary { | |
add is binary { | |
PRE + POST | |
}, | |
s:println 4 add 5, | |
s:println add | |
}. |
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
> isCorner(3); | |
undefined | |
> rows | |
5 | |
> cols | |
5 | |
> isCorner | |
function isCorner(i) { | |
return | |
i == 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
function deepExtend(target, source) { | |
Object.keys(source).forEach(function(key) { | |
var value = source[key]; | |
var dest = target[key]; | |
var sourceType = typeof value; | |
var destType = typeof target[key]; | |
if (Array.isArray(value) && Array.isArray(dest)) | |
target[key] = dest.concat(value); | |
else if (sourceType === destType && sourceType === 'object') |
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
#!/usr/bin/env ruby | |
require 'json' | |
Products = JSON.parse(DATA.read) | |
Productindex = Products.keys | |
ingredientsstack = [] | |
buildstack = {} | |
build = ARGV.shift |
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 "globals.mzn"; | |
% Given an integer n and a real e | |
par int: n = 566*708; | |
par float: e = 16/9; | |
% Find two integers r <= c | |
var int: r; var int: c; | |
constraint c >= r; | |
output [ |