I hereby claim:
- I am hadronzoo on github.
- I am joshua (https://keybase.io/joshua) on keybase.
- I have a public key whose fingerprint is 23CE 2108 CFCE 83A5 B09C B4CE ADF9 100C 2284 C5DB
To claim this, I am signing this object:
| % Run a Monty Hall problem simulation with the following parameters: | |
| % | |
| % changeDoors: boolean determining whether the contestant should change | |
| % doors | |
| % | |
| % doors: the number of doors in the problem, with a minimum of 2 | |
| % | |
| % N: the number of problem simulations to perform, with a minimum | |
| % of 1 | |
| % |
| require 'dm-core' | |
| DataMapper.setup(:default, 'sqlite::memory:') | |
| class Project | |
| include DataMapper::Resource | |
| property :id, Serial | |
| has n, :members | |
| has n, :users, :through => :members |
| diff --git a/interfaces/emacs/imaxima/imaxima.el b/interfaces/emacs/imaxima/imaxima.el | |
| index e3feaa6..3a52a0b 100644 | |
| --- a/interfaces/emacs/imaxima/imaxima.el | |
| +++ b/interfaces/emacs/imaxima/imaxima.el | |
| @@ -296,6 +296,8 @@ nil means no scaling at all, t allows any scaling." | |
| (temp-directory)) | |
| ((eql system-type 'cygwin) | |
| "/tmp/") | |
| + ((eql system-type 'darwin) | |
| + "/tmp/") |
| module DataMapper | |
| module Model | |
| alias _load load | |
| def load(records, query) | |
| p "here" | |
| r = _load(records, query) | |
| end | |
| end |
| (deftype TestType [key] | |
| IHash | |
| (-hash [this] | |
| (hash key))) | |
| (def a (TestType. [1 2 3])) | |
| (def b (TestType. [1 2 3])) | |
| ;; the resulting PersistentHashSet should have one item, but has two: | |
| (.log js/console (pr-str (conj #{} a b))) |
| (defn gaps [coll] | |
| "Find gaps in collection coll, containing a sequence of monotonic integers" | |
| (letfn [(intervals [[cur & rst] prev] | |
| (when cur | |
| (cons [(inc prev) (dec cur)] | |
| (lazy-seq (intervals rst cur)))))] | |
| (lazy-seq | |
| (when-let [[cur & rst] (seq coll)] | |
| (remove (fn [[x y]] (> x y)) | |
| (intervals rst cur)))))) |
| #include<stdio.h> | |
| #include<stdlib.h> | |
| struct list_node { | |
| int val; | |
| struct list_node *next; | |
| }; | |
| int node_size = sizeof(struct list_node); |
| #include<stdio.h> | |
| #include<stdlib.h> | |
| int *add_counts(char *corpus, int *counts) { | |
| int i = 0; | |
| while (corpus[i]) { | |
| counts[corpus[i]]++; | |
| i++; | |
| } | |
| return counts; |
I hereby claim:
To claim this, I am signing this object: