View brainfuck_interpreter.hs
import Data.Char
data VM = VM {
mem :: [Int],
ptr :: Int
}
tPlus = '+'
tMinus = '-'
tDot = '.'
View discount_code_creation.go
package main
import "gopkg.in/resty.v1"
import "fmt"
import "log"
import "strconv"
import "sync"
func main() {
var wg sync.WaitGroup
View look_ahead_lookup_table.rb
require 'pp'
class RuleOption
attr_accessor :parts
def initialize(*parts)
@parts = parts
end
end
View parse_json.hs
-- Custom data types
data Value = ValueString String | ValueInt Int | ValueJson Json deriving (Show)
data KeyValuePair = KeyValuePair String Value deriving (Show)
data Json = JsonObject [KeyValuePair] | JsonArray [Value] deriving (Show)
-- Decoder
decode :: String -> Value
decode raw = v
View match_search.rb
## CONSTS #####################################################################
PERSON_NUM = 32
# Number of meeting iterations.
ITERATION = 64
## METHODS ####################################################################
# Generates start-state meetings with the number of iterations
def generate_old_meetings
View rubik.rb
require 'pp'
class Cube
attr_accessor :cells
def initialize
@cells = {
top: [0] * 9,
front: [1] * 9,
left: [2] * 9,
View add_frozen_heading.rb
# Call: ruby add_frozen_heading.rb PATH_TO_FOLDER
dir = ARGV[0] || ''
if !Dir.exist?(dir)
puts 'Missing folder.'
exit
end
def check_headers(dir)
# puts "Inspect #{dir}"
View ruby_prof_diff.rb
require 'pp'
require 'ostruct'
require 'cgi'
class CallChild
attr_accessor(
:file,
:method,
:callee_called,
:callee_line,
View diff_inverter.cpp
#include <iostream>
#include <fstream>
#include <sstream>
using namespace std;
int main(int argc, char* argv[]) {
ifstream file(argv[1]);
string s;
View mod_timing.c
#include "httpd.h"
#include "http_core.h"
#include "http_protocol.h"
#include "http_request.h"
#include <time.h>
#include <syslog.h>
/**
* Definitions.