<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Joshua Chi</title><link>http://freetofeel.com/</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/freetofeel" /><language>en</language><managingEditor>joshokn@gmail.com (Joshua Chi)</managingEditor><lastBuildDate>Sun, 22 Jan 2012 06:37:50 PST</lastBuildDate><feedburner:info uri="freetofeel" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><description></description><item><title>年末总结(Dragon Year Wish List)</title><link>http://feedproxy.google.com/~r/freetofeel/~3/kn-JtMY08Tc/dragon-year.html</link><pubDate>Sun, 22 Jan 2012 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2012/01/22/dragon-year</guid><description>&lt;p&gt;开始慢慢享受除夕之夜了。最尽意的莫过于总结过去，展望明年。
今年除夕只是飘着小雪，但家乡依然比上海冷。
过去的一年我真的努力尝试去喜欢上海，去适应它。尽管为此我已经付出了代价。2011年，身体状况不佳，这个倒是给我提了一个很大的醒。
2011年10月份开始，着实让我体会到了忙，所有的事情交织在一块，忙的我正事都来不及做了。&lt;/p&gt;

&lt;h3&gt;2011 完成的目标&lt;/h3&gt;




&lt;ul&gt;
  &lt;li&gt;
    &lt;del&gt;结婚，自己都觉得不好意思了；&lt;/del&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;del&gt;下半年装修；&lt;/del&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;del&gt;完成学车；&lt;/del&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;del&gt;回家把护照给办了；&lt;/del&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;del&gt;希望可以在工作中做的更多，得到更大的认可。&lt;/del&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;del&gt;和亲戚朋友多联系，2010年，我们联系的太少了；&lt;/del&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;del&gt;争取做一次说的过去的远徒旅行或者国外旅行一次 :-)；&lt;/del&gt;    
  &lt;/li&gt;
  &lt;li&gt;
    &lt;del&gt;多写点有价值的文章&lt;/del&gt;    
  &lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;2011 未完成的事情&lt;/h3&gt;




&lt;ul&gt;
  &lt;li&gt;
    上线一个新的产品， 如果有精力将其它几个产品打包上线 -- &lt;br /&gt;事情多蹉跎，这个是我最想做的事情，在最后的几个月只能被搁置，完成率60%。
  &lt;/li&gt;
  &lt;li&gt;
    在互联网上混的更实在，看到这领域太多的肤浅和吹嘘 -- &lt;br /&gt;因为第一次定目标，此目标定的太虚。想的没有用实体表达出来，以至目前无法测量。  
  &lt;/li&gt;
  &lt;li&gt;
    寻找一种锻炼身体的方式，这个是最急切的任务 -- &lt;br /&gt;尝试了去打羽毛球，也确实坚持了半年多，但最后还是级别太低，没能最后坚持下来。  
  &lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;2012 TODO LIST：&lt;/h3&gt;




&lt;ul&gt;
  &lt;li&gt;
    强身健体第一位，具体目标是锻炼腰部腹部肌肉，提高身体协调能力。
  &lt;/li&gt;
  &lt;li&gt;
    职业发展： &lt;br /&gt;
    a. 空间的预测;&lt;br /&gt;
    b. 时间的估计，把持重点;&lt;br /&gt;
    c. Have a better idea about how to manage team and how to manage company.
  &lt;/li&gt;
  &lt;li&gt;
    增加静心休息的时间。
  &lt;/li&gt;
  &lt;li&gt;
    买车。
  &lt;/li&gt;
  &lt;li&gt;
    读书&gt;=15本；&lt;br /&gt;
    电影&gt;=5;&lt;br /&gt;
  &lt;/li&gt;
  &lt;li&gt;
    完成网站建设，其实现在已经不再是为了完成而完成了。练手；练脑；提高思维的整体性，连续性，可扩展性。
  &lt;/li&gt;
  &lt;li&gt;
    蜜月履行。
  &lt;/li&gt;
  &lt;li&gt;
    去年的时间管理基本满意，需要继续坚持下来。
  &lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;2012 WISH LIST：&lt;/h3&gt;


&lt;p&gt;祝福我，我的家人，我认识的亲戚朋友身体健健康康！&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/kn-JtMY08Tc" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2012/01/22/dragon-year.html</feedburner:origLink></item><item><title>How And When To Use Mysql Federated Storage Engine</title><link>http://feedproxy.google.com/~r/freetofeel/~3/qVoYND3UwMM/mysql-federated-engine.html</link><pubDate>Mon, 01 Aug 2011 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/08/01/mysql-federated-engine</guid><description>&lt;p&gt;Learned from &lt;a href='http://conferences.oreillynet.com/presentations/mysql06/mixi_update.pdf'&gt;mixi update&lt;/a&gt; that they are using mysql federated engine for db partitioning.&lt;/p&gt;

&lt;pre&gt;
Use FEDERATED TABLE from MySQL 5.
Or do SELECT twice which is faster than using FEDERATED TABLEs
&lt;/pre&gt;


&lt;p&gt;&lt;a href='http://dev.mysql.com/doc/refman/5.0/en/federated-storage-engine.html'&gt;Mysql Official document&lt;/a&gt; didn't talk too much about how and when to use federated engine. You can learned more from &lt;a href='http://www.xaprb.com/blog/2007/01/29/mysqls-federated-storage-engine-part-1/'&gt;Mysql Federated storage engine 1&lt;/a&gt; and &lt;a href='http://www.xaprb.com/blog/2007/01/31/mysqls-federated-storage-engine-part-2/'&gt;Mysql Federated storage engine 2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Finally I find some clues in &lt;a href='http://www.xaprb.com/blog/2007/01/31/mysqls-federated-storage-engine-part-2/'&gt;Mysql Federated storage engine 2&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;
Strengths:

For example, pretend you have a set of distributed servers working on small parts of a large task, and their results need to be merged back together when done without conflict. Many solutions to this problem involve modulo arithmetic for generating primary keys. This could be a good use of a FEDERATED table: just federate one central table on all the servers, have the processes INSERT into the table, and they’ll get non-conflicting primary key numbers. That’s a trivially easy way to coordinate distributed resource requests.

The way it lets you mis-define tables holds great potential. For example, Giuseppe Maxia has already noted that you can define a FEDERATED table against a view. Views don’t have indexes (yet), but that shouldn’t stop you from telling the engine it does! That way, your WHERE clauses are sent through to the remote server unharmed, where the view can execute GROUP BY queries and the like. Giuseppe even outlines a way to get the remote server to execute arbitrary commands via a FEDERATED table!

What about combinations with replication, triggers and so forth? There must be many more cool hacks waiting to be discovered.

&lt;/pre&gt;


&lt;p&gt;And in &lt;a href='http://mysql.lamphost.net/tech-resources/articles/mysql-federated-storage.html'&gt;Accessing Distributed Data with the Federated Storage Engine&lt;/a&gt;, you can find a simple demo that 'merge' two partioned tables into one by creating a view. Although, this is not what I expected. It will still make sense in some cases.&lt;/p&gt;

&lt;p&gt;Still have some questions about how the performance looks like when use view? And what's the limitation of rows or table size when using federated storage engine?&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/qVoYND3UwMM" height="1" width="1"/&gt;</description><enclosure url="http://conferences.oreillynet.com/presentations/mysql06/mixi_update.pdf" length="2205015" type="application/pdf" /><feedburner:origLink>http://freetofeel.com/2011/08/01/mysql-federated-engine.html</feedburner:origLink></item><item><title>Form Ajax Submit With Jquery Form Plugin</title><link>http://feedproxy.google.com/~r/freetofeel/~3/VBN6a1qrXFY/jquery-ajax-file-upload-with-symfony4.html</link><pubDate>Tue, 26 Jul 2011 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/07/26/jquery-ajax-file-upload-with-symfony4</guid><description>&lt;p&gt;I can't remember how I make file ajax upload work last time. So a blog might be the best place to record it.&lt;/p&gt;

&lt;p&gt;Because &lt;a href='http://en.wikipedia.org/wiki/Xmlhttprequest'&gt;XMLHttpRequest&lt;/a&gt; didn't support file upload, and I didn't want to spend much time to hack it. So it might be simple to find a plugin to do it. I compared several plugins supporting file ajax upload.&lt;/p&gt;

&lt;p&gt;At last I choose &lt;a href='http://malsup.com/jquery/form/'&gt;Jquery Form Plugin&lt;/a&gt;. Althrough it didn't sound like it supposed to be. Especially there is file field in your form. And the data format that client communicate with server is &lt;a href='http://en.wikipedia.org/wiki/Json'&gt;json&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So what does it look like?&lt;/p&gt;

&lt;p&gt;JS Client:&lt;/p&gt;

&lt;pre&gt;
                            var options = {
                                beforeSubmit: function(formData, jqForm, options) { 
                                  var queryString = $.param(formData);
                                    alert('About to submit: \n\n' + queryString); 
                                    
                                    for (var i=0; i &lt; formData.length; i++) { 
                                        if (!formData[i].value) { 
                                          return false; 
                                    } 
                                    } 
                                },
                                success: function(data) {
                                        if(data &amp;&amp; typeof data == 'object'){
                                            //...
                                        }
                                },
                url:       '/action', 
                dataType:  'json',
                clearForm: true
              }; 
              
                            $('#form').ajaxSubmit(options);
                          return false; 
&lt;/pre&gt;


&lt;p&gt;Symfony Backend:&lt;/p&gt;

&lt;pre&gt;

        $json = json_encode($data);
        if(!$request-&gt;isXmlHttpRequest()){
          echo '&amp;lt;textarea&amp;gt;'.$json.'&amp;lt;/textarea&amp;gt;';
          return sfView::NONE;
        }else{
        echo $json;
          return sfView::NONE;
        }
&lt;/pre&gt;


&lt;p&gt;You can check &lt;a href='http://malsup.com/jquery/form/#file-upload'&gt;plugin document&lt;/a&gt; to know why you need 'echo "&amp;lt;textarea&amp;gt;"'.  :-D&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/VBN6a1qrXFY" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/07/26/jquery-ajax-file-upload-with-symfony4.html</feedburner:origLink></item><item><title>Network Sharing Between Ubuntu And IPhone4(China Unicom Contract Version)</title><link>http://feedproxy.google.com/~r/freetofeel/~3/UnIDr6831Fo/iphone4-network-sharing-under-ubuntu.html</link><pubDate>Sat, 02 Jul 2011 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/07/02/iphone4-network-sharing-under-ubuntu</guid><description>&lt;p&gt;Find a solution from Internet that can make network sharing between Ubuntu And IPhone4.&lt;/p&gt;

&lt;pre&gt;
sudo add-apt-repository ppa:pmcenery/ppa

sudo apt-get update

sudo apt-get install gvfs ipheth-dkms ipheth-utils
&lt;/pre&gt;


&lt;p&gt;If you can pass all these steps, and then restart your machine. Bingo!&lt;/p&gt;

&lt;p&gt;You can find more information &lt;a href='http://ivkin.net/2010/05/tethering-ubuntu-lucid-lynx-and-iphone-os/#comment-4790' &gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/UnIDr6831Fo" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/07/02/iphone4-network-sharing-under-ubuntu.html</feedburner:origLink></item><item><title>Restore Lost Commits After Git Hard Reset</title><link>http://feedproxy.google.com/~r/freetofeel/~3/hi42kso-TXE/get-commit-back-after-git-hard-reset.html</link><pubDate>Wed, 22 Jun 2011 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/06/22/get-commit-back-after-git-hard-reset</guid><description>&lt;p&gt;Sometimes, you will make mistakes. But when someone told you there still is a hope that if you try xxxxx. What feeling will you have?&lt;/p&gt;

&lt;p&gt;The following might be one solution after 'git reset --hard' and realized you made a mistake:&lt;/p&gt;

&lt;pre&gt;
  $ git reflog
  $ git merge 7c61179
&lt;/pre&gt;


&lt;p&gt;Check the blog post &lt;a href='http://gitready.com/advanced/2009/01/17/restoring-lost-commits.html'&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/hi42kso-TXE" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/06/22/get-commit-back-after-git-hard-reset.html</feedburner:origLink></item><item><title>Replace MySql Table with NoSQL DB</title><link>http://feedproxy.google.com/~r/freetofeel/~3/5kNHHFNBPF4/nosql-db-try.html</link><pubDate>Sun, 12 Jun 2011 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/06/12/nosql-db-try</guid><description>&lt;h4&gt;Backgroud:&lt;/h4&gt;


&lt;p&gt;I am not nosql fans. I don't have the habit to replace whole mysql db with nosql db. But if a mysql table can be replaced with nosql db and expensive queries are generated againest this table, I will give a try of nosql DB.&lt;/p&gt;

&lt;p&gt;In our product, we have a unique user login log table to know how many users logined in a specify date. Here is the table structure:&lt;/p&gt;

&lt;pre&gt;
  unique_login_logs: 
    _attributes:  {phpName: UniqueLoginLog}
    id:
    user_id: { type: integer }
    date: { type: date, index: true }
    created_at:
    _uniques:
      unique_date_type: [user_id, date]
&lt;/pre&gt;


&lt;p&gt;The expensive query looks like:&lt;/p&gt;

&lt;pre&gt;
select date, count(`user_id`) from unique_login_logs group by date order by date desc;'
&lt;/pre&gt;


&lt;p&gt;And the other related operations will be save an entry into this table or check the user entry for a specify date is in the table or not. Nothing more.&lt;/p&gt;

&lt;h4&gt;Choose NoSQL DB from &lt;a href='http://en.wikipedia.org/wiki/NoSQL'&gt;wiki page&lt;/a&gt;: &lt;/h4&gt;




&lt;pre&gt;
...
Key-value cache in RAM

    Citrusleaf database
    memcached
    Oracle Coherence
    Redis
    Tuple space
    Velocity

Key-value stores implementing the Paxos algorithm

    Keyspace

Key-value stores on disk

    BigTable
    CDB
    Citrusleaf database
    Dynomite
    Keyspace
    membase
    Memcachedb
    Redis
    Tokyo Cabinet
    TreapDB
    Tuple space
    MongoDB
...
&lt;/pre&gt;


&lt;p&gt;For my feature request, I need a disk stored key-value system. I just spend 1 minute to take a look the MongoDB features. It meet my feature requirements. That's enough. If you know more about the other nosql DBs, of course you should choose the one which suit yours best.&lt;/p&gt;

&lt;h4&gt;Try MongoDB&lt;/h4&gt;


