2012-05-01から1ヶ月間の記事一覧
公式ドキュメントにも記載されていますが、 案外はまってしまうことも多い仕様のため、自戒の意味で。 FormHelper — Cookbook v2.x documentationFormHelperのControllerおよび、actionを自由に変更する方法。 Form->create(null, array('url' => '/recipes/…
MacOS Lion環境下で、ターミナルからMAMPのMySQL文字コードを変更するフロー $ cd ~/Applications # 次の処理はApplicationsディレクトリ下のMAMPのインストールを確認するフロー $ find /Applications -type d -name "MAMP" # MAMPのディレクトリへ移動 $ c…
使用しているOSはLionになります。あまり、適切な解放が紹介されていないようです。 http://stackoverflow.com/questions/641017/unable-to-find-applications-folder-in-macs-terminal find /Application -type d -name "*.app"
Model::hasAnyとはCake/lib/Model/Model.phpを参照すると以下のように定義されている。(2597行目) public function hasAny($conditions = null) { return ($this->find('count', array('conditions' => $conditions, 'recursive' => -1)) != false); } つ…
jQueryで(nの倍数)番目の要素だけに処理する例えば、4の倍数番目だけmargin-rightを取り除くといった処理。 $('.book_container').each(function(i){ if(((i+1)%4) == 0){ $(this).css({'margin-right': '0px'}); } }); DOMに対してeachでループする際、fu…