Scott Blomquist sblom

View GitHubForWindowsPath.cmd
1
for /f "usebackq delims=*" %%p in (`powershell -Command "& { . $env:LOCALAPPDATA\GitHub\shell.ps1 ; echo $env:path }"`) do set path=%%p
View clojure-reducer.linq
1 2 3 4 5 6 7 8 9 10
List<int> ns = new List<int> { 1, 2, 3, 4, 5, 6, 7, 8 };
 
Func<Func<int,int>,Func<Func<int,int,int>,Func<int,int,int>>> mapping = delegate(Func<int,int> f) {
return (Func<int,int,int> f1) => ((int r, int i) => f1(r,f(i)));
};
 
Func<Func<int,bool>,Func<Func<int,int,int>,Func<int,int,int>>> filtering = delegate(Func<int,bool> pred) {
return (Func<int,int,int> f1) => ((int r, int i) => {
if (pred(i))
return f1(r,i);
View fracgen.m
1 2 3 4 5 6 7 8 9
frac[1] = {{0, 1}, {1, 1}, {1,0}}
frac[n_] := frac[n] = frac[n - 1] ~Riffle~ newFracs[n - 1]
newFracs[n_] := Apply[Plus, #] & /@ Partition[frac[n], 2, 1]
 
(* Example usage: *)
Map[Apply[Divide, #] &, frac[14]]
 
(*
A few very surprising things happen here:
View Example1.m
1 2 3 4 5 6 7 8 9 10
(* Project Euler Problem 1 *)
(* Find the sum of all the multiples of 3 or 5 below 1000. *)
 
(* StreamSource[#&] is a simple idiom for "a stream of all the natural numbers". *)
ints = TakeWhile[StreamSource[# &], # < 1000 &];
 
(* Choose only the numbers that are multiples of 3 or 5. *)
filtered = Select[ints, Mod[#, 3] == 0 || Mod[#, 5] == 0];
 
(* Sum them. Will probably add Stream/:Total[] since it comes up a lot. *)
View Problem1.ma
1
n = 1; While[Total[IntegerDigits[n!]] != 8001, n = n + 1]; n
View VirtualAccessors.cs
1 2 3 4 5 6 7 8 9 10
public class Base {
public virtual int Accessor {
get; set;
}
}
 
public class GetOverride: Base {
public override int Accessor {
get {
return base.Accessor - 1;
View life.ijs
1
life =: 3 : '+./ (1 ,: y) *. 3 4="0 _ +/ +/ 1 0 _1 |."1/"(0 _) 1 0 _1 |./"0 _ y'
Something went wrong with that request. Please try again.