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
MAX = 1000 | |
def sum(*list) | |
s = 0 | |
if list.size == 1 then | |
return list | |
end | |
for val in list do | |
s += val | |
end |
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
<?php | |
require_once('./lib/userdata.php'); | |
$consumer_key = $userdata->twitter_consumer_key; | |
$consumer_secret = $userdata->twitter_consumer_key_secret; | |
$oauth_token = $userdata->twitter_access_token; | |
$oauth_token_secret = $userdata->twitter_access_token_secret; | |
$url = 'https://userstream.twitter.com/1.1/user.json'; | |
$method = 'GET'; |
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
<?php | |
// Tumblrに投稿したTagの一括置き換えをする | |
/* action config */ | |
// 置換前の文字列 | |
$search = '-'; | |
// 置換後の文字列 | |
$replace = ' '; | |
// 完全一致のみ置換 -> TRUE, 部分置換 -> FALSE | |
$is_compmatch = FALSE; |
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> | |
<meta charset="UTF-8"> | |
<title>css モンスターボール</title> | |
<style> | |
.monsterball-wrap { | |
height: 140px; | |
width: 140px; | |
float: left; | |
border: solid; |
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
<?php | |
define('CIRCLE_D', 36); | |
for ($k = 0; $k < 100; $k++): | |
list($px, $py) = get_rand_circle(CIRCLE_D / 2); | |
for ($i = 0; $i < CIRCLE_D;$i++) { | |
for ($j = 0; $j < CIRCLE_D;$j++) { | |
if ($i == $py && $j == $px) { | |
echo '='; |
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
<?php | |
list($f,$b)=str_split($_='fibu',sqrt(strlen($_))); | |
preg_match("#(".str_repeat('(.{4})',2).")#","{$f}zz{$b}zz",${"'"}); | |
while(@$__!==@${0}?$_--+--$__*@${''}:$_=$__=ord(@c)):?><?=!($k=++$__-$_).(@${'\''}[(4-!($k%15)-!($k%3)*2-!($k%5))]?:$k)?> | |
<?php endwhile ?> |
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
<?php | |
require_once('keys.php'); | |
/** | |
keys.phpを設置して twitter tokenなどを用意しておく | |
define('CONSUMER_KEY' , '*********'); | |
define('CONSUMER_SECRET' , '*********'); | |
define('OAUTH_TOKEN' , '***-******'); | |
define('OAUTH_TOKEN_SECRET' , '*********'); | |
* | |
*/ |
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="UTF-8"> | |
<title></title> | |
<link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8" /> | |
</head> | |
<body> | |
<div class="case"> | |
<div class="pockey c1"> <div class="stick"></div> <div class="chocolate"></div></div> |
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
.case { | |
background: red; | |
height: 600px; | |
width: 400px; | |
margin: 10px; | |
padding: 10px; | |
border: solid 1px black; | |
} | |
.pockey { |
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
for (var n = 2; n < 20; n++) { | |
print("私は" + n + "FI生" + ((n == (14).toString(n)) ? "です" : "じゃありません")); | |
} |
OlderNewer