This file contains 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
20150802 | 6 | |
---|---|---|
20150803 | 1 | |
20150804 | 1 | |
20150806 | 1 | |
20150807 | 1 | |
20150809 | 1 | |
20150812 | 3 | |
20150813 | 1 | |
20150815 | 1 | |
20150816 | 2 |
This file contains 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
function toggleSection(toggleObj, id, showtext, hidetext) { | |
var e = document.getElementById('sectionblock'+id); | |
if(toggleObj.innerHTML == showtext) { | |
toggleObj.innerHTML = hidetext; | |
e.style.display = 'block'; | |
} | |
else { | |
toggleObj.innerHTML = showtext; | |
e.style.display = 'none'; | |
} |
This file contains 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
use strict; | |
use warnings; | |
use feature 'say'; | |
package Promise { | |
my $STATE; # = 'PENDING'; | |
my $fulfillvalue; | |
my $rejectreason; |
This file contains 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
use v6; | |
use Test; | |
plan 10; | |
#bare sigils | |
lives_ok { my $ }, 'basic bare sigil $'; | |
lives_ok { my @ }, 'basic bare sigil @'; | |
lives_ok { my % }, 'basic bare sigil %'; |
This file contains 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
proto infix:<=>($, $) is rw { * } | |
multi infix:<=>(Mu \a, Mu \b) is rw { | |
nqp::p6store(a, b) | |
} | |
multi infix:<=>(Mu \a, Nil \b) is rw { | |
if nqp::iscont(a) { | |
nqp::p6store(a, a.VAR.of); | |
} | |
else { X::Assignment::RO.new.throw; } | |
} |
This file contains 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 5.10.0; | |
use strict; | |
use warnings; | |
use Tie::File; | |
my $MAX_LINES = 100_000; | |
my @FIELDS = (7, 8, 9, 14, 17, 18, 19, 25, 30, 31, 35, 36, 37, 43, 44, 46, 47, 50, 52, 55, 62, 63, 66, 67, 68, 75, 76, 77, 81); |
This file contains 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 5.10.0; | |
use strict; | |
use warnings; | |
my $MAX_LINES = 100_000; | |
my @FIELDS = (7, 8, 9, 14, 17, 18, 19, 25, 30, 31, 35, 36, 37, 43, 44, 46, 47, 50, 52, 55, 62, 63, 66, 67, 68, 75, 76, 77, 81); | |
sub nextfilename { |
This file contains 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
program 1 | |
perl6 -n -e '.split(" ")[2].say' 1.txt | |
program 2 | |
perl6 -e 'say [+] $*ARGFILES.lines' 2.txt | |
program 3 | |
perl6 -n -e 'say $_, "\n"' 3.txt | |
program 4 |
This file contains 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
use v6; | |
sub uq(*@vals) { so @vals.bag.values.all == 1 } | |
sub rowN($n, *@vals) { | |
return say "[{@vals.join(',')}]" if $n > 8; | |
for 1..8 -> $new { | |
my @vnew = @vals, $new; | |
my ($i1, $i2) = 0, 0; | |
next if !uq(@vnew) | |
or !uq(@vnew.map: { $_ - ++$i1 }) | |
or !uq(@vnew.map: { $_ + ++$i2 }); |
This file contains 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
use v6; | |
use Lingua::Number; | |
my &to_roman = &roman-numeral; | |
use Test; | |
is to_roman(3), "III", "3 gets converted to III"; |
NewerOlder