Go to magma calculator and paste the binary-look-and-say.magma
code in the textarea.
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
@Grab('com.bloidonia:groovy-stream:0.9.0') | |
import groovy.stream.* | |
def (n, f, b) = [ | |
{ [ it[0], it[1] + '' ] }, | |
{ [ it[0], it[1] + 'fizz' ] }, | |
{ [ it[0], it[1] + 'buzz' ] } | |
] | |
def fizzs = Stream.from([f, n, n]).repeat() |
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 <iostream> | |
#include <gecode/int.hh> | |
#include <gecode/search.hh> | |
using namespace Gecode; | |
class Tuple : public Space { | |
protected: | |
IntVar x; |
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
! | |
! Turn caps lock into a control | |
! | |
remove Lock = Caps_Lock | |
keysym Caps_Lock = Control_L | |
add Control = Control_L |
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
CSP.problem = { | |
variables : { | |
v1 : [0, 1], | |
v2 : [0, 1], | |
v3 : [0, 1], | |
v4 : [0, 1], | |
v5 : [0, 1], | |
v6 : [0, 1], | |
v7 : [0, 1], | |
v8 : [0, 1], |
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
Rules | |
===== | |
Starting point: 200 | |
no disadvantages limit | |
Races | |
----- | |
Human, Elves, Dwarves, Orc, Kobolds |
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 express = require('express'); | |
var http = require('http'); | |
var Faye = require('faye'); | |
var app = express(); | |
app.use(express.static(__dirname + '/public')); | |
var bayeux = new Faye.NodeAdapter({ mount : '/faye' }); | |
var server = http.createServer(app); |
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(undefined){ | |
var pico = function(template){ | |
var _regexp = /\{\{(\w*)\}\}/g; | |
return function(data) { | |
return template.replace(_regexp, function(str, key){ | |
return data[key]; | |
}); | |
} | |
}; |
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(Pouch){ | |
if (!Pouch) { throw "No Pouch found!"; } | |
var dbName = "experiment"; | |
var ResponseLogger = function(loggerName){ | |
return function logResponse(err, response){ | |
if (err) { throw err; } | |
console.log(loggerName + ":"); | |
console.log(response); |
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 express = require("express"); | |
var app = express(); | |
app.use("/static", express.static(__dirname + '/public')); | |
var port = process.env.PORT || 3000; | |
app.listen(port); | |
console.log("Listening on port " + port); |