2008-06-01ãã1ã¶æéã®è¨äºä¸è¦§
Shell ã¯ã©ã¹ããè¦ã¦ $this->Dispatch->stdin ã«æ¨æºå ¥åã®ãã³ãã©ãããã Dispatch->stdin; while (!feof($stdin)) { $buffer = fgets($stdin); // ï¼è¡åå¾ echo $buffer; // ä½ããã®å¦ç } } }
ããããããã°ã¤ã³æ©è½ãæ¤è¨ãã¦ã¿ããAuthComponent ã使ãã¨ããã¿ãããhttp://blog.ne2ma2.com/archives/160 http://blog.ne2ma2.com/archives/161 http://blog.ne2ma2.com/archives/163ã»ã»ã»ååã¯ã©ãããããããããã°ã¤ã³ããªãã¨ã¦ã¼ã¶ã追å ã§â¦
http://d.hatena.ne.jp/ngtn/20080409/1207747539 ããã $this->User->query("SELECT * FROM users"); ã®ããã«ãSQLæãç´æ¥å®è¡ããå ´åãçµæã®ãã¼ã¿ã®æ§é ã find ãªã©ã¨éã£ã¦ããã åãå½¢å¼ã«ããã«ã¯ find ã¡ã½ããã§çºè¡ãã SQLæã¨åããã®ãçâ¦
http://bakery.cakephp.org/articles/view/release-some-rc2-sweetnessããæ°ããã®ãããã£ã¦ããè²ã ãã°ãã£ãã¯ã¹ãã¦ããã ã£ã¦ã æè¿ãªãªã¼ã¹ã®ãã¼ã¹ãããæãã ãã CakePHP 1.2 RC1 -> RC2 cake ãã£ã¬ã¯ããªã¨ app/webroot/{index,test}.php ãâ¦
Sanitize::escape() ã使ããã(試ãã¦ãªã)ãCakePHP 1.1 ã 㨠Sanitaize::sql() ã ã£ããã©ã 1.2 ã«ãªã£ã¦ã©ãã«ç§»åããã®ãåãããªãã£ããããããè¦ã¤ããã
Model::findAll() ã ã¨ããã«ã¡ã¢ãªã¼ä¸è¶³ã«ãªã£ã¦ãã¾ããããªå¦çãã DboSource::fetchRow() ã§é次èªã¿è¾¼ãã°å¤§ä¸å¤«ã $db =& $this->User->getDataSource(); $row = $ds->fetchRow("SELECT * FROM users"); while (!empty($row)) { var_dump($row); // â¦
DboSource::conditions() ã§ã§ãããããã§ãModel::findAll() ã®ããã®æ¡ä»¶ãã¼ã¿($conditions)ããSQLã容æã«ä½æã§ãããDboSource::limit() ã DobSource::order() ã¨ããããã®ã§ã試ãã¦ã¿ãããç´ã«SQLæãæ¸ãã¦ããããã ãã©ãDBå·®ãæ¿ããªãã¦å¤§â¦
Shell ã¯ã©ã¹ãç¶æ¿ãããã¡ã¤ã«ã app/vendors/shells ã®ç´ä¸ã«ããã¨ãcake ã³ãã³ãã§å®è¡ã§ãããããã以ä¸ãåèã«ãªãã http://www.syuhari.jp/blog/archives/185ã¾ããç´°ããã¨ããã¯ãAPIãåèã«ããã¨ããããã http://api.cakephp.org/class_sâ¦
find -name "*.php" | xargs grep -B 1 -A 10 "@deprecated"ã¨ãæã£ã¦èª¿ã¹ããçµæ§ãããããã¤ããéæ¨å¥¨ãªã®ãã¯ä¸æãªãã®ãå¤ããã©ãéæ¨å¥¨ã®é¢æ°ä¸è¦§ã¯ã http://api.cakephp.org/1.2/deprecated.html ã«ã¾ã¨ãã¦ãããã»ã»ã»ããããModel::findAll(â¦
ãã¡ããããããã¤ãããã¯ã¢ãããç¾ç¶ã§ã¯ããã±ãããªãã¡ã¬ã³ã¹ã§åãããªãã¨ããã¯ããããã§èª¿ã¹ããã½ã¼ã¹ãèªãã§ããããã¯ããã¾ã¨ã¾ã£ããã®ãããã¨å©ããã Configurations ACL ã¯ã©ã¹ã®ååãå¤ããã¾ãã Beta : Configure::write('Acl.claâ¦
http://www.oracle.com/technology/products/berkeley-db/db/index.htmlãããããã¤ã®éã«ã(5/20?)ãæ°ãããã¼ã¸ã§ã³ããªãªã¼ã¹ããã¦ãããããã£ããã¥ã¼ã¹ã£ã¦ããããä¸ã«ã¯è©±é¡ã«ä¸ãã£ã¦ããªããã®ã ãã社å ã®ã·ã¹ãã 㧠Berkeley DB 4.6 ãå©ç¨ãâ¦
ãã¥ã¼ã«é¢ãã¦ã¯åä½ã確èªã§ããã ã¢ãã«ã«ã¤ãã¦ç¢ºèªãããã³ã³ããã¼ã©ã§åãåã£ããã§ãã¯ããã¯ã¹ã®ãã¼ã¿ã¯ãé åã«ãªã£ã¦ããã®ã§ã ã¢ãã«ã§ã¯ãã¡ãã£ã¨å·¥å¤«ãå¿ è¦ã以ä¸ã®æ©è½ãå®è£ ããã DBã«ä¿åããéã«ã¯ãã«ã³ãåºåãã§ä¿åããäºã«ããâ¦
ãã¥ã¼ã§ä»¥ä¸ã®æ§ã«ããã¨é¢ç½ããã¨ã«ãªã£ãã checkbox('User.sex.1')?>ç·æ§ checkbox('User.sex.2')?>å¥³æ§ ã³ã³ããã¼ã©ã¼ã§ã¯ã$this->data['User']['sex'] ãé åã«ãªããvar_dump($this->data['User']['sex'] ãã¨ãã¨ã array(2) { [1]=> string(1) "â¦
/cake/libs/view/layouts/default.ctp ãç¨æããã¦ããã®ã§ãããã /app/view/layouts 以ä¸ã«ã³ãã¼ãã¦å©ç¨ããã
FormHelper::month() ãå©ç¨ããã®ã ããCakePHP 1.2.0.7125 RC1ã§ã¯ãè±èªè¡¨è¨ã«ãããã©ããã "monthNames" ãªãã·ã§ã³ã§æå®ã§ããã month('User.birthday', 'now', array('monthNames' => false)) ?> ã§ãæ°å表è¨ã«å¤æ´ãã»ã»ã»ãããã¯ã/cake/libs/â¦
CakePHP ãã±ãããªãã¡ã¬ã³ã¹ãè³¼å ¥ããã http://gihyo.jp/book/2008/978-4-7741-3503-8éçºçãªã®ã§å½ããåãªã®ã ããCakePHP 1.2 ã¯å 容ãã©ãã©ãå¤ãã£ã¦ããæ§ã ã ãã±ãããªãã¡ã¬ã³ã¹ã¯ã CakePHP 1.2.0.6311-beta ãåç §ãã¦ããã
cake/libs/model/datasources/dbo_source.php ã¨ãããã¡ã¤ã«ãããã ãã®ã¯ã©ã¹ãå©ç¨ãããã¨ã§ãç´æ¥SQLãå®è¡ãããã¨ãã§ãããhttp://www.1x1.jp/blog/2008/04/cakephp_php5_dbosource.html ããã useDbConfig); $db->value($hoge); ?> $this->useDBâ¦
CakePHPã«ã¤ãã¦æ å ±åéã«2æ¥ãããå¾ãå©ç¨éå§ãã¦1æ¥ç®ã§ããã£ãç¹ã ç°å¢è¨å®ã§ããã£ã DocumentRoot 以å¤ã«ã³ã³ãã³ããè¨ç½®ããéã®è¨å®ã è¤æ°ã® .htaccess ã« RewriteBase ã追å ããã ä¾ï¼ http://localhost/~okinaka/cake/ ã«ãããã¨ã ~/pubâ¦
Ubuntu (hardy) ã« iPod shuffle ãæ¥ç¶ãã¦ã¿ãã Ubuntu ãã·ã³ã« iPod shuffle ã USB æ¥ç¶ããã¨ãããã«èªèãããã Rythmbox ã®ãããã¤ã¹ãã®æ¬ã« iPod ã表示ãããã åºè·æã®ç¶æ ã§ã¯ Rythmbox ã使ã£ã¦æ²ã追å ã§ããªãã£ãã æ²ããã©ãã°&ããâ¦
ã¹ã¿ã³ãã¢ãã³ã® Java ã¢ããªã±ã¼ã·ã§ã³ã® build.xml ãä½æããã¨ãããããã§ã¹ãã« Main-Class ãæå®ãã¦ããã¨ããã <jar jarfile="${build.dir}/${name}.jar" basedir="${build.dest}"> <manifest> <attribute name="Main-Class" value="${main.class}"/> </manifest> </jar> åèï¼ http://java.sun.com/javase/ja/6/docs/ja/technotes/guides/jar/jar.html
ä»åã"magic_quotes_gpc = On" ã®ç°å¢ã§éçºãããã¨ã«ãªã£ãã®ã§ãä»æ§ç¢ºèªã GPC(Get/Post/Cookie) å¦çã«é¢ãã magic_quotes ã®è¨å®ãè¡ãã¾ãã magic_quotes ã on ã®å ´åã'(ã·ã³ã°ã«ã¯ãªã¼ã)ã" (ããã«ã¯ãªã¼ã)ã\(ããã¯ã¹ã©ãã·ã¥) ãNULL ã«â¦
http://nanasi.jp/articles/howto/file/modeline.html#id10 ãªãã·ã§ã³ ãªãã·ã§ã³(çç¥) 説æ tabstop ts ã¿ããç»é¢ã§è¡¨ç¤ºããéã®å¹ ã shiftwidth sw ã¤ã³ãã³ãæã«ä½¿ç¨ãããã¹ãã¼ã¹ã®æ°ã textwidth tw 0ã§ãªããªãããã®ãªãã·ã§ã³ã§è¨å®ãããå¹ ã§â¦
Debian (etch) ã«å ¥ã£ã¦ãã libsqlite3-ruby ã®ä¸å ·å(ã¨ããã sqlite3 ã®ä»æ§å¤æ´ã«æªå¯¾å¿)ãåå ã§ãsqlite3 ã§ã¯ Rails ããã¾ãåããªããDebian ã®ããã±ã¼ã¸ã®ä»£ããã«ãrubygems ã§ææ°ã® sqlite3-ruby ãåå¾ããã°åé¡è§£æ¶ã gem install sqlite3â¦
http://redmine.jp/tech_note/install/ ãããRedmine ã¯ãRuby on Rails ãã¼ã¹ã®ããã¸ã§ã¯ã管çã·ã¹ãã ãä»åã¯ãRails ã®ãã¼ã¿ãã¼ã¹ã¨ã㦠sqlite3 ãå©ç¨ããã å¿ è¦ãªããã±ã¼ã¸ã®ã¤ã³ã¹ãã¼ã« rubygems 㨠rake ãããã±ã¼ã¸ã§ã¤ã³ã¹ãã¼ã« aptitâ¦