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
package main; | |
use strict; | |
use warnings; | |
my $board = Board->new( | |
table => [ | |
[-1,-1, 0, 1, 1,-1,-1], | |
[ 0, 0, 0, 0, 1, 2,-1], | |
[ 0, 8, 0, 2, 2, 2, 0], | |
[ 8, 8, 0, 6, 0, 3, 3], | |
[ 8, 7, 0, 5, 0, 3, 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
<html> | |
<head> | |
<script type="text/javascript"> | |
function push_codes(arr, char1, char2){ | |
for(var i = char1.charCodeAt(0) ; i <= char2.charCodeAt(0); i++){ | |
arr.push( String.fromCharCode(i) ); | |
} | |
} | |
function make_password(alpha, len){ |
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
open(OUT,">test.php"); | |
print OUT "<?php\n"; | |
print OUT "/*\n"; | |
print OUT " ____\n"; | |
print OUT " /__.))ノヽ\n"; | |
print OUT " .|ミ.l _ ._ i.) \n"; | |
print OUT " (^'ミ/.´・ .〈・ リ phpはわしが育てた\n"; | |
print OUT " .しi r、_) | \n"; | |
print OUT " | `ニニ' / \n"; | |
print OUT " ノ `ー―i\n"; |
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 | |
# perlのパスが違う時はここを書き換える | |
# 2008/12/05 コメントを新しく記述 by 高橋 | |
# 2009/02/13 全体的にコメントが足りないので追加 by 高橋 | |
use strict; # おまじない(どこかのサイトで見た気がします) | |
use warnings; # おまじない(どこかのサイトで見た気がします) | |
# @hello配列をmyで宣言する | |
my @hello; | |
# 配列に、Hとeとlとlとoと空白文字( )とWとrとoとlとdと改行文字(\n)を代入 | |
push @hello, 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', "\n"; |
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 AI::NeuralNet::Simple; | |
use GD; | |
my $width = 200; | |
my $height = 200; | |
my @classes = ( | |
{ |
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
package MyFilter; | |
use metaclass 'MooseX::POE::SweetArgs'; | |
use MooseX::POE; | |
has cont => ( | |
isa => 'ArrayRef', | |
is => 'ro', | |
required => 1, | |
); |
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
package MyPmap::Filter; | |
use metaclass 'MooseX::POE::SweetArgs'; | |
use MooseX::POE; | |
use POE::Wheel::Run; | |
has cont => ( | |
isa => 'ArrayRef', | |
is => 'ro', | |
required => 1, | |
); |
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
<html> | |
<body> | |
<script type="text/javascript"> | |
var noReturn = (function () {})(); | |
document.write("NO RETURN:" + noReturn + "<br>"); | |
var explicitReturn = (function () {return false;})(); | |
document.write("EXPLICIT RETURN:" + explicitReturn + "<br>"); | |
</script> | |
</body> | |
</html> |
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/local/bin/perl | |
use strict; | |
use warnings; | |
sub usage{ | |
die "USAGE: $0 MIHH MIHH"; | |
} | |
sub format_cmd{ |
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
-- http://projecteuler.net/index.php?section=problems&id=4 | |
intToPalindrome :: (Num a, Read a) => a -> a | |
intToPalindrome x = x * 1000 + ( read . reverse . show) x | |
palindromes = [intToPalindrome n | n <- [999,998..100] ] | |
is3by3 n = or $ map (\m -> and [n `mod` m == 0, is3 $ n `div` m]) [100 .. 999] | |
where is3 l = and [l >= 100, l < 1000] |
OlderNewer