- 関数がいろいろある
- preg_replace は パターンに
//
がいるけど、mb_ereg_replace はいらない - preg_match はキャプチャできるけど、mb_ereg_match はできない
- preg_replace では動かない正規表現が mb_ereg_replace にしたら動いた
- 正規表現パターンは ruby で正常に動いたので正しいと思う
- こういうの
/\A【[^】]+】/
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
#!/usr/bin/env ruby | |
# http://codekata.com/kata/kata02-karate-chop/ | |
require 'test/unit' | |
def chop(target, values) | |
middle = values.length / 2 | |
return -1 if values.empty? | |
return middle if values[middle] == target |
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
* NeoBundle | |
* ctrl-p or unite |
これまで適当にこんな感じだった
- Evernote に1つノートを作って(タイトル:学んだこと)そこに箇条書きして行く
- 深みが出ない
- 検索性が悪い
- あとでわからないことを見返さない
だんだん更新しなくなった
- Evernote だと埋もれて行ってしまう
!
がプレースホルダである
! - スカラー値を意味し、"そのまま"命令文に挿入されます。
http://pear.php.net/manual/ja/package.database.db.intro-execute.php
否定のSQL文で`status != ?'とか書くと意味の分からないエラーになってパニックになる
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
neocomplcache disabled: "sudo vim" is detected and $HOME is set to your user's home. You may want to use the sudo.vim plugin, the "-H" option with "sudo" or set always_set_home in /etc/sudoers instead. | |
unite.vim disabled: "sudo vim" is detected and $HOME is set to your user's home. You may want to use the sudo.vim plugin, the "-H" option with "sudo" or set always_set_home in /etc/sudoers instead. | |
Press ENTER or type command to continue |
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
<?php | |
namespace Foo¥Bar; | |
class Test | |
{ | |
public function queryWithReconnect($sql, $params) | |
{ | |
while ($count++ < MAX_RETRY_COUNT) { | |
try { |
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
* 設計 | |
* オブジェクト指向設計 | |
* リレーショナルデータベーススキーマ設計 | |
* プログラミング | |
* コーディング力 | |
* プログラミング言語 | |
* ガーベッジコレクションの仕組み | |
* コンパイラの仕組み | |
* 関数型、prolog |
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
git show | |
commit af0ea06f9fa594f52ba8c59be8796900feb167ad | |
Author: Takatoshi Ono <takatoshi.ono@gmail.com> | |
Date: Tue Oct 21 23:53:04 2014 +0900 | |
確認ボタンを押したら個数を input から text にする | |
diff --git a/index.html b/index.html | |
index 33363f5..a85464d 100644 | |
--- a/index.html |