&lt;p&gt;Step 1: Install MongoDB(http://www.mongodb.org/display/DOCS/Quickstart+Unix);&lt;/p&gt;

&lt;p&gt;Step 2: Simple demo testing:&lt;/p&gt;

&lt;p&gt;create a new db:&lt;/p&gt;

&lt;pre&gt;
use mydb;
&lt;/pre&gt;


&lt;p&gt;Save an entry:&lt;/p&gt;

&lt;pre&gt;
db.uniqueLoginLog.save({date: '2011-06-09', user_id: 101});
db.uniqueLoginLog.save({date: '2011-06-09', user_id: 111});
db.uniqueLoginLog.save({date: '2011-06-09', user_id: 102});
..
db.uniqueLoginLog.save({date: '2011-06-11', user_id: 100});
db.uniqueLoginLog.save({date: '2011-06-11', user_id: 101});
db.uniqueLoginLog.save({date: '2011-06-11', user_id: 102});
&lt;/pre&gt;


&lt;p&gt;Group entries by date:&lt;/p&gt;

&lt;pre&gt;
db.uniqueLoginLog.group(
           {key: { date:true },
            reduce: function(obj,prev) { prev.count ++; },
            initial: { count: 0 }
            });
            
&lt;/pre&gt;


&lt;p&gt;The output looks like:&lt;/p&gt;

&lt;pre&gt;
[
    {
        "date" : "2011-01-01",
        "count" : 3
    },
    {
        "date" : "2011-01-02",
        "count" : 3
    },
    {
        "date" : "2011-01-03",
        "count" : 1
    },
    {
        "date" : "2011-01-04",
        "count" : 1
    }
]
&lt;/pre&gt;


&lt;p&gt;&lt;/p&gt;

&lt;p&gt;With the output, I can do the order in client.&lt;/p&gt;

&lt;h4&gt;Install PHP Mongo Extension&lt;/h4&gt;


&lt;p&gt;You can install Mongo PHP extension with pecl command line or install it &lt;a href='http://pecl.php.net/package/mongo'&gt;manually&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;
&gt; pecl search mongo
Retrieving data...0%
Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
mongo   1.1.4 (stable)        MongoDB database driver

&gt; pecl install mongo
&lt;/pre&gt;




&lt;h4&gt;Get stored items with php function&lt;/h4&gt;


&lt;p&gt;PHP code:&lt;/p&gt;

&lt;pre&gt;
$m = new Mongo();

$db = $m-&gt;mydb;

$collection = $db-&gt;uniqueLoginLog;


$obj = array('date'=&gt; '2011-06-09', 'user_id'=&gt; 101);
$collection-&gt;insert($obj);



$keys = array("date" =&gt; 1);
$initial = array("count" =&gt; 0);
$reduce = "function(obj,prev) { prev.count ++; }";
$g = $collection-&gt;group($keys, $initial, $reduce);

var_dump($g);

&lt;/pre&gt;


&lt;p&gt;Output looks like:&lt;/p&gt;

&lt;pre&gt;
array(4) {
  ["retval"]=&gt;
  array(3) {
    [0]=&gt;
    array(2) {
      ["date"]=&gt;
      string(10) "2011-06-09"
      ["count"]=&gt;
      float(17)
    }
    [1]=&gt;
    array(2) {
      ["date"]=&gt;
      string(10) "2011-06-11"
      ["count"]=&gt;
      float(10)
    }
    [2]=&gt;
    array(2) {
      ["date"]=&gt;
      string(10) "2011-06-10"
      ["count"]=&gt;
      float(7)
    }
  }
  ["count"]=&gt;
  float(34)
  ["keys"]=&gt;
  int(3)
  ["ok"]=&gt;
  float(1)
}
&lt;/pre&gt;




&lt;h4&gt;Deploy to production?&lt;/h4&gt;


&lt;p&gt;Until now, the demo is still a toy. If you want to deploy it to production, there are more work need to to be done. Take a look at the &lt;a href='http://www.mongodb.org/display/DOCS/Admin+Zone'&gt;admin zone&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For my feature implemention, I will consider &lt;a href='http://www.mongodb.org/display/DOCS/Replication'&gt;Replication&lt;/a&gt; next step.&lt;/p&gt;

&lt;p&gt;Summary:&lt;/p&gt;

&lt;p&gt;This is not a &lt;a href='http://www.mongodb.org/display/DOCS/Tutorial'&gt;toturial&lt;/a&gt; about how to use MongoDB. It is just a example that can use nosql db in your production.&lt;/p&gt;

&lt;p&gt;Reference:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href='http://try.mongodb.org/'&gt;A Tiny MongoDB Browser Shell (mini tutorial included)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='https://github.com/mongodb/mongo/tree/master/jstests/'&gt;JsTest&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/5kNHHFNBPF4" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/06/12/nosql-db-try.html</feedburner:origLink></item><item><title>When To Use Combine Index</title><link>http://feedproxy.google.com/~r/freetofeel/~3/J72PJ8OG_0g/mysql-index-merge.html</link><pubDate>Tue, 24 May 2011 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/05/24/mysql-index-merge</guid><description>&lt;p&gt;There are already a lot of posts which gave a introduction of what index merge is in MySQL. One of them is:&lt;/p&gt;

&lt;p&gt;&lt;a href='http://brian.moonspot.net/2008/04/22/playing-with-mysql-index-merge/'&gt;Playing with MySQL's index merge&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today I just noticed the combined index also can be affected by the single column index. For example:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Let's say we have a table named table1 which have 100,000 items. The size of this table is 35MB.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Table structure:&lt;/p&gt;

&lt;pre&gt;
CREATE TABLE `table1` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) DEFAULT NULL,
  `status1` int(11) DEFAULT NULL,
  `status2` int(11) DEFAULT NULL,
  `status3` int(11) DEFAULT NULL,
  `status4` int(11) DEFAULT NULL,
  `status5` int(11) DEFAULT NULL,
  `status6` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `table1_name_unique` (`name`),
  KEY `table1_status1` (`status1`),
  KEY `table1_status2` (`status2`),
  KEY `table1_status3` (`status3`),
  KEY `table1_status4` (`status4`),
  KEY `table1_status5` (`status5`),
  KEY `table1_status6` (`status6`),
  KEY `table1_combine_index` (`status1`,`status2`,`status3`,`status4`,`status5`,`status6``)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
&lt;/pre&gt;


&lt;p&gt;We have a query need to select items from table1 table with checking all the status columns in where clause. Let's do a explain:&lt;/p&gt;

&lt;pre&gt;
explain select * from table1 where status1=1 and status2=1 and status3=1 and status4=1 and status5=1 and status6=1  
&lt;/pre&gt;


&lt;p&gt;Explain result:&lt;/p&gt;

&lt;pre&gt;
  select_type: SIMPLE
  table: table1
  type: index_merge
  possible_keys: PRIMARY,table1_status1,table1_status2,table1_status3,table1_status4,table1_status5,table1_status6,table1_combine_index
  key: table1_status1,table1_status2,table1_status3,table1_status4,table1_status5,table1_status6
  key_len: 1,1,4,4,4,5
  refs: NULL
  rows: 1955
  Extra: Using intersect(table1_status1,table1_status2,table1_status3,table1_status4,table1_status5,table1_status6); Using where
&lt;/pre&gt;


&lt;p&gt;The select query takes &lt;b&gt;3.5ms&lt;/b&gt; by intersecting indexes.&lt;/p&gt;

&lt;p&gt;What happened if we force index to use table1_combine_index:&lt;/p&gt;

&lt;pre&gt;
explain select * from table1 force index (table1_combine_index)  where status1=1 and status2=1 and status3=1 and status4=1 and status5=1 and status6=1  
&lt;/pre&gt;


&lt;p&gt;Explain result:&lt;/p&gt;

&lt;pre&gt;
  select_type: SIMPLE
  table: table1
  type: ref
  possible_keys: table1_combine_index
  key: table1_combine_index
  key_len: 9
  refs: const,const
  rows: 62590
  Extra: Using where
&lt;/pre&gt;


&lt;p&gt;The select query takes &lt;b&gt;10.5ms&lt;/b&gt; by using combine index.&lt;/p&gt;

&lt;p&gt;In this example, intersecting index is more useful than combine index. There is an article give a more detailed explanation why it works like this:&lt;/p&gt;

&lt;p&gt;&lt;a href='http://www.mysqlperformanceblog.com/2009/09/19/multi-column-indexes-vs-index-merge/'&gt;Multi Column indexes vs Index Merge&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now it's time to make this example a little complicated.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;We have another table named table2, the structure looks like:&lt;/p&gt;

&lt;pre&gt;
CREATE TABLE `table2` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `table1_id` int(11) NOT NULL,
  `column1` datetime NOT NULL,
  `column2` varchar(255) NOT NULL,
  `column3` text,
  `column4` tinyint(4) NOT NULL,
  `column5 ` tinyint(4) NOT NULL,
  `column6 ` tinyint(4) NOT NULL,
  `column7` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `column7 ` (`column7 `),
  KEY `table2_FI_1` (`table1_id `)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
&lt;/pre&gt;


&lt;p&gt;There are 20,000 rows in table2, with size 11MB. We have a feature request need to join table1 with table2 and sort by table2's id.&lt;/p&gt;

&lt;pre&gt;
SELECT sql_no_cache * FROM table2 LEFT JOIN table1 ON (table2.table1_id = table1.id) WHERE table1.status1=1 and table1.status2=1 and table1.status3=1 and table1.status4=1 and table1.status5=1 and table1.status6=1 ORDER BY table2.id DESC LIMIT 10;
&lt;/pre&gt;


&lt;p&gt;It takes &lt;b&gt;3s&lt;/b&gt; to finish the query. The explain tells you:&lt;/p&gt;

&lt;pre&gt;
  select_type: SIMPLE
  table: table1
  type: index_merge
  possible_keys: PRIMARY,`table1_status1`,`table1_status2`,`table1_status3`,`table1_status4`,`table1_status5`,`table1_status6`,`table1_combine_index`
  key: `table1_status1`,`table1_status2`,`table1_status3`,`table1_status4`,`table1_status5`,`table1_status6`
  key_len: 1,1,4,4,4,5
  refs: NULL
  rows: 1955
  Extra: Using intersect(`table1_status1`,`table1_status2`,`table1_status3`,`table1_status4`,`table1_status5`,`table1_status6`); Using where
  
  ---
  select_type: SIMPLE
  table: table2
  type: ref
  possible_keys: table2_FI_1
  key: table2_FI_1
  key_len: 4
  refs: table1.id
  rows: 1
  Extra:  
&lt;/pre&gt;


&lt;p&gt;Now I want to remove these single column indexes in table1 to see what will happen:&lt;/p&gt;

&lt;pre&gt;
  select_type: SIMPLE
  table: table2
  type: index
  possible_keys: table2_FI_1
  key: PRIMARY
  key_len: 4
  refs: 
  rows: 10
  Extra:
  
  ---
  
  select_type: SIMPLE
  table: table1
  type: eq_ref
  possible_keys: PRIMARY,table1_combine_index
  key: PRIMARY
  key_len: 4
  refs: table2.table1_id
  rows: 1
  Extra: Using where
&lt;/pre&gt;


&lt;p&gt;After removing the single column indexes in table 1, this select query only takes &lt;b&gt;2.4ms&lt;/b&gt;. To explain this, we can simply treat (status1,status2,status3,status4,status5,status6) as one column in table1. I think the single columns indexes affected the 'join' performance. MySQL need to use these single indexes to filter the table1 firstly and then make a join with table2.&lt;/p&gt;

&lt;p&gt;Summary:&lt;/p&gt;

&lt;p&gt;Combine index is not always better than index merge. To know which one is better, explain your query, analyze it and adjust the index.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/J72PJ8OG_0g" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/05/24/mysql-index-merge.html</feedburner:origLink></item><item><title>Nginx, PHP-FPM, 404 error after upgrading to Ubuntu 11.04</title><link>http://feedproxy.google.com/~r/freetofeel/~3/tlGViREOsVA/upgrade-ubuntu-fpm-404-error.html</link><pubDate>Fri, 06 May 2011 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/05/06/upgrade-ubuntu-fpm-404-error</guid><description>&lt;p&gt;After upgrading from ubuntu 10.10 to ubuntu 11.04 my local site didn't work anymore. It reponsed with a 404 page.&lt;/p&gt;

&lt;p&gt;After researcing for a while, I found the root should be put outside the location property:
Before:&lt;/p&gt;

&lt;pre&gt;
server {
  server_name  localhost;

  location / {
        root   /var/www;
        index  index.php index.html index.htm;
    }
 ....
}

&lt;/pre&gt;


&lt;p&gt;After:&lt;/p&gt;

&lt;pre&gt;
server {

  root   /var/www;
  index  index.php index.html index.htm;
  server_name  localhost;

 ....
}
&lt;/pre&gt;


&lt;p&gt;Now it works, but have no idea what has been changed since Ubuntu upgrade.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/tlGViREOsVA" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/05/06/upgrade-ubuntu-fpm-404-error.html</feedburner:origLink></item><item><title>Solve Wireless Issue When Upgrading From 10.10 to 11.04</title><link>http://feedproxy.google.com/~r/freetofeel/~3/PrD2Ysjvwc8/solve-ubuntu1104-wifi-issue.html</link><pubDate>Sun, 01 May 2011 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/05/01/solve-ubuntu1104-wifi-issue</guid><description>&lt;p&gt;After upgrading from ubuntu 10.10 to ubuntu 11.04 the wireless stop working.&lt;/p&gt;

&lt;p&gt;The first step, I was using &lt;a href="https://help.ubuntu.com/community/WifiDocs/WirelessTroubleShootingGuide"&gt;ubuntu trouble shooting&lt;/a&gt; to detect the issue.&lt;/p&gt;

&lt;p&gt;a. Detail whether there are software or hardware blocks on your rf devices. To get a list of devices and their hardware and software status, try "sudo rfkill list".&lt;/p&gt;

&lt;pre&gt;
~$ sudo rfkill list
0: hp-wifi: Wireless LAN
    Soft blocked: yes
    Hard blocked: yes
&lt;/pre&gt;


&lt;p&gt;Unblock your devices by "sudo rfkill unblock 0".&lt;/p&gt;

&lt;p&gt;b. Check for Device Recognition for my HP laptop(amd64)&lt;/p&gt;

&lt;pre&gt;
~$ sudo lshw -C network
  *-network UNCLAIMED     
       description: Network controller
       product: BCM4311 802.11a/b/g
       vendor: Broadcom Corporation
       physical id: 0
       bus info: pci@0000:30:00.0
       version: 01
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list
       configuration: latency=0
       resources: memory:c8000000-c8003fff
  *-network
       description: Ethernet interface
       product: NetXtreme BCM5788 Gigabit Ethernet
       vendor: Broadcom Corporation
       physical id: 1
       bus info: pci@0000:02:01.0
       logical name: eth0
       version: 03
       serial: 00:17:08:37:6a:64
       size: 100Mbit/s
       capacity: 1Gbit/s
       width: 32 bits
       clock: 66MHz
       capabilities: pm vpd msi bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=tg3 driverversion=3.116 duplex=full firmware=5788-v3.26 ip=192.168.1.103 latency=64 link=yes mingnt=64 multicast=yes port=twisted pair speed=100Mbit/s
       resources: irq:23 memory:d4000000-d400ffff
&lt;/pre&gt;


&lt;p&gt;Here I can see 'tg3' driver was using. And by checking the loaded module the tg3 is there.&lt;/p&gt;

&lt;pre&gt;
~$ sudo lsmod
&lt;/pre&gt;


&lt;p&gt;If your driver was not loaded, you can load it by "sudo modprobe &lt;module&gt;"&lt;/p&gt;

&lt;p&gt;c. Identify PCI devices with PCI ID.&lt;/p&gt;

&lt;pre&gt;
~$ sudo lspci -v | grep Ethernet
02:01.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5788 Gigabit Ethernet (rev 03)

~$ sudo lspci -v | grep Network
30:00.0 Network controller: Broadcom Corporation BCM4311 802.11a/b/g (rev 01)
&lt;/pre&gt;


&lt;p&gt;d. Check the addtional drivers, I found "Broadcom STA wireless driver" was using.&lt;/p&gt;

&lt;p&gt;Everything looks good until now. Driver was working and was recognized. So I guess the issue might be the compatibility with new kernel?&lt;/p&gt;

&lt;p&gt;e. With the help from google.&lt;/p&gt;

&lt;p&gt;i). Someone solve it by install &lt;a herf="http://ubuntuforums.org/showthread.php?t=1653157"&gt;linux-backports-modules-wireless-maverick-generic&lt;/a&gt;. It is interesting to know what &lt;a hef="https://help.ubuntu.com/community/UbuntuBackports"&gt;backports&lt;/a&gt; is.&lt;/p&gt;

&lt;p&gt;Unfortunately it didn't work for me.&lt;/p&gt;

&lt;p&gt;ii). So I tried the solution in this &lt;a href="http://ubuntuforums.org/showthread.php?t=1653157&amp;page=2"&gt;thread&lt;/a&gt; by disable my "Broadcom STA wireless driver" and install b43.&lt;/p&gt;

&lt;pre&gt;
Removing "bcmwl-kernel-source" by using Synaptic Package Manager
Then installing "firmware-b43-installer" and "b43-fwcutter" again by Synaptic Package Manager. 
&lt;/pre&gt;


&lt;p&gt;At the end of step e, and by rebooting laptop, the wifi issue was fixed. If you still has the issue, I suggest check the trouble shooting tutorial again. It is really helpful.&lt;/p&gt;

&lt;p&gt;Reference:&lt;/p&gt;

&lt;p&gt;1.http://linuxfans.keryxproject.org/?page_id=27&lt;/p&gt;

&lt;p&gt;2.http://www.ubuntumini.com/2009/11/broadcom-wireless-driver-fix-in-karmic.html&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/PrD2Ysjvwc8" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/05/01/solve-ubuntu1104-wifi-issue.html</feedburner:origLink></item><item><title>What RabbitMQ Cluster Can Do</title><link>http://feedproxy.google.com/~r/freetofeel/~3/kjfZI7bI7U0/what-rabbitmq-cluster-can-do.html</link><pubDate>Fri, 22 Apr 2011 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/04/22/what-rabbitmq-cluster-can-do</guid><description>&lt;h3&gt;What RabbitMQ cluster can do - Scaling and Reliability&lt;/h3&gt;


&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Example 1&lt;/b&gt;:&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;All data/state required for the operation of a RabbitMQ broker is replicated across all nodes.&lt;/p&gt;

&lt;p&gt;Let's take an example to help you understand better.&lt;/p&gt;

&lt;p&gt;There is a publisher which publish 10 messages to RabbitMQ broker(*1).&lt;/p&gt;

&lt;p&gt;|Publisher| --&gt; |10 Messages| --&gt; |Broker( = Node_A + Node_B)|&lt;/p&gt;

&lt;p&gt;So Node_A will receive Message 1, Message 3, 5, 7, 9; Node_B will receive Message 2, Message 4, 6, 8, 10.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Example 2&lt;/b&gt;:&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;We still use the above example. If the Node_A crashed when it is consuming the messages, what happens?&lt;/p&gt;

&lt;p&gt;Before Node_A crashed (I simply powered off this machine):&lt;/p&gt;

&lt;p&gt;Node_A finished Message 1, Message 3, and it is starting to consume Message 5;&lt;/p&gt;

&lt;p&gt;Node_B finished Message 2, Message 4 and it is starting to consume Message 6.&lt;/p&gt;

&lt;p&gt;After Node_A crashed:&lt;/p&gt;

&lt;p&gt;Node_A stopped working;&lt;/p&gt;

&lt;p&gt;Node_B finished Message 6, Message 7, Message 8, Message 9, Message 10 and Message 5.&lt;/p&gt;

&lt;p&gt;Yes, as you can see, even Node_A dies unexpected. Broker still can get the status of Message 5 and send it to Node_B.
And you can find following explanation:&lt;/p&gt;

&lt;pre&gt;
  If a node goes down or becomes unreachable what effects can this have on the cluster? Do things 'hang' for a bit?
  
  Topology change operations (see above) could potentially pause operation for a brief time but they will complete eventually. We use the net_kernel erlang module to do monitoring between nodes. The default "tick" time there is 60 seconds but this can be reduced. Further, in the event of a failure, any communication between the nodes will likely result in an error being generated and detected immediately: i.e. the only time at which you would not know about a node failure for 60 seconds is if there was no communication between the nodes for that amount of time.
  
  ....
  
&lt;/pre&gt;




&lt;h3&gt;What RabbitMQ cluster can not do - High Availability&lt;/h3&gt;


&lt;p&gt;So the 60 seconds is what RabbitMQ can not do. We call it high availability.&lt;/p&gt;

&lt;pre&gt;
...
Whilst RabbitMQ also supports clustering, clustering is intended to facilitate scalability, not availability. Thus in a cluster, if a node fails, queues which were on the failed node are lost. With the high availability setup described in this guide, when a node fails, the durable queues and the persistent messages within them can be recovered by a different node.
...
&lt;/pre&gt;


&lt;p&gt;To build a high availability and scalable application, you can take a look &lt;a href='http://www.rabbitmq.com/pacemaker.html'&gt;RabbitMQ Placemaker&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;References:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;RabbitMQ broker - a logical grouping of one or several Erlang nodes, each running the RabbitMQ application and sharing users, virtual hosts, queues, exchanges, etc. Sometimes we refer to the collection of nodes as a cluster.&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/kjfZI7bI7U0" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/04/22/what-rabbitmq-cluster-can-do.html</feedburner:origLink></item><item><title>Do we still need scrum if ...</title><link>http://feedproxy.google.com/~r/freetofeel/~3/X_pDBqqGkeU/do-we-still-need-scrum.html</link><pubDate>Tue, 08 Mar 2011 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/03/08/do-we-still-need-scrum</guid><description>&lt;p&gt;Just learned an interesting point from &lt;a href='http://architects.dzone.com/articles/balancing-software'&gt;'balance software' post&lt;/a&gt;:&lt;/p&gt;

&lt;h4&gt;When Scrum has died&lt;/h4&gt;


&lt;pre&gt;
  In the journey of dramatic improvements to bring your code base under control, there are few things that you should take notice off.

  * An architecture will emerge that supports the design of the resident parts.  Things fit together sweetly and each part supports the other part in symbiotic relationships.
  * The code base will get smaller and the team will shrink to, perhaps,  just 2 or 3 people.
  * Each developer will take on greater responsibility and will find it difficult to break core principles.  The act of living those principles will result in a values that don't need to be listed on a poster on the wall.
  * The scrum master will become redundant.
  * The product owner will do more by working directly with the developers.
  * The developers will represent the interest of their customers directly.
  * The bottleneck will shift from development to the product owner and eventually the customer.
&lt;/pre&gt;


&lt;p&gt;In my opinion, Scrum is used for company to delivery features to users quickly and interactively. As a team, with scrum you can easily prove your works after a short time. You don't have to wait for one year or longer. And big feature can be split into small ones. Everyone know what need to be done in following weeks. You don't have to write so many documents to trace what's going on. Ideally, as the authors said, if the code base can be made smaller and smaller. And the new feature will be just a plugin to your platform. Of course you don't need scrum. Should we call it as 'factory model'? As workers(developers) just need to collect the feature request and compose it by some existing functions. And plug it into the platform(codebase). I have not seen a company who has such a powerful platform. Will the bottleneck be the platform itself then?&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/X_pDBqqGkeU" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/03/08/do-we-still-need-scrum.html</feedburner:origLink></item><item><title>Web Server Memory Monitor</title><link>http://feedproxy.google.com/~r/freetofeel/~3/UbfDV_qPyBY/server-monitor.html</link><pubDate>Wed, 02 Mar 2011 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/03/02/server-monitor</guid><description>&lt;h2&gt;free-m&lt;/h2&gt;


&lt;pre&gt;
free-m: to see how much memory you are currently using
&lt;/pre&gt;


&lt;p&gt;Output:
&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; total &amp;nbsp;&amp;nbsp; used&amp;nbsp;&amp;nbsp; free&amp;nbsp;&amp;nbsp;&amp;nbsp; shared buffers cached&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Mem:&amp;nbsp;90&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 85 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 34&lt;br&gt;
-/+ buffers/cache:&amp;nbsp; 46&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 43&lt;br&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Swap:&amp;nbsp;&amp;nbsp; 9&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9 &lt;/code&gt;
The top row 'used' (85) value will almost always nearly match the top row mem value (90).  Since Linux likes to use any spare memory to cache disk blocks (34).&lt;/p&gt;

&lt;p&gt;The key used figure to look at is the buffers/cache row used value (46).  This is how much space your applications are currently using.  For best performance, this number should be less than your total (90) memory.  To prevent out of memory errors, it needs to be less than the total memory (90) and swap space (9).&lt;/p&gt;

&lt;p&gt;If you wish to quickly see how much memory is free look at the buffers/cache row free value (43). This is the total memory (90)- the actual used (46). (90 - 46 = 44, not 43, this will just be a rounding issue)&lt;/p&gt;

&lt;h2&gt;ps aux&lt;/h2&gt;


&lt;pre&gt;
ps aux: to see where all your memory is going.That will show the percentage of memory each process is using.  You can use it to identify the top memory users (usually Apache, MySQL and Java processes).
&lt;/pre&gt;


&lt;p&gt;Output:
&lt;code&gt;
USER PID %CPU %MEM VSZ&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RSS&amp;nbsp;&amp;nbsp; TTY&amp;nbsp;&amp;nbsp; STAT
&amp;nbsp; START TIME COMMAND&lt;br&gt;
root 854 0.5&amp;nbsp; 39.2 239372&amp;nbsp; 36208 pts/0 S&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 22:50 0:05
/usr/local/jdk/bi&lt;br&gt;
n/java -Xms16m -Xmx64m -Djava.awt.headless=true -Djetty.home=/opt/jetty -cp /opt&lt;br&gt;
/jetty/ext/ant.jar:/opt/jetty/ext/jasper-compiler.jar:/opt/jetty/ext/jasper-runt&lt;br&gt;
ime.jar:/opt/jetty/ext/jcert.jar:/opt/jetty/ext/jmxri.jar:/opt/jetty/ext/jmxtool
&lt;/code&gt;
We can see that java is using up 39.2% of the available memory.&lt;/p&gt;

&lt;h2&gt;vmstat&lt;/h2&gt;


&lt;pre&gt;
vmstat:helps you to see, among other things, if your server is swapping.
&lt;/pre&gt;


&lt;p&gt;&lt;code&gt;
- vmstat 1 2
   procs                      memory    swap          io     system         cpu
 r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us  sy  id
 0  0  0  39132   2416    804  15668   4   3     9     6  104    13   0   0 100
 0  0  0  39132   2416    804  15668   0   0     0     0   53     8   0   0 100
 0  0  0  39132   2416    804  15668   0   0     0     0   54     6   0   0 100
&lt;/code&gt;
The first row shows your server averages.  The si (swap in) and so (swap out) columns show if you have been swapping (i.e. needing to dip into 'virtual' memory) in order to run your server's applications.  The si/so numbers should be 0 (or close to it).  Numbers in the hundreds or thousands indicate your server is swapping heavily.  This consumes a lot of CPU and other server resources and you would get a very (!) significant benefit from adding more memory to your server.&lt;/p&gt;

&lt;p&gt;Some other columns of interest: The r (runnable) b (blocked) and w (waiting) columns help see your server load.  Waiting processes are swapped out.  Blocked processes are typically waiting on I/O.  The runnable column is the number of processes trying to something.  These numbers combine to form the 'load' value on your server.  Typically you want the load value to be one or less per CPU in your server.&lt;/p&gt;

&lt;p&gt;The bi (bytes in) and bo (bytes out) column show disk I/O (including swapping memory to/from disk) on your server.&lt;/p&gt;

&lt;p&gt;The us (user), sy (system) and id (idle) show the amount of CPU your server is using.  The higher the idle value, the better.&lt;/p&gt;

&lt;h2&gt;Resolving: High Java Memory Usage&lt;/h2&gt;


&lt;p&gt;Java processes can often consume more memory than any other application running on a server.&lt;/p&gt;

&lt;p&gt;Java processes can be passed a -Xmx option.  This controls the maximum Java memory heap size.  It is important to set a limit on the heap size, otherwise the heap will keep increasing until you get out of memory errors on your VPS (resulting in the Java process - or even some other, random, process - dying.&lt;/p&gt;

&lt;p&gt;Usually the setting can be found in your /usr/local/jboss/bin/run.conf or /usr/local/tomcat/bin/setenv.sh config files.  And your RimuHosting default install should have a reasonable value in there already.&lt;/p&gt;

&lt;p&gt;If you are running a custom Java application, check there is a -XmxNNm (where NN is a number of megabytes) option on the Java command line.&lt;/p&gt;

&lt;p&gt;The optimal -Xmx setting value will depend on what you are running.  And how much memory is available on your server.&lt;/p&gt;

&lt;p&gt;From experience we have found that Tomcat often runs well with an -Xmx between 48m and 64m.  JBoss will need a -Xmx of at least 96m to 128m.  You can set the value higher.  However, you should ensure that there is memory available on your server.&lt;/p&gt;

&lt;p&gt;To determine how much memory you can spare for Java, try this: stop your Java process; run free -m; subtract the 'used' value from the "-/+ cache" row from the total memory allocated to your server and then subtract another 'just in case' margin of about 10% of your total server memory.  The number you come up with is a rough indicator of the largest -Xmx setting you can use on your server.&lt;/p&gt;

&lt;h2&gt;Resolving: High Apache Memory Usage&lt;/h2&gt;


&lt;p&gt;Apache can be a big memory user.  Apache runs a number of 'servers' and shares incoming requests among them.  The memory used by each server grows, especially when the web page being returned by that server includes PHP or Perl that needs to load in new libraries.  It is common for each server process to use as much as 10% of a server's memory.&lt;/p&gt;

&lt;p&gt;To reduce the number of servers, you can edit your httpd.conf file.  There are three settings to tweak: StartServers, MinSpareServers, and MaxSpareServers.  Each can be reduced to a value of 1 or 2 and your server will still respond promptly, even on quite busy sites.  Some distros have multiple versions of these settings depending on which process model Apache is using.  In this case, the 'prefork' values are the ones that would need to change.&lt;/p&gt;

&lt;p&gt;To get a rough idea of how to set the MaxClients directive, it is best to find out how much memory the largest apache thread is using. Then stop apache, check the free memory and divide that amount by the size of the apache thread found earlier. The result will be a rough guideline that can be used to further tune (up/down) the MaxClients directive. The following script can be used to get a general idea of how to set MaxClients for a particular server:&lt;/p&gt;

&lt;pre class="codebox"&gt;
#!/bin/bash
echo "This is intended as a guideline only!"
if [ -e /etc/debian_version ]; then
    APACHE="apache2"
elif [ -e /etc/redhat-release ]; then
    APACHE="httpd"
fi
RSS=`ps -aylC $APACHE |grep "$APACHE" |awk '{print $8'} |sort -n |tail -n 1`
RSS=`expr $RSS / 1024`
echo "Stopping $APACHE to calculate free memory"
/etc/init.d/$APACHE stop &amp;amp;amp;ampamp&amp;gt; /dev/null
MEM=`free -m |head -n 2 |tail -n 1 |awk '{free=($4); print free}'`
echo "Starting $APACHE again"
/etc/init.d/$APACHE start &amp;amp;amp;&amp;gt; /dev/null
echo "MaxClients should be around" `expr $MEM / $RSS`
&lt;/pre&gt;


&lt;p&gt;Note: httpd.conf should be tuned correctly on our newer WBEL3 and FC2 distros.  Apache is not installed by default on our Debian distros (since some people opt for Apache 2 and others prefer Apache 1.3).  So this change should only be necessary if you have a Debian distro.&lt;/p&gt;

&lt;p&gt;from http://modperlbook.org/html/11-2-Setting-the-MaxRequestsPerChild-Directive.html: "Setting MaxRequestsPerChild to a non-zero limit solves some memory-leakage problems caused by sloppy programming practices and bugs, whereby a child process consumes a little more memory after each request. In such cases, and where the directive is left unbounded, after a certain number of requests the children will use up all the available memory and the server will die from memory starvation."&lt;/p&gt;

&lt;h2&gt;Resolving: High MySQL Memory Usage&lt;/h2&gt;


&lt;p&gt;&lt;code&gt;
-- if your are not using the innodb table manager, then just skip it to save some memory
-- skip-innodb
innodb_buffer_pool_size = 16k
key_buffer_size = 16k
myisam_sort_buffer_size = 16k
query_cache_size = 1M
&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;Troubleshooting Irregular Out Of Memory Errors&lt;/h2&gt;


&lt;p&gt;Sometimes a server's regular memory usage is fine.  But it will intermittently run out of memory.  And when that happens you may lose trace of what caused the server to run out of memory.&lt;/p&gt;

&lt;p&gt;In this case you can setup a script (see below) that will regularly log your server's memory usage.  And if there is a problem you can check the logs to see what was running.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;
wget http://proj.ri.mu/memmon.sh -O /root/memmon.sh
chmod +x /root/memmon.sh
&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;
-- create a cronjob that runs every few minutes to log the memory usage
echo '0-59/10 * * * * root /root/memmon.sh &gt;&gt; /root/memmon.txt' &gt; /etc/cron.d/memmon
/etc/init.d/cron* restart 

-- create a logrotate entry so the log file does not get too large
echo '/root/memmon.txt {}' &gt; /etc/logrotate.d/memmon

&lt;/pre&gt;


&lt;p&gt;This article was copied from http://rimuhosting.com/howto/memory.jsp.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/UbfDV_qPyBY" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/03/02/server-monitor.html</feedburner:origLink></item><item><title>mysql ERROR 1005 (ER_CANT_CREATE_TABLE)</title><link>http://feedproxy.google.com/~r/freetofeel/~3/c2RLkcnTn_M/deal-with-mysql-error-150.html</link><pubDate>Mon, 21 Feb 2011 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/02/21/deal-with-mysql-error-150</guid><description>&lt;p&gt;To deal with this error, there are a lot of &lt;a href='http://verysimple.com/2006/10/22/mysql-error-number-1005-cant-create-table-mydbsql-328_45frm-errno-150/'&gt;suggestions&lt;/a&gt;.
In my case, it is because of:&lt;/p&gt;

&lt;pre&gt;
  Make sure that the Charset and Collate options are the same both at the table level as well as individual field level for the key columns. (Thanks to FRR for this tip)
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/c2RLkcnTn_M" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/02/21/deal-with-mysql-error-150.html</feedburner:origLink></item><item><title>Same update query only update once</title><link>http://feedproxy.google.com/~r/freetofeel/~3/-CqLC4-XNxg/mysql-update.html</link><pubDate>Wed, 16 Feb 2011 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/02/16/mysql-update</guid><description>&lt;p&gt;Just learned more about the mysql update statement.
I am very curious with this query:&lt;/p&gt;

&lt;pre&gt;
UPDATE `table_name` SET `column3` = (`column1` | (`column2` * 2) ;
&lt;/pre&gt;


&lt;p&gt;The first time, there are 10,000 items were updated. When I execute it again, 0 affected.&lt;/p&gt;

&lt;p&gt;So there is no where condition, how can this happen?
Learn it from &lt;a href='http://dev.mysql.com/doc/refman/5.1/en/update-speed.html'&gt;mysql doc: Speed of UPDATE Statements&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Yes, it is because of the index.&lt;/p&gt;

&lt;pre&gt;
  ...The speed of the write depends on the amount of data being updated and the number of indexes that are updated. Indexes that are not changed do not get updated. 
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/-CqLC4-XNxg" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/02/16/mysql-update.html</feedburner:origLink></item><item><title>Deal with mysql ERROR 1005 (HY000)</title><link>http://feedproxy.google.com/~r/freetofeel/~3/YoIv_uR2HmE/deal-with-mysql-error-1005-hy000.html</link><pubDate>Fri, 21 Jan 2011 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/01/21/deal-with-mysql-error-1005-hy000</guid><description>&lt;p&gt;How to deal with 'mysql ERROR 1005 (HY000): Can't create table '' (errno: 150)'? Usuall it was caused by mysql foreign key. But how you know which foreign key is wrong? Or why it is incorrect? To get more information, you can execute: &lt;pre&gt;SHOW ENGINE INNODB STATUS\G&lt;/pre&gt;.
In my case:&lt;/p&gt;

&lt;pre&gt;
CREATE TABLE `table3`
(
  `id` INTEGER  NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(255),
  `author_id` INTEGER  NOT NULL,
  `is_published` TINYINT default 0,
  `identifier` VARCHAR(100),
  `path` VARCHAR(255),
  `description` TEXT,
  PRIMARY KEY (`id`),
  KEY `books_I_1`(`is_published`),
  INDEX `books_FI_1` (`author_id`),
  CONSTRAINT `books_FK_1`
    FOREIGN KEY (`author_id`)
    REFERENCES `users` (`id`)
    ON DELETE SET NULL
)Type=InnoDB
&lt;/pre&gt;


&lt;p&gt;I get mysql 1005 error with above sql, if I execute show innodb status, I will get:&lt;/p&gt;

&lt;pre&gt;
=====================================
110121 16:11:12 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 13 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 28, signal count 28
Mutex spin waits 0, rounds 81, OS waits 4
RW-shared spins 38, OS waits 19; RW-excl spins 5, OS waits 5
------------------------
LATEST FOREIGN KEY ERROR
------------------------
110121 16:05:56 Error in foreign key constraint of table table3:

   FOREIGN KEY (`author_id`)
   REFERENCES `users` (`id`)
   ON DELETE SET NULL
)Type=InnoDB:
You have defined a SET NULL condition though some of the
columns are defined as NOT NULL.
&lt;/pre&gt;


&lt;p&gt;Yes, as you can see, the last sentence is what I want. Actually, I define author_id can not be null. Good luck to you.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/YoIv_uR2HmE" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/01/21/deal-with-mysql-error-1005-hy000.html</feedburner:origLink></item><item><title>Cross Lanaguage Service Development</title><link>http://feedproxy.google.com/~r/freetofeel/~3/o-nEg8DozUY/thrift-framework.html</link><pubDate>Fri, 14 Jan 2011 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2011/01/14/thrift-framework</guid><description>&lt;p&gt;Thrift is a software framework for scalable cross-language services development.
Now it supports C++, C#, Erlang, Haskell, Java, Objective C/Cocoa, OCaml, Perl, PHP, Python, Ruby, and Squeak.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Download: &lt;a href='http://incubator.apache.org/thrift/download/'&gt;http://incubator.apache.org/thrift/download/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install: &lt;a href='http://wiki.apache.org/thrift/GettingUbuntuPackages'&gt;http://wiki.apache.org/thrift/GettingUbuntuPackages&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;So basically, what you need to do is define a .thrift definition file. And Thrift will help you generate the RPC client and RPC server. There are a lot of examples in this &lt;a href='http://wiki.apache.org/thrift/'&gt;wiki&lt;/a&gt; page.&lt;/p&gt;

&lt;p&gt;You can use this &lt;a href='http://chanian.com/2010/05/13/thrift-tutorial-a-php-client/'&gt;demo&lt;/a&gt; to understand how it works.&lt;/p&gt;

&lt;p&gt;There is a similar project called &lt;a href='http://code.google.com/apis/protocolbuffers/'&gt;Protocol Buffers&lt;/a&gt; which provided by google.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;This is what I have done in todays' Innovation Day. And I totall agree:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Individuals and interactions over processes and tools&lt;/code&gt;&lt;/pre&gt;


&lt;br /&gt;


&lt;p&gt;We know people is the kernel in a technical company. Anything is beneficial for people should be encouraged. But of course, it also should be beneficial for company firstly. Any rule that restrict people's mind should be removed.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/o-nEg8DozUY" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2011/01/14/thrift-framework.html</feedburner:origLink></item><item><title>年末总结</title><link>http://feedproxy.google.com/~r/freetofeel/~3/otSqF1Hshhw/world-is-changing.html</link><pubDate>Fri, 31 Dec 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/12/31/world-is-changing</guid><description>&lt;p&gt;又到岁末了，这一年最大的感触就是世界在变,变得太快。我一直在想七八十岁的老人生活在这个年代，坐着更现代的交通工具，吃着更美味的美食，眼睁睁的目睹人的行为的变化。他们会怎么看这个时代。我现在有点同感了。&lt;/p&gt;

&lt;p&gt;以前从未有个new year todo list，但从工作实践中感觉这个确实还有有些效果和意义的（以前我最讨厌形式上的东西的）。&lt;/p&gt;

&lt;p&gt;&lt;b&gt;2010 完成和进行中的事情&lt;/b&gt;：&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;kiwitask.com 年初改版上线，几次尝试都失败，最后直接将其下线。有意思的事情对这个产品的反省和思索是事情过去了几个月之后才渐渐体会到的；&lt;/li&gt;
&lt;li&gt;终于在高房价的矛盾中购房一套；&lt;/li&gt;
&lt;li&gt;开始学车历程，临近过节看着各式各样的车祸，心头一寒，不学好真不敢出来开；&lt;/li&gt;
&lt;li&gt;有幸成为SM，依然在实践中继续学习，汲取前人的经验和教训，希望不要误人子弟；&lt;/li&gt;
&lt;li&gt;做了一次国内远徒旅行，太简单了；&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;b&gt;2011 TO DO LIST&lt;/b&gt;：&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;结婚，自己都觉得不好意思了；&lt;/li&gt;
&lt;li&gt;下半年装修；&lt;/li&gt;
&lt;li&gt;完成学车；&lt;/li&gt;
&lt;li&gt;回家把护照给办了；&lt;/li&gt;
&lt;li&gt;上线一个新的产品， 如果有精力将其它几个产品打包上线；&lt;/li&gt;
&lt;li&gt;在互联网上混的更实在，看到这领域太多的肤浅和吹嘘；&lt;/li&gt;
&lt;li&gt;寻找一种锻炼身体的方式，这个是最急切的任务；&lt;/li&gt;
&lt;li&gt;希望可以在工作中做的更多，得到更大的认可。&lt;/li&gt;
&lt;li&gt;和亲戚朋友多联系，2010年，我们联系的太少了；&lt;/li&gt;
&lt;li&gt;争取做一次说的过去的远徒旅行或者国外旅行一次 :-)；&lt;/li&gt;
&lt;li&gt;多写点有价值的文章&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;b&gt;2011 WISH LIST&lt;/b&gt;：&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;冤案越来越少，人心越来越温暖，没有欺骗，诚实进步的社会；&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/otSqF1Hshhw" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/12/31/world-is-changing.html</feedburner:origLink></item><item><title>Be Careful Of Your Memcached Slab Size</title><link>http://feedproxy.google.com/~r/freetofeel/~3/IIAcC1URj9M/memcached-slabs.html</link><pubDate>Wed, 29 Dec 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/12/29/memcached-slabs</guid><description>&lt;p&gt;Recently, we found a very 'strange' bug. The memcached's evictions keep growing. But there is stil 10% free memory in this instance. The memcached instance size is around 600M, and it has recached 90% percentage usage for a long time. This issue happened after we deployed a fix, which changed the entry size stored in memcache.&lt;/p&gt;

&lt;p&gt;Let's give a brief analysis:
Memcached memory allocation: a slab has many pages. One page has many chunks. Each chunk is a fixed size, based on the maximum size for the slab. So for example, there is 600Mb memory for the whole instance. And there are 540Mb has been used. Usually you store some big entries into memcache. Let's say 1500 bytes for each of them. So there are some big slabs with chunk size from 1000 bytes to 2000 bytes. And these slabs took 400Mb memory. Now you changed the size for these entries to 500 bytes. Let's call these entries 'Changed-Entries'. So memcached try to find some slabs which have 500 bytes size chunk. There are three possibilities:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;There is no such size slabs exist. So Memcached will use the free memory to create some proper size slab for 'Changed-Entries'; There are 60Mb free memory can be used. But if these entries need 100Mb. That means some old entries will be 'kicked out' from these new slabs. Eviction happens;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If memcached found some used slabs which have 500 bytes chunk. It will kickout the expired items firstly. If the memroy still not enough for 'Changed-Entries', then the least used entries will be kicked out. Eviction happens;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If there is no free memory and there is no propel slabs can be used, then eviction happens.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;If you want to learn more detail about how it works, take a look following references:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href='http://code.google.com/p/memcached/wiki/FAQ#When_do_expired_cached_items_get_deleted_from_the_cache?'&gt;When do expired cached items get deleted from the cache?&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href='http://dev.mysql.com/doc/refman/5.0/en/ha-memcached-using-memory.html'&gt;Memory allocation within memcached&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/IIAcC1URj9M" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/12/29/memcached-slabs.html</feedburner:origLink></item><item><title>Dig Into Nodejs</title><link>http://feedproxy.google.com/~r/freetofeel/~3/aF0BPWsn55E/nodejs-with-socket-io.html</link><pubDate>Sun, 19 Dec 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/12/19/nodejs-with-socket-io</guid><description>&lt;p&gt;Just find a beautiful and simplest javascript code:&lt;/p&gt;

&lt;pre&gt;
  // In both HTTP servers and clients it is possible to queue up several
  // outgoing messages. This is easiest to imagine in the case of a client.
  // Take the following situation:
  //
  //    req1 = client.request('GET', '/');
  //    req2 = client.request('POST', '/');
  //
  // The question is what happens when the user does
  //
  //   req2.write("hello world\n");
  //
  // It's possible that the first request has not been completely flushed to
  // the socket yet. Thus the outgoing messages need to be prepared to queue
  // up data internally before sending it on further to the socket's queue.
  //
  // This function, outgoingFlush(), is called by both the Server
  // implementation and the Client implementation to attempt to flush any


  while (message.output.length) {
    if (!socket.writable) return; // XXX Necessary?

    var data = message.output.shift();
    var encoding = message.outputEncodings.shift();

    ret = socket.write(data, encoding);
  }
&lt;/pre&gt;


&lt;p&gt;Now I know how nodejs talk with server, which is using &lt;a href='http://socket.io/'&gt;Socket.IO&lt;/a&gt; - multi-transport socket server.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/aF0BPWsn55E" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/12/19/nodejs-with-socket-io.html</feedburner:origLink></item><item><title>Find Ubuntu Wireless Icon</title><link>http://feedproxy.google.com/~r/freetofeel/~3/B1yMY92GsWc/find-ubuntu-wireless-icon.html</link><pubDate>Sun, 05 Dec 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/12/05/find-ubuntu-wireless-icon</guid><description>&lt;p&gt;My network-manager works fine. You can test by &lt;code&gt;sudo service network-manager start/stop&lt;/code&gt;. And my wireless network can be found by &lt;code&gt;sudo iwlist  scan&lt;/code&gt;.
So there are two solutions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Right click the top panel and click 'add to panel' and select 'notifications area'. If this didn't work,then netstep:
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;sudo vim /etc/NetworkManager/nm-sysmte-settings.conf&lt;/code&gt;. Modify false to true.
&lt;code&gt;sudo service network-manager restart&lt;/code&gt;

In my ubuntu 10.10, after these trys, the wireless icon displayed in the panel again. Good luck to you.&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/B1yMY92GsWc" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/12/05/find-ubuntu-wireless-icon.html</feedburner:origLink></item><item><title>Try to Use Github Pages As My Blog</title><link>http://feedproxy.google.com/~r/freetofeel/~3/-2o64BbY73Y/try-to-use-githubpages-for-my-blog.html</link><pubDate>Tue, 30 Nov 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/11/30/try-to-use-githubpages-for-my-blog</guid><description>&lt;p&gt;Finally, I decide to move my blog to githubpages. I know github do a great job. I want to give a try.&lt;br /&gt;
Later I will try to import my old blog entries.&lt;br /&gt;
Until now, everything looks amazing.&lt;/p&gt;
&lt;p&gt;&amp;#8212;&lt;br /&gt;
I finished the import from wordpress blog to github. I make a import.php script. Don&amp;#8217;t forget to change the user name, password and database in this script.&lt;/p&gt;
&lt;p&gt;&amp;#8212;&lt;br /&gt;
Add &lt;a href='http://disqus.com'&gt;comment service&lt;/a&gt; into my blog.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/-2o64BbY73Y" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/11/30/try-to-use-githubpages-for-my-blog.html</feedburner:origLink></item><item><title>Import Big InnoDB Tables</title><link>http://feedproxy.google.com/~r/freetofeel/~3/WcmAWFgRsoA/import-big-innodb-tables.html</link><pubDate>Wed, 28 Jul 2010 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/07/28/import-big-innodb-tables</guid><description>&lt;ol&gt;
&lt;li&gt;turn off the logs;&lt;/li&gt;
&lt;li&gt;turn off unique key check if the table has;&lt;/li&gt;
&lt;li&gt;turn off foreign key check;&lt;/li&gt;
&lt;/ol&gt;


&lt;ul&gt;
    &lt;li&gt;
When importing data into InnoDB, make sure that MySQL does not have autocommit mode enabled because that requires a log flush to disk for every insert. To disable autocommit during your import operation, surround it with SET autocommit and COMMIT statements:

&lt;code&gt;SET autocommit=0;
... SQL import statements ...
COMMIT;&lt;/code&gt;

If you use the mysqldump option --opt, you get dump files that are fast to import into an InnoDB  table, even without wrapping them with the SET autocommit and COMMIT statements. &lt;/li&gt;
    &lt;li&gt;If you have UNIQUE constraints on secondary keys, starting from MySQL 3.23.52 and 4.0.3, you can speed up table imports by temporarily turning off the uniqueness checks during the import session:

&lt;code&gt;SET unique_checks=0;
... SQL import statements ...
SET unique_checks=1;&lt;/code&gt;

For big tables, this saves a lot of disk I/O because InnoDB can use its insert buffer to write secondary index records in a batch. Be certain that the data contains no duplicate keys.&lt;/li&gt;
    &lt;li&gt;#

If you have FOREIGN KEY constraints in your tables, starting from MySQL 3.23.52 and 4.0.3, you can speed up table imports by turning the foreign key checks off for a while in the import session:
&lt;code&gt;
SET foreign_key_checks=0;
... SQL import statements ...
SET foreign_key_checks=1;&lt;/code&gt;

For big tables, this can save a lot of disk I/O.
&lt;/li&gt;

If the above solution still can not quick your import process. Try &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html"&gt;mysqlimport&lt;/a&gt;.  You can use mysqldump to dump a sql file and a text file. There is an example, look like this:
&lt;pre name='code' class='sql'&gt;
shell&gt; mysql -e 'CREATE TABLE imptest(id INT, n VARCHAR(30))' test
shell&gt; ed
a
100     Max Sydow
101     Count Dracula
.
w imptest.txt
32
q
shell&gt; od -c imptest.txt
0000000   1   0   0  \t   M   a   x       S   y   d   o   w  \n   1   0
0000020   1  \t   C   o   u   n   t       D   r   a   c   u   l   a  \n
0000040
shell&gt; mysqlimport --local test imptest.txt
test.imptest: Records: 2  Deleted: 0  Skipped: 0  Warnings: 0
shell&gt; mysql -e 'SELECT * FROM imptest' test
+------+---------------+
| id   | n             |
+------+---------------+
|  100 | Max Sydow     |
|  101 | Count Dracula |
+------+---------------+

&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/WcmAWFgRsoA" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/07/28/import-big-innodb-tables.html</feedburner:origLink></item><item><title>Symfony 1.0 addJoin an array</title><link>http://feedproxy.google.com/~r/freetofeel/~3/EbTBwoLUT64/symfony-1-0-addjoin-an-array.html</link><pubDate>Sat, 03 Jul 2010 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/07/03/symfony-1-0-addjoin-an-array</guid><description>&lt;p&gt;In sf1.3, we can use addJoin(array('id_a'm 'id_b'), array('id_1', 'id_2'))&lt;/p&gt;

&lt;pre name='code' class='php'&gt;
/**
     * This is the way that you should add a straight (inner) join of two tables.  For
     * example:
     *
     * &lt;p&gt;
     * AND PROJECT.PROJECT_ID=FOO.PROJECT_ID
     * &lt;p&gt;
     *
     * left = PROJECT.PROJECT_ID
     * right = FOO.PROJECT_ID
     *
     * @param      mixed $left A String with the left side of the join.
     * @param      mixed $right A String with the right side of the join.
     * @param      mixed $operator A String with the join operator e.g. LEFT JOIN, ...
   *
     * @return     Criteria A modified Criteria object.
     */
    public function addJoin($left, $right, $operator = null)
    {
        $join = new Join();
    if (!is_array($left)) {
      // simple join
      $join-&gt;addCondition($left, $right);
    } else {
      // join with multiple conditions
      // deprecated: use addMultipleJoin() instead
      foreach ($left as $key =&gt; $value)
      {
        $join-&gt;addCondition($value, $right[$key]);
      }
    }
        $join-&gt;setJoinType($operator);
        
        return $this-&gt;addJoinObject($join);
    }
&lt;/pre&gt;


&lt;p&gt;Sometimes we still work on symfony 1.0. So when we want to join on more keys, it seems impossible.&lt;/p&gt;

&lt;pre name='code' class='php'&gt;
select * from books left join categories on book.category_id = categories.id where categories.name='biography'
&lt;/pre&gt;


&lt;p&gt;If books has 1,000,000 items. There are 100,000 categories, but only 1000 categories with name 'biography' . The above sql will go through all the categories. But we propel can generated sql like this:&lt;/p&gt;

&lt;pre name='code' class='php'&gt;
select * from books left join categories on book.category_id = categories.id and categories.name='biography'
&lt;/pre&gt;


&lt;p&gt;This sql can limit the touched categories number to 1000.&lt;/p&gt;

&lt;p&gt;So we can do following in symfony 1.0&lt;/p&gt;

&lt;pre name='code' class='php'&gt;
$c-&gt;addJoin(BookPeer::CATEGORY_ID, CategoryPeer::ID.' AND '.CategoryPeer::NAME.'= "biography"', Criteria::LEFT_JOIN);
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/EbTBwoLUT64" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/07/03/symfony-1-0-addjoin-an-array.html</feedburner:origLink></item><item><title>How to win others trust</title><link>http://feedproxy.google.com/~r/freetofeel/~3/TdZplYHj0P4/how-to-win-others-trust.html</link><pubDate>Mon, 28 Jun 2010 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/06/28/how-to-win-others-trust</guid><description>&lt;p&gt;I just want to post some suggestions about 'trust' from my experience. It might not be perfect, but I am sure some of them are mostly useful for you.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Trust"&gt;Trust (social sciences), reliance on another person or entity. Having faith in others and believing them.&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;    
    &lt;li&gt;&lt;strong&gt;Be polite.&lt;/strong&gt; Only when you respect the others, you can get the respect from the others. Only when you get respect, then it is possible for you to get the 'trust'.&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Trust is not two-way.&lt;/strong&gt; It doesn't mean if you trust somebody, somebody should also trust on you. But for sure they will try to trust you firstly. And then if you break the trust from this guy, it will difficulty for you to get it back.&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Trust is hard to copy.&lt;/strong&gt; If you didn't know how to be honest man, you will break it at sometime.&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Think before you say.&lt;/strong&gt; When somebody ask you something seriously, please think it for a while and then make the reply. If you don't know, you can try to give some references or just say 'no'. Don't waste the others' time and the time of yourself.&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Contribute to the others.&lt;/strong&gt; Try to share something or give some help for the others. Don't live in the world with yourself.&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Keep your promise.&lt;/strong&gt; If you lost your promise for the others several times and everybody knows you didn't try your best, you will lost the trust forever.&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Try to say 'sorry'. Don't always say 'sorry'.&lt;/strong&gt; When you lost your promise, try to say sorry and give a reasonable explanation, rather than ignore it. But..but don't always say sorry for the same mistake.&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;Undertake your mistake.&lt;/strong&gt; If you make something wrong in your group, please undertake the mistake, rather than hide it. If you think the others might be stupid, you will be the stupid one.&lt;/li&gt;

&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/TdZplYHj0P4" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/06/28/how-to-win-others-trust.html</feedburner:origLink></item><item><title>Mysql : Avoid Filesort</title><link>http://feedproxy.google.com/~r/freetofeel/~3/j4fbW5iD4MQ/mysql-avoid-filesort.html</link><pubDate>Thu, 03 Jun 2010 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/06/03/mysql-avoid-filesort</guid><description>&lt;ul&gt;
    &lt;li&gt;You can avoid the filesort by making order by column appear in the where clause&lt;/li&gt;

    &lt;li&gt;When using join, make sure the left side join table column is used in the ORDER BY clause or change the join type&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;a href="http://venublog.com/2007/11/29/mysql-how-to-avoid-filesort/"&gt;Reference&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/j4fbW5iD4MQ" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/06/03/mysql-avoid-filesort.html</feedburner:origLink></item><item><title>Fighting with an issue in cracked mac machine</title><link>http://feedproxy.google.com/~r/freetofeel/~3/r6Fae55R9Ss/fighting-with-an-issue-in-cracked-mac-machine.html</link><pubDate>Tue, 01 Jun 2010 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/06/01/fighting-with-an-issue-in-cracked-mac-machine</guid><description>&lt;p&gt;Problem: There is always a black border for every window in a cracked mac, including 'Finder', 'Terminal', even the icon on the desktop.&lt;/p&gt;

&lt;p&gt;Solution: Delete 'com.apple.universalaccess.plist' in /Usr/$YOURNAME/Library/Preferences/. And then Logout and login.&lt;/p&gt;

&lt;p&gt;It can fixed in my cracked mac machine.
And the main idea was back up your mac preferences&lt;/p&gt;

&lt;pre name='code' class='css'&gt;
cp -R /Usr/$YOURNAME/Library/Preferences/ /Usr/$YOURNAME/backup/
&lt;/pre&gt;


&lt;p&gt;And then when you login again, the preferences will be recreated again, like a new user.
For you, you just try to copy some plist from /Usr/$YOURNAME/backup/ to /Usr/$YOURNAME/Library/Preferences/. And then you can check which plist file was the fail reason&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/r6Fae55R9Ss" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/06/01/fighting-with-an-issue-in-cracked-mac-machine.html</feedburner:origLink></item><item><title>ERROR:  While executing gem ... (Gem::GemNotFoundException)</title><link>http://feedproxy.google.com/~r/freetofeel/~3/ZwhLq6IaXx4/error-while-executing-gem-gemgemnotfoundexception.html</link><pubDate>Mon, 31 May 2010 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/05/31/error-while-executing-gem-gemgemnotfoundexception</guid><description>&lt;p&gt;Try&lt;/p&gt;

&lt;pre name='code' class='php'&gt;
gem clean
&lt;/pre&gt;


&lt;p&gt;&lt;a href="http://stackoverflow.com/questions/2273503/ruby-gem-package-manager-failing-with-gemgemnotfoundexception"&gt;reference&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you got&lt;/p&gt;

&lt;pre name='code' class='php'&gt;
/usr/bin/gem:10: undefined method `manage_gems' for Gem:Module (NoMethodError)
&lt;/pre&gt;


