<!-- Free Hosting WebNG.com --> 
<center>
<script type="text/javascript" charset="utf-8">

  var redvase_ad = { version: 1.5 };

  redvase_ad.publisher = 'webng';

  redvase_ad.kind      = 'leaderboard';

  redvase_ad.content   = 'creative'

  redvase_ad.refurl    = encodeURI('**URL_HERE**');

  </script>

<script src="http://redvase.bravenet.com/javascripts/redvase.js" type="text/javascript" charset="utf-8"></script>
</center>
<!-- Free Hosting WebNG.com --> <?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
  <channel>
    <title><![CDATA[○白子○ 的Blog]]></title> 
    <link>http://www6.webng.com/seaboat/</link> 
    <description><![CDATA[关注互联网，拥抱开源，记录工作和生活的点点滴滴]]></description> 
    <language>zh-cn</language> 
    <copyright><![CDATA[Copyright 2009, ○白子○ 的Blog]]></copyright> 
    <webMaster><![CDATA[ouzhiwei@gmail.com (Jlake Ou)]]></webMaster> 
    <generator>LBS v2.0.313</generator> 
    <pubDate>Mon, 23 Nov 2009 04:29:58 -0500</pubDate> 
    <ttl>60</ttl>
  
    <item>
      <title><![CDATA[ExtJS 2.x 的多行工具条实现]]></title> 
      <link><![CDATA[http://www6.webng.com/seaboat/article.asp?id=769]]></link> 
      <category><![CDATA[编程相关]]></category> 
      <author><![CDATA[seaboat <null@null.com>]]></author> 
      <pubDate>Mon, 16 Nov 2009 21:41:48 -0500</pubDate> 
      <description><![CDATA[通常的写法<div class="code">tbar: [{<br />&nbsp;... ...<br />}, {<br />&nbsp;... ...<br />}]</div>这样实现的工具条只有一行。<br /><br />有时候工具条按钮比较多，一行放不下，需要加行。<br />简单的做法是：<div class="code">tbar: new Ext.Panel({<br />&nbsp;border: false,<br />&nbsp;items:[{<br />&nbsp;xtype: &#39;toolbar&#39;,<br />&nbsp;items: [<br />&nbsp;... ...<br />&nbsp;]<br />&nbsp;}, {<br />&nbsp;xtype: &#39;toolbar&#39;,<br />&nbsp;items: [<br />&nbsp;... ...<br />&nbsp;]<br />&nbsp;}, {<br />&nbsp;xtype: &#39;toolbar&#39;,<br />&nbsp;items: [<br />&nbsp;... ...<br />&nbsp;]<br />&nbsp;}]<br />})</div>]]></description>
      <wfw:commentRss><![CDATA[http://www6.webng.com/seaboat/feed.asp?q=comment&id=769]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[GAE 开发最常用的两个命令]]></title> 
      <link><![CDATA[http://www6.webng.com/seaboat/article.asp?id=766]]></link> 
      <category><![CDATA[编程相关]]></category> 
      <author><![CDATA[seaboat <null@null.com>]]></author> 
      <pubDate>Sun, 01 Nov 2009 20:18:05 -0500</pubDate> 
      <description><![CDATA[GAE开发离不开两个很简单的命令，我是想起来才用一下，每次都上搜索引擎查询用法，费时费力，因此这儿做个笔记。<br /><br /><b>命令一</b><br /><span style="color:blue">dev_appserver.py appname</span><br /><br /><b>命令二</b><br /><span style="color:blue">appcfg.py update appname</span><br /><br />详细用法请参考 Google 的文档：<br /><a href="http://code.google.com/intl/ja/appengine/docs/python/tools/devserver.html" title="http://code.google.com/intl/ja/appengine/docs/python/tools/devserver.html" target="_blank">dev_appserver.py</a><br /><a href="http://code.google.com/intl/ja/appengine/docs/python/tools/uploadinganapp.html" title="http://code.google.com/intl/ja/appengine/docs/python/tools/uploadinganapp.html" target="_blank">appcfg.py</a>]]></description>
      <wfw:commentRss><![CDATA[http://www6.webng.com/seaboat/feed.asp?q=comment&id=766]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[Smarty 下最简单的调试方法]]></title> 
      <link><![CDATA[http://www6.webng.com/seaboat/article.asp?id=763]]></link> 
      <category><![CDATA[编程相关]]></category> 
      <author><![CDATA[seaboat <null@null.com>]]></author> 
      <pubDate>Mon, 28 Sep 2009 21:44:44 -0400</pubDate> 
      <description><![CDATA[很简单的一句话，却常常忘记，因此记录一下：<div class="code">{$var|@debug_print_var}</div>稍微复杂一点的用法：<div class="code">{$var|@debug_print_var:2:100}</div>意思是缩进长度为2个空格，每行最多字数为100。<br /><br />其他调试方法可以参考<a href="http://memo.xight.org/2006-11-30-7" title="http://memo.xight.org/2006-11-30-7" target="_blank">这个</a>（日文）]]></description>
      <wfw:commentRss><![CDATA[http://www6.webng.com/seaboat/feed.asp?q=comment&id=763]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[Zend Framework 下实现简单的 proxy 功能]]></title> 
      <link><![CDATA[http://www6.webng.com/seaboat/article.asp?id=761]]></link> 
      <category><![CDATA[编程相关]]></category> 
      <author><![CDATA[seaboat <null@null.com>]]></author> 
      <pubDate>Sun, 13 Sep 2009 21:17:45 -0400</pubDate> 
      <description><![CDATA[用 Zend_Http_Client 可实现简单的 Proxy 功能，代码如下：<div class="code">public function proxyAction()<br />{<br />&nbsp;$params = $this-&gt;_getAllParams();<br />&nbsp;if(!isset($params[&#39;url&#39;])) {<br />&nbsp;echo &#39;URL未指定。&#39;;<br />&nbsp;} else {<br />&nbsp;$http = new Zend_Http_Client($params[&#39;url&#39;]);<br />&nbsp;$response = $http-&gt;request();<br />&nbsp;if ($response-&gt;getStatus() == 200) {<br />&nbsp;header(&#39;Content-Type: text/html; charset=utf-8&#39;);</div>]]></description>
      <wfw:commentRss><![CDATA[http://www6.webng.com/seaboat/feed.asp?q=comment&id=761]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[用于分割字符串的两个 PHP 函数]]></title> 
      <link><![CDATA[http://www6.webng.com/seaboat/article.asp?id=760]]></link> 
      <category><![CDATA[编程相关]]></category> 
      <author><![CDATA[seaboat <null@null.com>]]></author> 
      <pubDate>Wed, 09 Sep 2009 22:16:25 -0400</pubDate> 
      <description><![CDATA[新作了两个函数，结果没用上，放在在这儿以备用。<div class="code">/**<br />&nbsp;* 按词分割字符串<br />&nbsp;* @param $str 元字符串<br />&nbsp;* @param $maxLength 单词最大长度<br />&nbsp;* @return array<br />&nbsp;*/<br />function splitInWords($str, $maxLength = 16) {<br />&nbsp;if(empty($str)) return array();<br />&nbsp;if($maxLength &lt;= 0) $maxLength = 1;<br />&nbsp;$rawWords = explode(&#39; &#39;, $str);<br />&nbsp;$words = array();<br />&nbsp;foreach($rawWords as $word) {<br />&nbsp;$len = mb_strlen($word);<br />&nbsp;if($len &gt; $maxLength) {</div>]]></description>
      <wfw:commentRss><![CDATA[http://www6.webng.com/seaboat/feed.asp?q=comment&id=760]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[给 ExtJS 的输入控件增加提示功能]]></title> 
      <link><![CDATA[http://www6.webng.com/seaboat/article.asp?id=759]]></link> 
      <category><![CDATA[编程相关]]></category> 
      <author><![CDATA[seaboat <null@null.com>]]></author> 
      <pubDate>Wed, 09 Sep 2009 01:49:57 -0400</pubDate> 
      <description><![CDATA[在页面的 js 代码最上层，追加以下代码<br />Ext.override(Ext.form.Field, {<br />    afterRender: function() {<br />        this.initEvents();<br />        this.initValue();<br />        //取得控件的标签<br />        var findLabel = function(field) {<br />            var wrapDiv = null;<br />            var label = null<br />            wrapDiv = field.getEl().up(&#39;div.x-form-element&#39;);<br />            if(wrapDiv) {<br />                label = wrapDiv.child(&#39;label&#39;);        <br />]]></description>
      <wfw:commentRss><![CDATA[http://www6.webng.com/seaboat/feed.asp?q=comment&id=759]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[JavaScript: 判断字符串是否数字]]></title> 
      <link><![CDATA[http://www6.webng.com/seaboat/article.asp?id=758]]></link> 
      <category><![CDATA[编程相关]]></category> 
      <author><![CDATA[seaboat <null@null.com>]]></author> 
      <pubDate>Thu, 03 Sep 2009 02:00:40 -0400</pubDate> 
      <description><![CDATA[一个小小的数字判断功能，也有很多学问。<br />请看解答： <a href="http://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric" title="http://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric" target="_blank">http://stackoverflow.com/questions/18082/validate-numbers-in-javascript-isnumeric</a><br /><br />总结一下文章中提到的方法：<br /><br /><b>1. 内建函数 isNaN</b><br />这个不用多说。<br /><br /><b>2. 正则表达式</b><div class="code">function isNumeric(x) {<br />&nbsp;return /^-?\d*\.?\d+$/.test(x);<br />}</div><br /><b>3. 利用类型变换</b><div class="code">function isNumeric(x) {<br />&nbsp;return parseFloat(x) == x;<br />}</div><br /><b>4. 利用“潜规则”</b><div class="code">function isNumeric(x) {<br />&nbsp;return (x - 0) == x &amp;&amp; x.length &gt; 0;</div>]]></description>
      <wfw:commentRss><![CDATA[http://www6.webng.com/seaboat/feed.asp?q=comment&id=758]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[文本编辑常用正则表达式（不定期更新）]]></title> 
      <link><![CDATA[http://www6.webng.com/seaboat/article.asp?id=757]]></link> 
      <category><![CDATA[编程相关]]></category> 
      <author><![CDATA[seaboat <null@null.com>]]></author> 
      <pubDate>Wed, 02 Sep 2009 21:12:22 -0400</pubDate> 
      <description><![CDATA[从事代码别想工作时间长了，用正则表达式查找替换文本也就成为家常便饭。<br />编辑文本，如果不会用正则表达式，效率要打折扣，这是我的一点体会。<br /><br />记录一下最近常用的表达式：<br /><br />-------------------------------<br />js多余逗号<br /><span style="color:orangered">,[\s\r\n]*\}<br />,[\s\r\n]*\]</span><br />-------------------------------<br />行尾空格<br /><span style="color:orangered">([^\s])\s+$</span><br />-------------------------------<br />一个或多个汉字<br /><span style="color:orangered">[\x{4e00}-\x{9fa5}]+</span><br />-------------------------------<br />php 变量名替换: $var_name -&gt; $varName<br />]]></description>
      <wfw:commentRss><![CDATA[http://www6.webng.com/seaboat/feed.asp?q=comment&id=757]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[EmEditor 下最近常用的两个宏 （自制）]]></title> 
      <link><![CDATA[http://www6.webng.com/seaboat/article.asp?id=754]]></link> 
      <category><![CDATA[编程相关]]></category> 
      <author><![CDATA[seaboat <null@null.com>]]></author> 
      <pubDate>Sun, 09 Aug 2009 21:28:10 -0400</pubDate> 
      <description><![CDATA[编辑代码，总会有经常重复的动作。利用 EmEditor 的宏功能，可以让重复的动作得以轻松实现。<br /><br />以下是最近常用的两个宏:<br /><br /><b>1. 行首空格转Tab（spaceToTab.jsee）</b><div class="code">document.selection.Replace(&quot;^(\\t*)(    )&quot;,&quot;\\1\\t&quot;,eeFindNext | eeFindReplaceCase | eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp);<br />document.selection.Replace(&quot;^\\t+$&quot;,&quot;&quot;,eeFindNext | eeFindReplaceCase | eeFindReplaceEscSeq | eeReplaceAll | eeFindReplaceRegExp);</div>]]></description>
      <wfw:commentRss><![CDATA[http://www6.webng.com/seaboat/feed.asp?q=comment&id=754]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[Zend Framework 重定向方法(render, forward, redirect)总结]]></title> 
      <link><![CDATA[http://www6.webng.com/seaboat/article.asp?id=753]]></link> 
      <category><![CDATA[编程相关]]></category> 
      <author><![CDATA[seaboat <null@null.com>]]></author> 
      <pubDate>Tue, 04 Aug 2009 02:15:42 -0400</pubDate> 
      <description><![CDATA[<b>一. render</b><br /><span style="color:blue">不指定render</span><br />结果： {当前Module}/{当前Controller}/{当前Action}.phtml<br /><br /><span style="color:blue">$this-&gt;render(&#39;bar&#39;) ;</span><br />结果： {当前Module}/{当前Controller}/bar.phtml<br /><br /><b>二. forward</b><br /><span style="color:blue">$this-&gt;_forward(&#39;bar&#39;) ;</span><br />结果： {当前Module}/{当前Controller}/bar<br /><br /><span style="color:blue">$this-&gt;_forward(&#39;bar&#39;, &#39;foo&#39;) ;</span><br />结果： {当前Module}/foo/bar<br /><br /><span style="color:blue">$this-&gt;_forward(&#39;bar&#39;, &#39;foo&#39;, &#39;hoge&#39;) ;</span><br />]]></description>
      <wfw:commentRss><![CDATA[http://www6.webng.com/seaboat/feed.asp?q=comment&id=753]]></wfw:commentRss>
    </item>
      
  </channel>
</rss>
