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 jp.s5r; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class MapBuilder<K, V> { | |
private Object[] objects; | |
public MapBuilder(Object[] args) { | |
if (args.length % 2 != 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
19:38 mashiro_: 唐揚げ食べたい | |
19:38 mashiro_: かららげげとそそあ | |
19:38 mashiro_: からあげおとさけ | |
19:38 shunirr: そそさ | |
19:38 shunirr: そそあ | |
19:38 ssig33: そそあ | |
19:38 mashiro_: 唐揚げとおお酒 | |
19:38 shunirr: からあげとそそあ食べたい | |
19:39 ssig33: そそあ食べたいですね | |
19:39 mashiro_: そそあたべよう |
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
class Twitter::Client | |
def rest_request_uri(path, params = nil) | |
uri = "#{self.class.config.path_prefix}/1#{path}" | |
uri << "?#{params.to_http_str}" if params | |
p uri | |
uri | |
end | |
def uri_components(service = :rest) | |
case service |
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
#include<stdio.h> | |
int main(void) { | |
int i = 10; | |
printf("%d¥n", i); | |
return 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
# ホットスタンバイがバックアップじゃないとかその手の話はとりあえず置いておきます | |
# | |
# なぜこんな間抜けな事故が起きたかについてだけ想像 | |
# | |
# 1. いろんなサーバーメンテナンスをスクリプトでやっていた | |
# 2. スクトプトは随時使い回したり書き換えたりして使っていた | |
# | |
# という状態であったと推測する。中小規模自社サービスとかやってるところとかもわりとこ | |
# うなんじゃないですかね。ホスティングでそのレベルでいい加減なのどうなんでしょうか。 | |
# |
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
typedef struct { | |
int *p; | |
} Mashiro; | |
void fuga(const Mashiro& a) | |
{ | |
Mashiro b = a; // コピーされる | |
*(b.p) = 20; // アドレスごとコピーされているので、これは a.p に影響する | |
} |
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
FacebookIrcGateway | |
開発と今後について | |
@shunner | |
闇 RubyKaigi について |
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
# 実装見てない and 記憶だけで書く | |
# 現状 | |
# status | |
@typablemap.push [status_oid, status_object] | |
# comment | |
@typablemap.push [comment_oid, parent_status_object] |
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
D, [2011-05-23T18:43:17.910217 #8783] DEBUG -- : RECEIVE: PRIVMSG #facebook :re sa いいえ、おなかがすきました。 | |
D, [2011-05-23T18:43:18.606925 #8783] DEBUG -- : SEND: :FacebookIrcGateway NOTICE #facebook コマンド実行すると思った?でも残念、さやかちゃんでした! | |
E, [2011-05-23T18:43:18.607073 #8783] ERROR -- : ./lib/facebook_irc_gateway/server.rb: 305L | |
E, [2011-05-23T18:43:18.607115 #8783] ERROR -- : #<OAuth2::HTTPError: Received HTTP 400 during request.> | |
E, [2011-05-23T18:43:18.607152 #8783] ERROR -- : /home/kuniyoshi/FacebookIrcGateway/vendor/bundle/ruby/1.8/gems/oauth2-0.4.1/lib/oauth2/client.rb:83:in `request' | |
E, [2011-05-23T18:43:18.607189 #8783] ERROR -- : /home/kuniyoshi/FacebookIrcGateway/vendor/bundle/ruby/1.8/gems/oauth2-0.4.1/lib/oauth2/access_token.rb:34:in `request' | |
E, [2011-05-23T18:43:18.607225 #8783] ERROR -- : /home/kuniyoshi/FacebookIrcGateway/vendor/bundle/ruby/1.8/gems/oauth2-0.4.1/lib/oauth2/access_token.rb:42:in `post' | |
E, [2011-05-23T18:43:18.607261 #8783] ERROR -- : /home/kuniyoshi/FacebookIrcGateway/v |
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
datas = API からデータを拾ってくる() | |
datas.each do |data| | |
status_object_id = data.id | |
unless DB.duplication?(status_object_id) | |
DB.insert("objects_table", :object_id => status_object_id, :data => data) | |
DB.insert("relations", :parent_id => "me" :object_id =>status_object_id) | |
ステータスを表示する | |
end |