~/project/mobacon-pre (master) tree -L 1
.
├── Gemfile
├── Gemfile.lock
├── Procfile
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
use strict; | |
use warnings; | |
# XXX 素数定理の int ($N*log($N) + $N*log(log($N)) + 1) で抑えて計算したいけど、 | |
# この近似値だとゆるすぎたので、10000番目の素数を決め打ちで、、。 | |
my $max = 104729; | |
# 問題文で与えられているものは事前準備 | |
my $res = 28; # 5番目までの素数の和 | |
my @composites = (); |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=320,height=device-height,user-scalable=0"> | |
<script type="text/javascript"> | |
window.onload = function(){ | |
draw(); | |
} | |
function draw() { |
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
<!doctype html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<img id="hoge" /> | |
<script> | |
var img = new Image(); |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8" /> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
</head> | |
<body> | |
hello!! | |
<div id="hoge"></div> | |
<script> |
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
use 5.10.0; | |
use strict; | |
use warnings; | |
#perl -E 'say for q{12345 #123456 � #12345678; �} =~ /(?<!&)#([0-9]+)/g' | |
for my $message ('12345', '#123456', '�', '#12345678;', '�') { | |
if ($message =~ m/#([0-9]+)/) { | |
unless ($message =~ m/&#$1/) { | |
say $1; |
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
<script id="hoge" type="application/json" src="hoge.json"></script> | |
<script> | |
console.log(document.getElementById("hoge")); // -> script#hoge | |
// hoge.jsonの中身にアクセスする方法ある? | |
// 次のようなことがしたい | |
var json = JSON.parse(document.getElementById('hoge').GREAT_ACCESSOR()); | |
// xhr使えよ? | |
</script> |
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
use strict; | |
use warnings; | |
use feature 'say'; | |
say join ':', split '', 'abc'; |
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/env perl | |
use 5.10.0; | |
use strict; | |
use warnings; | |
use Test::More; | |
sub hoge { | |
my %ret; | |
for my $row (@_) { |
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/env perl | |
use 5.10.0; | |
use strict; | |
use warnings; | |
use Test::More; | |
sub hoge { join ',', ('?') x @_ } | |
is hoge(qw/1 3 4 5/), '?,?,?,?'; |
OlderNewer