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 | |
| my $letters = shift or die "Specify letters"; | |
| my @letters = split //, $letters; | |
| my $size = shift or die "Specify count"; | |
| open(DICT, "</usr/share/dict/words"); | |
| my $words = {}; |
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 | |
| use strict; | |
| use warnings; | |
| my $dictionary = "/usr/share/dict/words"; | |
| open DICTIONARY, "<$dictionary" or die "$!"; | |
| my $map = {}; | |
| while(my $word = <DICTIONARY>){ | |
| chomp $word; |
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
| import java.math.BigDecimal; | |
| import java.math.RoundingMode; | |
| public class Main{ | |
| private static Transformer<BigDecimal> floor = new BigDecToDiscreteViaFloor(); | |
| private static Transformer<BigDecimal> ceil = new BigDecToDiscreteViaCeil(); | |
| private static Transformer<BigDecimal> round = new BigDecToDiscreteViaRound(); | |
| private static Transformer<BigDecimal> i = new BigDecIdentity(); |
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
| #!/opt/local/bin/perl -w | |
| use strict; | |
| our($fac0, $fac1, $fac2); #keep "use strict" happy | |
| my $num = shift; | |
| #Take 0 | |
| #Everyone's first implementation of factorial (except using function | |
| #pointers instead of functions). Get used to function pointers; I'll be using |
NewerOlder