2007-02-01から1ヶ月間の記事一覧

Stringオブジェクト、なんちゃって拡張

String.prototype.ucFirst = function () { return this.substr(0,1).toUpperCase() + this.substr(1,this.length); }; String.prototype.lcFirst = function () { return this.substr(0,1).toLowerCase() + this.substr(1,this.length); }; String.prototyp…

mootooles.jsのAjax.request()にX-REQUESTED-WITHヘッダを追加

prototype.jsと同じリクエストヘッダを追加するオーバライド? 追加するヘッダ:X-REQUESTED-WITH: XMLHttpRequest 意味あんのか? Ajax.implement({ request: function(){ this.transport.open(this.options.method, this.url, this.options.async); this.t…

svn mergeについて

branch2.0の-r100 から -r120までの変更をtrunkに反映させる(trunkのディレクトリ内で実行) テスト実行(実際のファイルには反映されない) $ svn merge --dry-run -r 100:120 svn+ssh://oppara@ibook-g4/path/to/project/branches/2.0 実行 $ svn merge -r …

対話・引数

sh

対話 echo 'Get it? [y/n]' read ANS if [ $ANS = 'y' -o $ANS = 'yes' ]; then echo 'ゴリ.' else echo '...' fi 引数 if [ -z $1 ]; then echo "Usage: $0 xxx" else echo $1 fi exit 0