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
# encoding: utf-8 | |
require "twitter" | |
Twitter.configure{ |conf| | |
conf.consumer_key = CONSUMER_KEY | |
conf.consumer_secret = CONSUMER_SECRET | |
conf.oauth_token = OAUTH_TOKEN | |
conf.oauth_token_secret = OAUTH_TOKEN_SECRET | |
} |
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
# encoding: utf-8 | |
# このお店とこのお店は同じ店?! | |
# https://codeiq.jp/ace/fshin2000/q391 | |
searches = [ | |
"中目黒いぐち", | |
"まるかつ水産 東京ミッドタウン店", | |
"寿司寿" | |
] |
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
<?php | |
define("READ_START_SYMBOL", "# ---auto update---"); | |
define("READ_END_SYMBOL", "# ---/auto update---"); | |
// | |
function notify_update($name, $from, $to) { | |
echo "updated '".$name."' from ".$from." to ".$to."\n"; | |
} |
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
/** | |
JS:島の多いエーゲ海 | |
https://codeiq.jp/challenge.php?challenge_id=381 | |
*/ | |
(function(global, undefined) { | |
"use strict"; | |
// 縦か横に隣接する島をすべて沈める(0にする) | |
// 沈められる島が無くなったら終了 | |
function sink(field, x, y) { |
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
function parse(str) { | |
/** | |
演算子順位解析 | |
http://fujimura2.fiw-web.net/java/mutter/operator-precedence/index.html | |
-1: x(パースエラー) | |
0: shift | |
1: reduce | |
2: pop | |
3: end |
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
(function(window, undefined) { | |
"use strict"; | |
var map; | |
var domUtil = { | |
byId: function(id, context) { | |
context = context || document; | |
return context.getElementById(id); | |
}, |
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
/** | |
* 標準入力のパースと汎用関数を提供する | |
* @method parseInput | |
* @param {Boolean} [useSplitSpace] スペースを区切り文字として利用する | |
* @default true | |
*/ | |
function parseInput(useSplitSpace) { | |
var index = 0, | |
ret = [], |
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
var puts = console.log, | |
p = require("util").print, | |
cin = parseInput(); | |
// ここに処理を記述 | |
function parseInput(useSplitSpace) { | |
var index = 0, | |
ret = [], | |
input = require("fs").readFileSync("/dev/stdin", "utf8"), |
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
<?php | |
require_once('workflows.php'); | |
$wf = new Workflows(); | |
$url = "{query}"; | |
// htmlを取得してtitleタグを抜き出し | |
$html = $wf->request($url); | |
preg_match("/<title>(.*?)<\/title>/i", $html, $match); |
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
<?php | |
error_reporting(1); | |
require("workflows.php"); | |
// 設定ファイルに登録されたユーザ名を返す | |
function get_user_name() { | |
$f = fopen("./user", "r"); | |
return fgets($f); | |
} |