&lt;p&gt;Check if there are two gem under /usr/bin/ directory.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/ZwhLq6IaXx4" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/05/31/error-while-executing-gem-gemgemnotfoundexception.html</feedburner:origLink></item><item><title>Joshuas Feel</title><link>http://feedproxy.google.com/~r/freetofeel/~3/-KhgVMQ9WZo/joshuas-feel.html</link><pubDate>Fri, 21 May 2010 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/05/21/joshuas-feel</guid><description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Important VS Urgent
In everyone's life, there are urgent things and important things. You will feel pressure if there are a lot of urgent things. And you will pick urgent things before starting the important ones. But have you think about this logic? Sometimes the urgent things are caused by the important ones. Taking exercises is important thing for your healthy. But if you get sick, that will be the urgent thing. But if you pay more attention to the important things, may be you will not get sick. This is the logic!
So pay more attention to the important ones, which will save you a lot of time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The best architecture will not the one that can work best for your project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rome was not built in a day!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/-KhgVMQ9WZo" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/05/21/joshuas-feel.html</feedburner:origLink></item><item><title>[scrum] Perfect Estimate</title><link>http://feedproxy.google.com/~r/freetofeel/~3/Lsg_k56sExA/scrum-perfect-estimate.html</link><pubDate>Sat, 17 Apr 2010 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/04/17/scrum-perfect-estimate</guid><description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Estimates can be better done by the people who have the experience of similar kind of work already done, Peers and Historical data. It is always better to involve the people who have similar work experience for appropriate estimations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No one will estimate perfectly for the first time, for sure team members will either over estimate or under estimate the task work, but it makes them realize how much they can produce and for next sprint the team members will try to estimate a bit more precisely.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After three to four sprints, team members will be in a position to understand their own strength and how much work they can do. This leads for better estimates.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/Lsg_k56sExA" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/04/17/scrum-perfect-estimate.html</feedburner:origLink></item><item><title>Be careful when using propel-build-schema</title><link>http://feedproxy.google.com/~r/freetofeel/~3/1RWy1E3tHzs/be-careful-when-using-propel-build-schema.html</link><pubDate>Thu, 15 Apr 2010 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/04/15/be-careful-when-using-propel-build-schema</guid><description>&lt;p&gt;Tip1:
The generated schema.yml will has the duplicated table when you are using propel-build-schema to generate the yml file based on Symfony Version 1.&lt;/p&gt;

&lt;pre class='yml' name='code'&gt;
propel:
  duplicated_table_name:
&lt;/pre&gt;


&lt;p&gt;Tip 2:
In config/propel.ini, the propel.database means the database engine.&lt;/p&gt;

&lt;pre class='php' name='code'&gt;
propel.database            = mysql
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/1RWy1E3tHzs" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/04/15/be-careful-when-using-propel-build-schema.html</feedburner:origLink></item><item><title>Apache Unable to load dynamic library php_openssl.dll</title><link>http://feedproxy.google.com/~r/freetofeel/~3/Ev2oJrD6MnM/apache-unable-to-load-dynamic-library-php_openssl-dll.html</link><pubDate>Tue, 09 Mar 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/03/09/apache-unable-to-load-dynamic-library-php_openssl-dll</guid><description>&lt;p&gt;As a windows user, sometimes you have to face and handle this kind of problems.&lt;/p&gt;

&lt;p&gt;The error: “PHP Startup: Unable to load dynamic library php_openssl.dll. The operating system cannot run %1“, when you are trying to start the apache server in the error.log file.&lt;/p&gt;

&lt;p&gt;Basically what this error is trying to mention that there is an issue with your php_openssl.dll and a possible mismatch with other depending libraries. To resolve this, follow the below steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Rename ’ssleay32.dll’ and ‘libeay32.dll’ in c:\windows\system32 to ’ssleay32.dll.old’ and ‘libeay32.dll.old’ respectively.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Copy ’ssleay32.dll’ and ‘libeay32.dll’ from your PHP folder to the system32.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Restart the apache webserver.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Even I resolve it finally , I can learn nothing from it. This such a damn rule("copy the dll file from PHP folder to system32") was made by Microsoft? I don't know. You couldn't find the solution even in php document. The solution was passed from one developer to another. But no matter how I can stay away this kind of damn things for a while.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/Ev2oJrD6MnM" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/03/09/apache-unable-to-load-dynamic-library-php_openssl-dll.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2010-03-08</title><link>http://feedproxy.google.com/~r/freetofeel/~3/NeH3jWRBrhY/twitter-weekly-updates-for-2010-03-08-2.html</link><pubDate>Mon, 08 Mar 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/03/08/twitter-weekly-updates-for-2010-03-08-2</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;&lt;a href="http://ss64.com/nt/" rel="nofollow"&gt;http://ss64.com/nt/&lt;/a&gt; An A-Z Index of the Windows XP command line &lt;a href="http://twitter.com/Joshua_C/statuses/10172817942"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;xcopy source_folder destination_folder /E /D /Y &lt;a href="http://twitter.com/Joshua_C/statuses/10161212004"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Nginx 0.8.34 + PHP 5.2.13 (FastCGI) 可以承受3万以上的并发连接数，相当于同等环境下Apache的10倍 &lt;a href="http://blog.s135.com/nginx_php_v6/" rel="nofollow"&gt;http://blog.s135.com/nginx_php_v6/&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/10147838282"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Google 1 gigabit per second, network &lt;a href="http://www.google.com/appserve/fiberrfi" rel="nofollow"&gt;http://www.google.com/appserve/fiberrfi&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/10064675925"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;It would be interesting to build a &amp;#39;no dependence plugin&amp;#39; with nodejs &lt;a href="http://s3.amazonaws.com/four.livejournal/20091117/jsconf.pdf" rel="nofollow"&gt;http://s3.amazonaws.com/four.livejournal/20091117/jsconf.pdf&lt;/a&gt; #&lt;a href="http://search.twitter.com/search?q=%23nodejs"&gt;nodejs&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/10064480377"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;If just want to improve the speed, I would prefer to hiphop instead of Objective-PHP. &lt;a href="http://twitter.com/Joshua_C/statuses/10064076979"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;It seems jquery was the right choice. &lt;a href="http://ejohn.org/apps/workshop/todo/" rel="nofollow"&gt;http://ejohn.org/apps/workshop/todo/&lt;/a&gt; &lt;a href="http://ejohn.org/apps/workshop/social/" rel="nofollow"&gt;http://ejohn.org/apps/workshop/social/&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/10003325256"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Diferent company culture will result in different result. Different attitudes towards different life. &lt;a href="http://twitter.com/Joshua_C/statuses/9973621157"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Interesting thing, yahoo logo can not be saved. google logo can be viewed and saved as an normal pictures. baidu logo was using &amp;#39;usemap&amp;#39;. &lt;a href="http://twitter.com/Joshua_C/statuses/9973524607"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Everytime I could relaxed from here -  &lt;a href="http://www.douban.com/artist/baishui/" rel="nofollow"&gt;http://www.douban.com/artist/baishui/&lt;/a&gt;. &lt;a href="http://twitter.com/Joshua_C/statuses/9972268887"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/NeH3jWRBrhY" height="1" width="1"/&gt;</description><enclosure url="http://s3.amazonaws.com/four.livejournal/20091117/jsconf.pdf" length="447789" type="application/pdf" /><feedburner:origLink>http://freetofeel.com/2010/03/08/twitter-weekly-updates-for-2010-03-08-2.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2010-03-08</title><link>http://feedproxy.google.com/~r/freetofeel/~3/OYCPSJtqsWU/twitter-weekly-updates-for-2010-03-08.html</link><pubDate>Mon, 08 Mar 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/03/08/twitter-weekly-updates-for-2010-03-08</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;&lt;a href="http://ss64.com/nt/" rel="nofollow"&gt;http://ss64.com/nt/&lt;/a&gt; An A-Z Index of the Windows XP command line &lt;a href="http://twitter.com/Joshua_C/statuses/10172817942"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;xcopy source_folder destination_folder /E /D /Y &lt;a href="http://twitter.com/Joshua_C/statuses/10161212004"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Nginx 0.8.34 + PHP 5.2.13 (FastCGI) 可以承受3万以上的并发连接数，相当于同等环境下Apache的10倍 &lt;a href="http://blog.s135.com/nginx_php_v6/" rel="nofollow"&gt;http://blog.s135.com/nginx_php_v6/&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/10147838282"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Google 1 gigabit per second, network &lt;a href="http://www.google.com/appserve/fiberrfi" rel="nofollow"&gt;http://www.google.com/appserve/fiberrfi&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/10064675925"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;It would be interesting to build a &amp;#39;no dependence plugin&amp;#39; with nodejs &lt;a href="http://s3.amazonaws.com/four.livejournal/20091117/jsconf.pdf" rel="nofollow"&gt;http://s3.amazonaws.com/four.livejournal/20091117/jsconf.pdf&lt;/a&gt; #&lt;a href="http://search.twitter.com/search?q=%23nodejs"&gt;nodejs&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/10064480377"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;If just want to improve the speed, I would prefer to hiphop instead of Objective-PHP. &lt;a href="http://twitter.com/Joshua_C/statuses/10064076979"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;It seems jquery was the right choice. &lt;a href="http://ejohn.org/apps/workshop/todo/" rel="nofollow"&gt;http://ejohn.org/apps/workshop/todo/&lt;/a&gt; &lt;a href="http://ejohn.org/apps/workshop/social/" rel="nofollow"&gt;http://ejohn.org/apps/workshop/social/&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/10003325256"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Diferent company culture will result in different result. Different attitudes towards different life. &lt;a href="http://twitter.com/Joshua_C/statuses/9973621157"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Interesting thing, yahoo logo can not be saved. google logo can be viewed and saved as an normal pictures. baidu logo was using &amp;#39;usemap&amp;#39;. &lt;a href="http://twitter.com/Joshua_C/statuses/9973524607"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Everytime I could relaxed from here -  &lt;a href="http://www.douban.com/artist/baishui/" rel="nofollow"&gt;http://www.douban.com/artist/baishui/&lt;/a&gt;. &lt;a href="http://twitter.com/Joshua_C/statuses/9972268887"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/OYCPSJtqsWU" height="1" width="1"/&gt;</description><enclosure url="http://s3.amazonaws.com/four.livejournal/20091117/jsconf.pdf" length="447789" type="application/pdf" /><feedburner:origLink>http://freetofeel.com/2010/03/08/twitter-weekly-updates-for-2010-03-08.html</feedburner:origLink></item><item><title>Using JSONP to do the cross domain request </title><link>http://feedproxy.google.com/~r/freetofeel/~3/UmKdd23GU4s/using-jsonp-to-do-the-cross-domain-request.html</link><pubDate>Fri, 26 Feb 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/02/26/using-jsonp-to-do-the-cross-domain-request</guid><description>&lt;p&gt;JSONP (script insertion)&lt;/p&gt;

&lt;p&gt;How does it work?&lt;/p&gt;

&lt;p&gt;Lets assume, that we have a textarea iResponse and we want to set its value to something that we will receive from the server. And that we have some server in a different domain. With script insertion we can send a HTTP-GET request to the server like this:&lt;/p&gt;

&lt;pre name='code' class='javascript'&gt;
function insertScript( url){
    var script = document.createElement("script");
    script.setAttribute("src",url);
    script.setAttribute("type","text/javascript");
    document.body.appendChild(script);
}
&lt;/pre&gt;


&lt;p&gt;url in the request is a proper HTTP-GET request with the parameters. Hence server can receive input to work with. The trick with JSONP is how the output is passed back to the client. The newly downloaded “script” will be evaluated on load. Hence, if the script contains:&lt;/p&gt;

&lt;pre name='code' class='javascript'&gt;
call_me( value );
&lt;/pre&gt;


&lt;p&gt;A method call_me() will be called with the value as a parameter. Hence we should have another bit of script in our client to have a callback:&lt;/p&gt;

&lt;pre name='code' class='javascript'&gt;
function call_me( vParam ){
        document.getElementsByName("iResponse")[0].value = vParam;
}
&lt;/pre&gt;


&lt;p&gt;Finally, JSONP-based services are (if they are not tailored to a single client when the callback is predefined) should take the callback name as a parameter:&lt;/p&gt;

&lt;pre name='code' class='javascript'&gt;
url = "http://dummy.server.org/Create_a_Script.php?callback=call_me&amp;......
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/UmKdd23GU4s" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/02/26/using-jsonp-to-do-the-cross-domain-request.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2010-02-22</title><link>http://feedproxy.google.com/~r/freetofeel/~3/kiuX-AQcZhM/twitter-weekly-updates-for-2010-02-22.html</link><pubDate>Mon, 22 Feb 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/02/22/twitter-weekly-updates-for-2010-02-22</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;google buzz tips &lt;a href="http://googlesystem.blogspot.com/2010/02/google-buzz-tips.html" rel="nofollow"&gt;http://googlesystem.blogspot.com/2010/02/google-buzz-tips.html&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/9428245415"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Protocol Buffers and Hadoop at Twitter &lt;a href="http://slidesha.re/biq2Po" rel="nofollow"&gt;http://slidesha.re/biq2Po&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/9382297551"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/kiuX-AQcZhM" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/02/22/twitter-weekly-updates-for-2010-02-22.html</feedburner:origLink></item><item><title>Report plugin for Vanilla 2</title><link>http://feedproxy.google.com/~r/freetofeel/~3/wEJhhXNL4N0/report-plugin-for-vanilla-2.html</link><pubDate>Mon, 15 Feb 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/02/15/report-plugin-for-vanilla-2</guid><description>&lt;p&gt;You can find it &lt;a href="http://vanillaforums.org/addon/520/report-system"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Install
1. Unzip the plugin package and put it into Garden/plugins;
2. Enable it in admin panel;&lt;/p&gt;

&lt;p&gt;Configure:
1. Add the following code into file Garden\applications\vanilla\views\discussion\index.php
//Arround line 12 ~14
[CODE]
&amp;lt;?php $this-&gt;FireEvent('AfterDiscussionHeaderRender'); ?&gt;
[/CODE]&lt;/p&gt;

&lt;p&gt;Then the code likes:
[PIECE]
&amp;lt;?php $this-&gt;FireEvent('AfterDiscussionHeaderRender'); ?&gt;
&amp;lt;h2&amp;gt;&amp;lt;?php
   if (Gdn::Config('Vanilla.Categories.Use') === TRUE) {&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  echo Anchor($this-&amp;gt;Discussion-&amp;gt;Category, 'categories/'.$this-&amp;gt;Discussion-&amp;gt;CategoryID.'/'.Format::Url($this-&amp;gt;Discussion-&amp;gt;Category));
  echo '&amp;lt;span&amp;gt;&amp;amp;bull;&amp;lt;/span&amp;gt;';
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;   }
   echo Format::Text($this-&gt;Discussion-&gt;Name);
?&gt;&amp;lt;/h2&amp;gt;
[/PIECE]&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Config pagination for admin page:
Add following line into config.php
$Configuration['Vanilla']['Report']['PerPage'] = 10;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/wEJhhXNL4N0" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/02/15/report-plugin-for-vanilla-2.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2010-02-08</title><link>http://feedproxy.google.com/~r/freetofeel/~3/_JTDLUtp4n8/twitter-weekly-updates-for-2010-02-08.html</link><pubDate>Mon, 08 Feb 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/02/08/twitter-weekly-updates-for-2010-02-08</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;I found it was so big different in their business mode between taobao.com and amazon.com until today. &lt;a href="http://twitter.com/Joshua_C/statuses/8756126714"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;京东：价格都还未标出，一大堆的好评就出来了，‘价格合适....’ 真的是这样？ &lt;a href="http://twitter.com/Joshua_C/statuses/8725366937"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://tinyurl.com/ylrpw4r" rel="nofollow"&gt;http://tinyurl.com/ylrpw4r&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/8715460310"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;等有空再收拾了，没有一个UI合我意 &lt;a href="http://twitter.com/Joshua_C/statuses/8715391975"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Tried several ways to cross. I like the feeling after I cross it successfully. &lt;a href="http://twitter.com/Joshua_C/statuses/8714650350"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Build google app engine proxy. &lt;a href="http://twitter.com/Joshua_C/statuses/8714622072"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Spend two hours to cross the GFW &lt;a href="http://twitter.com/Joshua_C/statuses/8714592641"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/_JTDLUtp4n8" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/02/08/twitter-weekly-updates-for-2010-02-08.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2010-02-01</title><link>http://feedproxy.google.com/~r/freetofeel/~3/bsDJ4RU53_s/twitter-weekly-updates-for-2010-02-01.html</link><pubDate>Mon, 01 Feb 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/02/01/twitter-weekly-updates-for-2010-02-01</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;How to promote innovation from your web team &lt;a href="http://briancray.com/2010/01/28/innovative-web-team/" rel="nofollow"&gt;http://briancray.com/2010/01/28/innovative-web-team/&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/8500603501"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;GReader  - Follow changes to any website &lt;a href="http://googlereader.blogspot.com/2010/01/follow-changes-to-any-website.html" rel="nofollow"&gt;http://googlereader.blogspot.com/2010/01/follow-changes-to-any-website.html&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/8235514055"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;GRader This Blog - Follow changes to any website &lt;a href="http://googlereader.blogspot.com/2010/01/follow-changes-to-any-website.html" rel="nofollow"&gt;http://googlereader.blogspot.com/2010/01/follow-changes-to-any-website.html&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/8235488069"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;今天老师说，国外穷人是买不起手机的，中国，太不可思议了。-- 是啊， 我们这点做的很好，星星之火最后燎原了 &lt;a href="http://twitter.com/Joshua_C/statuses/8235061591"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/bsDJ4RU53_s" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/02/01/twitter-weekly-updates-for-2010-02-01.html</feedburner:origLink></item><item><title>MySQL Custom Function</title><link>http://feedproxy.google.com/~r/freetofeel/~3/9yNxmMbpnRY/mysql-custom-function.html</link><pubDate>Mon, 01 Feb 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/02/01/mysql-custom-function</guid><description>&lt;p&gt;Today when I try to update a table in sql command, I didn't want to use the mysql function &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_uuid"&gt;uuid &lt;/a&gt;to generate a string with middle line in it. So I try to use mysql &lt;a href="http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html"&gt;custom function&lt;/a&gt; to generate a 32-bit length string without middle line.&lt;/p&gt;

&lt;pre name='code' class='sql'&gt;
DELIMITER ;

DROP FUNCTION IF EXISTS uid;
DELIMITER $$

CREATE FUNCTION uid()
    RETURNS VARCHAR(32)
BEGIN
    DECLARE c VARCHAR(36) DEFAULT '';
    SET c = uuid();
    return CONCAT(substring(c,1,8) , substring(c,10,4) , substring(c,15,4) , substring(c,20,4), substring(c,25,12));
END$$

DELIMITER ;

select uid();
&lt;/pre&gt;


&lt;p&gt;I am writing this because mysql is powerful enough to handle all the issues in web software development.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/9yNxmMbpnRY" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/02/01/mysql-custom-function.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2010-01-25</title><link>http://feedproxy.google.com/~r/freetofeel/~3/vAIxrc3_J4Q/twitter-weekly-updates-for-2010-01-25.html</link><pubDate>Mon, 25 Jan 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/01/25/twitter-weekly-updates-for-2010-01-25</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;Vanilla Forums Raises $500,000 For Open-Source Forum Software &lt;a href="http://www.techcrunch.com/2010/01/19/vanilla-forums-funding/" rel="nofollow"&gt;http://www.techcrunch.com/2010/01/19/vanilla-forums-funding/&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/7946411510"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/vAIxrc3_J4Q" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/01/25/twitter-weekly-updates-for-2010-01-25.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2010-01-18</title><link>http://feedproxy.google.com/~r/freetofeel/~3/J1OCLiwLC6g/twitter-weekly-updates-for-2010-01-18.html</link><pubDate>Mon, 18 Jan 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/01/18/twitter-weekly-updates-for-2010-01-18</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;&lt;a href="http://blogs.wsj.com/chinarealtime/2010/01/15/clearing-up-confusion-on-google-and-china/" rel="nofollow"&gt;http://blogs.wsj.com/chinarealtime/2010/01/15/clearing-up-confusion-on-google-and-china/&lt;/a&gt;  Clearing Up Confusion on Google and China &lt;a href="http://twitter.com/Joshua_C/statuses/7824537607"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/J1OCLiwLC6g" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/01/18/twitter-weekly-updates-for-2010-01-18.html</feedburner:origLink></item><item><title>What I learned today</title><link>http://feedproxy.google.com/~r/freetofeel/~3/9mnYCWntuMI/what-i-learned-today.html</link><pubDate>Wed, 13 Jan 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/01/13/what-i-learned-today</guid><description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.shinguz.ch/MySQL/mysql_mv.html"&gt;Materialised Views with MySQL&lt;/a&gt;&lt;/li&gt; -
I gave a simple test as this '&lt;a href="Materialized view makes login process 25k times faster"&gt;article&lt;/a&gt;'. 10 times faster in my case.
Before: 56 ms;
After: 6ms;
But the disadvantage of this is the data on the site will not be real time. So if you want to use method to speed up your site, it depends on what business of this page is.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At last I understand, &lt;a href="http://www.kiwitask.com"&gt;kiwi&lt;/a&gt; is dead. If you lost your customer for a while, you will lost them forever.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don't say yes or not simplely. Please give some explanation of yes or no even if no body ask you the reason.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Learn more about Scrum.
&lt;a href="http://www.freetofeel.com/2010/01/what-i-learned-today/scrum/" rel="attachment wp-att-365"&gt;&lt;img src="http://www.freetofeel.com/wp-content/uploads/2010/01/scrum-300x195.jpg" alt="scrum" title="scrum" width="300" height="195" class="aligncenter size-medium wp-image-365" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/9mnYCWntuMI" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/01/13/what-i-learned-today.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2010-01-11</title><link>http://feedproxy.google.com/~r/freetofeel/~3/nx-KHxd4PjE/twitter-weekly-updates-for-2010-01-11.html</link><pubDate>Mon, 11 Jan 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/01/11/twitter-weekly-updates-for-2010-01-11</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;在看第二财经谈哥本哈根，同时也在看http://www.brookings.edu/opinions/2009/1222_china_climate_lieberthal.aspx &lt;a href="http://twitter.com/Joshua_C/statuses/7557841646"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.cool-friends.cn/archives/5" rel="nofollow"&gt;http://www.cool-friends.cn/archives/5&lt;/a&gt; 还是关于舞女转动那个图片 &lt;a href="http://twitter.com/Joshua_C/statuses/7391581351"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/nx-KHxd4PjE" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/01/11/twitter-weekly-updates-for-2010-01-11.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2010-01-04</title><link>http://feedproxy.google.com/~r/freetofeel/~3/3MYx3W8B3-U/twitter-weekly-updates-for-2010-01-04.html</link><pubDate>Mon, 04 Jan 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/01/04/twitter-weekly-updates-for-2010-01-04</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;&lt;a href="http://www.addedbytes.com/cheat-sheets/" rel="nofollow"&gt;http://www.addedbytes.com/cheat-sheets/&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/7361828037"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @&lt;a href="http://twitter.com/kejunz"&gt;kejunz&lt;/a&gt; 2010 = 1+2-(3-4-5)*6*7*8-9 &lt;a href="http://bit.ly/5bVDir" rel="nofollow"&gt;http://bit.ly/5bVDir&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/7359868857"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.chinaunix.net/jh/39/482118.html" rel="nofollow"&gt;http://www.chinaunix.net/jh/39/482118.html&lt;/a&gt; 今天吃了高远球的亏，这帖子讲的不错 &lt;a href="http://twitter.com/Joshua_C/statuses/7298751284"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Spence-Chapin- accredited nonprofit agency that has been offering quality adoption services for over 100 years.http://www.spence-chapin.org/ &lt;a href="http://twitter.com/Joshua_C/statuses/7292719362"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;2010！ &lt;a href="http://twitter.com/Joshua_C/statuses/7238103258"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;There is a little fear for I am going to lose 2009! &lt;a href="http://twitter.com/Joshua_C/statuses/7237792551"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;08做的plan 经过一年的实践，并没有像想象中的那样带来经济价值，但其他方面我都得到了。 &lt;a href="http://twitter.com/Joshua_C/statuses/7237522656"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;08前做的plan 经过一年的实践，并没有像想象中的那样带来经济价值，但其他方面我都得到了。 &lt;a href="http://twitter.com/Joshua_C/statuses/7237512078"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @&lt;a href="http://twitter.com/smashingmag"&gt;smashingmag&lt;/a&gt; A Designer’s List of New Year’s Resolutions - &lt;a href="http://bit.ly/4G0v7O" rel="nofollow"&gt;http://bit.ly/4G0v7O&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/7229858111"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @yingeli: Liu Xiaobo poems,read by Paul Auster: &lt;a href="http://tr.my/F32" rel="nofollow"&gt;http://tr.my/F32&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/7229694333"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @&lt;a href="http://twitter.com/keso"&gt;keso&lt;/a&gt; 孔子过泰山，见到一妇人在哭，让子路去问问咋回事。妇人道：我老公公被老虎吃了，老公又被老虎吃了，孩子也被老虎吃了。那你怎么不离开这里呢？妇人道：这里不用办证啊。子曰：“小子识之，苛证猛于虎也。” &lt;a href="http://twitter.com/Joshua_C/statuses/7179988038"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/3MYx3W8B3-U" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/01/04/twitter-weekly-updates-for-2010-01-04.html</feedburner:origLink></item><item><title>Symfony + Vanilla2 + SSO</title><link>http://feedproxy.google.com/~r/freetofeel/~3/KWNVb4lLX3Q/symfony-vanilla2-sso.html</link><pubDate>Mon, 04 Jan 2010 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2010/01/04/symfony-vanilla2-sso</guid><description>&lt;p&gt;Vanilla2 is really really cool! Both the interface and functionality are very good.
I give a implementation of integrating the vanilla forum into a symfony project with SSO.
I have given some investigation of the SSO. If you have a lot of applications deployed in different domains, &lt;a href="http://www.jasig.org/cas"&gt;CAS&lt;/a&gt; is a better choice. But it will take you a lot of time to implement. As I can think, there is a CAS server using 8080 port that you should deploy.
And I found an interesting post &lt;a href="http://www.adaniels.nl/articles/simple-single-sign-on-for-php/"&gt;"Simple Single Sign-On for PHP"&lt;/a&gt;. I really like this idea.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://www.adaniels.nl/wp-content/uploads/sso-diagram_binck.png" alt="simple SSO" width="300" height="213" /&gt;&lt;/p&gt;

