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
#!/usr/bin/perl | |
for $p (1..6) {for $q (1..6) {for $r (1..6) { | |
my @dice = sort { $a <=> $b } $p, $q, $r; | |
$count{join "-", @dice}++; | |
}}} | |
for my $roll (sort keys %count) { | |
printf "%5s %3d %5.2f%%\n", | |
$roll, $count{$roll}, $count{$roll}*100/216; |
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
Delivered-To: [email protected] | |
Received: by 10.76.133.164 with SMTP id pd4csp327526oab; | |
Mon, 14 Oct 2013 15:17:56 -0700 (PDT) | |
X-Received: by 10.182.44.134 with SMTP id e6mr30188804obm.14.1381789076174; | |
Mon, 14 Oct 2013 15:17:56 -0700 (PDT) | |
Return-Path: <[email protected]> | |
Received: from 216459-web1.unfuddle.com (216459-web1.unfuddle.com. [98.129.249.98]) | |
by mx.google.com with ESMTP id gw9si16977581obc.33.1969.12.31.16.00.00; | |
Mon, 14 Oct 2013 15:17:56 -0700 (PDT) |
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
graph g22 { | |
shape=circle; | |
0 [color=blue]; | |
1 [color=green]; | |
2 [color=green]; | |
3 [color=green]; | |
0 -- 1; | |
0 -- 2; | |
0 -- 3; | |
1 -- 4; |
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
# | |
# 123 | |
# 456 | |
# 789 | |
# | |
my @lines = ([1,2,3], [4,5,6], [7,8,9], | |
[1,4,7], [2,5,8], [3,6,9], | |
[1,5,9], [3,5,7], |
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
#!/usr/bin/perl | |
# | |
# http://math.stackexchange.com/questions/457360/splitting-stacks-nim | |
# | |
# | |
my %did; | |
for my $total (1 .. 10) { | |
my $pp = partitions($total); | |
for my $p (@$pp) { |
This file has been truncated, but you can view the full file.
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
Examining: | |
..... | |
..... | |
..... | |
..... | |
..... | |
Examining: | |
333.. | |
333.. |
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
= 26cf20b (HEAD, shared/budget-shutoff-rebase, budget-shutoff-rebase) When a budget cap is mod | |
* 663b74b budgets are now disabled when they are exceeded | |
* aaa0e09 tweaks and cleanups in AlertTrackingLoad.pm | |
= b1ff9c2 New budget_for_date method gets the budget for a given board on a given date | |
* a1c4ccf Start test file for exhausted budget shutoff | |
= 4d7c3b6 get rid of nonportable curdate() in SQL | |
= 6a6e257 tests for budget->enable et al | |
= 23974b3 methods to enable and disable budgets | |
= b0cf6fc add disabled_at field to board_budget table | |
* 3831f98 (shared/master, git-svn, master) discount for unfuddle #4174 |
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
I want to define a type class that supports a scaling operation. This | |
includes polynomials, and various decorated sorts of polynomials. | |
I tried | |
class Num s => Scale s a where | |
scale :: s -> a -> a | |
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
IF var1 IS tiny AND var2 IS tiny AND var3 IS tiny AND var4 IS tiny AND var5 IS tiny AND var6 IS tiny THEN output IS - | |
IF var1 IS tiny AND var2 IS tiny AND var3 IS tiny AND var4 IS tiny AND var5 IS tiny AND var6 IS small THEN output IS - | |
IF var1 IS tiny AND var2 IS tiny AND var3 IS tiny AND var4 IS tiny AND var5 IS tiny AND var6 IS large THEN output IS - | |
IF var1 IS tiny AND var2 IS tiny AND var3 IS tiny AND var4 IS tiny AND var5 IS tiny AND var6 IS huge THEN output IS - | |
IF var1 IS tiny AND var2 IS tiny AND var3 IS tiny AND var4 IS tiny AND var5 IS small AND var6 IS tiny THEN output IS - | |
IF var1 IS tiny AND var2 IS tiny AND var3 IS tiny AND var4 IS tiny AND var5 IS small AND var6 IS small THEN output IS - | |
IF var1 IS tiny AND var2 IS tiny AND var3 IS tiny AND var4 IS tiny AND var5 IS small AND var6 IS large THEN output IS - | |
IF var1 IS tiny AND var2 IS tiny AND var3 IS tiny AND var4 IS tiny AND var5 IS small AND var6 IS huge THEN output IS - | |
IF var1 IS tiny AND var2 IS tiny AND var3 IS tiny AND var4 IS tiny AND v |
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
data Zero | |
data Succ a | |
lower :: Succ a -> a | |
lower = undefined | |
class Modulus a where | |
modulus :: a -> Integer | |
instance Modulus Zero where |