-
start with a queue Q1 of all the live cells followed by a "end of live" tombstone
-
before tombstone reached:
-
pull cell C from queue
-
add C's dead non-queued neighbors to queue
-
add C to queue Q2 if it shall live
-
repeat
-
after "end of live" tombstone reached:
-
put "end of dead" tombstone on Q1
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
title New Browser Setup | |
User->Phone: identifying info | |
Phone->idjump: identifying info | |
idjump->Phone: encrypted blob | |
User->Phone: decrypting info | |
Phone->local storage: decrypted blob |
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
require 'pp' | |
class PatternObject | |
def initialize | |
@patterns = Hash.new | |
end | |
def method_missing(name, *args) | |
candidates = @patterns[name] | |
winner = candidates.detect do |c| | |
c.match args | |
end |
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
irb(main):019:0> q = Qria.new | |
=> #<Qria:0x007fbec8c873f8 @thunks=[]> | |
irb(main):020:0> q.where{|x| x > 5 } | |
=> [#<Thunk:0x007fbec8c74d70 @name=:>, @args=[5]>] | |
irb(main):021:0> q.where{|x| x.match '/^text/'} | |
=> [#<Thunk:0x007fbec8c74d70 @name=:>, @args=[5]>, #<Thunk:0x007fbec8c67698 @name=:match, @args=["/^text/"]>] | |
irb(main):022:0> puts q.to_js | |
function(t) { | |
var i = Riak.mapValuesJson(t)[0]; | |
var c = true; |
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
Application = Rack::Builder.new do | |
use NewRelic::Rack::DeveloperMode | |
map '/cans' do | |
run Cans::Application.new | |
end | |
map '/' do | |
run Sinatra::Application | |
end | |
end |
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
/*This code for a PIC12F615 compiles in mikroC for PIC http://www.mikroe.com | |
It takes an analog value from a dash-mounted potentiometer and drives a MOSFET proportional to the input. The MOSFET pulses the low-side of a blower motor in | |
a 1997 Mitsubishi Mirage, providing 128 speeds*/ | |
void main() { | |
int anin=0, ramped=255; | |
unsigned long temp = 0; |
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
require 'capybara/dsl' | |
include Capybara::DSL | |
Capybara.current_driver = :selenium | |
Capybara.app_host = 'https://ssl.bing.com' | |
# do log in stuff here | |
def slumlord(thing) | |
click_on thing |
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
Day job: | |
Rails developer | |
Favorite Python project: | |
NodeBox | |
Favorite Conference: | |
Scottish Ruby Conference | |
Python Experience Level: |
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 "symbol.h" | |
#include "init.h" | |
void JJ() | |
{ | |
long a,b,r; | |
a = (long)stack_pop(); // (long)stack_pop() turns into this | |
b = (long)stack_pop(); | |
r = a + b; | |
stack_push((stack_entry)r); // stack_push((stack_entry)r) turns into this |