&lt;p&gt;The main idea is using the &lt;a href="http://learn.clemsonlinux.org/wiki/Symlink"&gt;symlinks&lt;/a&gt; in Linux system to link one session file in domain aaa.domain.com to another in bb.domain.com. To implementation this idea into your application is simple. But there is not so many security test for this idea. I have given a integration of &lt;a href="http://bbpress.org/"&gt;bbpress&lt;/a&gt; into my symfony project. But there is a lot of interface should be modified in bbpress, like login, auth_user and so on. And I didn't want to spend so much time on it. So I almost give up.&lt;/p&gt;

&lt;p&gt;After I installed the &lt;a href="http://vanillaforums.org/"&gt;vanilla 2&lt;/a&gt;, I was shocked by its UI.
&lt;a href="http://www.freetofeel.com/2010/01/symfony-vanilla2-sso/screenshot/" rel="attachment wp-att-346"&gt;&lt;img src="http://www.freetofeel.com/wp-content/uploads/2010/01/screenshot-300x213.png" alt="screenshot" title="screenshot" width="300" height="213" class="aligncenter size-medium wp-image-346" /&gt;&lt;/a&gt;
And there is a &lt;a href="http://vanillaforums.org/page/SingleSignOn"&gt;SSO plugin&lt;/a&gt; for vanilla 2. The main idea to implement vanilla-SSO is sharing the domain cookie and sharing the current user information in the main site. That the vanilla will try to get the current user information. If there is, the user will sign in the vanilla. But this only limit to these sites have the same domain. For example, your main application was deployed on xx.domain.com and the vanilla should be deployed on yy.domain.com.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/KWNVb4lLX3Q" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2010/01/04/symfony-vanilla2-sso.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-12-28</title><link>http://feedproxy.google.com/~r/freetofeel/~3/0cEwKt5CFlI/twitter-weekly-updates-for-2009-12-28.html</link><pubDate>Mon, 28 Dec 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/12/28/twitter-weekly-updates-for-2009-12-28</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;@&lt;a href="http://twitter.com/YaYaZheng"&gt;YaYaZheng&lt;/a&gt; WOW~~~ &lt;a href="http://twitter.com/YaYaZheng/statuses/4467822814"&gt;in reply to YaYaZheng&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/7118009292"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;所谓的编程和架构：都是做事情，只是处于事情的不同阶段而已。就技术难度而言，一样。你也可以说他没有难度。 &lt;a href="http://twitter.com/Joshua_C/statuses/7001694475"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;终于又可以上网了，看来想和twitter保持同步是很难的。同时也发现从twitter 上节省下来的时间可不是个小数字。 &lt;a href="http://twitter.com/Joshua_C/statuses/6985116712"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Yoono - Twitter, Facebook, LinkedIn, MySpace, Flickr, IM... &lt;a href="https://addons.mozilla.org/en-US/firefox/search?q=twitter" rel="nofollow"&gt;https://addons.mozilla.org/en-US/firefox/search?q=twitter&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/6922877901"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/0cEwKt5CFlI" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/12/28/twitter-weekly-updates-for-2009-12-28.html</feedburner:origLink></item><item><title>Upload and downfile using scp</title><link>http://feedproxy.google.com/~r/freetofeel/~3/XeFsrvWaybo/upload-and-downfile-using-scp.html</link><pubDate>Fri, 18 Dec 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/12/18/upload-and-downfile-using-scp</guid><description>&lt;p&gt;The &lt;a href="http://www.linuxtutorialblog.com/post/ssh-and-scp-howto-tips-tricks"&gt;scp&lt;/a&gt; command allows you to copy files over ssh connections. This is pretty useful if you want to transport files between computers, for example to backup something.&lt;/p&gt;

&lt;p&gt;Upload local file to remote server:
scp localfile username@tohostname:/dir/&lt;/p&gt;

&lt;p&gt;Download remote file to local system:
scp username@tohostname:/remotefile /localdir/&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/XeFsrvWaybo" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/12/18/upload-and-downfile-using-scp.html</feedburner:origLink></item><item><title>2W records update with different sql engine</title><link>http://feedproxy.google.com/~r/freetofeel/~3/DNZGWh0LmlI/2w-records-update-with-different-sql-engine.html</link><pubDate>Tue, 15 Dec 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/12/15/2w-records-update-with-different-sql-engine</guid><description>&lt;p&gt;This is just a test result:
20000 records in table animals;&lt;/p&gt;

&lt;pre name='code' class='sql'&gt;
CREATE TABLE `animals` (                                                           
           `animal_id` mediumint(8) NOT NULL auto_increment,                                
           `animal_type` varchar(25) collate utf8_unicode_ci NOT NULL,                      
           `animal_name` varchar(25) collate utf8_unicode_ci NOT NULL,                      
           `created` datetime NOT NULL default '2009-02-02 00:00:00',                       
           `doubledata` double default NULL,                                                
           PRIMARY KEY  (`animal_id`),                                                      
           KEY `typekey` (`animal_type`,`animal_name`),                                     
           KEY `datetime` (`created`),                                                      
           KEY `DOUBLE` (`doubledata`)                                                      
         ) ENGINE=MyISAM AUTO_INCREMENT=20001 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci  
&lt;/pre&gt;


&lt;p&gt;sql file looks like this:&lt;/p&gt;

&lt;pre name='code' class='sql'&gt;
update animals set animal_type = 'xxx' where animal_id = 1;
update animals set animal_type = 'xxx' where animal_id = 2;
.
.
.
update animals set animal_type = 'dog123' where animal_id = 20000;
&lt;/pre&gt;


&lt;p&gt;With Innodb engine, the update time &gt; 5min( I just have no time to wait any more)
With MyISAM, the update time = 30 seconds.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/DNZGWh0LmlI" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/12/15/2w-records-update-with-different-sql-engine.html</feedburner:origLink></item><item><title>The simplest and quickest way to create mysql table demo records.</title><link>http://feedproxy.google.com/~r/freetofeel/~3/iNqZHnJOZNg/the-simplest-and-quickest-way-to-create-mysql-table-demo-records.html</link><pubDate>Mon, 14 Dec 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/12/14/the-simplest-and-quickest-way-to-create-mysql-table-demo-records</guid><description>&lt;p&gt;Take animals table as example,
Field        Type     Extra&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;id    mediumint(8)  auto_increment
animal_type  varchar(25)      &lt;br/&gt;
animal_name  varchar(25)&lt;/p&gt;

&lt;p&gt;Create one records in this table.
Step1. insert into animals(&lt;code&gt;animal_type&lt;/code&gt;, &lt;code&gt;animal_name&lt;/code&gt;) values('dingo', 'cat');
Step2:
insert into animals(&lt;code&gt;animal_type&lt;/code&gt;, &lt;code&gt;animal_name&lt;/code&gt;) select animal_type, animal_name from animals;&lt;/p&gt;

&lt;p&gt;Re-run the step2 serval times, you will find the records was increased as geometric progressions.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/iNqZHnJOZNg" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/12/14/the-simplest-and-quickest-way-to-create-mysql-table-demo-records.html</feedburner:origLink></item><item><title>MySQL Database Backup and Restore</title><link>http://feedproxy.google.com/~r/freetofeel/~3/YFkRnjVyums/mysql-backup-and-restore-system.html</link><pubDate>Mon, 14 Dec 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/12/14/mysql-backup-and-restore-system</guid><description>&lt;p&gt;&lt;strong&gt;Backup&lt;/strong&gt;
I was trying to find some backup and restore system for our product mysql database. There are a lot of tools can do this. But I think the simple way is using &lt;a href="https://help.ubuntu.com/community/CronHowto"&gt;crontab&lt;/a&gt; + &lt;a href="http://www.ntchosting.com/mysql/database-dump.html"&gt;mysqldump&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So I write a simple script&lt;/p&gt;

&lt;pre name='code' class='sql'&gt;
$ mysqldump -u [uname] -p[pass] [dbname] | gzip -9 &gt; [backupfile.sql.gz]
example:

15 2 * * * root mysqldump -u root -pPASSWORD --all-databases | gzip &gt; /usr/local/bk/database_`data '+%m-%d-%Y'`.sql.gz 
&lt;/pre&gt;


&lt;p&gt;If you want to extract the .gz file, use the command below:&lt;/p&gt;

&lt;pre name='code' class='html'&gt;
$ gunzip [backupfile.sql.gz]
&lt;/pre&gt;


&lt;p&gt;This script will vardump all my database into the database_&lt;code&gt;data '+%m-%d-%Y'&lt;/code&gt;.sql.gz zip file at 2::15am on every day of every month.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Restoring&lt;/strong&gt;
Restore the databases is simple.&lt;/p&gt;

&lt;pre name='code' class='sql'&gt;
$ mysql -u [uname] -p[pass] [db_to_restore] &lt; [backupfile.sql]
&lt;/pre&gt;


&lt;p&gt;To restore from a compress sql:&lt;/p&gt;

&lt;pre name='code' class='sql'&gt;
gunzip &lt; [backupfile.sql.gz] | mysql -u [uname] -p[pass] [dbname]
&lt;/pre&gt;


&lt;p&gt;If you need to restore a database that already exists, you'll need to use mysqlimport command. The syntax for mysqlimport is as follows&lt;/p&gt;

&lt;pre name='code' class='sql'&gt;
mysqlimport -u [uname] -p[pass] [dbname] [backupfile.sql]
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/YFkRnjVyums" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/12/14/mysql-backup-and-restore-system.html</feedburner:origLink></item><item><title>Using Rsync and SSH to synchronise between two servers</title><link>http://feedproxy.google.com/~r/freetofeel/~3/vKAR72n0RcA/using-rsync-and-ssh-to-synchronise-between-two-servers.html</link><pubDate>Fri, 11 Dec 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/12/11/using-rsync-and-ssh-to-synchronise-between-two-servers</guid><description>&lt;p&gt;$ rsync -avz -e ssh remoteuser@remotehost:/remote/dir /this/dir/&lt;/p&gt;

&lt;p&gt;&lt;a href="http://troy.jdmz.net/rsync/index.html"&gt;refs&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/vKAR72n0RcA" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/12/11/using-rsync-and-ssh-to-synchronise-between-two-servers.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-12-07</title><link>http://feedproxy.google.com/~r/freetofeel/~3/8G7spP0LTW0/twitter-weekly-updates-for-2009-12-07.html</link><pubDate>Mon, 07 Dec 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/12/07/twitter-weekly-updates-for-2009-12-07</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;HTM::Sanitizer, this lib help you to parse html easier.Don&amp;#39;t invent the wheel anymore. &lt;a href="http://www.codinghorror.com/blog/archives/001311.html" rel="nofollow"&gt;http://www.codinghorror.com/blog/archives/001311.html&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/6433320128"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;node.js + NOSQL database , cool idea. Hope I can get a project to give a try. &lt;a href="http://simonwillison.net/2009/Nov/23/node/" rel="nofollow"&gt;http://simonwillison.net/2009/Nov/23/node/&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/6432961969"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;google public dns &lt;a href="http://blog.s135.com/google_public_dns/" rel="nofollow"&gt;http://blog.s135.com/google_public_dns/&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/6421480322"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;I think it is wrong decision that integrate twitter into linkedin.  Not every product is suitable for integration twitter. #&lt;a href="http://search.twitter.com/search?q=%23linkedin"&gt;linkedin&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/6388822149"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Dear Windows7, you are more quick, you are more safe? But you are definitely more difficult to use! #&lt;a href="http://search.twitter.com/search?q=%23windows7"&gt;windows7&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/6269306864"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/8G7spP0LTW0" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/12/07/twitter-weekly-updates-for-2009-12-07.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-11-30</title><link>http://feedproxy.google.com/~r/freetofeel/~3/TDIaS4o4zUA/twitter-weekly-updates-for-2009-11-30.html</link><pubDate>Mon, 30 Nov 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/11/30/twitter-weekly-updates-for-2009-11-30</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;Client-side JavaScript file processing &lt;a href="http://arstechnica.com/open-source/news/2009/11/w3c-publishes-draft-of-new-file-api-spec.ars" rel="nofollow"&gt;http://arstechnica.com/open-source/news/2009/11/w3c-publishes-draft-of-new-file-api-spec.ars&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/6166425316"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;cn.scs.msg.yahoo.com for Yahoo message on pidgin &lt;a href="http://twitter.com/Joshua_C/statuses/6163527876"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;每次搬家都是一次新的适应。每次启程都是一个新的视角。 &lt;a href="http://twitter.com/Joshua_C/statuses/6162589567"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/TDIaS4o4zUA" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/11/30/twitter-weekly-updates-for-2009-11-30.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-11-23</title><link>http://feedproxy.google.com/~r/freetofeel/~3/8LYkJPbAhSA/twitter-weekly-updates-for-2009-11-23.html</link><pubDate>Mon, 23 Nov 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/11/23/twitter-weekly-updates-for-2009-11-23</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;看着老外学习中国古典文化，研究甲骨文，研究易经。我们崇外的日子太久了，该内敛一些了，昨天看了2012，最后还是中国人拯救了全世界人民。 &lt;a href="http://twitter.com/Joshua_C/statuses/5974127427"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Are you enjoying (life( and )work)? &lt;a href="http://www.ry-to-job.com/ry-to-job/flame/j-mainflame-template.html" rel="nofollow"&gt;http://www.ry-to-job.com/ry-to-job/flame/j-mainflame-template.html&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/5882098738"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Finally, tweets has its own &amp;#39;Reply&amp;#39; and &amp;#39;Retweet&amp;#39; #&lt;a href="http://search.twitter.com/search?q=%23twitter"&gt;twitter&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/5797626254"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/8LYkJPbAhSA" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/11/23/twitter-weekly-updates-for-2009-11-23.html</feedburner:origLink></item><item><title>Sign in your PDF document</title><link>http://feedproxy.google.com/~r/freetofeel/~3/bKW4ySZEWZ4/sign-in-your-pdf-document.html</link><pubDate>Thu, 19 Nov 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/11/19/sign-in-your-pdf-document</guid><description>&lt;p&gt;Have you ever succeed to sign in a PDF file?
Today I try several methods of &lt;a href="http://www.labnol.org/software/sign-pdf-documents/9333/"&gt;How to Sign Documents Electronically – No Ink or Paper Required&gt;&lt;/a&gt;.
1.
I try to make an image signature at &lt;a href="http://www.mylivesignature.com/mls_sigdraw.php"&gt;MyLiveSignature&lt;/a&gt;. And then download it into my local machine;
Try to convert my PDF file to word file via &lt;a href="http://www.pdftoword.com/"&gt;web service&lt;/a&gt;.
And then upload the doc file and attached the signature image at the right place. Save it as PDF file again.
The PDF file will be messed through this way. So I suggest the second way, easier and faster.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="http://www.echosign.com/"&gt;Echosign&lt;/a&gt;
Upload you PDF file ask signature and get the signature document.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/bKW4ySZEWZ4" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/11/19/sign-in-your-pdf-document.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-11-16</title><link>http://feedproxy.google.com/~r/freetofeel/~3/pmvYuhGi5L4/twitter-weekly-updates-for-2009-11-16.html</link><pubDate>Mon, 16 Nov 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/11/16/twitter-weekly-updates-for-2009-11-16</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;amazing with this php code &amp;#39;public function executeIndex(sfWebRequest $request)&amp;#39; the parameter type was defined there. ....? &lt;a href="http://twitter.com/Joshua_C/statuses/5765597472"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @digitalboy
  
RT @jasontsui: 交通大学消息人士透露，交大被挑选6名学生参加与奥巴马的对话。与奥巴马对话学生名单是从上海各高校（大学）挑选出2到5人，学生们日前就被限制部分自由，集中活动和生活。 &lt;a href="http://twitter.com/Joshua_C/statuses/5649158974"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;许久没有担心 windows的文件夹只读属性了，今天也体验了一把它的厉害。windows需要通过共享设权来去掉readonly文件夹属性 &lt;a href="http://twitter.com/Joshua_C/statuses/5591664083"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/pmvYuhGi5L4" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/11/16/twitter-weekly-updates-for-2009-11-16.html</feedburner:origLink></item><item><title>Folder or file permission in php project installation process</title><link>http://feedproxy.google.com/~r/freetofeel/~3/b6XyMCiy-3w/folder-or-file-permission-in-php-project-installation-process.html</link><pubDate>Mon, 16 Nov 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/11/16/folder-or-file-permission-in-php-project-installation-process</guid><description>&lt;p&gt;Most projects will add notes like '..don't forget to change the "cache" folder permission: $chmod -R 777 xxx' in their project install guide.
But have you noticed that there are still a lot of users will ask the same question in their project forums? Yes, the solution is simple and easier. but why not make the simple thing more easier?&lt;/p&gt;

&lt;pre name='code' class='php'&gt;
chmod($options['file'], isset($options['file_mode']) ? $options['file_mode'] : 0666);
mkdir($dir, isset($options['dir_mode']) ? $options['dir_mode'] : 0777, true);
&lt;/pre
These code comes from symfony source code. It make me feels good in the installation process.
It is easier to make this permission modification process transparent for your user.&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/b6XyMCiy-3w" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/11/16/folder-or-file-permission-in-php-project-installation-process.html</feedburner:origLink></item><item><title>Textmate  for Ubuntu</title><link>http://feedproxy.google.com/~r/freetofeel/~3/Hs7aADJIgzY/textmate-for-ubuntu.html</link><pubDate>Tue, 10 Nov 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/11/10/textmate-for-ubuntu</guid><description>&lt;p&gt;GEdit + Gmate = Textmate on Ubuntu&lt;/p&gt;

&lt;p&gt;Install Gedit and Gedit plugins.
First you need to install the plugin extenstion for gedit&lt;/p&gt;

&lt;pre name='code' class='text'&gt;
sudo apt-get install gedit gedit-plugins
&lt;/pre&gt;


&lt;p&gt;Gmate is a usefull program (collection set of plugins and theme) transforming Gedit into a Textmate like&lt;/p&gt;

&lt;pre name='code' class='text'&gt;
cd ~
git clone git://github.com/lexrupy/gmate.git
cd gmate
sh ./install.sh
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/Hs7aADJIgzY" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/11/10/textmate-for-ubuntu.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-11-09</title><link>http://feedproxy.google.com/~r/freetofeel/~3/e2wfhG5om4o/twitter-weekly-updates-for-2009-11-09.html</link><pubDate>Mon, 09 Nov 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/11/09/twitter-weekly-updates-for-2009-11-09</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;Nic Cage bought it: yachts, a jet, a castle, over 50 cars, ... &lt;a href="http://bit.ly/494EvK" rel="nofollow"&gt;http://bit.ly/494EvK&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/5435774974"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/e2wfhG5om4o" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/11/09/twitter-weekly-updates-for-2009-11-09.html</feedburner:origLink></item><item><title>flickr widget</title><link>http://feedproxy.google.com/~r/freetofeel/~3/IFv4WldOcoo/flickr-widget.html</link><pubDate>Mon, 09 Nov 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/11/09/flickr-widget</guid><description>&lt;p&gt;I created a &lt;a href="http://github.com/JoshuaChi/Flickr-Widget"&gt;flickr widget&lt;/a&gt; for wordpress. It was built on &lt;a href="http://www.flickr.com/fun/zeitgeist/"&gt;Flickr Daily Zeitgeist&lt;/a&gt;. You can try it and welcome any comment.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://github.com/JoshuaChi/Flickr-Widget/archives/master"&gt;&lt;strong&gt;Download it NOW!&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;&lt;a href="http://www.freetofeel.com/projects/flickr_widget_1-2/" rel="attachment wp-att-293"&gt;&lt;img src="http://www.freetofeel.com/wp-content/uploads/2009/08/flickr_widget_11.gif" alt="flickr_widget_1" title="flickr_widget_1" width="530" height="289" class="aligncenter size-full wp-image-293" /&gt;&lt;/a&gt;
&lt;a href="http://www.freetofeel.com/projects/flickr_widget_2/" rel="attachment wp-att-290"&gt;&lt;img src="http://www.freetofeel.com/wp-content/uploads/2009/08/flickr_widget_2.gif" alt="flickr_widget_2" title="flickr_widget_2" width="177" height="261" class="aligncenter size-full wp-image-290" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/IFv4WldOcoo" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/11/09/flickr-widget.html</feedburner:origLink></item><item><title>Blowing in the wind</title><link>http://feedproxy.google.com/~r/freetofeel/~3/ARN0xR2l29Q/blowing-in-the-wind.html</link><pubDate>Fri, 06 Nov 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/11/06/blowing-in-the-wind</guid><description>&lt;p&gt;&lt;object height="100" width="400" align="middle" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"&gt;&lt;param value="best" name="quality"/&gt;&lt;param value="never" name="allowScriptAccess"/&gt;&lt;param value="true" name="allowFullScreen"/&gt;&lt;param value="transparent" name="wmode"/&gt;&lt;param value="http://www.blogcastone.net/audio/player.swf?soundFile=http%3A%2F%2Fwww.txms.cn%2Fuploadfile%2F2005122121542851.mp3&amp;amp;playerID=10&amp;amp;bg=0xeeeeee&amp;amp;leftbg=0x99ff00&amp;amp;lefticon=0x666666&amp;amp;rightbg=0x666666&amp;amp;rightbghover=0x99ff00&amp;amp;righticon=0xffffff&amp;amp;righticonhover=0xffffff&amp;amp;text=0x666666&amp;amp;slider=0x666666&amp;amp;track=0xFFFFFF&amp;amp;border=0x666666&amp;amp;loader=0x99ff00&amp;amp;loop=no&amp;amp;autostart=no" name="movie"/&gt;&lt;embed height="100" width="400" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="playerMode=embedded" wmode="transparent" bgcolor="#ffffff" quality="best" allowfullscreen="true" allowscriptaccess="never" src="http://www.blogcastone.net/audio/player.swf?soundFile=http%3A%2F%2Fwww.txms.cn%2Fuploadfile%2F2005122121542851.mp3&amp;amp;playerID=10&amp;amp;bg=0xeeeeee&amp;amp;leftbg=0x99ff00&amp;amp;lefticon=0x666666&amp;amp;rightbg=0x666666&amp;amp;rightbghover=0x99ff00&amp;amp;righticon=0xffffff&amp;amp;righticonhover=0xffffff&amp;amp;text=0x666666&amp;amp;slider=0x666666&amp;amp;track=0xFFFFFF&amp;amp;border=0x666666&amp;amp;loader=0x99ff00&amp;amp;loop=no&amp;amp;autostart=no" type="application/x-shockwave-flash"/&gt;&lt;/object&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;How many roads must a man walk down  一个人要经历多长的旅途

Before they call him a man  才能成为真正的男人

How many seas must a white dove sail  鸽子要飞跃几重大海

Before she sleeps in the sand  才能在沙滩上安眠

How many times must the cannon balls fly 要多少炮火

Before they’re forever banned  才能换来和平

The answer, my friend, is blowing in the wind  那答案，我的朋友，飘零在风中

The answer is blowing in the wind  答案随风飘逝

How many years must a mountain exist  山峰要屹立多久

Before it is washed to the sea  才是沧海桑田

How many years can some people exist  人们要等待多久

Before they’re allowed to be free  才能得到自由

How many times can a man turn his head  一个人要季度回首

And pretend that he just doesn’t see  才能视而不见

The answer, my friend, is blowing in the wind 那答案，我的朋友，在风中飘零

The answer is blowing in the wind  答案随风而逝

How many times must a man look up  一个人要仰望多少次

Before he can see the sky 才能见苍穹

How many ears must one man have  一个人要多么善听

Before he can hear people cry  才能听见他人的呐喊

How many deaths will it take  多少生命要陨落

‘Till he knows that too many people have died  才知道那已故的众生

The answer, my friend, is blowing in the wind  答案，我的朋友，在风中飘零

The answer is blowing in the wind 答案随风而逝
&lt;/code&gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/ARN0xR2l29Q" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/11/06/blowing-in-the-wind.html</feedburner:origLink></item><item><title>Push and pull mode </title><link>http://feedproxy.google.com/~r/freetofeel/~3/QWTGErywgLU/push-and-pull-mode.html</link><pubDate>Tue, 03 Nov 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/11/03/push-and-pull-mode</guid><description>&lt;p&gt;Push and pull are two data transfer mode in Internet. At the beginning of my studying of web development four years ago, there is only pull mode in fact. Everything is pull. When client send a request to server, it is pulling data from server actually. The result can be null or not null.  That means the response depend on server, not the pull object. We all know it is resource-wasting. If each time pull, the client can get something back, or the client pull the data when there should be response data in server side. So the geek invent many ways to achieve this. The following &lt;a href="http://code.google.com/p/pubsubhubbub/"&gt;pubsubhubbub&lt;/a&gt; is one of them. It can be used to replace the traditional Feed 'pull' mode.&lt;/p&gt;

&lt;iframe src="http://docs.google.com/present/embed?id=ajd8t6gk4mh2_34dvbpchfs&amp;size=m" frameborder="0" width="555" height="451"&gt;&lt;/iframe&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/QWTGErywgLU" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/11/03/push-and-pull-mode.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-11-02</title><link>http://feedproxy.google.com/~r/freetofeel/~3/GUHqru21Kj4/twitter-weekly-updates-for-2009-11-02.html</link><pubDate>Mon, 02 Nov 2009 00:00:00 PST</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/11/02/twitter-weekly-updates-for-2009-11-02</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;RT @&lt;a href="http://twitter.com/jeresig"&gt;jeresig&lt;/a&gt;  
The most important part of Google Wave uses jQuery: &lt;a href="http://j.mp/2xBtuF" rel="nofollow"&gt;http://j.mp/2xBtuF&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/5310065557"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;key-value stored, http, json to connect and read, javascript is the &amp;#39;SQL&amp;#39; language, it is cool - #&lt;a href="http://search.twitter.com/search?q=%23CouchDB"&gt;CouchDB&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/5287867410"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;#&lt;a href="http://search.twitter.com/search?q=%23erlang"&gt;erlang&lt;/a&gt; map,list is so cool &lt;a href="http://twitter.com/Joshua_C/statuses/5229964092"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;#&lt;a href="http://search.twitter.com/search?q=%23cakephp"&gt;cakephp&lt;/a&gt; Helloween? &lt;a href="http://bit.ly/15SJGu" rel="nofollow"&gt;http://bit.ly/15SJGu&lt;/a&gt; &lt;a href="http://cakephp.org/" rel="nofollow"&gt;http://cakephp.org/&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/5228405202"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/GUHqru21Kj4" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/11/02/twitter-weekly-updates-for-2009-11-02.html</feedburner:origLink></item><item><title>One Week Review</title><link>http://feedproxy.google.com/~r/freetofeel/~3/eKH_uiUqnHk/one-week-review.html</link><pubDate>Sat, 31 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/31/one-week-review</guid><description>&lt;ul&gt;
    &lt;li&gt;&lt;strong&gt;YUI Conference&lt;/strong&gt; has been closed recently. There are a lot of valuable &lt;a href="http://yuilibrary.com/yuiconf2009/"&gt;presentation&lt;/a&gt;.&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;&lt;a href="http://www.douban.com/subject/3673223/"&gt;Coders at Work&lt;/a&gt;&lt;/strong&gt; - &lt;br /&gt;&lt;em&gt;&lt;strong&gt;What you’ll learn&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;
How the best programmers in the world do their job&lt;br /&gt;
&lt;em&gt;&lt;strong&gt;Who is this book for?&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;
Programmers interested in the point of view of leaders in the field. Programmers looking for approaches that work for some of these outstanding programmers.&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://couchdb.apache.org/"&gt;CouchDB&lt;/a&gt; - The first database that I have known that can be operated by Javascript. Key-value stored, http, json to connect and read... &lt;br /&gt;&lt;a href="http://www.freetofeel.com/2009/10/one-week-review/sketch/" rel="attachment wp-att-269"&gt;&lt;img src="http://www.freetofeel.com/wp-content/uploads/2009/10/sketch.png" alt="sketch" title="sketch" width="292" height="340" class="aligncenter size-full wp-image-269" /&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://bret.appspot.com/entry/how-friendfeed-uses-mysql"&gt;How FriendFeed uses MySQL to store schema-less data&lt;/a&gt;&lt;ul&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/eKH_uiUqnHk" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/31/one-week-review.html</feedburner:origLink></item><item><title>check your current php.ini path</title><link>http://feedproxy.google.com/~r/freetofeel/~3/74mNgpQv6Sk/check-your-current-php-ini-path.html</link><pubDate>Sat, 31 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/31/check-your-current-php-ini-path</guid><description>&lt;p&gt;You might have two different PHP versions installed: one for the command line, and another for the web. So use this function which was provided by symfony that can be easily judge.&lt;/p&gt;

&lt;pre name='code' class='php'&gt;
/**
 * Gets the php.ini path used by the current PHP interpretor.
 *
 * @return string the php.ini path
 */
function get_ini_path()
{
  if ($path = get_cfg_var('cfg_file_path'))
  {
    return $path;
  }

  return 'WARNING: not using a php.ini file';
}
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/74mNgpQv6Sk" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/31/check-your-current-php-ini-path.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-10-26</title><link>http://feedproxy.google.com/~r/freetofeel/~3/c2EPpM1TwY0/twitter-weekly-updates-for-2009-10-26.html</link><pubDate>Mon, 26 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/26/twitter-weekly-updates-for-2009-10-26</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;Google will announce &amp;quot;Google Audio&amp;quot; next Wednesday to Mash Up 4 Cool Web 2.0 Music Services: &lt;a href="http://bit.ly/2qTE7c" rel="nofollow"&gt;http://bit.ly/2qTE7c&lt;/a&gt; // ‘谷歌音乐‘ in china? &lt;a href="http://twitter.com/Joshua_C/statuses/5160868495"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;There will be no PDO_MySQL in PHP5.3 &lt;a href="http://twitter.com/Joshua_C/statuses/5138923041"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;There will be no PDO_MySQL &lt;a href="http://twitter.com/Joshua_C/statuses/5138361963"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;@&lt;a href="http://twitter.com/sklivvz"&gt;sklivvz&lt;/a&gt; &lt;a href="mailto:joshokn@gmail.com"&gt;joshokn@gmail.com&lt;/a&gt; Thanks! &lt;a href="http://twitter.com/Joshua_C/statuses/5119114371"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @&lt;a href="http://twitter.com/sklivvz"&gt;sklivvz&lt;/a&gt; &lt;a href="mailto:joshokn@gmail.com"&gt;joshokn@gmail.com&lt;/a&gt; Thanks! &lt;a href="http://twitter.com/Joshua_C/statuses/5119103417"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @&lt;a href="http://twitter.com/sklivvz"&gt;sklivvz&lt;/a&gt; is it possible for you to send me a google wave invitation? Thanks in advance. &lt;a href="http://twitter.com/Joshua_C/statuses/5118745631"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @mengite: 又将迎来一波放送 Google Wave 的高潮, 我得到了 20 个邀请的权限.//可以赠送一枚吗？十分感谢。 &lt;a href="http://twitter.com/Joshua_C/statuses/5118443615"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;arguments is not an array. And turn objects into an array - var args = Array.prototype.slice.call(arguments); &lt;a href="http://twitter.com/Joshua_C/statuses/5113968257"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Turn Your Office into Whiteboard  &lt;a href="http://bit.ly/hQiPm" rel="nofollow"&gt;http://bit.ly/hQiPm&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/5085198549"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @&lt;a href="http://twitter.com/wangpei"&gt;wangpei&lt;/a&gt; RT @&lt;a href="http://twitter.com/anmin_wang"&gt;anmin_wang&lt;/a&gt; 如果是通过hunter找的工作，面试完hunter故作关心打电话给你，询问表现，顺便问“他/她问了什么问题？”“他/她有没有问xxx&amp;quot;，不要告诉他。他是把这些信息传递给其它candidate以增加成功机会。很流氓~~ &lt;a href="http://twitter.com/Joshua_C/statuses/5084740441"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Can somebody give an answer to the question in this article(http://bit.ly/C8bGD) about the code smell? &lt;a href="http://twitter.com/Joshua_C/statuses/5069970853"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @&lt;a href="http://twitter.com/wangpei"&gt;wangpei&lt;/a&gt; 男人为什么应当结婚？那是因为，当他遭遇绑架，他的妻子会为他奔走呼告，如果不结婚，奔走呼告者将是他年迈的母亲。 &lt;a href="http://twitter.com/Joshua_C/statuses/5064726515"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/c2EPpM1TwY0" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/26/twitter-weekly-updates-for-2009-10-26.html</feedburner:origLink></item><item><title>The interesting thing about Google Translate</title><link>http://feedproxy.google.com/~r/freetofeel/~3/Ae77unDI2hM/the-interesting-thing-about-google-translate.html</link><pubDate>Mon, 26 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/26/the-interesting-thing-about-google-translate</guid><description>&lt;p&gt;Have you noticed that when you open the &lt;a href="http://translate.google.com"&gt;Google Translate page&lt;/a&gt;, and you enter some simple words or a sentence you want to translate.
The translated URL in your address bar looks like
'http://translate.google.com/translate_t#el|en|%CE%9C%CE%BF%CF%85%20%CE%B1%CF%81%CE%AD%CF%83%CE%B5%CE%B9%20%CE%B1%CF%85%CF%84%CE%AE%20%CE%B7%20%CE%BC%CE%BF%CF%85%CF%83%CE%B9%CE%BA%CE%AE'
Here we take the example,
Translate sentence 'Μου αρέσει αυτή η μουσική' -&gt; 'I like this music'
Greek -&gt; English
As we seen, the sentence was encoded and appended as a parameter in the URL.
But if you try to translate some longer sentence, like,
'Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.Μου αρέσει αυτή η μουσική.'&lt;/p&gt;

