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
# -*- coding: utf-8 -*- | |
import sys | |
try: | |
xrange | |
except NameError: | |
xrange = range | |
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
### | |
### templating.php | |
### | |
<?php | |
function h($str) { | |
return htmlspecialchars($str, ENT_QUOTES, 'UTF-8'); | |
} | |
function print_template($template_filename, $vars) { ## テンプレートへの値は連想配列$varsで渡す |
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
## ループ | |
def sum(xs): | |
t = 0 | |
for x in xs: | |
t += x | |
return t | |
## 再帰呼び出し | |
def sum(xs): | |
if not xs: |
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
# -*- coding: utf-8 -*- | |
- page: 55 | |
text: "暗号化したパスワード文字列を送信する「md5」方式" | |
comment: MD5 はハッシュ値を計算するだけであり、暗号化するわけではないのでは? | |
- page: 69 | |
item: 表4-3 | |
text: "同時に実行されている他のトランザクションが書き込んでいるがコミットされていないデータを読み込んでしまう" | |
comment: "同時に実行されている他のトランザクションが、書き込んでいるがコミットされていないデータを読み込んでしまう" |
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
# -*- coding: utf-8 -*- | |
import re | |
class matching(object): | |
def __init__(self, string): | |
self.string = string | |
self.matched = None |
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
# -*- coding: utf-8 -*- | |
import sys, re | |
from benchmarker import Benchmarker | |
try: | |
xrange | |
except: | |
xrange = range |
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
# -*- coding: utf-8 -*- | |
import sys, re | |
from benchmarker import Benchmarker | |
try: | |
xrange | |
except: | |
xrange = range |
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
# -*- coding: utf-8 -*- | |
import sys, re | |
from benchmarker import Benchmarker | |
try: | |
xrange | |
except: | |
xrange = range |
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
// -*- coding: utf-8 -*- | |
// ベースとなる設定 | |
var config_common = { | |
name: 'My Application', | |
mode: null, | |
secret: null, | |
db: { | |
host: 'localhost', | |
port: 9876, |
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 Length(value, uom) { | |
this.value = value; | |
this.uom = uom || "cm"; | |
} | |
function Square(length, uom) { | |
this.length = new Length(length, uom); | |
} | |
function Colored(figure, r, g, b) { |