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/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
binmode STDOUT,":utf8"; | |
use Net::Twitter::Lite::WithAPIv1_1; | |
use Time::Piece; |
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/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Data::Dumper; | |
binmode STDIN,":encoding(UTF-8)"; | |
binmode STDOUT,":utf8"; |
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/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
sub fizzbuzz{ | |
my $n = shift; | |
return 'FizzBuzz' if &is_fizz($n) && &is_buzz($n); | |
return 'Fizz' if &is_fizz($n); | |
return 'Buzz' if &is_buzz($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
# fizzbuzz.t | |
use strict; | |
use warnings; | |
use Test::More; | |
require_ok( 'fizzbuzz.pl' ); | |
ok( &fizzbuzz(1) == 1,'1を与えたとき1を返す' ); | |
is( &fizzbuzz(3) , 'Fizz' , '3を与えたときFizzを返す' ); | |
is( &fizzbuzz(6) , 'Fizz' , '3の倍数を与えたときFizzを返す' ); | |
is( &fizzbuzz(5) , 'Buzz' , '5を与えたときBuzzを返す' ); |
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/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use TestPackages::Neko; | |
my $neko1 = Neko->new(); | |
my $neko2 = Neko->new(); |
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 Neko; | |
sub new{ | |
my $class = shift; | |
my $self = { | |
name => 'none', | |
color => 'none' | |
}; | |
return bless $self,$class; | |
} |
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/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
binmode STDOUT,":utf8"; | |
use Data::Dumper; |
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/env perl | |
use strict; | |
use warnings; | |
#use utf8; | |
use Data::Dumper; | |
binmode STDIN,":utf8"; | |
binmode STDOUT,":utf8"; | |
binmode STDERR,":utf8"; |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf8"> | |
<script type="text/javascript"> | |
var $html = ""; | |
for (var i = 1; i <= 100; i++){ | |
if( i % 15 == 0){ | |
$html += "FizzBuzz<br>"; | |
}else if( i % 3 == 0){ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Tyoe" content="text/html" charset="utf-8"> | |
<script type="text/javascript"> | |
var numbers = [[10,50],[48,40,88],[39,77]]; | |
console.log(numbers[1][2]); | |
</script> | |
</head> | |
<body> |
OlderNewer