&lt;p&gt;Now your address bar will look like 'http://translate.google.com/translate_t#'.
No matter which case, the translation words will be stored in cache. The next time, the translation words will be searched in cache firstly.
But why the translation words was added into Get parameter in first case? The only convenient that I can think is that we can copy and past the link from one browser to another. This convenient can not be achieved in the second case for the Get Parameter Length Limit. Is there any other secrets you know?&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/Ae77unDI2hM" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/26/the-interesting-thing-about-google-translate.html</feedburner:origLink></item><item><title>Query Performance Optimization</title><link>http://feedproxy.google.com/~r/freetofeel/~3/n4Ho7M23QxY/query-performance-optimization.html</link><pubDate>Sun, 25 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/25/query-performance-optimization</guid><description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Simple Treatment Method for a bad query is accessing less data and fecting less columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In MySQL, the simplest query cost metrics are:
a. Execution time
b. Number of rows examined
c. Number of rows returned&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The access types range from a full table scan to index scans, range scans, unique index lookups, and constants. Each of these is faster than the one before it. If you aren’t getting a good access type, the best way to solve the problem is usually by adding an appropriate index.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Duplicated test record with a cool SQL:
Assuming there was serval record in your table 'animals[id,animal_type , animal_name]'&lt;/p&gt;

&lt;blockquote&gt;&lt;blockquote&gt;&lt;p&gt;insert into animals(animal_type , animal_name ) select animal_type , animal_name from animals.&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;'The traditional approach to database design emphasizes doing as much work as possible with as few queries as possible.' - This advice doesn’t apply as much to MySQL. MySQL can run more than 50,000 simple queries per second on commodity server hardware and over 2,000 queries per second from a single correspondent on a Gigabit network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Summary: When Application Joins May Be More Efficient &gt;&gt;
Not doing joins in the application may be more efficient when:
You cache and reuse a lot of data from earlier queries
You use multiple MyISAM tables
You distribute data across multiple servers
You replace joins with IN( ) lists on large tables
A join refers to the same table multiple times&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow along with the illustration to see what happens when you send MySQL a query:
1). The client sends the SQL statement to the server.
2). The server checks the query cache. If there’s a hit, it returns the stored result from the cache; otherwise, it passes the SQL statement to the next step.
3). The server parses, preprocesses, and optimizes the SQL into a query execution plan.
4). The query execution engine executes the plan by making calls to the storage engine API.
5). The server sends the result to the client.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fetching result directly without buffering:
[code]&lt;/p&gt;

&lt;h1&gt;!/usr/bin/perl&lt;/h1&gt;

use DBI;
my $dbh = DBI-&gt;connect('DBI:mysql:;host=localhost', 'user', 'p4ssword');
my $sth = $dbh-&gt;prepare('SELECT * FROM HUGE_TABLE', { mysql_use_result =&gt; 1 });
$sth-&gt;execute( );
while ( my $row = $sth-&gt;fetchrow_array( ) ) {

&lt;h1&gt;Do something with result&lt;/h1&gt;

&lt;p&gt;}
[/code]
Notice that the call to prepare( ) specified to “use” the result instead of “buffering” it. You can also specify this when connecting, which will make every statement unbuffered:
[code]
my $dbh = DBI-&gt;connect('DBI:mysql:;mysql_use_result=1', 'user', 'p4ssword');
[/code]
This will be usfully when your fetching data is too big.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Query states:
Sleep -
  The thread is waiting for a new query from the client.
Query -
  The thread is either executing the query or sending the result back to the client.
Locked -
  The thread is waiting for a table lock to be granted at the server level.
Analyzing and statistics -
  The thread is checking storage engine statistics and optimizing the query.
Copying to tmp table [on disk] -
  The thread is processing the query and copying results to a temporary table, probably for a GROUP BY, for a filesort, or to satisfy a UNION. If the state ends with “on disk,” MySQL is converting an in-memory table to an on-disk table.
Sorting result -
  The thread is sorting a result set.
Sending data -
  This can mean several things: the thread might be sending data between stages of the query, generating the result set, or returning the result set to the client.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MySQL uses the term “join” more broadly than you might be used to. In sum, it considers every query a join—not just every query that matches rows from two tables, but every query.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/n4Ho7M23QxY" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/25/query-performance-optimization.html</feedburner:origLink></item><item><title>The behavior of javascript is not always your expected</title><link>http://feedproxy.google.com/~r/freetofeel/~3/XQmtCbd5d6w/the-behavior-of-javascript-is-not-always-your-expected.html</link><pubDate>Sat, 24 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/24/the-behavior-of-javascript-is-not-always-your-expected</guid><description>&lt;p&gt;Let's raise the issue '07 + 08 = 07' firstly from &lt;a href="http://www.debuggable.com/posts/7+8===7-in-javascript:4acba016-d204-489b-b5a0-1fd0cbdd56cb"&gt;this guy's article&lt;/a&gt;.&lt;/p&gt;

&lt;pre name='code' class='javascript'&gt;
var a = '07';
var b = '08'

alert(a + b); //'0708';
&lt;/pre&gt;


&lt;p&gt;OK. We knew the result. What we will do is using the 'parseInt' method.&lt;/p&gt;

&lt;pre name='code' class='javascript'&gt;
var a = '07';
var b = '08'

alert(parseInt(a) + parseInt(b)); //'07';
&lt;/pre&gt;


&lt;p&gt;The result is not our expected this time.&lt;/p&gt;

&lt;p&gt;So boys give a lot of solutions.
solution 1:&lt;/p&gt;

&lt;pre name='code' class='javascript'&gt;
var a = '07';
var b = '08'

alert(parseInt(a, 10) + parseInt(b, 10)); //'15';
&lt;/pre&gt;


&lt;p&gt;solution 2:&lt;/p&gt;

&lt;pre name='code' class='javascript'&gt;
var a = '07';
var b = '08'

alert(Number(a) + Number(b)); //'15';
&lt;/pre&gt;


&lt;p&gt;I like this solution. If the variable is a number, transform it to 'Number' directly to keep it safe. If the variable is a string, transform it to 'String' directly.
The same issue occurred in Date function too.&lt;/p&gt;

&lt;pre name='code' class='javascript'&gt;
var d = new Date(2009, 08, 02); //It's 2nd of JULY
&lt;/pre&gt;


&lt;p&gt;The &lt;a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date"&gt;reason&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;year
    Integer value representing the year. For compatibility (in order to avoid the Y2K problem), you should always specify the year in full; use 1998, rather than 98.

month
    Integer value representing the month, beginning with 0 for January to 11 for December.

date
    Integer value representing the day of the month (1-31). &lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/XQmtCbd5d6w" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/24/the-behavior-of-javascript-is-not-always-your-expected.html</feedburner:origLink></item><item><title>Code Smell</title><link>http://feedproxy.google.com/~r/freetofeel/~3/5_KU9kJ01f8/code-smell.html</link><pubDate>Thu, 22 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/22/code-smell</guid><description>&lt;p&gt;There is a &lt;a href="http://www.cnblogs.com/idior/archive/2006/06/13/424592.html"&gt;code smell list&lt;/a&gt; that we can then as a reference.&lt;/p&gt;

&lt;blockquote&gt;
In computer programming, code smell is any symptom in the source code of a computer program that indicates something may be wrong. It generally indicates that the code should be refactored or the overall design should be reexamined. The term appears to have been coined by Kent Beck on WardsWiki. Usage of the term increased after it was featured in Refactoring. Improving the Design of Existing Code.&lt;/blockquote&gt;


&lt;p&gt;Interesting Discussion about '&lt;a href="http://stackoverflow.com/questions/114342/what-are-code-smells-what-is-the-best-way-to-correct-them"&gt;What are Code Smells? What is the best way to correct them?&lt;/a&gt;'.&lt;/p&gt;

&lt;p&gt;A question is flying on my head:&lt;/p&gt;

&lt;pre name='code' class='php'&gt;
class Person{
 var $name;
 var $age;
//....
}

function calculateEmployeeAverageAge($employee){
//...
}

calculateEmployeeAverageAge(new Person());
&lt;/pre&gt;


&lt;p&gt;If there is a function like 'calculateEmployeeAverageAge', is it a code smell? I have met this before in our own product code. I mean the function must know much about the Person structure. But actually, we didn't want to a function rely on too much outside. I always avoid this way in my application. But the guy said 'Methods with a ridiculous (e.g. 7+) amount of parameters. This usually means that there should be a new class introduced (which, when passed, is called an indirect parameter.)' in this &lt;a href="http://stackoverflow.com/questions/114342/what-are-code-smells-what-is-the-best-way-to-correct-them"&gt;discussion&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/5_KU9kJ01f8" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/22/code-smell.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-10-19</title><link>http://feedproxy.google.com/~r/freetofeel/~3/hv2gPaXro8M/twitter-weekly-updates-for-2009-10-19.html</link><pubDate>Mon, 19 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/19/twitter-weekly-updates-for-2009-10-19</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;Browser support for CSS3 and HTML5 - &lt;a href="http://bit.ly/qnWQU" rel="nofollow"&gt;http://bit.ly/qnWQU&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/4966533845"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;10 secrets to staying informed about web design - &lt;a href="http://boagworld.com/reviews/usingrss" rel="nofollow"&gt;http://boagworld.com/reviews/usingrss&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/4962957714"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Earth and Jupiter in the same shot - &lt;a href="http://bit.ly/dlgFb" rel="nofollow"&gt;http://bit.ly/dlgFb&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/4962887490"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Clojure - Functional Programming for the JVM - &lt;a href="http://bit.ly/nN8tj" rel="nofollow"&gt;http://bit.ly/nN8tj&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/4962873149"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Remove a specific value from a javascript array &lt;a href="http://bit.ly/4F3aeJ" rel="nofollow"&gt;http://bit.ly/4F3aeJ&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/4957514824"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/hv2gPaXro8M" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/19/twitter-weekly-updates-for-2009-10-19.html</feedburner:origLink></item><item><title>One pixel notched corners</title><link>http://feedproxy.google.com/~r/freetofeel/~3/D9jGh_20pHA/one-pixel-notched-corners.html</link><pubDate>Mon, 19 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/19/one-pixel-notched-corners</guid><description>&lt;p&gt;An interesting article &lt;a href="http://www.askthecssguy.com/2008/03/one_pixel_notched_corners_as_u.html"&gt;One pixel notched corners as used by Google Analytics&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;A simple explanation of the 'why':
&lt;a href="http://www.freetofeel.com/2009/10/one-pixel-notched-corners/one_pixel_corner/" rel="attachment wp-att-235"&gt;&lt;img src="http://www.freetofeel.com/wp-content/uploads/2009/10/one_pixel_corner.gif" alt="one_pixel_corner" title="one_pixel_corner" width="220" height="186" class="aligncenter size-full wp-image-235" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;pre name='code' class='html'&gt;
&lt;style type="text/css"&gt;
/* default stuff */
.letsGiveItAFixedWidthOf200Pixels { width:200px; }

.feature {
    border:solid red;
    border-width:0px 4px 2px;
    background:#b0c0e6;
}
.feature div {
  position:relative;
  top: -4px;
  left: 0;
  border:solid blue;
  border-width:4px 0 0;
}
&lt;/style&gt;
&lt;/head&gt;&lt;body&gt;

&lt;div class="examplesGoHere letsGiveItAFixedWidthOf200Pixels"&gt;
    &lt;h3&gt;A div&lt;/h3&gt;
    &lt;div class="feature"&gt;
        &lt;div&gt;
            &lt;div&gt;
                a
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/D9jGh_20pHA" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/19/one-pixel-notched-corners.html</feedburner:origLink></item><item><title>Lets make the web faster - Google Code</title><link>http://feedproxy.google.com/~r/freetofeel/~3/LLdeYAccZQw/lets-make-the-web-faster-google-code.html</link><pubDate>Mon, 19 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/19/lets-make-the-web-faster-google-code</guid><description>&lt;p&gt;&lt;a href="http://code.google.com/speed/articles/optimizing-php.html"&gt;Interesting post&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use caching&lt;/li&gt;
&lt;li&gt;Use output buffering&lt;/li&gt;
&lt;li&gt;Avoid writing naive setters and getters&lt;/li&gt;
&lt;li&gt;Don't copy variables for no reason&lt;/li&gt;
&lt;li&gt;Use caching&lt;/li&gt;
&lt;li&gt;Avoid doing SQL queries within a loop&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/LLdeYAccZQw" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/19/lets-make-the-web-faster-google-code.html</feedburner:origLink></item><item><title>The Start-up Feedback Loop</title><link>http://feedproxy.google.com/~r/freetofeel/~3/YBa9XBbt72k/the-start-up-feedback-loop.html</link><pubDate>Sun, 18 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/18/the-start-up-feedback-loop</guid><description>&lt;p&gt;&lt;a href="http://www.freetofeel.com/2009/10/the-start-up-feedback-loop/startup-feedback-loop1-287x300/" rel="attachment wp-att-227"&gt;&lt;img src="http://www.freetofeel.com/wp-content/uploads/2009/10/startup-feedback-loop1-287x300.png" alt="startup-feedback-loop1-287x300" title="startup-feedback-loop1-287x300" width="287" height="300" class="aligncenter size-full wp-image-227" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After reading &lt;a href="http://kevindewalt.com/blog/2009/10/14/the-best-programming-language-for-a-lean-startup/"&gt;The Best Programming Language for a Lean Startup&lt;/a&gt;, I agree with the author's opinion. There is no a best language for your startup, even the language you choosed is not the key point for your startup. The proper is the best.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/YBa9XBbt72k" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/18/the-start-up-feedback-loop.html</feedburner:origLink></item><item><title>Schema Optimization and Indexing</title><link>http://feedproxy.google.com/~r/freetofeel/~3/dMCCIkgXWjs/schema-optimization-and-indexing.html</link><pubDate>Sun, 18 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/18/schema-optimization-and-indexing</guid><description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Choosing Data Type &gt;
a. Smaller is usually better;
b. Simple is good;
c. Avoid NULL if possible - When a nullable column is indexed, it requires an extra byte per entry and can even cause a fixed-size index;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Two kinds of numbers: whole numbers and real numbers (numbers with a fractional part)
TINYINT, SMALLINT, MEDIUMINT, INT, or BIGINT. These require 8, 16, 24, 32, and 64 bits of storage space. Signed and unsigned types use the same amount of storage space and have the same performance, so use whatever’s best for your data range.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MySQL lets you specify a “width” for integer types, such as INT(11). &amp;lt;@author:Oh, I was cheated!&gt;This is meaningless for most applications: it does not restrict the legal range of values, but simply specifies the number of characters MySQL’s interactive tools (such as the commandline client) will reserve for display purposes. For storage and computational purposes, INT(1) is identical to INT(20).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;VARCHAR - helps performance because it saves space. However, because the rows are variable-length, they can grow when you update them, which can cause extra work.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;CHAR - is fixed-length: MySQL always allocates enough space for the specified number of characters. When storing a CHAR value, MySQL removes any trailing
spaces.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Binary comparisons can be much simpler than character comparisons, so they are faster.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Using ENUM instead of a string type.
Note:ENUM field sorts by the internal integer values, not by the strings themselves.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;TIMESTAMP &gt;
By default, MySQL will set the first TIMESTAMP column to the current time when you insert a
row without specifying a value for the column. MySQL also updates the first TIMESTAMP column’s value by default when you update the row, unless you assign a value explicitly in the UPDATE statement.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What if you need to store a date and time value with subsecond resolution?
You can use the BIGINT data type and store the value as a timestamp in microseconds, or you can use a DOUBLE.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Date type choose priciple:
Choose the smallest size that can hold your required range of values, and leave room for future growth if necessary.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;String types &gt;
Avoid string types for identifiers if possible, as they take up a lot of space and are generally slower than integer types. Be especially cautious when using string identifiers with MyISAM tables. MyISAM uses packed indexes for strings by default, which may make lookups much slower. In our tests, we’ve noted up to six times slower performance with packed indexes on MyISAM.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Types of Indexes &gt;
B-Tree indexes - all the values are stored in order, and each leaf page is the same distance from the root.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Full-text indexes &gt;
It finds keywords in the text instead of comparing values directly to the values in the index.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Indexing Strategies for High Performance &gt; Isolate the Column
“Isolating” the column means it should not be part of an expression or be inside a function in the query.
i).mysql&gt; SELECT ... WHERE TO_DAYS(CURRENT_DATE) - TO_DAYS(date_col) &amp;lt;= 10;
ii). mysql&gt; SELECT ... WHERE date_col &gt;= DATE_SUB(CURRENT_DATE, INTERVAL 10 DAY);
iii). mysql&gt; SELECT ... WHERE date_col &gt;= DATE_SUB('2008-01-17', INTERVAL 10 DAY);&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you want to make index for a long column, the best way is using the prefix.
Prefix indexes can be a great way to make indexes smaller and faster, but they have downsides too: MySQL cannot use prefix indexes for ORDER BY or GROUP BY queries, nor can it use them as covering indexes.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;mysql&gt; SELECT COUNT(DISTINCT city)/COUNT(&lt;em&gt;) FROM sakila.city_demo;
+-------------------------------+
| COUNT(DISTINCT city)/COUNT(&lt;/em&gt;) |
+-------------------------------+
| 0.0312 |
+-------------------------------+
mysql&gt; SELECT COUNT(DISTINCT LEFT(city, 3))/COUNT(&lt;em&gt;) AS sel3,
-&gt; COUNT(DISTINCT LEFT(city, 4))/COUNT(&lt;/em&gt;) AS sel4,
-&gt; COUNT(DISTINCT LEFT(city, 5))/COUNT(&lt;em&gt;) AS sel5,
-&gt; COUNT(DISTINCT LEFT(city, 6))/COUNT(&lt;/em&gt;) AS sel6,
-&gt; COUNT(DISTINCT LEFT(city, 7))/COUNT(*) AS sel7
-&gt; FROM sakila.city_demo;
+--------+--------+--------+--------+--------+
| sel3 | sel4 | sel5 | sel6 | sel7 |
+--------+--------+--------+--------+--------+
| 0.0239 | 0.0293 | 0.0305 | 0.0309 | 0.0310 |
+--------+--------+--------+--------+--------+
mysql&gt; ALTER TABLE sakila.city_demo ADD KEY (city(7));&lt;/p&gt;&lt;/blockquote&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clustered Indexes &gt;
solidDB and InnoDB are the only ones that support this type index.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You should strive to insert data in primary key order when using InnoDB, and you should try to use a clustering key that will give a monotonically increasing value for each new row.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MySQL can use the same index for both sorting and finding rows.
Ordering the results by the index works only when the index’s order is exactly the same as the ORDER BY clause and all columns are sorted in the same direction (ascending or descending). If the query joins multiple tables, it works only when all columns in the ORDER BY clause refer to the first table. The ORDER BY clause also has the same limitation as lookup queries: it needs to form a leftmost prefix of the index.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MySQL implements UNIQUE constraints and PRIMARY KEY constraints with indexes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Redundant indexes are a bit different from duplicated indexes. If there is an index on (A, B), another index on (A) would be redundant because it is a prefix of the first index. That is, the index on (A, B) can also be used as an index on (A) alone. (This type of redundancy applies only to B-Tree indexes.) However, an index on (B, A) would not be redundant, and neither would an index on (B), because B is not a leftmost prefix of (A, B).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Where possible, try to extend existing indexes rather than adding new ones. It is usually more efficient to maintain one multicolumn index than several single-column indexes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;?--
If you don’t yet know your query distribution, strive to make your indexes as selective as you can, because highly selective indexes are usually more beneficial.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As this example shows, InnoDB can lock rows it doesn’t really need even when it uses an index.
Note:
The problem is even worse when it can’t use an index to find and lock the rows: if there’s no index for the query, MySQL will do a full table scan and lock every row, whether it “needs” it or not.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;!--
If MySQL uses an index for a range criterion in a query, it cannot also use another index (or a suffix of the same index) for ordering.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Run 'CHECK TABLE xxx' to see if the table is corrupt;
Fix corrupt tables with the 'REPAIR TABLE xxx' command.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Two types of data fragmentation:
a). Row fragmentation
b). Intra-row fragmentation
MyISAM tables may suffer from both types of fragmentation, but InnoDB never fragments short rows.
!--To defragment data, you can either run OPTIMIZE TABLE or dump and reload the data;
!--For storage engines that don’t support OPTIMIZE TABLE, you can rebuild the table with a no-op ALTER TABLE. Just alter the table to have the same engine it currently uses:
 mysql&gt; ALTER TABLE $table ENGINE=$engine;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example, you can change or drop a column’s default value in two ways (one fast, and one slow).
slow}mysql&gt; ALTER TABLE sakila.film
 -&gt; MODIFY COLUMN rental_duration TINYINT(3) NOT NULL DEFAULT 5;
In theory, MySQL could have skipped building a new table. The default value for the column is actually stored in the table’s .frm file, so you should be able to change it without touching the table itself. MySQL doesn’t yet use this optimization, however: any MODIFY COLUMN will cause a table rebuild. You can change a column’s default with ALTER COLUMN,* though:
fast}mysql&gt; ALTER TABLE sakila.film
 -&gt; ALTER COLUMN rental_duration SET DEFAULT 5;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Building MyISAM Indexes Quickly &gt;&gt;
The usual trick for loading MyISAM tables efficiently is to disable keys, load the data, and reenable the keys:
mysql&gt; ALTER TABLE test.load_data DISABLE KEYS;
-- load the data
mysql&gt; ALTER TABLE test.load_data ENABLE KEYS;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/dMCCIkgXWjs" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/18/schema-optimization-and-indexing.html</feedburner:origLink></item><item><title>How to remove a specific value from a javascript array</title><link>http://feedproxy.google.com/~r/freetofeel/~3/Vos_zZlpbK4/how-to-remove-a-specific-value-from-a-javascript-array.html</link><pubDate>Sat, 17 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/17/how-to-remove-a-specific-value-from-a-javascript-array</guid><description>&lt;p&gt;&lt;a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/splice"&gt;splice&lt;/a&gt; - Changes the content of an array, adding new elements while removing old elements.&lt;/p&gt;

&lt;blockquote&gt;array.splice(index, howMany, [element1][, ..., elementN]);
array.splice(index, [howMany, [element1][, ..., elementN]]);  // SpiderMonkey extension
&lt;/blockquote&gt;


&lt;p&gt;index&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Index at which to start changing the array. If negative, will begin that many elements from the end.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;howMany&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;An integer indicating the number of old array elements to remove. If howMany is 0, no elements are removed. In this case, you should specify at least one new element. If no howMany parameter is specified (second syntax above, which is a SpiderMonkey extension), all elements after index are removed. 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;element1, ..., elementN&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;The elements to add to the array. If you don't specify any elements, splice simply removes elements from the array. 
&lt;/code&gt;&lt;/pre&gt;

&lt;pre name='code' class='javascript'&gt;
// from this
var arr = ['remove', 'specific', 'value', 'from', 'javascript', 'array']; // 6 items
 
// to this ("specific" value removed)
var arr = ['remove', 'value', 'from', 'javascript', 'array']; //  5 items
 
// use this (removes "specific")
arr.splice(arr.indexOf('specific'), 1);
 
 
// full example
var arr = ['remove', 'specific', 'value', 'from', 'javascript', 'array'];
var value_to_remove = 'specific';
arr.splice(arr.indexOf(value_to_remove), 1);
 
 
// note: to support IE (anger rising as I type), you'll need this (thanks James!):
if (!Array.prototype.indexOf)
{
  Array.prototype.indexOf = function(elt /*, from*/)
  {
    var len = this.length &gt;&gt;&gt; 0;
 
    var from = Number(arguments[1]) || 0;
    from = (from &lt; 0)
         ? Math.ceil(from)
         : Math.floor(from);
    if (from &lt; 0)
      from += len;
 
    for (; from &lt; len; from++)
    {
      if (from in this &amp;&amp;
          this[from] === elt)
        return from;
    }
    return -1;
  };
}
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/Vos_zZlpbK4" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/17/how-to-remove-a-specific-value-from-a-javascript-array.html</feedburner:origLink></item><item><title>Chance, Possibility and Opportunity, difference?</title><link>http://feedproxy.google.com/~r/freetofeel/~3/Cv6sTjV4V6I/chance-possibility-and-opportunity-difference.html</link><pubDate>Wed, 14 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/14/chance-possibility-and-opportunity-difference</guid><description>&lt;p&gt;I got the answer from internet, maybe wrong, hope somebody can help me correct it.&lt;/p&gt;

&lt;p&gt;possibility is the chance for something to happen.
as in, "ladies and gents, this is your pilot. it is stormy and lightning is everywhere, so there's a possibility that the plane will crash."&lt;/p&gt;

&lt;p&gt;opportunity is the chance to do something.
as in, "there came an opportunity for him to break up with his girlfriend, but he backed out when he saw that she has a collection of guns."&lt;/p&gt;

&lt;p&gt;chance is a word you can use for both.
as in, "there's a chance (possibility) for you to flunk the exam because all you do is sleep and eat your toenails."
and "this is your chance (opportunity) to be a senator! all you have to do is get money from the taxpayers!"&lt;/p&gt;

&lt;p&gt;Chance = You are lucky it's passing by
Possibility= It is possible that it happen
Opportunity=It pass by you only once , so grab it&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/Cv6sTjV4V6I" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/14/chance-possibility-and-opportunity-difference.html</feedburner:origLink></item><item><title>SQL Optimization</title><link>http://feedproxy.google.com/~r/freetofeel/~3/_p5HRUAT2NI/sql-optimization.html</link><pubDate>Tue, 13 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/13/sql-optimization</guid><description>&lt;p&gt;Two tables:
city
id,name,country_id
1,xx,21
2,tt,22
3,tts,21
4,ss,31&lt;/p&gt;

&lt;p&gt;country
id,name
21,AA
22,BB
31,CC
41,EE
51,TT&lt;/p&gt;

&lt;p&gt;The question is selecting the country name which has not attached with any city.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;select * from country where id is not in (select id from country right join city where city.country_id = country.id);&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;But we can optimize this SQL like this:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;select * from country left join city where city.country_id is null;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/_p5HRUAT2NI" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/13/sql-optimization.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-10-12</title><link>http://feedproxy.google.com/~r/freetofeel/~3/hKG9vgRQ4OU/twitter-weekly-updates-for-2009-10-12.html</link><pubDate>Mon, 12 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/12/twitter-weekly-updates-for-2009-10-12</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;一天某sb问我，你都关注些什么新技术。答曰：有什么看什么，但除非感兴趣不到用时从来不当回事情。那个sb像是没有满足的样子，继续问之，但你到底都关注哪些呢？ 靠，我突然不知道该说什么好，想了想说，上中学的时候我对永动机这种‘新’技术很感兴趣,... &lt;a href="http://twitter.com/Joshua_C/statuses/4782085588"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Route of GFW - &lt;a href="http://twitpic.com/ky0uw" rel="nofollow"&gt;http://twitpic.com/ky0uw&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/4779834434"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @williamlong: Google Docs和Google Groups的两个IP地址74.125.155.139和72.14.203.100的443端口，被特殊处理了，方法是，一旦发现有用户访问这两个IP的443端口，GFW就发送RESET信号，中断用户访问。 &lt;a href="http://twitter.com/Joshua_C/statuses/4778780881"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;We are seeking a developer to create an iPhone application - &lt;a href="http://bit.ly/17VIlX" rel="nofollow"&gt;http://bit.ly/17VIlX&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/4698198607"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @&lt;a href="http://twitter.com/tweetmeme"&gt;tweetmeme&lt;/a&gt; | 5span &lt;a href="http://bit.ly/OGPMj" rel="nofollow"&gt;http://bit.ly/OGPMj&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/4697792247"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Iphone application development Job(http://bit.ly/OGPMj &lt;a href="http://twitter.com/Joshua_C/statuses/4678962471"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;“老罗，过去你说的那些我都特喜欢，每段都听了上百遍，可是你看看你现在这样，真他妈让我失望！”//嗯，这说明我有能力让你喜欢我，但我没心情总是哄你高兴，我毕竟不是出来卖的。学着长大吧，没有人会按照你的意愿活着，除非是另有目的，装的。- 罗哥 &lt;a href="http://twitter.com/Joshua_C/statuses/4678285280"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;你看孙悟空这个猴怪，看到别的妖怪总是怒目圆睁，大喝一声，“妖怪！”- 罗哥 &lt;a href="http://twitter.com/Joshua_C/statuses/4678089733"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;这是此类民族在它族中的生存技巧？他们就是在捕猎而非买卖。 &lt;a href="http://twitter.com/Joshua_C/statuses/4677317741"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;亲眼目睹卖甜糕的新疆人设计诈人，一群狼围堵一个羊。 &lt;a href="http://twitter.com/Joshua_C/statuses/4677284228"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/hKG9vgRQ4OU" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/12/twitter-weekly-updates-for-2009-10-12.html</feedburner:origLink></item><item><title>Personality Test</title><link>http://feedproxy.google.com/~r/freetofeel/~3/nf_LdWhdRrc/personality-test.html</link><pubDate>Mon, 12 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/12/personality-test</guid><description>&lt;p&gt;DISC性格测试&lt;/p&gt;

&lt;p&gt;在每行中挑选一个与您最相近的形容词（每题必须选一个并且只能选一个）若您在某一题上实在无法判断请考虑3年前的自己的特征作答。&lt;/p&gt;

&lt;p&gt;1。 A 活泼生动  B 富于冒险  C 善于分析  D适应性强
2。 A 喜好娱乐  B 善于说服  C 坚持不懈  D平和
3。 A 善于社交  B 意志坚定  C 自我牺牲  D较少争辩
4。 A 使人认同  B 喜竞争胜  C 体贴      D自控性好
5。 A 使人振作  B 善于应变  C 令人尊敬  D含蓄
6。 A 生机勃勃  B 自立      C 敏感      D满足
7。 A 推动者    B 积极      C 计划者    D耐性
8。 A 无拘无束  B 肯定      C 时间性    D羞涩
9。 A 乐观      B 坦率      C 井井有条  D迁就
10。A 有趣      B 强迫性    C 忠诚      D友善
11。A 可爱      B 勇敢      C 注意细节  D外交手腕
12。A 让人高兴  B 自信      C 文化修养  D贯彻始终
13。A 富激励性  B 独立      C 理想主义  D无攻击性
14。A 情感外露  B 果断      C 深沉      D淡然幽默
15。A 喜交朋友  B 发起者    C 音乐性    D调解者
16。A 多言      B 执著      C 考虑周到  D容忍
17。A 活力充沛  B 领导者    C 忠心      D聆听着
18。A 让人喜爱  B 首领      C 制图者    D知足
19。A 受欢迎    B 勤劳      C 完美主义者D和气
20。A 跳跃型    B 无畏      C 规范型    D平衡&lt;/p&gt;

&lt;p&gt;21。A 露骨      B 专横      C 乏味      D扭捏
22。A 散漫      B缺乏同情心 C 不宽恕    D缺乏热情
23。A 唠叨      B 逆反      C 怨恨      D保留
24。A 健忘      B 率直      C 挑剔      D 胆小
25。A 好插口    B 没耐性    C 优柔寡断  D无安全感
26。A 难预测    B 直截了当  C 过于严肃  D 不参与
27。A 即兴      B 固执      C 难于取悦  D 犹豫不决
28。A 放任      B 自负      C 悲观      D 平淡
29。A 易怒      B 好争吵    C 孤芳自赏  D 无目标
30。A 天真      B 鲁莽      C 消极      D冷漠
31。A 喜获认同  B 工作狂    C 不善交际  D 担忧
32。A 喋喋不休  B不圆滑老练 C 过分敏感  D 胆怯
33。A 杂乱无章  B 跋扈      C 抑郁      D腼腆
34。A 缺乏毅力  B 不容忍    C 内向      D无异议
35。A 零乱      B 喜操纵    C 情绪化    D喃喃自语
36。A 好表现    B 顽固      C 有戒心    D缓慢
37。A 大嗓门    B 统治欲    C 孤僻      D 懒惰
38。A 不专注    B 易怒      C 多疑      D 拖延
39。A 烦躁      B 轻率      C 报复型    D勉强
40。A 善变      B 狡猾      C 好批评    D妥协&lt;/p&gt;

