-
Jubatus サーバのタイムアウト機能を使用したくないユーザ (
--timeout 0
) の救済方法を検討する- 解決策: クライアントから close できるインタフェースを用意する (Jubatus クライアントを修正)
-
Jubatus サーバのタイムアウト機能を使用したいユーザの救済方法を検討する
- サーバから timeout で自動切断(サーバから TCP FIN パケット送信)された後に RPC メソッドを呼んだ際に RPC エラーが起きるのが不親切 (C++/Python/Ruby のみ)
-
解決策の案(松): サーバから受け取った FIN リクエストを正しくハンドリングするように修正 (msgpack-rpc ライブラリを修正)
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
<? | |
function hash_value($obj, $keys){ | |
if(empty($keys)) return $obj; | |
$key = array_shift($keys); | |
if(isset($obj[$key])){ | |
return hash_value($obj[$key], $keys); | |
}else{ | |
return ''; | |
} | |
} |
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
--- sample1 --- | |
(`・ω・´) | |
(´・ω・`) | |
(´・m・`) | |
(`・ω・´) | |
(´・ω・`) | |
(´・m・`) | |
(`・ω・´) | |
--- sample2 --- | |
| |
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
;; | |
;;; u-nya-mode | |
(defun cyclic (xs) | |
(setcdr (last xs) xs) | |
xs) | |
(defvar u-nya:message-list nil) | |
;; (defvar u-nya:update-hook nil) |
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
# 参考URL: http://d.hatena.ne.jp/gmaxlab/20090329/1238329567 | |
import httplib, ssl | |
#HTTPで上手くいく場合 | |
http_session = httplib.HTTPConnection("squidのドメイン", 8080) | |
http_session.request("GET", "http://yahoo.co.jp/") | |
r1 = http_session.getresponse() | |
print r1.status, r1.reason | |
#HTTPSで失敗する場合 |
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
from zope.interface.registry import Components | |
from zope.interface import Interface | |
from zope.interface import Attribute | |
from zope.interface import provider | |
from zope.interface import implementer | |
## global registry | |
_global_registry = None | |
def global_registry(): | |
return _global_registry or Components() |
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
;; CPSスタイル.これは、実は非同期処理など結果がいつ計算されるか分からない場合のモデル。 | |
;; 通常の同期処理とは異なり、引数のcontがいつ計算されるかは分からないが、*準備*ができたときcontに渡され次の計算が行われる。 | |
(define (add1 x cont) | |
(cont (+ x 1))) | |
(define (mul2 x cont) | |
(cont (* x 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
# -*- coding:utf-8 -*- | |
## why define like a this? | |
def _get_getter(o, attribute_string): | |
return lambda : _getter(o, attribute_string) | |
def _getter(o, attribute_string): | |
for k in attribute_string.split("."): | |
o = getattr(o, k) | |
return o |
つづきはこちらで http://akkunchoi.github.com/git-ref.html
Git
$ git init hoge # git リポジトリを作成。または...
OlderNewer