define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var PDDLHighlightRules = function() {
var keywordMapper = this.createKeywordMapper({
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
# -------------------------------------------------------------------- | |
# An implementation of the "Recursive Division" algorithm. This is a | |
# kind of fractal maze algorithm, recursively dividing the maze into | |
# smaller and smaller cells. This algorithm stops at the integer | |
# boundary, but theoretically the algorithm could continue infinitely | |
# to smaller and smaller scales. | |
# | |
# Note that this algorithm is implemented as a "wall adder", rather | |
# than a "passage carver", so the meaning of the bits in each cell | |
# is reversed: instead of the S bit (for instance) meaning "a passage |
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
# coding: binary | |
class BMP | |
class Reader | |
PIXEL_ARRAY_OFFSET = 54 | |
BITS_PER_PIXEL = 24 | |
DIB_HEADER_SIZE = 40 | |
def initialize(bmp_filename) | |
File.open(bmp_filename, "rb") do |file| |
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
require 'io/console' | |
# Reads keypresses from the user including 2 and 3 escape character sequences. | |
def read_char | |
STDIN.echo = false | |
STDIN.raw! | |
input = STDIN.getc.chr | |
if input == "\e" then | |
input << STDIN.read_nonblock(3) rescue 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
// var GH = ['#EEEEEE', '#D6E685', '#8CC665', '#44A340', '#1E6823']; /* previous GH colors */ | |
var GH = ['#EBEDF0', '#C6E48B', '#7BC96F', '#239A3B', '#196127']; | |
var CO = ['#EF4B4D', '#F89B47', '#FAEA20', '#7DC242', '#5D94CE', '#855CA7']; | |
var graph = document.getElementsByClassName('js-calendar-graph-svg')[0]; | |
var days = [].slice.call(graph.getElementsByTagName('rect'), 0); | |
days.forEach(function(rect) { | |
switch(rect.getAttribute('fill').toUpperCase()) { | |
case GH[0]: rect.setAttribute('fill', CO[2]); break; // yellow |
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
language: ruby | |
rvm: | |
- 2.0.0 | |
env: | |
global: | |
- USER="username" | |
- EMAIL="[email protected]" | |
- REPO="name of target repo" | |
- FILES="README.md foo.txt bar.txt" | |
- GH_REPO="github.com/${USER}/${REPO}.git" |
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
Warming up -------------------------------------- | |
subtract 233.432k i/100ms # higher is better | |
bitwise & == 164.352k i/100ms | |
bitwise & size 218.548k i/100ms | |
bitwise & [] 200.794k i/100ms | |
contains_all 74.648k i/100ms | |
contains_all_count 112.634k i/100ms | |
set 19.238k i/100ms | |
set cached 194.675k i/100ms | |
all? include? 144.048k i/100ms |