&lt;p&gt;每道题一份 然后计算出 ABCD 各个的得分&lt;/p&gt;

&lt;p&gt;得分最多的为主要性格 次多的是辅助型性格。&lt;/p&gt;

&lt;p&gt;A 得分最多的--活泼型
B 得分最多的--力量型
C 得分最多的--完美型
D 得分最多的--和平型&lt;/p&gt;

&lt;p&gt;性格分析：&lt;/p&gt;

&lt;p&gt;活泼型：外向 多言 乐观
特点：一群人里面说话最多的 天生希望成为注意力的中心，具有很强的好奇心 热情 热心具有表达能力 精力充沛具有干劲（但是却缺乏毅力 所以常常这干干 那干干） 好表现 粗线条 轻许诺（因为热心所以常常答应别人 但是由于记忆差所以常常答应后就忘记了） 以自己的快乐为主
缺点：以自己为中心 独霸主题 爱打断别人的谈话 不注意记忆 变化无常 这类人易交朋友但深切的朋友却不多  喜好多却不精 缺乏毅力
切入点：如果跟这类型的人交往 一定要多夸奖他 多鼓励他 多给他说话的机会
自我规划：&lt;/p&gt;

&lt;p&gt;1。管住自己的嘴
2。控制自己的表现欲望
3。对自己的评价不要过高 关心自己的同时也要关心别人
4。培养记忆力
5，不要太善变，要脚踏实地 要做就要把一件事作完整&lt;/p&gt;

&lt;p&gt;力量型：外向 行动者 乐观
特点：喜欢做主 行动力强  行动速度 思考力稍弱 喜欢做目标不达目的不罢休 充满自信 意志坚定 有活力 做事主动 不易气馁 是推动别人行动的人 粗线条 不容易适应环境 （不过由于行动力很强所以往往做事会有很大成就 ）
缺点：不易看到别人的需求，只看到自己的需求 做错事后很容易原谅自己 固执 易争吵 好斗说话极易伤害别人 具有强迫性 很容易支配别人 无耐性 专横 经常人际关系差 （这类人总觉得自己是对的不太需要朋友，并且这类人天生行动力强 但是即使是正确的事情 也因为性格问题 说话伤害到别人 而得不到别人的支持和认同）
注意点：这类型严重者会很独断霸道  容易让别人感到压力相处很累
自我规划：
1。减轻对别人的压力 学会放松 要缓和
2。尝试接受别人的号召和意见 尝试耐心和低调
3。停止争吵让别人也感觉到放松
4。学习包容 学会道歉 学会坦然接受自己的错误 放开胸怀（当一个力量型的人学会承认错误 那么他便成功了）&lt;/p&gt;

&lt;p&gt;完美型：内向 思考者 悲观
特点：以思考为主 深思熟虑 严肃 有目标 并且目标感很强 追求完美 有艺术天分 沉闷 关注细节完美主义 高标准 想得多但做得少 做事前一定要先想个计划 有条理 有组织 交友慎重（但一旦交往 就会很忠诚的对待朋友） 关心别人为别人牺牲是自己的意愿 （所以这类型的人一生一定有几个特别好的朋友 一辈子的朋友那种）情感丰富容易感动 也容易受伤高标准--对自己要求高对别人要求也高 希望一切都作的很好 很对。理想主义 朝着自己的目标前进
缺点：行动力弱 优柔寡断 容易抑郁（常常是因为要求过高了 当达不到时候就会很失望）容易自惭自愧 悲观天生消极 易受环境影响 情绪化
注意点：这类型的人太容易思考 过分时会情绪低落
切入点：如果想和着类型的人交往 一定要先打动他 但是不要进攻尽力 要一点一点的建立信任和感情这类型的人 一旦认同你后 会很忠诚 忠心
自我规划：
1。要快乐起来（没人喜欢郁闷的人）
2。不要太容易受伤害 不要太敏感
3。 不要把时间都用来规划上面 而不去行动发
4，不要那么高标准的要求别人 他不是你 要放松下来 要去发现别人的优点&lt;/p&gt;

&lt;p&gt;和平型：内向 旁观者 悲观
特点：性格低调 易相处 很轻松 平和 无异议 耐心 适应力强 无攻击性 很好的聆听者 具有外交手段（说话绕弯不直接） 人际关系好（和事老） 所以朋友很多 不爱生气
缺点：不容易兴奋 拒绝改变 喜欢一成不变 目标感不强 看似懒惰 不愿承担责任 回避压力沉默（不愿意沟通 即使内心波涛汹涌...所以这类型的爱人 常常都不会说 我爱你） 马虎 无主见（需要力量型的人给于指导，但不要施加压力） 不善于做决定
切入点：和这类型的人交往 一定要鼓励他 促进他
注意点：这类型过分时会毫无主见 做事漫不经心
自我规划：&lt;/p&gt;

&lt;p&gt;1。让自己快乐起来 给自己尝试新鲜的事物和思想
2。明确生活的责任 不要得过且过
3。有意识接受督促（找个力量型或完美型）
4。多表达 沟通&lt;/p&gt;

&lt;p&gt;据调查 很多成功人士的性格 主要是完美型+力量型  （思考者+行动者）（ 分数都很高并且比较平均）但是很多成功人士并不是天生就是这两种性格的 而是经过了后天很多的性格改变和培养~~&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blog.sina.com.cn/s/blog_404b25b90100bfgw.html"&gt;Original&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/nf_LdWhdRrc" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/12/personality-test.html</feedburner:origLink></item><item><title>Byte and bit</title><link>http://feedproxy.google.com/~r/freetofeel/~3/dFOs2I9l9K0/byte-and-bit.html</link><pubDate>Mon, 12 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/12/byte-and-bit</guid><description>&lt;p&gt;Bit意为“位”或“比特”，是计算机运算的基础，属于二进制的范筹；
　 Byte意为“字节”，是计算机文件大小的基本计算单位；
   这两者应用的场合不同。通常用bit来作数据传输的单位，因为物理层，数据链路层的传输对于用户是透明的，而这种通信传输是基于二进制的传输。在应用层通常是用byte来作单位，表示文件的大小，在用户看来就是可见的数据大小。比如一个字符就是1byte,如果是汉字，则是2byte。
