<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JohnPuPu &#187; program</title>
	<atom:link href="http://blog.johnpupu.tw/category/program/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.johnpupu.tw</link>
	<description>博觀而約取，厚積而薄發</description>
	<lastBuildDate>Sat, 28 Jan 2012 15:43:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>mb_convert_encoding</title>
		<link>http://blog.johnpupu.tw/2010/08/05/mb_convert_encoding/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mb_convert_encoding</link>
		<comments>http://blog.johnpupu.tw/2010/08/05/mb_convert_encoding/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 10:59:11 +0000</pubDate>
		<dc:creator>johnpupu</dc:creator>
				<category><![CDATA[program]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.johnpupu.tw/?p=528</guid>
		<description><![CDATA[mb_convert_encoding 和 mb_substitute_character 搭配服用效果更好~~]]></description>
		<wfw:commentRss>http://blog.johnpupu.tw/2010/08/05/mb_convert_encoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework Widget</title>
		<link>http://blog.johnpupu.tw/2010/05/13/zend-framework-widget/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=zend-framework-widget</link>
		<comments>http://blog.johnpupu.tw/2010/05/13/zend-framework-widget/#comments</comments>
		<pubDate>Wed, 12 May 2010 18:02:35 +0000</pubDate>
		<dc:creator>johnpupu</dc:creator>
				<category><![CDATA[program]]></category>
		<category><![CDATA[ZendFramework]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.johnpupu.tw/?p=499</guid>
		<description><![CDATA[主要是因為之前用Yii 的 Widget 用的挺開心的( 除了他會每次都進一次Cycle 外) 因為用ZF沒找到有這方面相關的資訊 所以自已動手刻&#8230;.. 1. 在application 下建 Titan/Base 的資料夾 ( Titan 是我想把自已寫的東西盡可能的都收在這 ) 2. vim Titan/Base/Widget.php [sourcecode language='php'] < ?php abstract class Titan_Base_Widget { protected $_basePath; protected $_viewBasePath; protected $_viewScriptPath; public function __construct( $array = null ) { //assign variables $this->_basePath = APPLICATION_PATH . DS . &#8216;widgets&#8217;; $this->_viewBasePath = APPLICATION_PATH . [...]]]></description>
		<wfw:commentRss>http://blog.johnpupu.tw/2010/05/13/zend-framework-widget/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Yii 1.1 CActiveRecord 關連的部份修正</title>
		<link>http://blog.johnpupu.tw/2010/01/13/yii-1-1-cactiverecord-%e9%97%9c%e9%80%a3%e7%9a%84%e9%83%a8%e4%bb%bd%e4%bf%ae%e6%ad%a3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=yii-1-1-cactiverecord-%25e9%2597%259c%25e9%2580%25a3%25e7%259a%2584%25e9%2583%25a8%25e4%25bb%25bd%25e4%25bf%25ae%25e6%25ad%25a3</link>
		<comments>http://blog.johnpupu.tw/2010/01/13/yii-1-1-cactiverecord-%e9%97%9c%e9%80%a3%e7%9a%84%e9%83%a8%e4%bb%bd%e4%bf%ae%e6%ad%a3/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 11:07:04 +0000</pubDate>
		<dc:creator>johnpupu</dc:creator>
				<category><![CDATA[program]]></category>

		<guid isPermaLink="false">http://blog.johnpupu.tw/?p=494</guid>
		<description><![CDATA[剛剛用Yii 的AR 寫的很開心, 下了這個 [sourcecode language='php'] $criteria=new CDbCriteria; $criteria->condition=&#8217;products.id=:ID AND products_info.language_id=:languageID&#8217;; $criteria->params=array(&#8216;:ID&#8217;=>$_GET['id'], &#8216;:languageID&#8217; => $this->_lang_id ); $criteria->order = &#8216;products_content.content_orders ASC&#8217;; $model = Products::model()->with( &#8216;products_info&#8217;, &#8216;products_content&#8217; )->find( $criteria ); [/sourcecode] 一直出現 CDbCommand 無法執行 SQL 陳述: SQLSTATE[42S22]: Column not found: 1054 Unknown column &#8216;products.id&#8217; in &#8216;where clause&#8217; 想說怪了&#8230; 再看了一下 sql log [sourcecode language='text'] 543 Query SELECT `t`.`id` [...]]]></description>
		<wfw:commentRss>http://blog.johnpupu.tw/2010/01/13/yii-1-1-cactiverecord-%e9%97%9c%e9%80%a3%e7%9a%84%e9%83%a8%e4%bb%bd%e4%bf%ae%e6%ad%a3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yii Csort With ActiveRecord</title>
		<link>http://blog.johnpupu.tw/2009/10/11/yii-csort/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=yii-csort</link>
		<comments>http://blog.johnpupu.tw/2009/10/11/yii-csort/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 06:31:35 +0000</pubDate>
		<dc:creator>johnpupu</dc:creator>
				<category><![CDATA[program]]></category>
		<category><![CDATA[yii php]]></category>

		<guid isPermaLink="false">http://blog.johnpupu.tw/?p=443</guid>
		<description><![CDATA[controller 部份 [sourcecode language='php'] $sort->attributes= array( &#8216;product.id&#8217;=>&#8217;productId&#8217;, &#8216;product.name&#8217;=>&#8217;productName&#8217;, &#8216;category.name&#8217;=>&#8217;categoryName&#8217;, &#8216;brand.name&#8217; => &#8216;brandName&#8217;, ); /* $sort->attributes= array( &#8216;model中的alias.欄位&#8217;=>&#8217;網址顯示的Alias&#8217;, ); */ [/sourcecode] view 部份 [sourcecode language='php'] < ?php echo $sort->link(&#8216;product.id&#8217;,'編號&#8217;); ?> //< ?php echo $sort->link(&#8216;table.name&#8217;,'網頁顯示的名稱&#8217;); ?> [/sourcecode] model 部份 記得把 relations中的 alias 設好 如下 [sourcecode language='php'] /** * @return array relational rules. */ public function relations() { [...]]]></description>
		<wfw:commentRss>http://blog.johnpupu.tw/2009/10/11/yii-csort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>system() &amp; exec()</title>
		<link>http://blog.johnpupu.tw/2009/06/10/system-exec/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=system-exec</link>
		<comments>http://blog.johnpupu.tw/2009/06/10/system-exec/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 02:33:48 +0000</pubDate>
		<dc:creator>johnpupu</dc:creator>
				<category><![CDATA[program]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.johnpupu.tw/?p=412</guid>
		<description><![CDATA[system() The system() call also tries to automatically flush the web server&#8217;s output buffer after each line of output if PHP is running as a server module. exec() 則不會flush 遇到的問題是 我的php 透過perl 去執行一些功能 然後perl 回傳 success or false 字串 在standard output 上 php再去get 這個字串 success 則print success 給 ajax 來判斷 結果 在前端的ajax 一直印出 successsuccess 的字眼 [...]]]></description>
		<wfw:commentRss>http://blog.johnpupu.tw/2009/06/10/system-exec/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YUI RTE setEditorHTML&#8230;.</title>
		<link>http://blog.johnpupu.tw/2008/11/27/yui-rte-seteditorhtml/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=yui-rte-seteditorhtml</link>
		<comments>http://blog.johnpupu.tw/2008/11/27/yui-rte-seteditorhtml/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 08:22:39 +0000</pubDate>
		<dc:creator>johnpupu</dc:creator>
				<category><![CDATA[program]]></category>
		<category><![CDATA[yui rte]]></category>

		<guid isPermaLink="false">http://blog.johnpupu.tw/?p=343</guid>
		<description><![CDATA[[sourcecode language='js'] var myEditor = new YAHOO.widget.Editor(&#8216;editor&#8217;, config); myEditor.on(&#8216;editorContentLoaded&#8217;, function() { myEditor.setEditorHTML(&#8216;This is my new content&#8217;); }); myEditor.render(); [/sourcecode] 要 listening editorContentLoaded event 才行 沒在editorContentLoaded 裡下&#8230;&#8230;&#8230;&#8230;. myEditor.setEditorHTML(&#8216;This is my new content&#8217;); 沒作用&#8230;&#8230;&#8230;]]></description>
		<wfw:commentRss>http://blog.johnpupu.tw/2008/11/27/yui-rte-seteditorhtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>some YUI RTE note..</title>
		<link>http://blog.johnpupu.tw/2008/11/24/some-yui-rte-note/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=some-yui-rte-note</link>
		<comments>http://blog.johnpupu.tw/2008/11/24/some-yui-rte-note/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 09:15:57 +0000</pubDate>
		<dc:creator>johnpupu</dc:creator>
				<category><![CDATA[program]]></category>
		<category><![CDATA[yui rte]]></category>

		<guid isPermaLink="false">http://blog.johnpupu.tw/?p=335</guid>
		<description><![CDATA[在&#60;body&#62; 這個tag 似乎一定要設 class=&#8217;yui-skin-sam&#8217; 不然會有一些小問題 我之前是設在&#60;div class=&#8217;yui-skin-sam&#8217;&#62;&#60;textarea&#62;&#60;/textarea&#62;&#60;/div&#62; 這樣來解 ..不過&#8230; 用了一陣子才發現&#8230;.class=&#8217;yui-skin-sam&#8217;不是設在body 的話&#8230;. add link 的這個func 會破版&#8230;&#8230;&#8230;&#8230;..css 會整個走掉&#8230;. 本來是沒有很想加 class 在body 的.. 不過突然想到&#8230;.drupal 的 plugin 中也有yui rte 我就去看了一下他是怎麼解的.. [sourcecode language='js'] [/sourcecode] 然後看了一下skin裡面的css 應該是不至於加了這個class 造成新版的走位，所以就照著幹了&#8230;]]></description>
		<wfw:commentRss>http://blog.johnpupu.tw/2008/11/24/some-yui-rte-note/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YUI Rich Text Editor 小記</title>
		<link>http://blog.johnpupu.tw/2008/11/17/yui-rich-text-editor-%e5%b0%8f%e8%a8%98/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=yui-rich-text-editor-%25e5%25b0%258f%25e8%25a8%2598</link>
		<comments>http://blog.johnpupu.tw/2008/11/17/yui-rich-text-editor-%e5%b0%8f%e8%a8%98/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 11:21:52 +0000</pubDate>
		<dc:creator>johnpupu</dc:creator>
				<category><![CDATA[program]]></category>
		<category><![CDATA[yui rte]]></category>

		<guid isPermaLink="false">http://blog.johnpupu.tw/?p=328</guid>
		<description><![CDATA[因為有打算用YUI RTE 來做default 的editor 不過因為有想要在textarea 裡面加入content 的須求 用document.post_form.post_text.value 會沒辦法在&#8221;所見即所得模式&#8221;下有反應 只能在原始碼模式下有作用 翻了一下文件 要用cmd_inserthtml來做 如下 [sourcecode language='js'] myEditor = YAHOO.widget.EditorInfo.getEditorById(&#8216;post_text&#8217;); myEditor.execCommand(&#8216;inserthtml&#8217;, document.post_form.post_text.value); [/sourcecode] 這樣應該就搞定了&#8230;]]></description>
		<wfw:commentRss>http://blog.johnpupu.tw/2008/11/17/yui-rich-text-editor-%e5%b0%8f%e8%a8%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php preg_replace bug ??</title>
		<link>http://blog.johnpupu.tw/2008/11/12/php-preg_replace-bug/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=php-preg_replace-bug</link>
		<comments>http://blog.johnpupu.tw/2008/11/12/php-preg_replace-bug/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 05:25:02 +0000</pubDate>
		<dc:creator>johnpupu</dc:creator>
				<category><![CDATA[program]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.johnpupu.tw/?p=323</guid>
		<description><![CDATA[這個問題在在Zend Framework 中 Zend/Db/Statement.php 裡面 [cc lang="php" tab_size="2" lines="40"] protected function _stripQuoted($sql) { // get the character for delimited id quotes, // this is usually &#8221; but in MySQL is ` $d = $this->_adapter->quoteIdentifier(&#8216;a&#8217;); $d = $d[0]; // get the value used as an escaped delimited id quote, // e.g. \&#8221; or &#8220;&#8221; or \` [...]]]></description>
		<wfw:commentRss>http://blog.johnpupu.tw/2008/11/12/php-preg_replace-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework DB Load Balancing (Master/Slave Database)</title>
		<link>http://blog.johnpupu.tw/2008/08/28/zend-framework-db-load-balancing-masterslave-database/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=zend-framework-db-load-balancing-masterslave-database</link>
		<comments>http://blog.johnpupu.tw/2008/08/28/zend-framework-db-load-balancing-masterslave-database/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 05:47:41 +0000</pubDate>
		<dc:creator>johnpupu</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[program]]></category>
		<category><![CDATA[mysql Zend_Framework php]]></category>

		<guid isPermaLink="false">http://blog.johnpupu.tw/?p=256</guid>
		<description><![CDATA[網路上找來找去&#8230;&#8230; 沒看到有人寫相關的解法&#8230;. 加上不想用mysql-proxy來解這部份&#8230; 所以打算從code 的部份下手 看到最後只能動Zend Framework 的code 了(還沒想到可以不動ZF 的code 而做到DB LB的方法) 我是先從function save 下手去找.. Zend/Table/Row/Abstract.php:    public function save() [sourcecode language='php'] public function save() { /** * If the _cleanData array is empty, * this is an INSERT of a new row. * Otherwise it is an UPDATE. */ if (empty($this->_cleanData)) { return $this->_doInsert(); } [...]]]></description>
		<wfw:commentRss>http://blog.johnpupu.tw/2008/08/28/zend-framework-db-load-balancing-masterslave-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