　下面是2个具体应用实例：
　Mbps=mega bits per second(兆位/秒)是速率单位，
　MB=mega bytes(兆比、兆字节)是量单位，1MB/S（兆字节/秒）=8MBPS（兆位/秒）。
  我们所说的硬盘容量是40GB、80GB、100GB，这里的B指是的Byte也就是“字节”。(与容量相关，应用层）
1 KB = 1024 bytes =2&lt;sup&gt;10&lt;/sup&gt; bytes
1 MB = 1024 KB = 2&lt;sup&gt;20&lt;/sup&gt; bytes
1 GB = 1024 MB = 2&lt;sup&gt;30&lt;/sup&gt; bytes
　USB2.0标准接口传输速率是480兆位/秒,即480MBps。这里的B指是的Bit也就是“位”。（与传输相关，底层）&lt;/p&gt;

&lt;p&gt;　注：另外，Byte通常简写为B(大写），而bit通常简写为b（小写）。可以这么记忆，用大写的就是数据值比较大的位，而小字的就是数据值比较小的字节，1B=8b。&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/dFOs2I9l9K0" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/12/byte-and-bit.html</feedburner:origLink></item><item><title>MySQL Architecture</title><link>http://feedproxy.google.com/~r/freetofeel/~3/GrjK946IKo4/mysql-architecture.html</link><pubDate>Fri, 09 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/09/mysql-architecture</guid><description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Each client connection gets its own thread within the server process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If it takes a lot of time on locks, why not separate read and write lock?
Q:  How to synchronise the read database and write database?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When we want to keep reading and writing date clean, we try to implement two types lock in db.
Expected：
Read locks on a resource are shared, or mutually nonblocking: many clients
may read from a resource at the same time and not interfere with each other.
Write locks, on the other hand, are exclusive—i.e., they block both read locks and
other write locks—because the only safe policy is to have a single client writing to
the resource at given time and to prevent all reads when a client is writing.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;MySQL way:
a. Table locks - the lowest overhead;
b. Row locks - the greatest concurrency.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Transactions aren’t enough unless the system passes the ACID test.
Atomicity
Consistency
Isolation
Durability - Once committed, a transaction’s changes are permanent.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Isolation Levels &gt;
READ UNCOMMITTED - Reading uncommitted data is also known as a dirty read;
READ COMMITTED - The default isolation level for most database systems (but not MySQL!);
REPEATABLE READ - MySQL’s default transaction isolation level.
SERIALIZABLE - At this level, a lot of timeouts and lock contention may occur.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deadlock -
The way InnoDB currently handles deadlocks is to roll back the transaction
that has the fewest exclusive row locks.
Deadlocks are a fact of life in transactional systems, and your applications
should be designed to handle them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Transaction in MySQL &gt;
MySQL AB provides three transactional storage engines: InnoDB, NDB Cluster, and
Falcon. solidDB and PBXT.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AUTOCOMMIT &gt;
MySQL operates in AUTOCOMMIT mode by default. It automatically executes each query in a separate transaction.
MyISAM or Memory tables -  essentially always operate in AUTOCOMMIT mode.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can’t reliably mix different engines in a single transaction. If you mix transactional and nontransactional tables (for instance, InnoDB and MyISAM tables) in a transaction, the transaction will work properly if all goes well. However, if a rollback is required, the changes to the nontransactional table can’t be undone.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;InnoDB also supports explicit locking, which the SQL standard does not mention at all:
a. SELECT ... LOCK IN SHARE MODE
b. SELECT ... FOR UPDATE&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;MySQL supports the LOCK TABLES and UNLOCK TABLES commands, which are implemented in the server, not in the storage engines.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;MySQL’s Storage Engines &gt;
The MyISAM Engine &gt;&gt;
Storage: The MyISAM format is platformneutral, meaning you can copy the data and index files from an Intel-based server to a PowerPC or Sun SPARC without any trouble.
MyISAM tables created in MySQL 5.0 with variable-length rows are configured by default to handle 256 TB of data, using 6-byte pointers to the data records.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Features:
Locking and concurrency / Automatic repair / Manual repair(You can also use the myisamchk
command-line tool to check and repair tables when the server is offline.) / Index features / Delayed key writes(However, after a server or system crash, the indexes will definitely be corrupted and will need repair.) /&lt;/p&gt;

&lt;p&gt;Compressed MyISAM tables:
Compressed MyISAM tables can have indexes, but they’re read-only.&lt;/p&gt;

&lt;p&gt;The MyISAM Merge Engine &gt;&gt;
A Merge table is the combination of several identical MyISAM tables into one virtual table. This is particularly useful when you use MySQL in logging and data warehousing applications.&lt;/p&gt;

&lt;p&gt;The InnoDB Engine &gt;&gt;
InnoDB can’t build indexes by sorting, which MyISAM can do.
Any operation that changes an InnoDB table’s structure will rebuild the entire table, including all the indexes.&lt;/p&gt;

&lt;p&gt;The Memory Engine &gt;&gt;
Here are some good uses for Memory tables:
a. For “lookup” or “mapping” tables, such as a table that maps postal codes to
state names
b. For caching the results of periodically aggregated data
c. For intermediate results when analyzing data
Support only fixed-size rows, so they really store VARCHARs as CHARs, which can waste memory.&lt;/p&gt;

&lt;p&gt;The Archive Engine &gt;&gt;
It causes much less disk I/O than MyISAM, because it buffers data writes and compresses each row with zlib as it’s inserted.&lt;/p&gt;

&lt;p&gt;The CSV Engine &gt;&gt;&lt;/p&gt;

&lt;p&gt;The Federated Engine &gt;&gt;
The Federated engine does not store data locally. Each Federated table refers to a table on a remote MySQL server, so it actually connects to a remote server for all operations.&lt;/p&gt;

&lt;p&gt;The Blackhole Engine &gt;&gt;
Blackhole engine useful for fancy replication setups and audit logging.&lt;/p&gt;

&lt;p&gt;The NDB Cluster Engine &gt;&gt;
An NDB database consists of data nodes, management nodes, and SQL nodes (MySQL instances).&lt;/p&gt;

&lt;p&gt;The Falcon Engine &gt;&gt;&lt;/p&gt;

&lt;p&gt;The solidDB Engine &gt;&gt;&lt;/p&gt;

&lt;p&gt;The PBXT (Primebase XT) Engine &gt;&gt;&lt;/p&gt;

&lt;p&gt;The Maria Storage Engine &gt;&gt;
The goal is to use Maria as a replacement for MyISAM, which is currently MySQL’s default storage engine.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Table Conversions &gt;
a. mysql&gt; ALTER TABLE mytable ENGINE = Falcon;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/GrjK946IKo4" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/09/mysql-architecture.html</feedburner:origLink></item><item><title>15 Common Mistakes in E-Commerce Design</title><link>http://feedproxy.google.com/~r/freetofeel/~3/zADRn3P3Dis/15-common-mistakes-in-e-commerce-design.html</link><pubDate>Thu, 08 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/08/15-common-mistakes-in-e-commerce-design</guid><description>&lt;p&gt;This &lt;a href="http://www.smashingmagazine.com/2009/10/08/15-common-mistakes-in-e-commerce-design-and-how-to-avoid-them/"&gt;article&lt;/a&gt; can help me optimize your E-Commerce site.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/zADRn3P3Dis" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/08/15-common-mistakes-in-e-commerce-design.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-10-05</title><link>http://feedproxy.google.com/~r/freetofeel/~3/jN2_qXGrfw0/twitter-weekly-updates-for-2009-10-05.html</link><pubDate>Mon, 05 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/05/twitter-weekly-updates-for-2009-10-05</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;Eight Essential Attributes for Top Sales Performance - &lt;a href="http://bit.ly/I6kBp" rel="nofollow"&gt;http://bit.ly/I6kBp&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/4640329824"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;On the road to my home town. Do nothing, but thinking! &lt;a href="http://twitter.com/Joshua_C/statuses/4487134839"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/jN2_qXGrfw0" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/05/twitter-weekly-updates-for-2009-10-05.html</feedburner:origLink></item><item><title>Can You Be a Web Designer?</title><link>http://feedproxy.google.com/~r/freetofeel/~3/etQ3RS72wkM/can-you-be-a-web-designer.html</link><pubDate>Mon, 05 Oct 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/10/05/can-you-be-a-web-designer</guid><description>&lt;p&gt;&lt;a href="http://www.freetofeel.com/2009/10/can-you-be-a-web-designer/04-02_web_designer_flowchart/" rel="attachment wp-att-201"&gt;&lt;img src="http://www.freetofeel.com/wp-content/uploads/2009/10/04-02_web_designer_flowchart-398x1024.jpg" alt="04-02_web_designer_flowchart" title="04-02_web_designer_flowchart" width="398" height="1024" class="aligncenter size-large wp-image-201" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is not true. The best way is learning from others' strong points and close the gap.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/etQ3RS72wkM" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/10/05/can-you-be-a-web-designer.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-09-28</title><link>http://feedproxy.google.com/~r/freetofeel/~3/r_QrHMelSqg/twitter-weekly-updates-for-2009-09-28.html</link><pubDate>Mon, 28 Sep 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/09/28/twitter-weekly-updates-for-2009-09-28</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;确实够勇猛的 &lt;a href="http://bit.ly/Fjuvy" rel="nofollow"&gt;http://bit.ly/Fjuvy&lt;/a&gt; 只适合老年人 &lt;a href="http://twitter.com/Joshua_C/statuses/4415500118"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;twitter里有些人成了角以后就喜欢屁话连篇，十句有两句是retweet，7句在废话，偶尔一句有点参考性，还发现在做自己广告，remove &lt;a href="http://twitter.com/Joshua_C/statuses/4366929469"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;主观上的接受是你很容易加深对某事物的理解 &lt;a href="http://twitter.com/Joshua_C/statuses/4314333128"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Great business development people don&amp;#39;t waste time in endless meetings with random vendors or hassle about tiny details up front &lt;a href="http://twitter.com/Joshua_C/statuses/4313947566"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Barcamp - &lt;a href="http://bit.ly/1BQxkK" rel="nofollow"&gt;http://bit.ly/1BQxkK&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/4166033822"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://bit.ly/4a60ed" rel="nofollow"&gt;http://bit.ly/4a60ed&lt;/a&gt; - pair programming &lt;a href="http://twitter.com/Joshua_C/statuses/4164232834"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Agile Design - &lt;a href="http://bit.ly/2sk3NZ" rel="nofollow"&gt;http://bit.ly/2sk3NZ&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/4160730877"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/r_QrHMelSqg" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/09/28/twitter-weekly-updates-for-2009-09-28.html</feedburner:origLink></item><item><title>The Payroll Case Study</title><link>http://feedproxy.google.com/~r/freetofeel/~3/R9V5Rs3lttY/the-payroll-case-study.html</link><pubDate>Wed, 23 Sep 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/09/23/the-payroll-case-study</guid><description>&lt;h2&gt;C13&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Command 模式是将UI中和应用层中的执行逻辑分离到特定的运行函数中。所谓的解耦。&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;C17&lt;/h2&gt;

&lt;p&gt;1.使NULL生命化，而不是每次显示的 'x != null'. 可以构造NullObject.&lt;/p&gt;

&lt;h2&gt;C18&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;对需求分析-&amp;gt;创建用例 -&amp;gt; 用例分析-&amp;gt; 抽象出接口模型&lt;/li&gt;
&lt;li&gt;初期应该抵制自己接近代码的诱惑&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/R9V5Rs3lttY" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/09/23/the-payroll-case-study.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-09-21</title><link>http://feedproxy.google.com/~r/freetofeel/~3/j6cOCVoovIs/twitter-weekly-updates-for-2009-09-21.html</link><pubDate>Mon, 21 Sep 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/09/21/twitter-weekly-updates-for-2009-09-21</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;听着这个火警，想起了当年上海滩逃难的场景。。。 &lt;a href="http://twitter.com/Joshua_C/statuses/4095444859"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://bit.ly/roNaM" rel="nofollow"&gt;http://bit.ly/roNaM&lt;/a&gt; // 买房卖房 freedom &lt;a href="http://twitter.com/Joshua_C/statuses/4069582217"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/j6cOCVoovIs" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/09/21/twitter-weekly-updates-for-2009-09-21.html</feedburner:origLink></item><item><title>Agile Design</title><link>http://feedproxy.google.com/~r/freetofeel/~3/4qpf-UNkXSs/agile-design.html</link><pubDate>Mon, 21 Sep 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/09/21/agile-design</guid><description>&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;1.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;敏捷设计之着眼于当下的需求，不预测未来的需求和需要&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;2.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;敏捷开发应用设计原则取出代码中的smell，当没有这些糟糕的smell的时候， 他们不会iqu应用这些原则，仅仅因为是一个原则就无条件的遵循它是错误的 -- 这句话太深入我心了，三年来，终于找到证据证明我的想法了。我一向讨厌那些死板教条，为了原则而原则，在没有开始代码之前就把这些条条框框把我们框住，太他妈混球了。这也证明了，代码世界中，很多混饭的。&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;C7&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;----------------------------------------------&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;1.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;满足工程设计标准的唯一文档就是源码&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;2.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;粘滞性 - 做正确的事情要比做错误的事情困难&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;3.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;为过多的可能性做设计，致使系统中含有绝不会用到的结构，从而变得混乱&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;4.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;如果只是简单的copy and past带来的重复代码，还是有希望治理的。但很多事情由于系统过于庞大，A开发者编写了一段功能代码，B因为没有看到的A的代码，而又重新编写了一段，这样的代码功能一样，但很难被发现。这个问题想彻底避免，我觉得也是很困难的，这就要求开发者在开始编码前就对整个系统有个通透的了解。这就是为什么说招10个初级程序员，还不如招两个中级程序员，招五个中级程序员，还不如招两个高级程序员。&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;5.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;敏捷设计是一个过程，持续的应用原则，模式和实践来保持系统任何时候都做得尽可能的简单，干净，富于想象力。&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;（写到这里让我想到，微软的程序员是绝没有机会实践这些东西的，他们一定很渴望，但却不可得，窃喜。）&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;C8&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;-----------------------------------------------&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;1.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;被依赖最多的功能，要注意解耦&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;C9&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;-----------------------------------------------&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;1.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;所有的原则都是使得我们可以尽可能的接近理想，而决不可能达到理想&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;2.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;对于扩展是开放的，对于更改是封闭的。&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;这就是为什么有时候我们您愿增加一段新的功能代码单独处理我们的另一端逻辑，而不愿更改那块被依赖很多次的代码&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;3.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;OCP一定要提前预测什么地方需要应用此原则&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;4.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;首先开发重要的部件，尽早的，经常性的发布&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;5.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;OCP - 面向对象的核心，只有当应用这个原则的时候才能看到面向对象的好处&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;C10&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;------------------------------------------------&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;1.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;Liskov替换原则 - 子类型必须能替换掉它的基类型&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;2.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;读到这里又让我想起当初学习那么多的定理，推论的用处了，很多的都用在这里了&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;3.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;Design By Contract(DBC) - 契约是通过为每个方法声明前置条件和后置条件来指定的。要是一个方法的一执行，前置方法必须为真，在执行结束后，后置方法必须为真。&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;4.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;为使第三方程序可控，可以将它们包装于你自己可以控制的函数内，以便未来什么时期将它替换掉。&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;C11&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;---------------------------------------------------&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;1.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;高层模块不依赖于底层模块，二者都依赖于抽象&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;抽象不依赖于细节，细节依赖于抽象&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;2.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;程序中所有的依赖关系都应该终止与抽象或者接口&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;C12&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;---------------------------------------------------&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;1.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;多重继承分离接口&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;敏捷设计之着眼于当下的需求，不预测未来的需求和需要&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;敏捷开发应用设计原则取出代码中的smell，当没有这些糟糕的smell的时候， 他们不会iqu应用这些原则，仅仅因为是一个原则就无条件的遵循它是错误的 -- 这句话太深入我心了，三年来，终于找到证据证明我的想法了。我一向讨厌那些死板教条，为了原则而原则，在没有开始代码之前就把这些条条框框把我们框住，太他妈混球了。这也证明了，代码世界中，很多混饭的。&lt;/p&gt;

&lt;p&gt;C7&lt;/p&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;满足工程设计标准的唯一文档就是源码&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;粘滞性 - 做正确的事情要比做错误的事情困难&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;为过多的可能性做设计，致使系统中含有绝不会用到的结构，从而变得混乱&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;如果只是简单的copy and past带来的重复代码，还是有希望治理的。但很多事情由于系统过于庞大，A开发者编写了一段功能代码，B因为没有看到的A的代码，而又重新编写了一段，这样的代码功能一样，但很难被发现。这个问题想彻底避免，我觉得也是很困难的，这就要求开发者在开始编码前就对整个系统有个通透的了解。这就是为什么说招10个初级程序员，还不如招两个中级程序员，招五个中级程序员，还不如招两个高级程序员。&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;敏捷设计是一个过程，持续的应用原则，模式和实践来保持系统任何时候都做得尽可能的简单，干净，富于想象力。&lt;/p&gt;

&lt;p&gt;（写到这里让我想到，微软的程序员是绝没有机会实践这些东西的，他们一定很渴望，但却不可得，窃喜。）&lt;/p&gt;

&lt;p&gt;C8&lt;/p&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;被依赖最多的功能，要注意解耦&lt;/p&gt;

&lt;p&gt;C9&lt;/p&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;所有的原则都是使得我们可以尽可能的接近理想，而决不可能达到理想&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;对于扩展是开放的，对于更改是封闭的。&lt;/p&gt;

&lt;p&gt;这就是为什么有时候我们您愿增加一段新的功能代码单独处理我们的另一端逻辑，而不愿更改那块被依赖很多次的代码&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;OCP一定要提前预测什么地方需要应用此原则&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;首先开发重要的部件，尽早的，经常性的发布&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;OCP - 面向对象的核心，只有当应用这个原则的时候才能看到面向对象的好处&lt;/p&gt;

&lt;p&gt;C10&lt;/p&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Liskov替换原则 - 子类型必须能替换掉它的基类型&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;读到这里又让我想起当初学习那么多的定理，推论的用处了，很多的都用在这里了&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Design By Contract(DBC) - 契约是通过为每个方法声明前置条件和后置条件来指定的。要是一个方法的一执行，前置方法必须为真，在执行结束后，后置方法必须为真。&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;为使第三方程序可控，可以将它们包装于你自己可以控制的函数内，以便未来什么时期将它替换掉。&lt;/p&gt;

&lt;p&gt;C11&lt;/p&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;高层模块不依赖于底层模块，二者都依赖于抽象&lt;/p&gt;

&lt;p&gt;抽象不依赖于细节，细节依赖于抽象&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;程序中所有的依赖关系都应该终止与抽象或者接口&lt;/p&gt;

&lt;p&gt;C12&lt;/p&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;多重继承分离接口&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/4qpf-UNkXSs" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/09/21/agile-design.html</feedburner:origLink></item><item><title>Start my site promotion?</title><link>http://feedproxy.google.com/~r/freetofeel/~3/n_yvah8fqYQ/start-my-site-promotion.html</link><pubDate>Sun, 20 Sep 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/09/20/start-my-site-promotion</guid><description>&lt;p style="line-height: 1.7em; text-align: justify;"&gt;Human is a powerful machine for website promotion. If you have 20 people and 20 computers located in 20 different cities, you can do incredible things like:&lt;/p&gt;


&lt;p style="line-height: 1.7em; text-align: justify;"&gt;1.Exposure: There will be 5000 advertising posts all over the websites in 24 hours, if each person copy and paste the same posts.&lt;/p&gt;


&lt;p style="line-height: 1.7em; text-align: justify;"&gt;2. Traffic: Each person uses a small program to clear cookie, redial ADSL(Ip address will be changed) , and visit your website once every 2 minutes, then you can reach 14,000 unique visits each day. Very high traffic for startup websites.&lt;/p&gt;


&lt;p style="line-height: 1.7em; text-align: justify;"&gt;3.Video marketing: Each person uses a small program to replay your video once every 6 seconds, then you can reach 12,000 views in one hour, and get it into the most popular video list.&lt;/p&gt;


&lt;p style="line-height: 1.7em; text-align: justify;"&gt;4. Make rivals crazy: With the same trick, 20 PCs from 20 cities automatically refresh your rivals’ websites 24 hours a day(remember to change your IP and clear cookie once every 5 minutes), they will kill themselves.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/n_yvah8fqYQ" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/09/20/start-my-site-promotion.html</feedburner:origLink></item><item><title>Agile Development</title><link>http://feedproxy.google.com/~r/freetofeel/~3/MG70IgF3qiM/agile-development.html</link><pubDate>Sun, 20 Sep 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/09/20/agile-development</guid><description>&lt;p&gt;时隔一年再读agile，理解更加深入，遂做些读书笔记.&lt;/p&gt;

&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;C1, C2&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;1.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;响应变化 胜过遵循计划&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;为下两周做详细计划&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;为下三个月做粗略计划&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;再以后就做及粗糙的计划&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;2.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;尽早交付，越早越好&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;3.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;人被认为项目取得成功的重要因素&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;4.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;团队内部，面对面交谈&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;5.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;程序员与客户工作在一起&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;6.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;任务分配给敏捷团队，而不是某个敏捷团队成员。团队也是自组织的。&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;7.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;前期的需求 只需要了解个大致。只有在产品的特性都整合在一起的时候，才是关注需求的时候，因为这个时候需求往往变动很大。&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;8.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;专家知识通过结对编程，成员共享&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;9.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;持续集成 = svn足够了&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;10.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;加班？好的安排，连发部前一个星期的加班都不需要。&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;11.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;充满积极讨论的屋子，生产效率不但不会降低，反而提高。- 密歇根大学研究得出&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;12.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;消除重复代码 - 抽象&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;13.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;重构是持续进行的&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;C3&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;---------------------------------------&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;1.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;通过一两天去原型化一两个feature，去探测团队开发速度是必要的；&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;对不明确的feature细分为更小，可以估算的时间成本的feature。当开发速度更准确些时，对任务时间进行更准确的估算更新&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;2.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;迭代一旦开始，客户不可以再次改变&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;3.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;项目的知识应该充分的被团队每个成员了解&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;4.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;迭代的终点，进度估算。本次迭代的半数素材应该被完成，如果没有需要移除一些素材&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;C4&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;------------------------------------------&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;1.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;与其说测试驱动的测试只测试的话，我更认为他是一种目标，只是一种可以测试的目标，每次的编码都是为了实现这个目标。也就是说编码的工作最后的结果和最终的测试应该是属于的集合关系，而不是被属于的关系。&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;TDD - 站在使用者的角度来看待程序&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;2.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;测试代码应该保证简单，越简单的测试被运行的机会越多&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;C5&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;------------------------------------------&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;1.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;重构的两点:&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;a,节约下次使用的成本；&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;b,使得代码易读，易于维护&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;C6&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;--------------------------------------------&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;1.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;XP结对编程中规定，当有人请求帮助的时候，不能说‘不’&lt;/div&gt;


&lt;p&gt;C1, C2&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;响应变化 胜过遵循计划&lt;/p&gt;

&lt;p&gt;为下两周做详细计划&lt;/p&gt;

&lt;p&gt;为下三个月做粗略计划&lt;/p&gt;

&lt;p&gt;再以后就做及粗糙的计划&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;尽早交付，越早越好&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;人被认为项目取得成功的重要因素&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;团队内部，面对面交谈&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;程序员与客户工作在一起&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;任务分配给敏捷团队，而不是某个敏捷团队成员。团队也是自组织的。&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;前期的需求 只需要了解个大致。只有在产品的特性都整合在一起的时候，才是关注需求的时候，因为这个时候需求往往变动很大。&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;专家知识通过结对编程，成员共享&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;持续集成 = svn足够了&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;加班？好的安排，连发部前一个星期的加班都不需要。&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;充满积极讨论的屋子，生产效率不但不会降低，反而提高。- 密歇根大学研究得出&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;消除重复代码 - 抽象&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;重构是持续进行的&lt;/p&gt;

&lt;p&gt;C3&lt;/p&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;通过一两天去原型化一两个feature，去探测团队开发速度是必要的；&lt;/p&gt;

&lt;p&gt;对不明确的feature细分为更小，可以估算的时间成本的feature。当开发速度更准确些时，对任务时间进行更准确的估算更新&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;迭代一旦开始，客户不可以再次改变&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;项目的知识应该充分的被团队每个成员了解&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;迭代的终点，进度估算。本次迭代的半数素材应该被完成，如果没有需要移除一些素材&lt;/p&gt;

&lt;p&gt;C4&lt;/p&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;与其说测试驱动的测试只测试的话，我更认为他是一种目标，只是一种可以测试的目标，每次的编码都是为了实现这个目标。也就是说编码的工作最后的结果和最终的测试应该是属于的集合关系，而不是被属于的关系。&lt;/p&gt;

&lt;p&gt;TDD - 站在使用者的角度来看待程序&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;测试代码应该保证简单，越简单的测试被运行的机会越多&lt;/p&gt;

&lt;p&gt;C5&lt;/p&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;重构的两点:&lt;/p&gt;

&lt;p&gt;a,节约下次使用的成本；&lt;/p&gt;

&lt;p&gt;b,使得代码易读，易于维护&lt;/p&gt;

&lt;p&gt;C6&lt;/p&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;XP结对编程中规定，当有人请求帮助的时候，不能说‘不’&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/MG70IgF3qiM" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/09/20/agile-development.html</feedburner:origLink></item><item><title>Are you happy or unhappy?</title><link>http://feedproxy.google.com/~r/freetofeel/~3/0OAqWBYilhM/are-you-happy-or-unhappy.html</link><pubDate>Thu, 17 Sep 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/09/17/are-you-happy-or-unhappy</guid><description>&lt;p&gt;&lt;a rel="attachment wp-att-163" href="http://www.freetofeel.com/2009/09/are-you-happy-or-unhappy/areyouhappy_a2_web_1024-600x848/"&gt;&lt;img class="alignnone size-full wp-image-163" title="Areyouhappy_a2_web_1024-600x848" src="http://www.freetofeel.com/wp-content/uploads/2009/09/Areyouhappy_a2_web_1024-600x848.jpg" alt="Areyouhappy_a2_web_1024-600x848" width="360" height="509" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/0OAqWBYilhM" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/09/17/are-you-happy-or-unhappy.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-09-14</title><link>http://feedproxy.google.com/~r/freetofeel/~3/1CCIMoRmthQ/twitter-weekly-updates-for-2009-09-14.html</link><pubDate>Mon, 14 Sep 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/09/14/twitter-weekly-updates-for-2009-09-14</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;在我的生命某段时期，我一定要用两年写谱作曲，我要把我最强烈的感受，每个作一首 &lt;a href="http://twitter.com/Joshua_C/statuses/3909413610"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;比毛片好看： &lt;a href="http://j.mp/hWIC7" rel="nofollow"&gt;http://j.mp/hWIC7&lt;/a&gt; - Want learn more about China? This is for you! &lt;a href="http://twitter.com/Joshua_C/statuses/3863783383"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;如何度量生命？时间？一两件成事足以 &lt;a href="http://twitter.com/Joshua_C/statuses/3862393698"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;刀尖浪口，努力努力就上去了，心一软一泄气就下来了 &lt;a href="http://twitter.com/Joshua_C/statuses/3853702992"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;做UI要像做音乐一样高潮低落，一篇UI出来要给人感觉像听完了一首音乐。UI design should be treated as     
music production. When we view through the pages, the feeling should ... &lt;a href="http://twitter.com/Joshua_C/statuses/3838776101"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/1CCIMoRmthQ" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/09/14/twitter-weekly-updates-for-2009-09-14.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-09-07</title><link>http://feedproxy.google.com/~r/freetofeel/~3/1mkHeUS5qrE/twitter-weekly-updates-for-2009-09-07.html</link><pubDate>Mon, 07 Sep 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/09/07/twitter-weekly-updates-for-2009-09-07</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;沉浸是一种解脱 &lt;a href="http://twitter.com/Joshua_C/statuses/3819061046"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @yining: 中国移动网站抄袭事件(. &lt;a href="http://bit.ly/11al6F" rel="nofollow"&gt;http://bit.ly/11al6F&lt;/a&gt; //他们从来就是低能的设计，仗着垄断，养着一帮猪 &lt;a href="http://twitter.com/Joshua_C/statuses/3793773368"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;听过去才知道为什么有些人被关注了几百次，而有些歌只能充个数 &lt;a href="http://bit.ly/mv8eI" rel="nofollow"&gt;http://bit.ly/mv8eI&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/3710194750"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;活得精彩 &lt;a href="http://comtely.blogbus.com/index_3.html" rel="nofollow"&gt;http://comtely.blogbus.com/index_3.html&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/3707066586"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/1mkHeUS5qrE" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/09/07/twitter-weekly-updates-for-2009-09-07.html</feedburner:origLink></item><item><title>规律</title><link>http://feedproxy.google.com/~r/freetofeel/~3/Ca6UO0e7tWE/%25e8%25a7%2584%25e5%25be%258b.html</link><pubDate>Sun, 06 Sep 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/09/06/%e8%a7%84%e5%be%8b</guid><description>&lt;p&gt;发现了英文好的，写blog都是中文，半点不透漏英文的踪迹；而像我们这种土人，英文刚学习走路的时候，写blog都是英文（希望看着每天自己英语能进步点，流畅点，稍微不那么土点），这就是差别啊。唉，反正已经土了就继续土下去了。&lt;/p&gt;

&lt;p&gt;听完ROR作者的解释，我有些明白了。如果你发现你的效率不高，是因为你工作太久了，你需要的是5各小时的工作时间而不是8个小时或者有甚者14个小时。Focus and dedicated on one thing  需要的是持续的新鲜血液，并学会给自己奖励。&lt;/p&gt;

&lt;p&gt;How determination seems to work: it consists of willfulness balanced with  discipline, aimed by ambition.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/Ca6UO0e7tWE" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/09/06/%25e8%25a7%2584%25e5%25be%258b.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-08-31</title><link>http://feedproxy.google.com/~r/freetofeel/~3/op1LhcEDpQc/twitter-weekly-updates-for-2009-08-31.html</link><pubDate>Mon, 31 Aug 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/08/31/twitter-weekly-updates-for-2009-08-31</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;使用rss阅读容易丢失信息的敏感性，大量的信息堆积在一起，是阅读过程变得枯燥。除非你是在发掘，否则如果你是按时阅读，久而久之会发现这个过程稍显枯燥 &lt;a href="http://twitter.com/Joshua_C/statuses/3666532182"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/op1LhcEDpQc" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/08/31/twitter-weekly-updates-for-2009-08-31.html</feedburner:origLink></item><item><title>在创业这个词语被炒的只剩下皮的时候</title><link>http://feedproxy.google.com/~r/freetofeel/~3/9I9cuUaOhSo/%25e5%259c%25a8%25e5%2588%259b%25e4%25b8%259a%25e8%25bf%2599%25e4%25b8%25aa%25e8%25af%258d%25e8%25af%25ad%25e8%25a2%25ab%25e7%2582%2592%25e7%259a%2584%25e5%258f%25aa%25e5%2589%25a9%25e4%25b8%258b%25e7%259a%25ae%25e7%259a%2584%25e6%2597%25b6%25e5%2580%2599.html</link><pubDate>Sun, 30 Aug 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/08/30/%e5%9c%a8%e5%88%9b%e4%b8%9a%e8%bf%99%e4%b8%aa%e8%af%8d%e8%af%ad%e8%a2%ab%e7%82%92%e7%9a%84%e5%8f%aa%e5%89%a9%e4%b8%8b%e7%9a%ae%e7%9a%84%e6%97%b6%e5%80%99</guid><description>&lt;p&gt;如果你也想开始你的startup，先问问自己的目的是什么？这个目的是否能为你提供足够的动力支持你未来的1年或者2年。因为这是必然的，大部分创业者的开始的1年或者2年基本都是在坚持。&lt;/p&gt;

&lt;p&gt;其次要明白startup和freelancer的区别，国内叫威客。&lt;/p&gt;

&lt;p&gt;再则如果你已经开始了你的创意，你是否也考虑过引些钱进来，那么请先看看&lt;a href="http://www.reachvc.com/post/712.html"&gt;《你适合找风险投资吗？》&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;不要犹豫是真的，但一点没有思考就出去了就是你的错了，这个世界不差那些昏头土脸，在外面玩了半年就回家的人。&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/9I9cuUaOhSo" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/08/30/%25e5%259c%25a8%25e5%2588%259b%25e4%25b8%259a%25e8%25bf%2599%25e4%25b8%25aa%25e8%25af%258d%25e8%25af%25ad%25e8%25a2%25ab%25e7%2582%2592%25e7%259a%2584%25e5%258f%25aa%25e5%2589%25a9%25e4%25b8%258b%25e7%259a%25ae%25e7%259a%2584%25e6%2597%25b6%25e5%2580%2599.html</feedburner:origLink></item><item><title>Javascript value copy and reference copy</title><link>http://feedproxy.google.com/~r/freetofeel/~3/61zP2rlmxVw/javascript-variable-reference-and-object-reference.html</link><pubDate>Fri, 28 Aug 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/08/28/javascript-variable-reference-and-object-reference</guid><description>&lt;p&gt;I will take an example in &amp;lt;JavaScript: The Definitive Guide&amp;gt;&lt;/p&gt;

&lt;pre name='code' class='javascript'&gt;
var a= 3.14;
var b = a; // copy the variable's value to a new variable
a = 4;
alert(b); //Displays 3.14; The copy has not changed
&lt;/pre&gt;


&lt;br /&gt;


&lt;pre name='code' class='javascript'&gt;
var a= [1,2,3];
var b = a; // copy that reference into a new variable
a[0] = 4;
alert(b); //Displays [4,2,3]; The copy has not changed
&lt;/pre&gt;


&lt;p&gt;Actually,the basic data type is value copy, like string, number, etc. But others , like Object, Array and Function are copy reference. In its fundamental nature, there is no Object and Function in Javascript language, all of them are a type of Array.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/61zP2rlmxVw" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/08/28/javascript-variable-reference-and-object-reference.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-08-24</title><link>http://feedproxy.google.com/~r/freetofeel/~3/e9CobbXclvA/twitter-weekly-updates-for-2009-08-24.html</link><pubDate>Mon, 24 Aug 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/08/24/twitter-weekly-updates-for-2009-08-24</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;季节交替，无法赶走的困意 &lt;a href="http://twitter.com/Joshua_C/statuses/3513811200"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;有时候对自己太苛刻会发现很多事情会停滞不前，因为大量的时间浪费在了如何是事情做得更好上面。其实是否可以迭代一下呢... &lt;a href="http://twitter.com/Joshua_C/statuses/3511897331"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;一个好的设计人员一定要对业务熟悉；对产品实现技术细节有所把握；至少是自己产品的普通用户。 &lt;a href="http://twitter.com/Joshua_C/statuses/3511429624"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;如果把世上每一个人的痛苦放在一起，再让你去选择，你可能还是愿意选择自己原来的那一份。—-苏格拉底 &lt;a href="http://twitter.com/Joshua_C/statuses/3510950261"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;求生存的阶段，不能空想干什么大事；求发展的阶段，不能总想赚什么小钱 &lt;a href="http://twitter.com/Joshua_C/statuses/3439963366"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://personas.media.mit.edu/personasWeb" rel="nofollow"&gt;http://personas.media.mit.edu/personasWeb&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/3417028441"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://eprints.soton.ac.uk/64607/" rel="nofollow"&gt;http://eprints.soton.ac.uk/64607/&lt;/a&gt; - Web Projects: How to keep the peace when making decisions &lt;a href="http://twitter.com/Joshua_C/statuses/3396033842"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/e9CobbXclvA" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/08/24/twitter-weekly-updates-for-2009-08-24.html</feedburner:origLink></item><item><title>Some Orthodox Heresies from alex</title><link>http://feedproxy.google.com/~r/freetofeel/~3/wyLrHW3mvTU/some-orthodox-heresies-from-alex.html</link><pubDate>Sat, 22 Aug 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/08/22/some-orthodox-heresies-from-alex</guid><description>&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;Plugins are not evil.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;The web is a force for social change.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;The internet centralizes power…slowly…oh so slowly…&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;CSS is the problem. Also, the solution.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;Competition does not mean that your favorite player wins.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;JavaScript cannot save you. Even if it could, you should not let it, for the price of this short-term salvation is the end of what you like about the web.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;Fast is better than slow. Slow is better than closed.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;A web that isn’t extensible will wither and die.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;Proprietary can be incredibly fast.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;The sooner we take HTML out of the hands of C++ hackers, the sooner we’ll screw it up.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;Extensibility is a crutch.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;Plugins bring the advantages of slow development, unportable code, hard failure, and security holes to a platform designed to remove them. Also, they make the web awesome.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;Getting what you want will not make you happy. It is your inner dissonance that brought you to the web in the first place. You might as well own it.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;“Proprietary” is the loser’s word for “I’m too lazy to copy the good parts”.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;Small firms are always more nimble and therefore better.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;You can’t beat big companies in the end.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;HTML 5 is a cruel joke — I can’t wait for it to be done.&lt;/div&gt;


&lt;div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"&gt;Original one is here.&lt;/div&gt;


&lt;ul&gt;
    &lt;li&gt;Plugins are not evil.&lt;/li&gt;
    &lt;li&gt;The web is a force for social change.&lt;/li&gt;
    &lt;li&gt;The internet centralizes power…slowly…oh so slowly…&lt;/li&gt;
    &lt;li&gt;CSS is the problem. Also, the solution.&lt;/li&gt;
    &lt;li&gt;Competition does not mean that your favorite player wins.&lt;/li&gt;
    &lt;li&gt;JavaScript cannot save you. Even if it could, you should not let it, for the price of this short-term salvation is the end of what you like about the web.&lt;/li&gt;
    &lt;li&gt;Fast is better than slow. Slow is better than closed.&lt;/li&gt;
    &lt;li&gt;A web that isn’t extensible will wither and die.&lt;/li&gt;
    &lt;li&gt;Proprietary can be incredibly fast.&lt;/li&gt;
    &lt;li&gt;The sooner we take HTML out of the hands of C++ hackers, the sooner we’ll screw it up.&lt;/li&gt;
    &lt;li&gt;Extensibility is a crutch.&lt;/li&gt;
    &lt;li&gt;Plugins bring the advantages of slow development, unportable code, hard failure, and security holes to a platform designed to remove them. Also, they make the web awesome.&lt;/li&gt;
    &lt;li&gt;Getting what you want will not make you happy. It is your inner dissonance that brought you to the web in the first place. You might as well own it.&lt;/li&gt;
    &lt;li&gt;“Proprietary” is the loser’s word for “I’m too lazy to copy the good parts”.&lt;/li&gt;
    &lt;li&gt;Small firms are always more nimble and therefore better.&lt;/li&gt;
    &lt;li&gt;You can’t beat big companies in the end.&lt;/li&gt;
    &lt;li&gt;HTML 5 is a cruel joke — I can’t wait for it to be done.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The original one is &lt;a href="http://alex.dojotoolkit.org/2009/08/some-orthodox-heresies/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/wyLrHW3mvTU" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/08/22/some-orthodox-heresies-from-alex.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-08-17</title><link>http://feedproxy.google.com/~r/freetofeel/~3/KXrQY81VJds/twitter-weekly-updates-for-2009-08-17.html</link><pubDate>Mon, 17 Aug 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/08/17/twitter-weekly-updates-for-2009-08-17</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;Too many redundant information in tweets. I need a tweets filter! &lt;a href="http://twitter.com/Joshua_C/statuses/3344346039"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;#&lt;a href="http://search.twitter.com/search?q=%23winMBP"&gt;winMBP&lt;/a&gt; @&lt;a href="http://twitter.com/taptaptap"&gt;taptaptap&lt;/a&gt; is giving away a $5999 ColorWare STEALTH MacBook Pro to celebrate launching Convert for iPhone! &lt;a href="http://taptaptap.com/+Gpv" rel="nofollow"&gt;http://taptaptap.com/+Gpv&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/3302096894"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;国外讨论sns，总是讨论应该怎么使用它，企业，政府机构等等，可以做什么不可以做什么，法律的制定等等； 可是国内看到的却是在玩，今天这家做了一个，明天西头又冒出一个，或者就是在复制处于sns前期的产品。我们是否能引领某种技术，而不是追随 &lt;a href="http://twitter.com/Joshua_C/statuses/3264341988"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/KXrQY81VJds" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/08/17/twitter-weekly-updates-for-2009-08-17.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-08-10</title><link>http://feedproxy.google.com/~r/freetofeel/~3/mD0HbTB1HqA/twitter-weekly-updates-for-2009-08-10.html</link><pubDate>Mon, 10 Aug 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/08/10/twitter-weekly-updates-for-2009-08-10</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;RT @herrbenz:Man shaves head, walks across China 4 year makes a timelapse of his hair/beard growth: &lt;a href="http://bit.ly/3KA37B" rel="nofollow"&gt;http://bit.ly/3KA37B&lt;/a&gt; // cool man &lt;a href="http://twitter.com/Joshua_C/statuses/3235410472"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://tinyurl.com/7lqsrr" rel="nofollow"&gt;http://tinyurl.com/7lqsrr&lt;/a&gt; //I&amp;#39;d like to recommend this to all of you, if you want to know what Chopin is saying! &lt;a href="http://twitter.com/Joshua_C/statuses/3224364793"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @jperrasHacking: hotel wifi with an SQL injection: &lt;a href="http://tr.im/hotelwifihack" rel="nofollow"&gt;http://tr.im/hotelwifihack&lt;/a&gt; // A classic injection &lt;a href="http://twitter.com/Joshua_C/statuses/3217467531"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;第七十六届环球沪语5.5级考试　B卷笔试　听力部分 - 太难了 &lt;a href="http://twitter.com/Joshua_C/statuses/3207091265"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;喝一口咖啡，最好可以把上面的泡沫一口喝下，然后用鼻子出气，香啊 &lt;a href="http://twitter.com/Joshua_C/statuses/3204280323"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;我看到的中国技术牛人远比国外的技术牛人多，可能是因为我接触外面的世界还很小，但一点可以肯定的就是如果他们都用英文写文章，搜索某个话题的时候，前十个搜索一定有一个中国的blogger &lt;a href="http://twitter.com/Joshua_C/statuses/3191150842"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;代理服务器是单台 P4 3.0GHz, 2GB RAM, SCSI U320 HDDs RAID-1.#资料备份 &lt;a href="http://twitter.com/Joshua_C/statuses/3187719259"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;应用服务器配置是dual Xeon 3.06GHz, 2GB RAM, SCSI U320 HDDs RAID-1.数据库服务器dual Xeon 3.06GHz, 4GB RAM, SCSI U320 HDDs RAID-1. &lt;a href="http://twitter.com/Joshua_C/statuses/3187713636"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT: @turingbook: 唉，这年头，推得好辛苦啊 // &lt;a href="http://hosts.file.patch.pp.ru/" rel="nofollow"&gt;http://hosts.file.patch.pp.ru/&lt;/a&gt; 这个我这里可以用，可以试试，如果可以，借你的影响力介绍给大家 &lt;a href="http://twitter.com/turingbook/statuses/3176001226"&gt;in reply to turingbook&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/3176087704"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;这一波又有多少人上不来了 &lt;a href="http://twitter.com/Joshua_C/statuses/3175944696"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;test &lt;a href="http://twitter.com/Joshua_C/statuses/3175845825"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;When you enjoy &amp;#39;Pink Floyd&amp;#39;, do not doubt your ears or your headphones! &lt;a href="http://twitter.com/Joshua_C/statuses/3172566732"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;host patch : &lt;a href="http://hosts.file.patch.pp.ru/" rel="nofollow"&gt;http://hosts.file.patch.pp.ru/&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/3171805359"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Node js I will love you too much! &lt;a href="http://twitter.com/Joshua_C/statuses/3171787916"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @smashingmag: Reading: &amp;quot;&amp;#39;Kill IE6&amp;#39; campaign gains force; 30M Web users get switch pitch&amp;quot; - &lt;a href="http://bit.ly/gcG9l" rel="nofollow"&gt;http://bit.ly/gcG9l&lt;/a&gt; (via @&lt;a href="http://twitter.com/speckyboy"&gt;speckyboy&lt;/a&gt;) //D &lt;a href="http://twitter.com/Joshua_C/statuses/3165803632"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;firefox的启动速度可以和windows开机想媲美了，你就不能先启动后加载啊？ &lt;a href="http://twitter.com/Joshua_C/statuses/3165683541"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;W3C announcement: Internet Explorer to be made obsolete. From fall onwards, IE6 and IE7 will be blocked from browsing the internet //OMG! &lt;a href="http://twitter.com/Joshua_C/statuses/3124952561"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Transcending imminent change lead to success; fighting it leaves you behind &lt;a href="http://twitter.com/Joshua_C/statuses/3123974259"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/mD0HbTB1HqA" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/08/10/twitter-weekly-updates-for-2009-08-10.html</feedburner:origLink></item><item><title>isBig5 function</title><link>http://feedproxy.google.com/~r/freetofeel/~3/QEpUYmTsOk0/isbig5-function.html</link><pubDate>Mon, 10 Aug 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/08/10/isbig5-function</guid><description>&lt;pre name='code' class='php'&gt;
/**
 * isBig5:Determine whether the sentence contain the entire phrase in Chinese (The mixture of Chinese and English is not the scope of this deal)
 *
 * @param $String target string
 *
 * @return 0:it is a chinese string;1-english string
 */
 function isBig5($String){
  $str=iconv("utf-8","big5",$String);
  if (mb_strlen($str,"Big5") == strlen($str))
    return 0;//non-Chinese
   else
    return 1;//Chinese
 }
&lt;/pre&gt;


&lt;p&gt;Reprint from &lt;a href="http://tdy.erufa.com/Blog/?p=32"&gt;tdy's blog&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/QEpUYmTsOk0" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/08/10/isbig5-function.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-07-27</title><link>http://feedproxy.google.com/~r/freetofeel/~3/8ZWO1HhsDik/twitter-weekly-updates-for-2009-07-27.html</link><pubDate>Mon, 27 Jul 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/07/27/twitter-weekly-updates-for-2009-07-27</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;RT: @kavenyan: 上午发现IE、Opera、Safari和Chrome均不能打开网页而Firefox却没有问题。//Ie8上我也遇到相同的问题，而且yahoo message也受影响，但还不清楚究竟它们和IE啥关系，可能最后还是windows底层的问题 &lt;a href="http://twitter.com/Joshua_C/statuses/2835064685"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT: @jeresig: The new Tron movie looks very very awesome. &lt;a href="http://bit.ly/KJomn" rel="nofollow"&gt;http://bit.ly/KJomn&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/2829194236"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;现在google把video和youtube分开放置了？ &lt;a href="http://twitter.com/Joshua_C/statuses/2814440888"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;ie8自认为弹出很多block就很安全。那些人的脑子在想什么！ &lt;a href="http://twitter.com/Joshua_C/statuses/2794405306"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;300年一遇没戏了 &lt;a href="http://twitter.com/Joshua_C/statuses/2759405246"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;yui blog也要翻，让日全食日你们祖宗十八代 &lt;a href="http://twitter.com/Joshua_C/statuses/2754472573"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;It seems facebook refuse the register from proxy server with an red error &amp;quot;Sorry, you are ineligible to sign up for Facebook.&amp;quot; &lt;a href="http://twitter.com/Joshua_C/statuses/2754226318"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/8ZWO1HhsDik" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/07/27/twitter-weekly-updates-for-2009-07-27.html</feedburner:origLink></item><item><title>Redirect a page with meta tag</title><link>http://feedproxy.google.com/~r/freetofeel/~3/Ch-389IPM9c/redirect-a-page-with-meta-tag.html</link><pubDate>Sun, 26 Jul 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/07/26/redirect-a-page-with-meta-tag</guid><description>&lt;p&gt;I have never imaged it can be so simple to redirect a page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&amp;lt;meta http-equiv="refresh" content="600"&amp;gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&amp;lt;meta&amp;gt; - This is the HTML tag. It belongs in the &lt;head&gt; of your HTML document. You can learn more about the meta tag in my tag library.&lt;/p&gt;

&lt;p&gt;http-equiv="refresh" - This attribute tells the browser that this meta tag is sending an HTTP command rather than a standard meta tag. Refresh is an actual HTTP header used by the Web server. It tells the server that the page is going to be reloaded or sent somewhere else.&lt;/p&gt;

&lt;p&gt;content="600" - This is the amount of time, in seconds, until the browser should reload the current page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;
&amp;lt;meta http-equiv="refresh" content="2;url=http://freetofeel.com"&amp;gt;
&lt;/strong&gt;
content="2;url=http://freetofeel.com/" - The number is the time, in seconds, until the page should be redirected. Then, separated by a semi-colon (;) is the URL that should be loaded.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Meta refresh tags have some drawbacks:&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;* If the redirect happens quickly (less than 2-3 seconds), readers with older browsers can't hit the "Back" button. This is a usability problem.
* If the redirect happens quickly and goes to a non-existant page, your readers won't be able to hit the "Back" button. This is a usability problem that will cause people to completely leave your site.
* Refreshing the current page can confuse people. If they didn't request the reload, some people can get concerned about security.
&lt;/code&gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/Ch-389IPM9c" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/07/26/redirect-a-page-with-meta-tag.html</feedburner:origLink></item><item><title>Website promotion</title><link>http://feedproxy.google.com/~r/freetofeel/~3/SqCejOCHch8/website-promotion.html</link><pubDate>Sat, 25 Jul 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/07/25/website-promotion</guid><description>&lt;p&gt;I try to gather all the website promotion techniques together here. Of course, I am not the original author of them. They are all widely used and are almost deserted as the techniques changes. So don't rely on a method or two method. As a beginner, we should learn the philosophy principles in them and make more thinking.&lt;/p&gt;

&lt;ul&gt;
    &lt;li&gt;&lt;strong&gt;Article Writing&lt;/strong&gt;&lt;/li&gt;
Article writing is still a useful traffic generator and promotion method. In recent times article marketing has changed. Google no longer appears to use all the backlinks from the same article submitted to multiple directories. So you only really benefit in terms of backlinks when someone reprints your article. This also provides the potential for additional direct traffic. A good strategy is to submit your unique article to one directory. Get it approved and then submit it to others at regular intervals.
    &lt;li&gt;&lt;strong&gt;Writing Articles For Other Websites&lt;/strong&gt;&lt;/li&gt;
This is a really useful strategy which is often overlooked. Most website owners are looking for unique content so if you offer to provide them with a totally unique article just for their site so they are unlikely to turn you down. In return all you require is a couple of backlinks to your website from within the article. This way you get to select the all important link text. If you choose quality websites with good page rank and traffic you get the best of both worlds. The best way to get this to work is to publish a couple of good articles on ezinearticles.com and then wait to see who reprints them. Get in touch with the website owner and offer them another article which this time will be exclusive to them.
    &lt;li&gt;&lt;strong&gt;Off-Site Blog Posting&lt;/strong&gt;&lt;/li&gt;
Pick some relevant blogs that pass page rank and start posting useful comments to them on a regular basis. Make your comments really useful even if you have to spend time researching. After a while just ask the blog owner if they would allow you to write a couple of posts on their site. They will not often refuse such an offer.
    &lt;li&gt;&lt;strong&gt;On Site Blog Posting&lt;/strong&gt;&lt;/li&gt;
If you don’t have your own blog, you need one. Set up a blog along side your existing website. Then write a post every other day about something relevant. If you blog is set up correctly then new posts will be found very quickly (within hours) by the search engines. Remember to write your posts with your keywords in mind. A blog post with a keyword rich title that contains a link back to your main site is worth having and will generate search traffic.
    &lt;li&gt;&lt;strong&gt;Web 2.0 Sites&lt;/strong&gt;&lt;/li&gt;
You can generate your own off-site pages for free by using Squidoo, Hubpages and wetpaint to name just three. Build these with content from your main site and articles but rewritten to make it unique. Then include a few links back to your main site. Do not over do the backlinks remember to keep it looking natural.
    &lt;li&gt;&lt;strong&gt;advertising&lt;/strong&gt;&lt;/li&gt;
There are many ways of advertising types, in accordance with the media to distinguish between the media, including network, television, books, etc., we can make use of these advertising media to promote our website in order to improve the click-through rate.
    &lt;li&gt;&lt;strong&gt;e-mail to promote&lt;/strong&gt;&lt;/li&gt;
E-mail to those rankings and better and our own business has a long association’s Web site to send e-mail request to exchange links, so that we can appear in the link of the website others in order to improve traffic. When the name It also requires us to e-mail designed to attract, at the same time we must have the actual content of sites, and contains a certain amount of original works, to attract visitors attention.
    &lt;li&gt;&lt;strong&gt;Links&lt;/strong&gt;&lt;/li&gt;
Recommendations and their own business operations of companies to establish mutual links to each other to engage in well-known.
    &lt;li&gt;&lt;strong&gt;Yellow Pages Registration&lt;/strong&gt;&lt;/li&gt;
Some well-known in the Yellow Pages company search website on the Companies Registry, the company added to the enterprise database, so the aim is to not only improve the chances of being searched, and more conducive for companies to promote and raise awareness
    &lt;li&gt;&lt;strong&gt;&lt;a href="http://www.unblockspace.net/browse.php?u=Oi8vd3d3LnByb21vdGlvbndvcmxkLmNvbS9zZS9hcnRpY2xlcy9hcnRpY2xlLzA5MDcxNS1Bbi1JbnRyby10by1Tb2NpYWwtTWVkaWEtTWFya2V0aW5n&amp;b=5"&gt;An Intro to Social Media Marketing&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;&lt;a href="http://www.unblockspace.net/browse.php?u=Oi8vd3d3LnByb21vdGlvbndvcmxkLmNvbS9zZS9hcnRpY2xlcy9hcnRpY2xlLzA5MDcxMy1PcHRpbWlzaW5nLVlvdXItU2l0ZS1CaW5n&amp;b=5"&gt;Optimising Your Site for Bing&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
    &lt;li&gt;&lt;strong&gt;&lt;a href="http://www.instantposition.com/search-submission.html"&gt;Search Engine Submission&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In my opinion, to improve the quality of your site is the king.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/SqCejOCHch8" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/07/25/website-promotion.html</feedburner:origLink></item><item><title>Generate a friendly URLS for your site</title><link>http://feedproxy.google.com/~r/freetofeel/~3/_izvk-sRV1o/generate-a-friendly-urls-for-your-site.html</link><pubDate>Tue, 21 Jul 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/07/21/generate-a-friendly-urls-for-your-site</guid><description>&lt;p&gt;'We are fighting with SEO everyday ...'
It is true! If you want Google 'know' more about you, it is time to give a friendly URLS to him.
There are two main method that we can make a friendly URLS for our site. And we will take blog as example:
1. The simple way
Append a friendly title after your original URL.
e.g.
Your original post url : &lt;strong&gt;http://xxx.com/blog/1254&lt;/strong&gt;
After appending the post title after the original title, it will looks like &lt;strong&gt;http://xxx.com/blog/1254/blog_post_title_about_iron_man&lt;/strong&gt;
But there is a disadvantage of this. It would look like blog_post_title_about_iron_man is a sub-item of 1254 for search engines. You can take &lt;a href="http://twitter.com/felixge"&gt;Felix&lt;/a&gt;'s &lt;a href="http://debuggable.com/posts/dessert-11-welcome-back-friendly-urls:480f4dd5-8dac-414b-b329-4dd5cbdd56cb"&gt;post&lt;/a&gt; as an example. I think it will be possible to modify the url like what you want, no matter which framework you are using.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The final solution
You can take wordpress article as an example. If you take a look at your wordpress database, there is a column named 'url' in posts table. Yes, it is the solution. What you need to do is generating a unique url for every post in your table. It is the same thing we generate an id for every record in our table. You can take the method 'getUniqueUrl' in article &lt;a href="http://bakery.cakephp.org/articles/view/adding-friendly-urls-to-the-cake-blog-tutorial"&gt;'Adding friendly URLs to The Cake Blog Tutorial'&lt;/a&gt; for example.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I believe it will not take you half an hour to give a friendly URLS for your website. Why not give a try? :-]&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/_izvk-sRV1o" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/07/21/generate-a-friendly-urls-for-your-site.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-07-20</title><link>http://feedproxy.google.com/~r/freetofeel/~3/ngZBLy5zJQo/twitter-weekly-updates-for-2009-07-20.html</link><pubDate>Mon, 20 Jul 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/07/20/twitter-weekly-updates-for-2009-07-20</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;现在任务栏托盘上面一看不见卡巴斯基，我就心慌慌 &lt;a href="http://twitter.com/Joshua_C/statuses/2740065556"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;IE 还是很大的市场份额，大家都不敢轻易放弃它 &lt;a href="http://www.w3counter.com/globalstats.php" rel="nofollow"&gt;http://www.w3counter.com/globalstats.php&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/2735675893"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;事不尽善则废矣 &lt;a href="http://twitter.com/Joshua_C/statuses/2730924625"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;很多时候开发一个feature很简单，但优化feature上面的纹理却很需要功力！ &lt;a href="http://twitter.com/Joshua_C/statuses/2730895177"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;截至17日18时，全川188万人受灾，8人死亡，5人失踪，紧急转移安置11.7万人 &lt;a href="http://bit.ly/PTCIL" rel="nofollow"&gt;http://bit.ly/PTCIL&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/2721006265"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;1255 --&amp;gt; 2653!! &lt;a href="http://twitter.com/Joshua_C/statuses/2719752803"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;winmege codepage:65001 == utf-8 &lt;a href="http://twitter.com/Joshua_C/statuses/2716444989"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;firefox啊 firefox啊，你就不能靠点谱吗？改完这个问题，出来那个问题，折腾 &lt;a href="http://twitter.com/Joshua_C/statuses/2702363214"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Creating a custom php.ini using the server default php.ini and configuration settings -- &lt;a href="http://drupal.org/node/290592" rel="nofollow"&gt;http://drupal.org/node/290592&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/2629429131"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/ngZBLy5zJQo" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/07/20/twitter-weekly-updates-for-2009-07-20.html</feedburner:origLink></item><item><title>Format PHP Code integrated with VIM</title><link>http://feedproxy.google.com/~r/freetofeel/~3/E0ivL6nI9Wo/format-php-code-integrated-with-vim.html</link><pubDate>Mon, 20 Jul 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/07/20/format-php-code-integrated-with-vim</guid><description>&lt;p&gt;I like this post &lt;a href="http://shadsplace.org/beautify-php/"&gt;Command line PHP Code Formatter for use with VIM&lt;/a&gt;. It really save me a lot of time on format the past code in VIM.
1.
download the &lt;a href="http://shadsplace.org/beautify-php/beautify.php.gz"&gt;beautify.php.gz&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Copy the beautify.php into your user bin directory
&lt;strong&gt;cp beautify.php /usr/local/bin&lt;/strong&gt;
&lt;strong&gt;chmod 755 /usr/local/bin/beautify.php&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the code and then format it using the php script.
Selecting code in visual mode (&lt;strong&gt;shift-v&lt;/strong&gt; while in command mode) and then sending it to beautify.php by
&lt;strong&gt;:! beautify.php&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/E0ivL6nI9Wo" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/07/20/format-php-code-integrated-with-vim.html</feedburner:origLink></item><item><title>Cake Tips from my App</title><link>http://feedproxy.google.com/~r/freetofeel/~3/AYS_Quj9TnM/cake-tips-from-my-app.html</link><pubDate>Fri, 17 Jul 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/07/17/cake-tips-from-my-app</guid><description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;If you turn on cache in core.php, everytime when you modify your model , don't forget to clear the files under /tmp/cache/models/.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don't cache the element which has include the pagination logic. Because the sort and pagination will fail to work.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If there is anonymous role in your ACL model, don't divide your ACL model like this:
All --
-----Anonymous
-----Member--
---------------Admin
---------------Normal&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;There is a &lt;a href="http://groups.google.com/group/cake-php/browse_thread/thread/cdc817b4ee5de4d5/824fccaad92bfca6?hl=en&amp;lnk=gst&amp;q=use+Auth+component+in+AppController%3F#"&gt;thread&lt;/a&gt; explained this.&lt;/p&gt;

&lt;p&gt;The following will be fine:
All --
-----Member--
---------------Admin
---------------Normal&lt;/p&gt;

&lt;p&gt;If you want 'post/view' page can be visited by anonymous user, just add it into $this-&gt;Auth-&gt;allowedActions = array(//....);&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If you want to use Auth component, you should decide you will use it entirely in your application or use it a little.
For example, If you want to implement your ACL like cake &lt;a href="http://book.cakephp.org/view/641/Simple-Acl-controlled-Application"&gt;demo&lt;/a&gt;. You should remember, there is no need to write users/login action code. Cake will help you do the left including login and redirect, if you has set the auth property.&lt;/li&gt;
&lt;/ol&gt;


&lt;pre name="code" class="php"&gt;
    $this-&gt;Auth-&gt;allowedActions = array(//...);
    $this-&gt;Auth-&gt;loginAction = array('controller' =&gt; 'controller_a', 'action' =&gt; 'action_a');
    $this-&gt;Auth-&gt;loginRedirect = array('controller' =&gt; 'controller_b', 'action' =&gt; 'action_b');
    $this-&gt;Auth-&gt;loginError = 'Username and password do not match. Please try again.';
    $this-&gt;Auth-&gt;fields = array(
     //...
    );
    $this-&gt;Auth-&gt;allowedControllers = array(//...);

&lt;/pre&gt;


&lt;p&gt;And I think Miles &lt;a href="http://www.milesj.me/blog/read/5/using-cakephps-auth-component"&gt;post&lt;/a&gt; will help you a lot.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;If you want to send email through Gmail, take a look at this &lt;a href="http://groups.google.com/group/cake-php/browse_thread/thread/8573140b2e72d1aa/839b6f576077ed18?hl=en&amp;lnk=gst&amp;q=Need+Help+of+Email+component+-+fail+to+send+email#839b6f576077ed18"&gt;thread&lt;/a&gt;. And Marc has wrote an &lt;a href="http://marcgrabanski.com/article/cakephp-email-google-apps-gmail"&gt;article&lt;/a&gt; to implement this in another way.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It is easy to customize all the error pages, copying the files you needed under cake\libs\view\errors into app\views\errors. And then you can customize it to what you want.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optimize your site performance
I don't want to write a lot about this. Because you can find there are a lot of resources[1] about this.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;*resource[1]:
1. &lt;a href="http://www.pseudocoder.com/archives/2009/03/17/8-ways-to-speed-up-cakephp-apps/"&gt;8 Ways to Speed Up the Performance of CakePHP Apps&lt;/a&gt;
2. &lt;a href="http://debuggable.com/posts/how-to-save-half-a-second-on-every-request-of-your-cakephp-app:49a69610-8648-4d65-815d-754c4834cda3"&gt;How To Save Half A Second On Every CakePHP Request&lt;/a&gt;
3. &lt;a href="http://www.samaxes.com/2008/04/htaccess-gzip-and-cache-your-site-for-faster-loading-and-bandwidth-saving/"&gt;Learn more about cakephp with .htaccess&lt;/a&gt; and &lt;a href="http://www.askapache.com/htaccess/apache-htaccess.html"&gt;another&lt;/a&gt; one about .htaccess
4. &lt;a href="http://www.g-loaded.eu/2006/12/04/optimize-and-compress-css-files"&gt;CSS Compress&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/AYS_Quj9TnM" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/07/17/cake-tips-from-my-app.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-07-13</title><link>http://feedproxy.google.com/~r/freetofeel/~3/5OZJ9B_LIG0/twitter-weekly-updates-for-2009-07-13.html</link><pubDate>Mon, 13 Jul 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/07/13/twitter-weekly-updates-for-2009-07-13</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;RT @kunshou: FriendFeed 撞墙后，可使用 &lt;a href="http://dev.ctor.org/f2p/" rel="nofollow"&gt;http://dev.ctor.org/f2p/&lt;/a&gt; 和 fftogo.com &lt;a href="http://ff.im/-59sHt" rel="nofollow"&gt;http://ff.im/-59sHt&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/2613452570"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @&lt;a href="http://twitter.com/nateabele"&gt;nateabele&lt;/a&gt; Cake3 code now available: &lt;a href="http://code.cakephp.org/cake3" rel="nofollow"&gt;http://code.cakephp.org/cake3&lt;/a&gt; #&lt;a href="http://search.twitter.com/search?q=%23CakePHP"&gt;CakePHP&lt;/a&gt; // Cake response quickly than what I expected. Good Jobs! &lt;a href="http://twitter.com/Joshua_C/statuses/2606047207"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Write a post about how to use the third party twitter clients - &lt;a href="http://bit.ly/itb8B" rel="nofollow"&gt;http://bit.ly/itb8B&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/2577773706"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;I love you , gmail+twitter - &lt;a href="http://bit.ly/XlTUu" rel="nofollow"&gt;http://bit.ly/XlTUu&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/2576854626"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Retweet button - &lt;a href="http://github.com/jeresig/retweet/tree/master" rel="nofollow"&gt;http://github.com/jeresig/retweet/tree/master&lt;/a&gt; -- Beautiful &lt;a href="http://twitter.com/Joshua_C/statuses/2560100741"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Google:Happy Birthday Nikola Tesla! &lt;a href="http://twitter.com/Joshua_C/statuses/2559973483"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/5OZJ9B_LIG0" height="1" width="1"/&gt;</description><enclosure url="http://bit.ly/XlTUu" length="-1" type="application/xhtml+xml" /><feedburner:origLink>http://freetofeel.com/2009/07/13/twitter-weekly-updates-for-2009-07-13.html</feedburner:origLink></item><item><title>The other twitter clients that you may be like</title><link>http://feedproxy.google.com/~r/freetofeel/~3/ZeKMDoiD_K8/the-other-twitter-clients-that-you-may-be-like.html</link><pubDate>Sat, 11 Jul 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/07/11/the-other-twitter-clients-that-you-may-be-like</guid><description>&lt;ul&gt;
&lt;li&gt;http://itweet.net/web/&lt;/li&gt;
&lt;li&gt;http://m.tweete.net/login&lt;/li&gt;
&lt;li&gt;http://twitzap.com/&lt;/li&gt;
&lt;li&gt;http://tweetree.com/&lt;/li&gt;
&lt;li&gt;https://filttr.com/&lt;/li&gt;
&lt;li&gt;http://twaitter.com/&lt;/li&gt;
&lt;li&gt;&lt;a href="http://twittergadget.appspot.com/"&gt;Gmail Gadget&lt;/a&gt;&lt;/li&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;My favorite is &lt;a href="http://twittergadget.appspot.com/"&gt;Gmail Gadget&lt;/a&gt; for its simple power that can break through the GFW in China.
Let me introduce the steps to set &lt;a href="http://twittergadget.appspot.com/"&gt;Gmail Gadget&lt;/a&gt; in Gmail.&lt;/p&gt;

&lt;p&gt;Step1: Click the lab icon in Gmail home page
&lt;img src="http://www.freetofeel.com/wp-content/uploads/2009/07/step1.gif" alt="step1" title="step1" width="550" height="82" class="alignnone size-full wp-image-76" /&gt;&lt;/p&gt;

&lt;p&gt;Step 2: Enable the 'Add any gadget by URL' widget
&amp;lt;img src="http://www.freetofeel.com/wp-content/uploads/2009/07/step2.gif" alt="step2" title="step2" width="683" height="128" class="alignnone size-full wp-image-77"&lt;/p&gt;

&lt;p&gt;Step 3: Go to Gmail home page -&gt; settings -&gt;Gadgets
Enter &lt;strong&gt;https://twittergadget.appspot.com/gadget-gmail.xml&lt;/strong&gt; at the gadget URL.&lt;/p&gt;

&lt;p&gt;Step 4: After you add the gadget URL, you will find a twitter widget appeared in the left of your home page.
&lt;img src="http://www.freetofeel.com/wp-content/uploads/2009/07/step3.gif" alt="step3" title="step3" width="172" height="132" class="alignnone size-full wp-image-80" /&gt;&lt;/p&gt;

&lt;p&gt;The last step is just verifying your twitter account.
And then you can enjoy it with its simple and powerful.
&lt;img src="http://www.freetofeel.com/wp-content/uploads/2009/07/step4.gif" alt="step4" title="step4" width="458" height="140" class="alignnone size-full wp-image-85" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/ZeKMDoiD_K8" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/07/11/the-other-twitter-clients-that-you-may-be-like.html</feedburner:origLink></item><item><title>Whats web OS?</title><link>http://feedproxy.google.com/~r/freetofeel/~3/35kZHr3pTNU/whats-web-os.html</link><pubDate>Wed, 08 Jul 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/07/08/whats-web-os</guid><description>&lt;p&gt;We known Google announced its &lt;a href="http://googleblog.blogspot.com/2009/07/introducing-google-chrome-os.html"&gt;web OS&lt;/a&gt; based on Chrome. As I have discussed this about two years ago with my colleagues, Web OS is the trending of the Operation System. What we need is a machine without hard disk, just strongest CPU and a network port. All the files, maybe we will call it data in Web OS era, will be stored in a data center. Every time when we start our machine, the Web OS opened. What we will do is remote. Calculation is remote, Storage is remote and Service is remote. I think the Cloud will be part of the data center at that time. There will be computer concept. What we needed is just an end point. Everything became simple , effective and worldwide shared.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/35kZHr3pTNU" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/07/08/whats-web-os.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-07-06</title><link>http://feedproxy.google.com/~r/freetofeel/~3/brWS88qHPiE/twitter-weekly-updates-for-2009-07-06.html</link><pubDate>Mon, 06 Jul 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/07/06/twitter-weekly-updates-for-2009-07-06</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;&lt;a href="http://tinyurl.com/ngf92d" rel="nofollow"&gt;http://tinyurl.com/ngf92d&lt;/a&gt; - The probability that you will change a piece of code in the near future increases when you make changes to... &lt;a href="http://twitter.com/Joshua_C/statuses/2420039633"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/brWS88qHPiE" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/07/06/twitter-weekly-updates-for-2009-07-06.html</feedburner:origLink></item><item><title>After auto redirect from PayPal, the session was lost[Cake App]</title><link>http://feedproxy.google.com/~r/freetofeel/~3/eJS4o_cWbP4/after-auto-redirect-from-paypal-the-session-was-lostcake-app.html</link><pubDate>Tue, 30 Jun 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/06/30/after-auto-redirect-from-paypal-the-session-was-lostcake-app</guid><description>&lt;p&gt;Reproduce steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Customer login &lt;a href="https://www.mysite.com"&gt;my site&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;Choose a product and redirect to &lt;a href="https://developer.paypal.com/cgi-bin/devscr"&gt;Paypal sandbox site&lt;/a&gt; to complete the payment;&lt;/li&gt;
&lt;li&gt;After the payment, the customer will be auto redirected to my site;&lt;/li&gt;
&lt;li&gt;And then the customer session was lost.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;I found the fail reason.&lt;/p&gt;

&lt;pre name="code" class="php"&gt;
function __initSession() {
    $iniSet = function_exists('ini_set');

    if ($iniSet &amp;&amp; env('HTTPS')) {
        ini_set('session.cookie_secure', 1); 
    } 
    switch ($this-&gt;security) {
     case 'high': $this-&gt;cookieLifeTime = 0;
     if ($iniSet) {
     ini_set('session.referer_check', $this-&gt;host);
     } 
     break;
     case 'medium': $this-&gt;cookieLifeTime = 7 * 86400;
     if ($iniSet) {
     ini_set('session.referer_check', $this-&gt;host);
     } 
     break;
     case 'low': default: $this-&gt;cookieLifeTime = 788940000; break;
    }
}
&lt;/pre&gt;


&lt;p&gt;If you set the security level 'high' or 'medium' , the session wil be renewed.&lt;/p&gt;

&lt;p&gt;A piece of comment from a guy in php.net:&lt;/p&gt;

&lt;pre name="code" class="html"&gt;
If you have a value specified for session.referer_check you may run into difficulty when someone accesses your site and attempts to log in with a mis-capitalized URL.  
The logon will fail because any calls to session_start() will result in the existing session being trashed and a new one being created.  This becomes a bigger problem when the logon is followed by a header("Location: ...") redirect, because the session_start() at the top of the page will fail.&lt;/pre&gt;


&lt;p&gt;So now , I have to avoid to use the refer_check.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/eJS4o_cWbP4" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/06/30/after-auto-redirect-from-paypal-the-session-was-lostcake-app.html</feedburner:origLink></item><item><title>VBOX: this kernel requires the following features not present on the CPU:pae</title><link>http://feedproxy.google.com/~r/freetofeel/~3/2wET8IG1pOg/vbox-this-kernel-requires-the-following-features-not-present-on-the-cpupae.html</link><pubDate>Mon, 29 Jun 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/06/29/vbox-this-kernel-requires-the-following-features-not-present-on-the-cpupae</guid><description>&lt;p&gt;Solution:
In the main window of VirtualBox-&gt;settings-&gt;General selection on the left-&gt;the Advanced tab on the right.
Enable PAE/NX is in the middle of the window in Extended Features.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/2wET8IG1pOg" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/06/29/vbox-this-kernel-requires-the-following-features-not-present-on-the-cpupae.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-06-29</title><link>http://feedproxy.google.com/~r/freetofeel/~3/kRC43nHoZsA/twitter-weekly-updates-for-2009-06-29.html</link><pubDate>Mon, 29 Jun 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/06/29/twitter-weekly-updates-for-2009-06-29</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;看到baidu blog上面一大堆的我顶我顶,让我想到可以诱导中国一大堆没有脱离幼稚的网民群体来给网站带点PV &lt;a href="http://twitter.com/Joshua_C/statuses/2370909243"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://bit.ly/bZs7T" rel="nofollow"&gt;http://bit.ly/bZs7T&lt;/a&gt;
 -- 早就有意识,这个只要大牌进来,所有的就只能喝汤 &lt;a href="http://twitter.com/Joshua_C/statuses/2366023451"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://bit.ly/ykdz6" rel="nofollow"&gt;http://bit.ly/ykdz6&lt;/a&gt;
 //旁边的还不自觉爆掉?留着干嘛 &lt;a href="http://twitter.com/Joshua_C/statuses/2355885796"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;每行数据都有自己的版本控制 &lt;a href="http://twitter.com/Joshua_C/statuses/2340868290"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;都是在强调写unit test的重要性，是不是应该有篇文档强调什么条件下是没有必要对一个方法一个模块写unit test的。低效的，收获甚微的。 &lt;a href="http://twitter.com/Joshua_C/statuses/2336566494"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;既然是鸡肋,既不能当钢筋混凝土使 &lt;a href="http://twitter.com/Joshua_C/statuses/2327036145"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;我决定把以前所有在网络上看得资料都download下来,准备过冬 &lt;a href="http://twitter.com/Joshua_C/statuses/2325049439"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;unit test - 鸡肋 &lt;a href="http://twitter.com/Joshua_C/statuses/2323740503"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;consensus driven development // ? &lt;a href="http://twitter.com/Joshua_C/statuses/2323517357"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Timelines bad, stability good -- cool &lt;a href="http://twitter.com/Joshua_C/statuses/2323487490"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;replace of yslow &lt;a href="http://bit.ly/rPV07" rel="nofollow"&gt;http://bit.ly/rPV07&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/2320278819"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;为啥还是时段时序呢,... &lt;a href="http://twitter.com/Joshua_C/statuses/2311900925"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;test &lt;a href="http://twitter.com/Joshua_C/statuses/2291346432"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT: @mason_hzx: @&lt;a href="http://twitter.com/Joshua_C"&gt;Joshua_C&lt;/a&gt; 你是在说google? 不是，只是看到别人的帖子 &lt;a href="http://twitter.com/Joshua_C/statuses/2287766859"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/kRC43nHoZsA" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/06/29/twitter-weekly-updates-for-2009-06-29.html</feedburner:origLink></item><item><title>The Failed requests in ApacheBench Test</title><link>http://feedproxy.google.com/~r/freetofeel/~3/AJvC6W2F2bE/the-failed-requests-in-apachebench-test.html</link><pubDate>Mon, 29 Jun 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/06/29/the-failed-requests-in-apachebench-test</guid><description>&lt;p&gt;Problem: I run &lt;a href="http://httpd.apache.org/docs/2.0/programs/ab.html"&gt;ab &lt;/a&gt;test&lt;ab -c 10 -t 60 http://www.xxx.com&gt; for my website yesterday, and there are so many failed request.
And I found the following explanation from &lt;a href="http://fixunix.com/linux/269587-apache-benchmark.html"&gt;fixunix&lt;/a&gt;:&lt;/p&gt;

&lt;pre  name="code" class="html"&gt;
May not actually be a problem. Reason? It might be a site that serves dynamic context (such as different cookie IDs mentioned) where the file size changes between each query. 

Easy way to verify: 

Code:    $ wget &lt;url&gt;   

Repeat that twice, then: 

Code:    $ diff &lt;retrieved filename&gt; &lt;retrieved filename&gt;.1 

See if there are differences. If yes, then you can ignore the length-related failures. If no, it's some other cause and need to investigate further.
&lt;/pre&gt;


&lt;p&gt;I hope it will help you too if you have the same problem.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/AJvC6W2F2bE" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/06/29/the-failed-requests-in-apachebench-test.html</feedburner:origLink></item><item><title>Twitter Weekly Updates for 2009-06-22</title><link>http://feedproxy.google.com/~r/freetofeel/~3/K-WnLQj65es/twitter-weekly-updates-for-2009-06-22.html</link><pubDate>Mon, 22 Jun 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/06/22/twitter-weekly-updates-for-2009-06-22</guid><description>&lt;ul class="aktt_tweet_digest"&gt;
    &lt;li&gt;Dinosaur is big enough , bug die out from the world; zzzzz~~~ &lt;a href="http://twitter.com/Joshua_C/statuses/2277400408"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://userfly.com/" rel="nofollow"&gt;http://userfly.com/&lt;/a&gt; -- So cool! web master tool &lt;a href="http://twitter.com/Joshua_C/statuses/2272200851"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;RT @&lt;a href="http://twitter.com/mranti"&gt;mranti&lt;/a&gt; After tens of thousands cops robbed people in #&lt;a href="http://search.twitter.com/search?q=%23Shishou"&gt;Shishou&lt;/a&gt; of a corpse, welcome to China ruled by Zombies. &lt;a href="http://bit.ly/M1EJx" rel="nofollow"&gt;http://bit.ly/M1EJx&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/2262796894"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;I will try to find another way to enhance the performance of element in Cake &lt;a href="http://twitter.com/Joshua_C/statuses/2260701169"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;A little disappoint with Smart integrated with Cake. We couldn&amp;#39;t use syntax like echo in element. &lt;a href="http://twitter.com/Joshua_C/statuses/2260699723"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;It seems twitterfox stop to work now. ... &lt;a href="http://twitter.com/Joshua_C/statuses/2260672322"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Read-optimize your source code &lt;a href="http://www.brendel.com/consulting/blog/2009/06/read-optimized-source-code.html" rel="nofollow"&gt;http://www.brendel.com/consulting/blog/2009/06/read-optimized-source-code.html&lt;/a&gt; &lt;a href="http://twitter.com/Joshua_C/statuses/2214899340"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;test &lt;a href="http://twitter.com/Joshua_C/statuses/2202798952"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Service overloaded? &lt;a href="http://twitter.com/Joshua_C/statuses/2200766877"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;Why only &amp;#39;The Lounge&amp;#39; can work on opera unite? The others all displayed as &amp;#39;404&amp;#39; &lt;a href="http://twitter.com/Joshua_C/statuses/2200683602"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;wordpress twitter plugin test &lt;a href="http://twitter.com/Joshua_C/statuses/2189969248"&gt;#&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;twitter plugin test &lt;a href="http://twitter.com/Joshua_C/statuses/2189958825"&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p class="aktt_credit"&gt;Powered by &lt;a href="http://alexking.org/projects/wordpress"&gt;Twitter Tools&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/K-WnLQj65es" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/06/22/twitter-weekly-updates-for-2009-06-22.html</feedburner:origLink></item><item><title>Pure CSS to make the footer at the bottom of the page</title><link>http://feedproxy.google.com/~r/freetofeel/~3/-Ro52I4Zx5M/pure-css-to-make-the-footer-at-the-bottom-of-the-page.html</link><pubDate>Mon, 22 Jun 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/06/22/pure-css-to-make-the-footer-at-the-bottom-of-the-page</guid><description>&lt;p&gt;Pure CSS, no javascript to make the footer at the bottom of the page.
Imaging you have the html layout like the following:&lt;/p&gt;

&lt;pre name="code" class="php"&gt;&amp;lt;body&amp;gt;

&amp;lt;div id="container"&amp;gt;
&amp;lt;div id="header"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div id="body"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;div id="footer"&amp;gt;&amp;lt;/div&amp;gt;

&amp;lt;/body&amp;gt;&lt;/pre&gt;


&lt;p&gt;What you will do is simple.&lt;/p&gt;

&lt;pre  name="code" class="css"&gt;html,
body {
margin:0;
padding:0;
height:100%;
}
#container {
min-height:100%;
position:relative;
}
#footer {
position:absolute;
bottom:0;
width:100%;
height:60px;/* Height of the footer */
background:#6cf;
}
&lt;/pre&gt;


&lt;p&gt;Thanks to &lt;a href="http://matthewjamestaylor.com/"&gt;Matthew James Taylor&lt;/a&gt; who gives the idea how to implement this.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/-Ro52I4Zx5M" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/06/22/pure-css-to-make-the-footer-at-the-bottom-of-the-page.html</feedburner:origLink></item><item><title>Run CakePHP CronJob On Web Hosting</title><link>http://feedproxy.google.com/~r/freetofeel/~3/ExkAsggjj1A/run-cakephp-cronjob-on-web-hosting.html</link><pubDate>Thu, 11 Jun 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/06/11/run-cakephp-cronjob-on-web-hosting</guid><description>&lt;blockquote&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 11px; white-space: pre;"&gt;/usr/local/bin/php /home/Username/www/cake/console/cake.php -app /home/&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 11px; white-space: pre;"&gt;Username&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 'Times New Roman'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana; font-size: 11px; white-space: pre;"&gt;/www/app cronjob&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;


&lt;p&gt;::Replace Username with your account name in Web Sharing Hosting.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/ExkAsggjj1A" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/06/11/run-cakephp-cronjob-on-web-hosting.html</feedburner:origLink></item><item><title>Fighting with subdomain problem in Lunarpages</title><link>http://feedproxy.google.com/~r/freetofeel/~3/3LL4edeHJh8/fighting-with-subdomain-problem-in-lunarpages.html</link><pubDate>Sat, 06 Jun 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/06/06/fighting-with-subdomain-problem-in-lunarpages</guid><description>&lt;p&gt;HostROOT -&lt;/p&gt;

&lt;p&gt;|- .htaccess(A)&lt;/p&gt;

&lt;p style="text-align: left;"&gt;|--------------- |-subdirectory&lt;/p&gt;


&lt;p style="text-align: left;"&gt;|--------------- -----------|- .htaccess(B)&lt;/p&gt;


&lt;p&gt;My host domain - http://www.example.com&lt;/p&gt;

&lt;p&gt;My sub domain - http://subdomain.example.com&lt;/p&gt;

&lt;p&gt;Don't forget to add a .htaccess file for your subdirectory and add the following content into it.&lt;/p&gt;

&lt;blockquote&gt;.htaccess(B)

&amp;lt;IfModule mod_rewrite.c&amp;gt;
RewriteEngine on
RewriteBase /subdirectory/
&amp;lt;/IfModule&amp;gt;&lt;/blockquote&gt;


&lt;blockquote&gt;&lt;/blockquote&gt;


&lt;p&gt;It worked as true. When I recall the process I fight with the&lt;/p&gt;

&lt;p&gt;Reference:http://bakery.cakephp.org/articles/view/mod-rewrite-on-godaddy-shared-hosting&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/3LL4edeHJh8" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/06/06/fighting-with-subdomain-problem-in-lunarpages.html</feedburner:origLink></item><item><title>Solution:ERROR 2006 (HY000) at line 140: MySQL server has gone away</title><link>http://feedproxy.google.com/~r/freetofeel/~3/z_c7c1ju3no/solutionerror-2006-hy000-at-line-140-mysql-server-has-gone-away.html</link><pubDate>Tue, 26 May 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/05/26/solutionerror-2006-hy000-at-line-140-mysql-server-has-gone-away</guid><description>&lt;p&gt;Add a line into your my.ini&lt;/p&gt;

&lt;blockquote&gt;max_allowed_packet = 12M&lt;/blockquote&gt;


&lt;p&gt;Give a bigger size if you need.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/z_c7c1ju3no" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/05/26/solutionerror-2006-hy000-at-line-140-mysql-server-has-gone-away.html</feedburner:origLink></item><item><title>How to use Security component in your application</title><link>http://feedproxy.google.com/~r/freetofeel/~3/DAl_zZzH2jY/how-to-use-security-component-in-your-application.html</link><pubDate>Mon, 25 May 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/05/25/how-to-use-security-component-in-your-application</guid><description>&lt;p&gt;The right way is generate all your filed use form helper.&lt;/p&gt;

&lt;p&gt;For example, the following code will prevent your app woking .&lt;/p&gt;

&lt;blockquote&gt;
&lt;div&gt;&amp;lt;?php echo $form-&amp;gt;create('User', array('action'=&amp;gt;'signup')); ?&amp;gt;&lt;/div&gt;
&lt;div&gt;//....&lt;/div&gt;
&lt;div&gt;&amp;lt;/form&amp;gt;&lt;/div&gt;&lt;/blockquote&gt;


&lt;div&gt;&lt;/div&gt;


&lt;div&gt;But if you modify these codes into following,&lt;/div&gt;


&lt;div&gt;&lt;/div&gt;


&lt;div&gt;
&lt;blockquote&gt;
&lt;div&gt;&amp;lt;?php echo $form-&amp;gt;create('User', array('action'=&amp;gt;'signup')); ?&amp;gt;&lt;/div&gt;
&lt;div&gt;//....&lt;/div&gt;
&lt;div&gt;&amp;lt;?php echo $form-&amp;gt;end();?&amp;gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;div&gt;It work again!&lt;/div&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/DAl_zZzH2jY" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/05/25/how-to-use-security-component-in-your-application.html</feedburner:origLink></item><item><title>CakePHP admin routing fail</title><link>http://feedproxy.google.com/~r/freetofeel/~3/ZoULCDbLu6Q/cakephp-admin-routing-fail.html</link><pubDate>Thu, 21 May 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/05/21/cakephp-admin-routing-fail</guid><description>&lt;p&gt;If your router wirte like this&lt;/p&gt;

&lt;blockquote&gt;Router::connect('/:controller/:action/*', array('controller' =&amp;gt; 'projects', 'action' =&amp;gt; 'index'));&lt;/blockquote&gt;


&lt;p&gt;Then when you call http://{cakeroot}/admin/{controller}/{action}, it will fail with error:&lt;/p&gt;

&lt;blockquote&gt;Please create AdminControoler.&lt;/blockquote&gt;


&lt;p&gt;But It is OK when you change the router to&lt;/p&gt;

&lt;blockquote&gt;Router::connect('/:controller/:action', array('controller' =&amp;gt; 'projects', 'action' =&amp;gt; 'index'));&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/ZoULCDbLu6Q" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/05/21/cakephp-admin-routing-fail.html</feedburner:origLink></item><item><title>require_once case sensitive in PHP5.1.6 on WIN32 platform</title><link>http://feedproxy.google.com/~r/freetofeel/~3/rnoo76DNeIk/require_once-case-sensitive-in-php516-on-win32-platform.html</link><pubDate>Wed, 13 May 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/05/13/require_once-case-sensitive-in-php516-on-win32-platform</guid><description>&lt;p&gt;require_once('a.php');
require_once('A.php');
This two lines will require the file a.php twice in WIN32 platform and give a declare twice fatal error;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/rnoo76DNeIk" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/05/13/require_once-case-sensitive-in-php516-on-win32-platform.html</feedburner:origLink></item><item><title>file_exists in Ubuntu</title><link>http://feedproxy.google.com/~r/freetofeel/~3/SW2j7kJ9npc/file_exists-in-ubuntu.html</link><pubDate>Mon, 11 May 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/05/11/file_exists-in-ubuntu</guid><description>&lt;p&gt;If the file was read/write forbidden for the current user, it is impossible to check the existance of this file unless some permissions are grant to this user for this folder.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/SW2j7kJ9npc" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/05/11/file_exists-in-ubuntu.html</feedburner:origLink></item><item><title>Damn!Apach+PHP+Windows = Parent: Created child process 357852</title><link>http://feedproxy.google.com/~r/freetofeel/~3/RXHwS6J1VTc/damnapachphpwindows-parent-created-child-process-357852.html</link><pubDate>Sun, 10 May 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/05/10/damnapachphpwindows-parent-created-child-process-357852</guid><description>&lt;p&gt;&lt;strong&gt;Parent: Created child process 357852&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;C:\Program Files\Apache Software Foundation\Apache2.2\logs\error.log&lt;/p&gt;

&lt;blockquote&gt;[Sun May 10 10:55:35 2009] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sun May 10 10:55:35 2009] [notice] Apache/2.2.6 (Win32) PHP/5.2.6 configured -- resuming normal operations
[Sun May 10 10:55:35 2009] [notice] Server built: Sep  5 2007 08:58:56
[Sun May 10 10:55:35 2009] [notice] Parent: Created child process 357852
[Sun May 10 10:55:36 2009] [notice] Child 357852: Child process is running
[Sun May 10 10:55:36 2009] [notice] Child 357852: Acquired the start mutex.
[Sun May 10 10:55:36 2009] [notice] Child 357852: Starting 250 worker threads.
[Sun May 10 10:55:36 2009] [notice] Child 357852: Starting thread to listen on port 80.
[Sun May 10 10:57:28 2009] [notice] Parent: Received restart signal -- Restarting the server.
[Sun May 10 10:57:28 2009] [notice] Child 357852: Exit event signaled. Child process is ending.
[Sun May 10 10:57:29 2009] [notice] Child 357852: Released the start mutex
[Sun May 10 10:57:30 2009] [notice] Child 357852: Waiting for 250 worker threads to exit.
[Sun May 10 10:57:30 2009] [notice] Child 357852: All worker threads have exited.
[Sun May 10 10:57:30 2009] [notice] Child 357852: Child process is exiting&lt;/blockquote&gt;


&lt;p&gt;To resolve this , take a look at this:&lt;/p&gt;

&lt;blockquote&gt;If you are getting this error, you are probably trying to use Apache, MySQL and PHP in a windows system. Just do this simple step to solve this issue.

It is quite frustrating to see that all your PHP pages suddenly doesn't seem to work. If you check your Apache log file you will see this error: Parent: child process exited with status 3221225477 -- Restarting

Don't worry just goto the PHP installation folder and look for libmysql.dll file.&lt;span class="Apple-converted-space"&gt; &lt;/span&gt;

Just copy this file and save it to your windows\system32 folder.

Now restart MySQL and Apache servers.

Everything should be fine now and all your PHP pages will work as normal.&lt;/blockquote&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/RXHwS6J1VTc" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/05/10/damnapachphpwindows-parent-created-child-process-357852.html</feedburner:origLink></item><item><title>JQuery validate password function can not work on Firefox3.1.10</title><link>http://feedproxy.google.com/~r/freetofeel/~3/mAEo_8RNNKg/hello-world.html</link><pubDate>Sat, 09 May 2009 00:00:00 PDT</pubDate><guid isPermaLink="false">http://freetofeel.com/2009/05/09/hello-world</guid><description>&lt;p&gt;When I use JQuery(Revision: 6246) with firefox 3.0.10, I found it is difficulty to validate the password field.
//js code
"data[User][password]": {
required: true,
minlength: 6,
maxlength: 15
},
"data[User][confirmPassword]": {
required: true,
minlength: 6,
maxlength: 15,
equalTo: "#UserPassword"
},
//code end
The error happened at line 1040 of jquery.validate.js
//code
equalTo: function(value, element, param) {
return value == $(param).val();
}
//end
The '$(param).val()' here is always empty. I test this on Chrome, it works fine there.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/freetofeel/~4/mAEo_8RNNKg" height="1" width="1"/&gt;</description><feedburner:origLink>http://freetofeel.com/2009/05/09/hello-world.html</feedburner:origLink></item></channel></rss>

