<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.feedsky.com/styles/feedsky2.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link href="http://feed.feedsky.com/charlestang" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/charlestang" type="application/rss+xml"></fs:self_link><lastBuildDate>Sun, 12 Feb 2012 06:15:33 GMT</lastBuildDate><title>Becomin' Charles</title><description>Building another myself~</description><image><url>http://www.feedsky.com/feed/charlestang/sc/gif</url><title>Becomin' Charles</title><link>http://sexywp.com</link></image><link>http://sexywp.com</link><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><language>en</language><pubDate>Sun, 12 Feb 2012 06:15:33 GMT</pubDate><item><title>Mac OS X Lion 终端快捷键</title><link>http://sexywp.com/mac-os-x-lion-terminal-shortcut.htm</link><content:encoded>&lt;p&gt;虽然Mac OS 提供了令人目眩神驰的界面效果，但是，我觉得我的最爱始终是终端，这到不是因为我有什么geek的癖好，而是因为到了*NIX系统上后，使用终端得心应手，就好像使用Windows，你喜欢点开开始菜单，或者习惯性打开资源管理器，是一个道理。&lt;/p&gt;
&lt;p&gt;Mac的终端是连接的使系统底层的Unix系统，名字叫Darwin，这个终端也支持许多的快捷键，记录下来，希望对大家有点帮助。&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;快捷键&lt;/th&gt;
&lt;th&gt;功能&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
Ctrl + a
&lt;/td&gt;
&lt;td&gt;
移动到开头
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Ctrl + e
&lt;/td&gt;
&lt;td&gt;
移动到结尾
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Ctrl + b
&lt;/td&gt;
&lt;td&gt;
向左移动一个字符（助记back）
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Ctrl + f
&lt;/td&gt;
&lt;td&gt;
向右移动一个字符（助记forward）
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Option + Left
&lt;/td&gt;
&lt;td&gt;
向左移动一个单词
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Option + Right
&lt;/td&gt;
&lt;td&gt;
向右移动一个单词
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Ctrl + h
&lt;/td&gt;
&lt;td&gt;
向左删除一个字符
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Ctrl + w
&lt;/td&gt;
&lt;td&gt;
向左删除一个单词
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Ctrl + k
&lt;/td&gt;
&lt;td&gt;
向右删除到行尾
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Ctrl + t
&lt;/td&gt;
&lt;td&gt;
交换行尾两个字符顺序
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Esc + t
&lt;/td&gt;
&lt;td&gt;
交换行尾两个单词顺序
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Ctrl + l
&lt;/td&gt;
&lt;td&gt;
清屏
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Ctrl + d
&lt;/td&gt;
&lt;td&gt;
相当于退出、logout、exit等命令
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
Shift + Cmd + 鼠标双击
&lt;/td&gt;
&lt;td&gt;
快速选中路径
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;还有些别的东西，大家可以看看这个： http://qingbo.net/blog/post438.html&lt;/p&gt;
&lt;p&gt;个人觉得set -o vi 是神器&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;使Mac OS X的终端看起来更舒服&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fcustom-mac-os-x-terminal.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;使Mac OS X的终端看起来更舒服&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Mac OS X上如何实现到Linux主机的ssh免登陆&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Mac OS X上如何实现到Linux主机的ssh免登陆&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Mac上的WordPress客户端MarsEdit&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac%25E4%25B8%258A%25E7%259A%2584wordpress%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AFmarsedit.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Mac上的WordPress客户端MarsEdit&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;为何以及如何整合Google搜索到WP博客&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fwhy-and-how-to-integrate-google-to-blog.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/22/9189497.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;为何以及如何整合Google搜索到WP博客&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;[新闻]WordPress新特性预览—主题自动安装（多图）&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fwordpress-new-features-theme-install.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/06/02/10687411.png&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;[新闻]WordPress新特性预览—主题自动安装（多图）&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
	标签：&lt;a href=&quot;http://sexywp.com/tags/mac-terminal-shortcut&quot; title=&quot;Mac terminal shortcut&quot; rel=&quot;tag&quot;&gt;Mac terminal shortcut&lt;/a&gt;&lt;br /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985480/charlestang/feedsky/s.gif?r=http://sexywp.com/mac-os-x-lion-terminal-shortcut.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://sexywp.com/mac-os-x-lion-terminal-shortcut.htm/feed</wfw:commentRss><slash:comments>0</slash:comments><description>虽然Mac OS 提供了令人目眩神驰的界面效果，但是，我觉得我的最爱始终是终端，这到不是因为我有什么geek的癖好，而是因为到了*NIX系统上后，使用终端得心应手，就好像使用Windows，你喜欢点开开始菜单，或者习惯性打开资源管理器，是一个道理。

Mac的终端是连接的使系统底层的Unix系统，名字叫Darwin，这个终端也支持许多的快捷键，记录下来，希望对大家有点帮助。



&lt;span class=&quot;readmore&quot;&gt;&lt;a href=&quot;http://sexywp.com/mac-os-x-lion-terminal-shortcut.htm&quot; title=&quot;Mac OS X Lion 终端快捷键&quot;&gt;Keep Reading --- 323 words totally&lt;/a&gt;&lt;/span&gt;&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;使Mac OS X的终端看起来更舒服&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fcustom-mac-os-x-terminal.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;使Mac OS X的终端看起来更舒服&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Mac OS X上如何实现到Linux主机的ssh免登陆&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Mac OS X上如何实现到Linux主机的ssh免登陆&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Mac上的WordPress客户端MarsEdit&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac%25E4%25B8%258A%25E7%259A%2584wordpress%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AFmarsedit.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Mac上的WordPress客户端MarsEdit&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Unnamed 1.23 中文语言包&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flang-pack-to-unnamed-123.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/06/01/10482994.jpg&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Unnamed 1.23 中文语言包&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;诺丁山&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fnotting-hill.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/08/21/23797535.jpg&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;诺丁山&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985480/charlestang/feedsky/s.gif?r=http://sexywp.com/mac-os-x-lion-terminal-shortcut.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>日　　记</category><category>Mac terminal shortcut</category><category>Mac</category><pubDate>Sun, 12 Feb 2012 14:15:33 +0800</pubDate><author>Charles</author><comments>http://sexywp.com/mac-os-x-lion-terminal-shortcut.htm#comments</comments><guid isPermaLink="false">http://sexywp.com/?p=473</guid><dc:creator>Charles</dc:creator><fs:srclink>http://sexywp.com/mac-os-x-lion-terminal-shortcut.htm</fs:srclink><fs:srcfeed>http://sexywp.com/feed</fs:srcfeed><fs:itemid>feedsky/charlestang/~7274293/604985480/5098041</fs:itemid></item><item><title>Yii框架base包代码分析</title><link>http://sexywp.com/yii-package-base-source-code-analysis.htm</link><content:encoded>&lt;p&gt;周日闲来无事，打开Yii的源代码学习一下，今天主要看的代码都是base包里面的，也就是框架根目录下的base目录里的代码。这个目录里的代码不多，但是类很多，而且这些类对整个框架来说至关重要，都是非常基本的组件。老实说，这里面的代码，我已经看了无数次了，但是总觉得常看常新，转念一想，这也实属正常，毕竟这是原作者数年框架开发经验的结晶，岂是我这等工作一两年的菜鸟能随便吃透的？&lt;/p&gt;
&lt;p&gt;最近又玩了两次Visual Paradigm这个软件，觉得自己操作水平又有进步，甚感欣喜，所以今天既然分析源代码，就正好再练练手，于是乎，我开始用VP UML开始画base包里的类，得图如下。（说明：这个图是基于Yii的1.1.8版本，另外这里面少了两个类，因为这两个类的功能比较特殊，我没有细看，所以也就没有画在图里，看后面是不是有兴致再来专门画一张，缺失的两个类是CSecurityManager和CStatePersister。）&lt;span id=&quot;more-466&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://picasaweb.google.com/lh/photo/zJ2ZqfcpDfOnu9JobQXA6w?feat=embedwebsite&quot;&gt;&lt;img src=&quot;https://lh5.googleusercontent.com/-SduLV1_OW1Y/Tsi7h2YNRcI/AAAAAAAAB7U/jSpUIlrODGg/s640/YiiFramework-base.png&quot; height=&quot;640&quot; width=&quot;545&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;从这个图里各个类占的面积里，我们不难看出，最重要的类有四个，CComponent，CModule，CApplication，CModel。事实上，这四个类也贯穿着Yii框架应用开发过程的始终，扮演着至关重要的角色。然而，如果你真的用Yii开发应用，可能一个应用做完了，却又没怎么见过这四个类的踪影，因为他们太基础了，始终处在水面之下，使得你可能根本就忽视了它们的存在。下面，我就一个一个来简单说一下我的学习心得。&lt;/p&gt;
&lt;p&gt;CComponent类，是整个Yii框架组件模型的基础，Yii框架内几乎所有的对象都是组件，其基类都是CComponent。细看其方法，我们发现基本上可以归类为三种，一是魔术方法，就是一些双下划线开头的方法，一是跟Behavior有关的方法，最后是跟Event有关的方法。这也就引出了组件的三大主要特性。属性成员，事件驱动和行为。&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;视频教程：使用Yii框架开发Blog&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fyii-package-base-source-code-analysis.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/22/9170385.jpg&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;视频教程：使用Yii框架开发Blog&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Yii框架的Log系统的分析&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fhow-to-use-log-in-yii-framework.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fyii-package-base-source-code-analysis.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/22/9184865.jpg&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Yii框架的Log系统的分析&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Yii框架中验证器的allowEmpty属性&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fyii-validator-allwoempty-property.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fyii-package-base-source-code-analysis.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Yii框架中验证器的allowEmpty属性&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;使用Gii时出现403错误&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Ferror-403-occured-when-use-gii.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fyii-package-base-source-code-analysis.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;使用Gii时出现403错误&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;使用Hybrid框架的起点&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fuse-hybrid-to-build-child-theme.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fyii-package-base-source-code-analysis.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;使用Hybrid框架的起点&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
	标签：&lt;a href=&quot;http://sexywp.com/tags/analytics&quot; title=&quot;analytics&quot; rel=&quot;tag&quot;&gt;analytics&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/code-reading&quot; title=&quot;code reading&quot; rel=&quot;tag&quot;&gt;code reading&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/framework&quot; title=&quot;framework&quot; rel=&quot;tag&quot;&gt;framework&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/source-code&quot; title=&quot;source code&quot; rel=&quot;tag&quot;&gt;source code&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/yii-2&quot; title=&quot;yii&quot; rel=&quot;tag&quot;&gt;yii&lt;/a&gt;&lt;br /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985481/charlestang/feedsky/s.gif?r=http://sexywp.com/yii-package-base-source-code-analysis.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://sexywp.com/yii-package-base-source-code-analysis.htm/feed</wfw:commentRss><slash:comments>3</slash:comments><description>周日闲来无事，打开Yii的源代码学习一下，今天主要看的代码都是base包里面的，也就是框架根目录下的base目录里的代码。这个目录里的代码不多，但是类很多，而且这些类对整个框架来说至关重要，都是非常基本的组件。老实说，这里面的代码，我已经看了无数次了，但是总觉得常看常新，转念一想，这也实属正常，毕竟这是原作者数年框架开发经验的结晶，岂是我这等工作一两年的菜鸟能随便吃透的？

最近又玩了两次Visual Paradigm这个软件，觉得自己操作水平又有进步，甚感欣喜，所以今天既然分析源代码，就正好再练练手，于是乎，我开始用VP UML开始画base包里的类，得图如下。（说明：这个图是基于Yii的1.1.8版本，另外这里面少了两个类，因为这两个类的功能比较特殊，我没有细看，所以也就没有画在图里，看后面是不是有兴致再来专门画一张，缺失的两个类是CSecurityManager和CStatePersister。）

&lt;span class=&quot;readmore&quot;&gt;&lt;a href=&quot;http://sexywp.com/yii-package-base-source-code-analysis.htm&quot; title=&quot;Yii框架base包代码分析&quot;&gt;Keep Reading --- 2459 words totally&lt;/a&gt;&lt;/span&gt;&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;视频教程：使用Yii框架开发Blog&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fvideo-guide-to-use-yii-framework.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fyii-package-base-source-code-analysis.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/22/9170385.jpg&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;视频教程：使用Yii框架开发Blog&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Yii框架的Log系统的分析&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fhow-to-use-log-in-yii-framework.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fyii-package-base-source-code-analysis.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/22/9184865.jpg&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Yii框架的Log系统的分析&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Yii框架中验证器的allowEmpty属性&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fyii-validator-allwoempty-property.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fyii-package-base-source-code-analysis.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Yii框架中验证器的allowEmpty属性&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;使用Gii时出现403错误&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Ferror-403-occured-when-use-gii.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fyii-package-base-source-code-analysis.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;使用Gii时出现403错误&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;使用Hybrid框架的起点&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fuse-hybrid-to-build-child-theme.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fyii-package-base-source-code-analysis.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;使用Hybrid框架的起点&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985481/charlestang/feedsky/s.gif?r=http://sexywp.com/yii-package-base-source-code-analysis.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>yii</category><category>analytics</category><category>source code</category><category>工作相关</category><category>framework</category><category>Yii</category><category>code reading</category><pubDate>Sun, 20 Nov 2011 21:46:32 +0800</pubDate><author>Charles</author><comments>http://sexywp.com/yii-package-base-source-code-analysis.htm#comments</comments><guid isPermaLink="false">http://sexywp.com/?p=466</guid><dc:creator>Charles</dc:creator><fs:srclink>http://sexywp.com/yii-package-base-source-code-analysis.htm</fs:srclink><fs:srcfeed>http://sexywp.com/feed</fs:srcfeed><fs:itemid>feedsky/charlestang/~7274293/604985481/5098041</fs:itemid></item><item><title>jQuery里面用到“打包盒”</title><link>http://sexywp.com/jquery-wrappers.htm</link><content:encoded>&lt;p&gt;想学学怎么写jQuery的插件，结果发现举步维艰，于是想通过研究插件代码的案例，来积累经验，结果看到第一行，我就郁闷了，天下间最郁闷的事情莫过于你出门去约会，结果刚打开门，就摔个狗吃屎，现在我就那个感觉。看代码：&lt;/p&gt;
&lt;div class=&quot;hl-surround&quot;&gt;&lt;div class=&quot;hl-main&quot;&gt;&lt;ol class=&quot;hl-main ln-show&quot; title=&quot;Double click to hide line number.&quot; ondblclick = &quot;linenumber(this)&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;第一种“包装盒”&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt; to do things here, I like use this way&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;jQuery&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;第二种“包装盒”&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Teal;&quot;&gt;window&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;undefined&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt; this is the wrapper of jquery&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Teal;&quot;&gt;window&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;第三种“包装盒”&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;$, &lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;undefined&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt; this is the wrapper of jquery ui components&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;jQuery&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;闭包是个好东西啊，自打初窥门径后，我干什么都喜欢在外面套个闭包，我把这个称为是打包盒，而且这个盒子很神奇，里面看得到外面，但是外面看不到里面。好处很多，比如可以放心大胆地命名变量啊，不用担心污染全局空间，也不用担心被全局空间的其他变量污染，还有像上面片段里，第一种那种写法，可以非常安全地去使用$符号代表的jQuery对象。因为在全局空间里，如果一个页面上引入多个类库的话，$符号很可能代表的不是jQuery对象，而用了第一种写法后，$符号变得很安全了。&lt;/p&gt;
&lt;p&gt;翻开jQuery和其各类插件的源代码，你会发现，它们都被安放在一些“打包盒”里面，不禁有种英雄所见略同的感觉，但是不要感觉太好，为什么人家用的，跟我用的不太一样呢？看第二种，是jQuery用的“打包盒”。乍看跟第一种很像，但是那两个形参，简直匪夷所思。第一个是window，这明显是地球人都知道的全局变量啊，第二个是undefined，这更加神了@#$%^&amp;#038;。&lt;a href=&quot;http://ued.alipay.com/wd/2010/05/17/using-window-and-undefined-as-parameter-in-closure/&quot;&gt;淘宝UED&lt;/a&gt;有篇文章解释了这个问题。文章观点大体是，将window由全局变量变为形参，可以在后期代码最小化时候，通过对局部变量名的替换，来大幅度减小代码体积，这算是一个优化吧，undefined那个同理。另一点文中提到的是，undefined可以被重新定义成自定义的值，也即可能被污染，使用这种方式，会得到真正的一个undefined。当然，我的眼光和专业程度也止于此了，但是我还是觉得，还有可能有一些额外的好处，如果看官童鞋你知道，请不吝赐教。&lt;/p&gt;
&lt;p&gt;第三种的话，看过了两种，基本上已经有点差不多全懂了，但是仔细一看，还差那么一点的。$形参，和undefined形参不多解释了。请大家关注那个不同点，就是最后一个闭合小括号的位置，发现了吧，最后闭合小括号，为什么是放在最后面了呢？由此我也发现了一个特性，就是在小括号里面的匿名函数，如果在函数结束的大括号后面，直接跟一对小括号的话，会使那个匿名函数立刻执行。如果离开了外面那对小括号，匿名函数是不能生存的，如果是具名函数呢，在闭合大括号后，跟一对小括号，也无法实现对函数的立即调用，反倒会有语法错误。但是还是来看最关键的那个不同，如下：&lt;/p&gt;
&lt;div class=&quot;hl-surround&quot;&gt;&lt;div class=&quot;hl-main&quot;&gt;&lt;ol class=&quot;hl-main ln-show&quot; title=&quot;Double click to hide line number.&quot; ondblclick = &quot;linenumber(this)&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;写法A&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;$, &lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;undefined&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt; this is the wrapper of jquery ui components&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;jQuery&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;写法B&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;$, &lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;undefined&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt; this is the wrapper of jquery ui components&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;jQuery&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;不用找茬了，这行不一样，看“)”的位置&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;这两种“包装盒”到底有何不同？第一种比第二种有什么特别的好处么？&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td &gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fshare-this-jquery.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;WordPress插件修改：Share This (jQuery)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fprogress-enhancement-of-comment-form.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;也说用jQuery改进WP评论表单&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fthickbox-tips.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;[心得]：在thickbox退出时执行动作&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Finside-wordpress-special-01.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;WordPress到底在整啥？—Special&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Finside-wordpress-05.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;WordPress到底在整啥？—(05)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td  align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
	标签：&lt;a href=&quot;http://sexywp.com/tags/code-reading&quot; title=&quot;code reading&quot; rel=&quot;tag&quot;&gt;code reading&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/jquery&quot; title=&quot;jQuery&quot; rel=&quot;tag&quot;&gt;jQuery&lt;/a&gt;&lt;br /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985482/charlestang/feedsky/s.gif?r=http://sexywp.com/jquery-wrappers.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://sexywp.com/jquery-wrappers.htm/feed</wfw:commentRss><slash:comments>0</slash:comments><description>想学学怎么写jQuery的插件，结果发现举步维艰，于是想通过研究插件代码的案例，来积累经验，结果看到第一行，我就郁闷了，天下间最郁闷的事情莫过于你出门去约会，结果刚打开门，就摔个狗吃屎，现在我就那个感觉。看代码：

&amp;#160;//第一种“包装盒”

&amp;#160;(function($){

&lt;span class=&quot;readmore&quot;&gt;&lt;a href=&quot;http://sexywp.com/jquery-wrappers.htm&quot; title=&quot;jQuery里面用到“打包盒”&quot;&gt;Keep Reading --- 1034 words totally&lt;/a&gt;&lt;/span&gt;&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td &gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fshare-this-jquery.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;WordPress插件修改：Share This (jQuery)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fprogress-enhancement-of-comment-form.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;也说用jQuery改进WP评论表单&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fthickbox-tips.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;[心得]：在thickbox退出时执行动作&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Finside-wordpress-special-01.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;WordPress到底在整啥？—Special&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Finside-wordpress-05.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fjquery-wrappers.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;WordPress到底在整啥？—(05)&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td  align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985482/charlestang/feedsky/s.gif?r=http://sexywp.com/jquery-wrappers.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>jQuery</category><category>code reading</category><pubDate>Sun, 23 Oct 2011 01:45:43 +0800</pubDate><author>Charles</author><comments>http://sexywp.com/jquery-wrappers.htm#comments</comments><guid isPermaLink="false">http://sexywp.com/?p=463</guid><dc:creator>Charles</dc:creator><fs:srclink>http://sexywp.com/jquery-wrappers.htm</fs:srclink><fs:srcfeed>http://sexywp.com/feed</fs:srcfeed><fs:itemid>feedsky/charlestang/~7274293/604985482/5098041</fs:itemid></item><item><title>怎么觉得Python这么混乱呢</title><link>http://sexywp.com/why-python-code-mess.htm</link><content:encoded>&lt;p&gt;开始学习写Python，写了一两个小脚本后，就产生了非常奇怪的感觉，我怎么觉得Python看着这么混乱呢？&lt;/p&gt;
&lt;p&gt;一个是没有大括号了，代码那种段落感没了，第二个是没有分号了，觉得一行总是没完似的。靠缩进来流程控制，觉得非常难受，总是习惯性地搞不清楚一个if和一个for的结束在什么地方，为啥不像pascal和VB那样，加个关闭之类的东西，也让人看着舒服点。代码说完，再说说文档，去官网查文档，感觉那文档视觉效果跟代码一样，没有括号，分号这样分块，断句的地方。那文档就是秘密麻麻一片，从上到下，页面长长的一串，而且还太宽，连个索引也没有，还得不停地ctrl+F来找函数。排版也忒鹾了吧？&lt;/p&gt;
&lt;p&gt;目前都还只是视觉上的别扭吧。估计Python的粉要来嘲我了。再往后学学吧～&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td &gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fwhy-python-code-mess.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Mac OS X上如何实现到Linux主机的ssh免登陆&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fwhy-python-code-mess.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;工作中常用的Linux命令集锦&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fwhy-python-code-mess.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Dedian 5的PHP包缺少readline支持&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fhow-to-install-phpunit-on-debian.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fwhy-python-code-mess.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;如何在Debian上安装PHPUnit&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fwhy-python-code-mess.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;VIM常用小窍门收集&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td  align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
	标签：&lt;a href=&quot;http://sexywp.com/tags/linux&quot; title=&quot;Linux&quot; rel=&quot;tag&quot;&gt;Linux&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/python&quot; title=&quot;python&quot; rel=&quot;tag&quot;&gt;python&lt;/a&gt;&lt;br /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985483/charlestang/feedsky/s.gif?r=http://sexywp.com/why-python-code-mess.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://sexywp.com/why-python-code-mess.htm/feed</wfw:commentRss><slash:comments>4</slash:comments><description>开始学习写Python，写了一两个小脚本后，就产生了非常奇怪的感觉，我怎么觉得Python看着这么混乱呢？

一个是没有大括号了，代码那种段落感没了，第二个是没有分号了，觉得一行总是没完似的。靠缩进来流程控制，觉得非常难受，总是习惯性地搞不清楚一个if和一个for的结束在什么地方，为啥不像pascal和VB那样，加个关闭之类的东西，也让人看着舒服点。代码说完，再说说文档，去官网查文档，感觉那文档视觉效果跟代码一样，没有括号，分号这样分块，断句的地方。那文档就是秘密麻麻一片，从上到下，页面长长的一串，而且还太宽，连个索引也没有，还得不停地ctrl+F来找函数。排版也忒鹾了吧？

&lt;span class=&quot;readmore&quot;&gt;&lt;a href=&quot;http://sexywp.com/why-python-code-mess.htm&quot; title=&quot;怎么觉得Python这么混乱呢&quot;&gt;Keep Reading --- 296 words totally&lt;/a&gt;&lt;/span&gt;&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td &gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fwhy-python-code-mess.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Mac OS X上如何实现到Linux主机的ssh免登陆&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fwhy-python-code-mess.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;工作中常用的Linux命令集锦&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fwhy-python-code-mess.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Dedian 5的PHP包缺少readline支持&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fhow-to-install-phpunit-on-debian.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fwhy-python-code-mess.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;如何在Debian上安装PHPUnit&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fwhy-python-code-mess.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;VIM常用小窍门收集&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td  align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985483/charlestang/feedsky/s.gif?r=http://sexywp.com/why-python-code-mess.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>Linux</category><category>python</category><category>工作相关</category><pubDate>Tue, 04 Oct 2011 00:49:09 +0800</pubDate><author>Charles</author><comments>http://sexywp.com/why-python-code-mess.htm#comments</comments><guid isPermaLink="false">http://sexywp.com/?p=461</guid><dc:creator>Charles</dc:creator><fs:srclink>http://sexywp.com/why-python-code-mess.htm</fs:srclink><fs:srcfeed>http://sexywp.com/feed</fs:srcfeed><fs:itemid>feedsky/charlestang/~7274293/604985483/5098041</fs:itemid></item><item><title>如何配置RHEL的iptables开放端口</title><link>http://sexywp.com/%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%aerhel%e7%9a%84iptables%e5%bc%80%e6%94%be%e7%ab%af%e5%8f%a3.htm</link><content:encoded>&lt;p&gt;要给一个朋友的服务器上架设ftp，一看，这哥们的服务器装的是RHEL AS4，看到这个发行版的名字，我就发怵了，果不其然，么有包管理器，我简直寸步难行，什么软件都没法装，各种依赖，太难解决了！！&lt;/p&gt;
&lt;p&gt;看了一下已经安装的软件列表，发现已经装了vsftpd，就用这个吧，man了半天，最后配好了，但是一连，发现死活连不上，百思不得其解，各种google，各种百度，也不知道过了多少天，才发现问题的症结在iptables，原来，要使用passive mode登陆ftp，必须开一个范围的端口，而系统默认的iptables规则，不允许对这些端口的访问，导致ftp连不上。怎么开放iptables的端口呢？又是各种google，各种百度，搜到一个iptables的tutorial，竟然有290页之厚，太难用了。&lt;/p&gt;
&lt;p&gt;几经周折又找到了一个图形化系统界面可以配置防火墙规则的，system-config-securitylevel-tui，通过这个东西，很容易就可以开放一个端口，但是这个东西也有问题，我要开10000号段的端口100个，就麻烦了，虽然网上说，用格式形如10000-10100:tcp这样的写法可以开放一个系列的端口，但是实际上，这么写是不管事的，也不知道是不是软件的版本的问题。&lt;/p&gt;
&lt;p&gt;最后，知道这个ui界面生成的规则被写到了/etc/sysconfig/iptables文件里面，然后又看了一下man，研究了一下如果手动配置规则的话，端口范围的写法（--dport 10000:10100），先用ui工具生成一条一个端口的规则，然后手动改文件，将端口改成范围，一重启，发现终于一切都按照预期的搞定了，真是累死我了。&lt;/p&gt;
&lt;p&gt;在RHEL下面，启动，重启，关闭，查询iptables状态的方法：&lt;/p&gt;
&lt;p&gt;Usage: /etc/init.d/iptables {start|stop|restart|condrestart|status|panic|save}&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td &gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&amp;from=http%3A%2F%2Fsexywp.com%2F%25E5%25A6%2582%25E4%25BD%2595%25E9%2585%258D%25E7%25BD%25AErhel%25E7%259A%2584iptables%25E5%25BC%2580%25E6%2594%25BE%25E7%25AB%25AF%25E5%258F%25A3.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;工作中常用的Linux命令集锦&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&amp;from=http%3A%2F%2Fsexywp.com%2F%25E5%25A6%2582%25E4%25BD%2595%25E9%2585%258D%25E7%25BD%25AErhel%25E7%259A%2584iptables%25E5%25BC%2580%25E6%2594%25BE%25E7%25AB%25AF%25E5%258F%25A3.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Mac OS X上如何实现到Linux主机的ssh免登陆&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fuse-ftp-in-netbeans.htm&amp;from=http%3A%2F%2Fsexywp.com%2F%25E5%25A6%2582%25E4%25BD%2595%25E9%2585%258D%25E7%25BD%25AErhel%25E7%259A%2584iptables%25E5%25BC%2580%25E6%2594%25BE%25E7%25AB%25AF%25E5%258F%25A3.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;[WP开发环境]在NetBeans中配置FTP&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fwhy-python-code-mess.htm&amp;from=http%3A%2F%2Fsexywp.com%2F%25E5%25A6%2582%25E4%25BD%2595%25E9%2585%258D%25E7%25BD%25AErhel%25E7%259A%2584iptables%25E5%25BC%2580%25E6%2594%25BE%25E7%25AB%25AF%25E5%258F%25A3.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;怎么觉得Python这么混乱呢&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fhow-to-install-phpunit-on-debian.htm&amp;from=http%3A%2F%2Fsexywp.com%2F%25E5%25A6%2582%25E4%25BD%2595%25E9%2585%258D%25E7%25BD%25AErhel%25E7%259A%2584iptables%25E5%25BC%2580%25E6%2594%25BE%25E7%25AB%25AF%25E5%258F%25A3.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;如何在Debian上安装PHPUnit&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td  align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
	标签：&lt;a href=&quot;http://sexywp.com/tags/ftp&quot; title=&quot;ftp&quot; rel=&quot;tag&quot;&gt;ftp&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/iptables&quot; title=&quot;iptables&quot; rel=&quot;tag&quot;&gt;iptables&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/linux&quot; title=&quot;Linux&quot; rel=&quot;tag&quot;&gt;Linux&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/rhel&quot; title=&quot;rhel&quot; rel=&quot;tag&quot;&gt;rhel&lt;/a&gt;&lt;br /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985484/charlestang/feedsky/s.gif?r=http://sexywp.com/%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%aerhel%e7%9a%84iptables%e5%bc%80%e6%94%be%e7%ab%af%e5%8f%a3.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://sexywp.com/%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%aerhel%e7%9a%84iptables%e5%bc%80%e6%94%be%e7%ab%af%e5%8f%a3.htm/feed</wfw:commentRss><slash:comments>0</slash:comments><description>要给一个朋友的服务器上架设ftp，一看，这哥们的服务器装的是RHEL AS4，看到这个发行版的名字，我就发怵了，果不其然，么有包管理器，我简直寸步难行，什么软件都没法装，各种依赖，太难解决了！！

看了一下已经安装的软件列表，发现已经装了vsftpd，就用这个吧，man了半天，最后配好了，但是一连，发现死活连不上，百思不得其解，各种google，各种百度，也不知道过了多少天，才发现问题的症结在iptables，原来，要使用passive mode登陆ftp，必须开一个范围的端口，而系统默认的iptables规则，不允许对这些端口的访问，导致ftp连不上。怎么开放iptables的端口呢？又是各种google，各种百度，搜到一个iptables的tutorial，竟然有290页之厚，太难用了。

&lt;span class=&quot;readmore&quot;&gt;&lt;a href=&quot;http://sexywp.com/%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%aerhel%e7%9a%84iptables%e5%bc%80%e6%94%be%e7%ab%af%e5%8f%a3.htm&quot; title=&quot;如何配置RHEL的iptables开放端口&quot;&gt;Keep Reading --- 568 words totally&lt;/a&gt;&lt;/span&gt;&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td &gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&amp;from=http%3A%2F%2Fsexywp.com%2F%25E5%25A6%2582%25E4%25BD%2595%25E9%2585%258D%25E7%25BD%25AErhel%25E7%259A%2584iptables%25E5%25BC%2580%25E6%2594%25BE%25E7%25AB%25AF%25E5%258F%25A3.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;工作中常用的Linux命令集锦&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&amp;from=http%3A%2F%2Fsexywp.com%2F%25E5%25A6%2582%25E4%25BD%2595%25E9%2585%258D%25E7%25BD%25AErhel%25E7%259A%2584iptables%25E5%25BC%2580%25E6%2594%25BE%25E7%25AB%25AF%25E5%258F%25A3.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Mac OS X上如何实现到Linux主机的ssh免登陆&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fuse-ftp-in-netbeans.htm&amp;from=http%3A%2F%2Fsexywp.com%2F%25E5%25A6%2582%25E4%25BD%2595%25E9%2585%258D%25E7%25BD%25AErhel%25E7%259A%2584iptables%25E5%25BC%2580%25E6%2594%25BE%25E7%25AB%25AF%25E5%258F%25A3.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;[WP开发环境]在NetBeans中配置FTP&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fwhy-python-code-mess.htm&amp;from=http%3A%2F%2Fsexywp.com%2F%25E5%25A6%2582%25E4%25BD%2595%25E9%2585%258D%25E7%25BD%25AErhel%25E7%259A%2584iptables%25E5%25BC%2580%25E6%2594%25BE%25E7%25AB%25AF%25E5%258F%25A3.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;怎么觉得Python这么混乱呢&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fhow-to-install-phpunit-on-debian.htm&amp;from=http%3A%2F%2Fsexywp.com%2F%25E5%25A6%2582%25E4%25BD%2595%25E9%2585%258D%25E7%25BD%25AErhel%25E7%259A%2584iptables%25E5%25BC%2580%25E6%2594%25BE%25E7%25AB%25AF%25E5%258F%25A3.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;如何在Debian上安装PHPUnit&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td  align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985484/charlestang/feedsky/s.gif?r=http://sexywp.com/%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%aerhel%e7%9a%84iptables%e5%bc%80%e6%94%be%e7%ab%af%e5%8f%a3.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>Linux</category><category>iptables</category><category>ftp</category><category>rhel</category><pubDate>Sun, 02 Oct 2011 11:53:47 +0800</pubDate><author>Charles</author><comments>http://sexywp.com/%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%aerhel%e7%9a%84iptables%e5%bc%80%e6%94%be%e7%ab%af%e5%8f%a3.htm#comments</comments><guid isPermaLink="false">http://sexywp.com/?p=460</guid><dc:creator>Charles</dc:creator><fs:srclink>http://sexywp.com/%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%aerhel%e7%9a%84iptables%e5%bc%80%e6%94%be%e7%ab%af%e5%8f%a3.htm</fs:srclink><fs:srcfeed>http://sexywp.com/feed</fs:srcfeed><fs:itemid>feedsky/charlestang/~7274293/604985484/5098041</fs:itemid></item><item><title>Mac上的WordPress客户端MarsEdit</title><link>http://sexywp.com/mac%e4%b8%8a%e7%9a%84wordpress%e5%ae%a2%e6%88%b7%e7%ab%afmarsedit.htm</link><content:encoded>&lt;p&gt;以前写博客，我就喜欢使用客户端，感觉客户端更像是在自己的地盘，用网页界面写博客，就感觉像在论坛发贴一样。少了一种严肃，多了一种随意。后来博客荒废已经多年，今天偶然想起来写一下，还是想用客户端写，于是好奇地在Google上搜了一下，找到了我现在用的这个MarsEdit（火星编辑器？哈哈）&lt;/p&gt;
&lt;p&gt;这款客户端软件非常完美地体现了MacOS的设计哲学，高度的用户友好，不把用户不懂的东西暴露给用户。你只需要告诉软件，你的部落格的网址是什么，然后他就帮你做好一切，最多是问你要一下登陆密码，从这点来说，可能比Windows下的Windows Live Writer更加友好。输入完密码，就会使用一个看起来像是Mail的一个界面来展示你部落格的所有文章列表，这是一种体验延续，或者也是一种体验借鉴，因为所有的Mac系统预装Mail，所以，作者恐怕觉得让界面长得像Mail，就能极大地减少教育成本。（我觉得这个设计思路相当值得借鉴，要想你的东西不言自明，一种是让用户不会犯错，无敌简单的UI，比如只有一个按钮，另一种，就是站在巨人肩膀上，重复用户非常熟悉的一种体验）。创建新文章，也像是写一封邮件一样，首先选一个blog（收件人），然后写标题，然后是tags，地下就是正文编辑区域。与Mail不同的是右侧多了分类列表和博文的基本属性。&lt;/p&gt;
&lt;p&gt;本文写地有点四不像了，说白了，其实也就是我想借机会测试一下这款客户端编辑器的效果怎么样。结论，东西还不错，比较好用，兼容中文也比较好，支持HTML所见即所得，也支持HTML代码直接编辑。支持预览。&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;免费WordPress主题&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Ffree-wordpress-themes.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac%25E4%25B8%258A%25E7%259A%2584wordpress%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AFmarsedit.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/06/02/10603183.png&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;免费WordPress主题&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;WordPress主题：GoogleCode&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fwordpress-theme-googlecode.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac%25E4%25B8%258A%25E7%259A%2584wordpress%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AFmarsedit.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/22/9170670.png&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;WordPress主题：GoogleCode&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Mac OS X Lion 终端快捷键&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac%25E4%25B8%258A%25E7%259A%2584wordpress%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AFmarsedit.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Mac OS X Lion 终端快捷键&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;使Mac OS X的终端看起来更舒服&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fcustom-mac-os-x-terminal.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac%25E4%25B8%258A%25E7%259A%2584wordpress%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AFmarsedit.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;使Mac OS X的终端看起来更舒服&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;WordPress备份及灾难恢复&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fwordpress-backup-restore.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac%25E4%25B8%258A%25E7%259A%2584wordpress%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AFmarsedit.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;WordPress备份及灾难恢复&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
	标签：&lt;a href=&quot;http://sexywp.com/tags/blogging&quot; title=&quot;blogging&quot; rel=&quot;tag&quot;&gt;blogging&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/client&quot; title=&quot;client&quot; rel=&quot;tag&quot;&gt;client&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/mac&quot; title=&quot;mac&quot; rel=&quot;tag&quot;&gt;mac&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/marsedit&quot; title=&quot;MarsEdit&quot; rel=&quot;tag&quot;&gt;MarsEdit&lt;/a&gt;&lt;br /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985485/charlestang/feedsky/s.gif?r=http://sexywp.com/mac%e4%b8%8a%e7%9a%84wordpress%e5%ae%a2%e6%88%b7%e7%ab%afmarsedit.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://sexywp.com/mac%e4%b8%8a%e7%9a%84wordpress%e5%ae%a2%e6%88%b7%e7%ab%afmarsedit.htm/feed</wfw:commentRss><slash:comments>1</slash:comments><description>以前写博客，我就喜欢使用客户端，感觉客户端更像是在自己的地盘，用网页界面写博客，就感觉像在论坛发贴一样。少了一种严肃，多了一种随意。后来博客荒废已经多年，今天偶然想起来写一下，还是想用客户端写，于是好奇地在Google上搜了一下，找到了我现在用的这个MarsEdit（火星编辑器？哈哈）

这款客户端软件非常完美地体现了MacOS的设计哲学，高度的用户友好，不把用户不懂的东西暴露给用户。你只需要告诉软件，你的部落格的网址是什么，然后他就帮你做好一切，最多是问你要一下登陆密码，从这点来说，可能比Windows下的Windows Live Writer更加友好。输入完密码，就会使用一个看起来像是Mail的一个界面来展示你部落格的所有文章列表，这是一种体验延续，或者也是一种体验借鉴，因为所有的Mac系统预装Mail，所以，作者恐怕觉得让界面长得像Mail，就能极大地减少教育成本。（我觉得这个设计思路相当值得借鉴，要想你的东西不言自明，一种是让用户不会犯错，无敌简单的UI，比如只有一个按钮，另一种，就是站在巨人肩膀上，重复用户非常熟悉的一种体验）。创建新文章，也像是写一封邮件一样，首先选一个blog（收件人），然后写标题，然后是tags，地下就是正文编辑区域。与Mail不同的是右侧多了分类列表和博文的基本属性。

&lt;span class=&quot;readmore&quot;&gt;&lt;a href=&quot;http://sexywp.com/mac%e4%b8%8a%e7%9a%84wordpress%e5%ae%a2%e6%88%b7%e7%ab%afmarsedit.htm&quot; title=&quot;Mac上的WordPress客户端MarsEdit&quot;&gt;Keep Reading --- 588 words totally&lt;/a&gt;&lt;/span&gt;&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;免费WordPress主题&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Ffree-wordpress-themes.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac%25E4%25B8%258A%25E7%259A%2584wordpress%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AFmarsedit.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/06/02/10603183.png&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;免费WordPress主题&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;WordPress主题：GoogleCode&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fwordpress-theme-googlecode.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac%25E4%25B8%258A%25E7%259A%2584wordpress%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AFmarsedit.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/22/9170670.png&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;WordPress主题：GoogleCode&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Mac OS X Lion 终端快捷键&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac%25E4%25B8%258A%25E7%259A%2584wordpress%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AFmarsedit.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Mac OS X Lion 终端快捷键&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;使Mac OS X的终端看起来更舒服&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fcustom-mac-os-x-terminal.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac%25E4%25B8%258A%25E7%259A%2584wordpress%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AFmarsedit.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;使Mac OS X的终端看起来更舒服&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;WordPress备份及灾难恢复&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fwordpress-backup-restore.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac%25E4%25B8%258A%25E7%259A%2584wordpress%25E5%25AE%25A2%25E6%2588%25B7%25E7%25AB%25AFmarsedit.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;WordPress备份及灾难恢复&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985485/charlestang/feedsky/s.gif?r=http://sexywp.com/mac%e4%b8%8a%e7%9a%84wordpress%e5%ae%a2%e6%88%b7%e7%ab%afmarsedit.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>client</category><category>mac</category><category>blogging</category><category>Mac</category><category>MarsEdit</category><pubDate>Fri, 30 Sep 2011 23:59:11 +0800</pubDate><author>Charles</author><comments>http://sexywp.com/mac%e4%b8%8a%e7%9a%84wordpress%e5%ae%a2%e6%88%b7%e7%ab%afmarsedit.htm#comments</comments><guid isPermaLink="false">http://sexywp.com/?p=459</guid><dc:creator>Charles</dc:creator><fs:srclink>http://sexywp.com/mac%e4%b8%8a%e7%9a%84wordpress%e5%ae%a2%e6%88%b7%e7%ab%afmarsedit.htm</fs:srclink><fs:srcfeed>http://sexywp.com/feed</fs:srcfeed><fs:itemid>feedsky/charlestang/~7274293/604985485/5098041</fs:itemid></item><item><title>Mac OS X上如何实现到Linux主机的ssh免登陆</title><link>http://sexywp.com/mac-os-x-ssh-key-pair-login-linux.htm</link><content:encoded>&lt;p&gt;本文要讲的，就是如何简化从Mac登录Linux主机的操作步骤，提高效率。所谓的“免登陆”其实是不存在的，只是说，从验证密码的登录方式，改为公私钥对的登录验证方式。使用后者的方式，每次会由ssh客户端自动发送验证信息，所以就免去了人工输入密码，看起来好像“免登陆”一样。&lt;/p&gt;
&lt;p&gt;关于这么做的原理，大家可以自己去Google，关键词是“非对称加密”，“RSA算法”，“基于ssh密钥对的自动登录”，等等，我就不多解释了。我直接说操作步骤吧：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;生成密钥对&lt;/li&gt;
&lt;li&gt;用密码登录远程主机，将公钥拷贝过去&lt;/li&gt;
&lt;li&gt;done&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;怎么样，无敌简单吧？&lt;/p&gt;
&lt;h2&gt;生成密钥对&lt;/h2&gt;
&lt;p&gt;执行命令 &lt;a href=&quot;http://sexywp.com/tags/ssh&quot; class=&quot;st_tag internal_tag&quot; rel=&quot;tag&quot; title=&quot;标签 ssh 下的日志&quot;&gt;ssh&lt;/a&gt;-keygen -t rsa&lt;br /&gt;
执行结果如下：&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
charles@&lt;a href=&quot;http://sexywp.com/tags/mac&quot; class=&quot;st_tag internal_tag&quot; rel=&quot;tag&quot; title=&quot;标签 mac 下的日志&quot;&gt;mac&lt;/a&gt;:~ &amp;gt; ssh-keygen -t rsa&lt;br /&gt;
Generating public/private rsa key pair.&lt;br /&gt;
Enter file in which to save the key (/Users/charles/.ssh/id_rsa):&lt;br /&gt;
Created directory '/Users/charles/.ssh'.&lt;br /&gt;
Enter passphrase (empty for no passphrase):&lt;br /&gt;
Enter same passphrase again:&lt;br /&gt;
Your identification has been saved in /Users/charles/.ssh/id_rsa.&lt;br /&gt;
Your public key has been saved in /Users/charles/.ssh/id_rsa.pub.&lt;br /&gt;
The key fingerprint is:&lt;br /&gt;
c8:4b:85:87:90:7c:1a:67:b6:71:f5:51:0c:9d:a2:89 charles@TCMBP.local&lt;br /&gt;
The key's randomart image is:&lt;br /&gt;
+--[ RSA 2048]----+&lt;br /&gt;
|   ...   .. o=.. |&lt;br /&gt;
|    +.*o.  ...+  |&lt;br /&gt;
|     Bo+o. o..   |&lt;br /&gt;
|    ...+E o      |&lt;br /&gt;
|      + S        |&lt;br /&gt;
|     . .         |&lt;br /&gt;
|      .          |&lt;br /&gt;
|                 |&lt;br /&gt;
|                 |&lt;br /&gt;
+-----------------+
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;注意：提示enter passphrase的时候，不要输入，因为你本来就想少打一次密码的，这里如果设置了用密码保护私钥，那登录的时候还是要输密码，就白做了。&lt;/p&gt;
&lt;p&gt;做完这个步骤后，cd ~/.ssh，你就可以看到你刚才生成的密钥对，id_rsa是私钥，id_rsa.pub是公钥。下一步，就是把公钥拷贝到目标主机上。&lt;/p&gt;
&lt;h2&gt;将公钥拷贝到目标主机&lt;/h2&gt;
&lt;p&gt;用ssh登录到目标主机，然后cd ~/.ssh目录，如果目录不存在，那么要自己创建mkdir -p ~/.ssh。你今后要用哪个帐户登录主机，就在哪个帐户的home目录下操作，如果要免登陆root，就要去/root下操作。使用~比较好，不用多想了。&lt;/p&gt;
&lt;p&gt;有了.ssh目录后，进去，然后把id_rsa.pub传过去，可以用scp命令，这里要做的一个主要操作，就是将id_rsa.pub，的文件内容，写到一个叫authorized_keys的文件中去，如果目标主机的相应用户名下已经有了.ssh目录和authorized_keys文件，那你操作要小心一点，可能别人也做过免登陆的设置，这个时候你要小心不要把别人的设置给覆盖了。如果没有的话，就创建文件touch ~/.ssh/authorized_keys，然后执行cat id_rsa.pub &gt;&gt; authorized_keys，将你的公钥写入到authorized_keys中，公钥文件.pub里面只有一行信息，上面的命令相当于把那一行信息追加到authorized_keys文件最后一行。&lt;/p&gt;
&lt;p&gt;如果.ssh目录是你主机刚刚创建的，那么可能还需要改变一下这个目录的权限，将权限放低，chmod -R 0600 ~/.ssh，到此，所有设置就算做完了，你可以退出登录，在自己的主机上试一下了，现在再敲入ssh命令后，不用密码就可以登录主机了。&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td &gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;工作中常用的Linux命令集锦&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;VIM常用小窍门收集&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Mac OS X Lion 终端快捷键&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fcustom-mac-os-x-terminal.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;使Mac OS X的终端看起来更舒服&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fword2007-doesnot-show-pics.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;[Tips]Word2007中看不到图片&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td  align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
	标签：&lt;a href=&quot;http://sexywp.com/tags/diy&quot; title=&quot;DIY&quot; rel=&quot;tag&quot;&gt;DIY&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/linux&quot; title=&quot;Linux&quot; rel=&quot;tag&quot;&gt;Linux&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/ssh&quot; title=&quot;ssh&quot; rel=&quot;tag&quot;&gt;ssh&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/tips&quot; title=&quot;tips&quot; rel=&quot;tag&quot;&gt;tips&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/usage&quot; title=&quot;usage&quot; rel=&quot;tag&quot;&gt;usage&lt;/a&gt;&lt;br /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985486/charlestang/feedsky/s.gif?r=http://sexywp.com/mac-os-x-ssh-key-pair-login-linux.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://sexywp.com/mac-os-x-ssh-key-pair-login-linux.htm/feed</wfw:commentRss><slash:comments>0</slash:comments><description>本文要讲的，就是如何简化从Mac登录Linux主机的操作步骤，提高效率。所谓的“免登陆”其实是不存在的，只是说，从验证密码的登录方式，改为公私钥对的登录验证方式。使用后者的方式，每次会由ssh客户端自动发送验证信息，所以就免去了人工输入密码，看起来好像“免登陆”一样。

关于这么做的原理，大家可以自己去Google，关键词是“非对称加密”，“RSA算法”，“基于ssh密钥对的自动登录”，等等，我就不多解释了。我直接说操作步骤吧：



&lt;span class=&quot;readmore&quot;&gt;&lt;a href=&quot;http://sexywp.com/mac-os-x-ssh-key-pair-login-linux.htm&quot; title=&quot;Mac OS X上如何实现到Linux主机的ssh免登陆&quot;&gt;Keep Reading --- 810 words totally&lt;/a&gt;&lt;/span&gt;&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td &gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;工作中常用的Linux命令集锦&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;VIM常用小窍门收集&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac-os-x-lion-terminal-shortcut.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Mac OS X Lion 终端快捷键&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fcustom-mac-os-x-terminal.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;使Mac OS X的终端看起来更舒服&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fword2007-doesnot-show-pics.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;[Tips]Word2007中看不到图片&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td  align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985486/charlestang/feedsky/s.gif?r=http://sexywp.com/mac-os-x-ssh-key-pair-login-linux.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>Linux</category><category>DIY</category><category>ssh</category><category>tips</category><category>工作相关</category><category>usage</category><pubDate>Sun, 04 Sep 2011 11:53:53 +0800</pubDate><author>Charles</author><comments>http://sexywp.com/mac-os-x-ssh-key-pair-login-linux.htm#comments</comments><guid isPermaLink="false">http://sexywp.com/?p=458</guid><dc:creator>Charles</dc:creator><fs:srclink>http://sexywp.com/mac-os-x-ssh-key-pair-login-linux.htm</fs:srclink><fs:srcfeed>http://sexywp.com/feed</fs:srcfeed><fs:itemid>feedsky/charlestang/~7274293/604985486/5098041</fs:itemid></item><item><title>【边学边用】PHP5函数参数的按引用传递</title><link>http://sexywp.com/php5-pass-param-by-ref.htm</link><content:encoded>&lt;p&gt;PHP是支持引用的，但是关于一个变量什么时候是引用，什么时候是值，我脑子里总是迷迷糊糊的，所以，想用引用的时候，就会不自觉地在所有的地方加上&amp;#038;符号，真的很累赘。为了缓解这个问题，我特意写了下面这个代码片段来增进自己的理解。起初，我对这个东西的理解是，对于对象来说，&lt;a href=&quot;http://sexywp.com/tags/php&quot; class=&quot;st_tag internal_tag&quot; rel=&quot;tag&quot; title=&quot;标签 PHP 下的日志&quot;&gt;PHP&lt;/a&gt;5就是按照引用传递的。但是我现在想，可能事情不是这么一回事情。下面的代码片段中，$obj其实是A的对象的一个引用，可以理解成一个指针，函数参数$o，其实还是对$obj的拷贝，只是拷贝的是引用本身，也即，$o其实是$obj的拷贝，只是由于其拷贝了$obj，所以，$o也指向A的对象。两个指针指向一个地方，这也是为什么函数changeObj可以改变A的对象的原因。我想，这样大概从技术来说，会更加合理一点。&lt;/p&gt;
&lt;div class=&quot;hl-surround&quot;&gt;&lt;div class=&quot;hl-main&quot;&gt;&lt;ol class=&quot;hl-main ln-show&quot; title=&quot;Double click to hide line number.&quot; ondblclick = &quot;linenumber(this)&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;span style=&quot;color: Blue;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;A&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: Maroon;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: Maroon;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$obj&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;A&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$obj&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;changeObj&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$o&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$o&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: Maroon;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$o&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;b&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: Maroon;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;changeObj&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$obj&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$obj&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;执行结果如下：&lt;/p&gt;
&lt;div class=&quot;hl-surround&quot;&gt;&lt;ol class=&quot;hl-main ln-show&quot; title=&quot;Double click to hide line number.&quot; ondblclick = &quot;linenumber(this)&quot;&gt;&lt;li class=&quot;hl-firstline&quot;&gt;object(A)#1 (2) {&lt;/li&gt;
&lt;li&gt;&amp;nbsp; [&amp;quot;a&amp;quot;]=&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp; int(1)&lt;/li&gt;
&lt;li&gt;&amp;nbsp; [&amp;quot;b&amp;quot;]=&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp; int(1)&lt;/li&gt;
&lt;li&gt;}&lt;/li&gt;
&lt;li&gt;object(A)#1 (2) {&lt;/li&gt;
&lt;li&gt;&amp;nbsp; [&amp;quot;a&amp;quot;]=&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp; int(3)&lt;/li&gt;
&lt;li&gt;&amp;nbsp; [&amp;quot;b&amp;quot;]=&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;nbsp; int(5)&lt;/li&gt;
&lt;li&gt;}&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;然后再看一个普通变量的引用传递的例子，这个例子里面使用的是原生的整型变量，然后函数changeInt的函数声明里，也用一般方法声明参数，普通的调用，我们发现函数不能改变$x和$y的值，这符合我们的预期，但是第二个形式的调用，就是传参数时候，带上引用标志&amp;#038;，结果我们发现，$x和$y的值也改变了，这是为什么呢，跟上面的例子是一个原因，函数的形式参数a和b其实是$x和$y的引用的拷贝，所以a和b也指向x和y，所以，a和b可以改变x和y的值。再看最下面的一种形式，这种是我认为的真正的按照引用传递参数。非常的绕乎对吧？我也觉得如此，确实太过灵活了。确实不利于学习和理解，代码也不容易维护，如果真的想用引用传递参数，推荐用最底下一种方式，明确告诉调用的人，这里其实是引用，千万别用changeInt(&amp;#038;$x, &amp;#038;$y);这种形式，这个代码散步在各处，将极难定位bug。&lt;/p&gt;
&lt;div class=&quot;hl-surround&quot;&gt;&lt;div class=&quot;hl-main&quot;&gt;&lt;ol class=&quot;hl-main ln-show&quot; title=&quot;Double click to hide line number.&quot; ondblclick = &quot;linenumber(this)&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;span style=&quot;color: Blue;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: Maroon;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: Maroon;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;changeInt&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: Maroon;&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: Maroon;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;changeInt&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;$x = 1, $y = 2&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;changeInt&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;, &amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;$x = 3, $y = 4&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;changeIntByRef&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;, &amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: Maroon;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt; = &lt;/span&gt;&lt;span style=&quot;color: Maroon;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;changeIntByRef&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;var_dump&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$x&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$y&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;; &lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: #ffa500;&quot;&gt;$x = 5, $y = 6&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td &gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Dedian 5的PHP包缺少readline支持&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;PHP 5.3.x中弃用的特性 Deprecated&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;工作中常用的Linux命令集锦&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;VIM常用小窍门收集&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fphp-return.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;[Tips] PHP中return的用法&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td  align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
	标签：&lt;a href=&quot;http://sexywp.com/tags/basic&quot; title=&quot;basic&quot; rel=&quot;tag&quot;&gt;basic&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/php&quot; title=&quot;PHP&quot; rel=&quot;tag&quot;&gt;PHP&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/usage&quot; title=&quot;usage&quot; rel=&quot;tag&quot;&gt;usage&lt;/a&gt;&lt;br /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985487/charlestang/feedsky/s.gif?r=http://sexywp.com/php5-pass-param-by-ref.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://sexywp.com/php5-pass-param-by-ref.htm/feed</wfw:commentRss><slash:comments>1</slash:comments><description>PHP是支持引用的，但是关于一个变量什么时候是引用，什么时候是值，我脑子里总是迷迷糊糊的，所以，想用引用的时候，就会不自觉地在所有的地方加上&amp;#038;符号，真的很累赘。为了缓解这个问题，我特意写了下面这个代码片段来增进自己的理解。起初，我对这个东西的理解是，对于对象来说，PHP5就是按照引用传递的。但是我现在想，可能事情不是这么一回事情。下面的代码片段中，$obj其实是A的对象的一个引用，可以理解成一个指针，函数参数$o，其实还是对$obj的拷贝，只是拷贝的是引用本身，也即，$o其实是$obj的拷贝，只是由于其拷贝了$obj，所以，$o也指向A的对象。两个指针指向一个地方，这也是为什么函数changeObj可以改变A的对象的原因。我想，这样大概从技术来说，会更加合理一点。

&lt;span class=&quot;readmore&quot;&gt;&lt;a href=&quot;http://sexywp.com/php5-pass-param-by-ref.htm&quot; title=&quot;【边学边用】PHP5函数参数的按引用传递&quot;&gt;Keep Reading --- 315 words totally&lt;/a&gt;&lt;/span&gt;&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td &gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flet-php5-support-readline.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Dedian 5的PHP包缺少readline支持&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fdeprecated-features-in-php-5-3.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;PHP 5.3.x中弃用的特性 Deprecated&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;工作中常用的Linux命令集锦&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;VIM常用小窍门收集&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fphp-return.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;[Tips] PHP中return的用法&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td  align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985487/charlestang/feedsky/s.gif?r=http://sexywp.com/php5-pass-param-by-ref.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>心得体会</category><category>basic</category><category>PHP</category><category>工作相关</category><category>usage</category><pubDate>Fri, 26 Aug 2011 22:07:14 +0800</pubDate><author>Charles</author><comments>http://sexywp.com/php5-pass-param-by-ref.htm#comments</comments><guid isPermaLink="false">http://sexywp.com/?p=454</guid><dc:creator>Charles</dc:creator><fs:srclink>http://sexywp.com/php5-pass-param-by-ref.htm</fs:srclink><fs:srcfeed>http://sexywp.com/feed</fs:srcfeed><fs:itemid>feedsky/charlestang/~7274293/604985487/5098041</fs:itemid></item><item><title>ExtJS 4 的MVC</title><link>http://sexywp.com/extjs-4-mvc.htm</link><content:encoded>&lt;p&gt;ExtJS是我听说了很久的一个js框架了，但是从来就没有用过，读研期间寝室里有个小哥在用，不过那时候醉心于WordPress开发，也懒得理会了。现在公司里，有个上线系统用到了这个框架中的一个TreePanel组件，整个界面上，就正中间扔了一个tree panel，而且不知道什么原因，CSS还有bug，把按钮都搞破了，弄得丑陋不堪，我于是自告奋勇，仔细调试，终于修复了那个显示上的bug，从此算是初次结识了ExtJS。它真正吸引我的原因是，它能够把富客户端应用的开发，从美工和基础交互中解放出来，只需要专注于业务逻辑开发即可，从而让后台工程师也能够有能力快速开发外观专业的网站应用系统。我觉得这真是功德无量的一个事情。（如果我直觉没错，Flex框架也是这一类东西，这也是我对其有兴趣的原因，当然还没有时间尝试）&lt;span id=&quot;more-445&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://picasaweb.google.com/lh/photo/6w-l2AcPyxIcU35pqAdwTA?feat=embedwebsite&quot;&gt;&lt;img src=&quot;https://lh6.googleusercontent.com/-NjYqHh6WjX0/ThiD-8_-xxI/AAAAAAAAB5w/jjqmfY8JrZE/s800/ExtJS%2525E5%2525AF%2525B9%2525E8%2525B1%2525A1%2525E5%252585%2525B3%2525E7%2525B3%2525BB%2525E5%25259B%2525BE.png&quot; height=&quot;310&quot; width=&quot;499&quot; alt=&quot;ExtJS 4 MVC&quot;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;据官网介绍，还有据同事&lt;a href=&quot;http://www.showframework.com/&quot; target=&quot;_blank&quot;&gt;ishow&lt;/a&gt;的描述，ExtJS 4.x 是一个变化很大的版本，相比已经应用广泛的 3.x 来说，变了很多、新特性也很多，MVC就是它提供的新特性之一。由于我最近半年都在学习MVC模式（主要是使用Yii框架），所以这个名词更是引起了我浓厚的兴趣，这几天都在官网上看这个框架MVC的例子，直到今天，总算是摸着一点门道，于是画了上面那个图。这个四不像的图，是我个人对框架的理解的第一个具体化产物。&lt;/p&gt;
&lt;p&gt;下面简单描述一下这个图。&lt;/p&gt;
&lt;p&gt;1. 每个应用都有一个实体，就是Application对象实例，而每个应用同样也采用单一入口结构，有个快捷函数就是Ext.application({config})，创建一个Application对象实例，并且运行它；这里行为表现和Yii框架的Application看起来很像，创建一个实例，然后run；&lt;/p&gt;
&lt;p&gt;2. Application在创建之初，会去加载Controller类，加载完毕后，会正式的lunch；&lt;/p&gt;
&lt;p&gt;3. Application在lunch的时候，会创建一个Viewport对象实例，这个东西就像一个骨架一样，上面可以拼装各种View，具体说，就是各种布局形式和窗体控件，可以说是应用界面的载体；&lt;/p&gt;
&lt;p&gt;4. Controller的角色完全是个粘合剂，它在加载之初，会帮忙加载跟其有关的Model，Store，View类，而其真正的作用，是通过一系列的事件处理函数，确定了每个View上面界面组件对用户交互行为的响应方法，可以说是一堆事件处理器函数的集合；这里面主要通过一个control成员函数来进行事件绑定，通过另一个叫ComponentQuery的组件，使用类似css selector的语法来定位界面上的组件，并为其绑定事件处理器；&lt;/p&gt;
&lt;p&gt;5. Model是对抽象数据的具体化，或者可以这么理解，就是数据库里面的一行记录，到底是怎么变成一个对象的，将数据库字段变成了对象的属性的对应关系；而这里比Yii框架MVC模型多出来的东西，就是Store这个东西，在Yii框架里面，有强大的ORM系统，还有强大的AR将Model直接连接到了DB上，数据一出来就直接变成了对象，而在ExtJS框架中，代码全在客户端，势必就出现了透过网络来加载数据需要，而我认为，Store就是对通过网络来加载数据的过程的一个抽象，Store依赖于Model，通过关联的Model对象来获知如何将取回的数据对象化，以方便View展现，所以View是依赖Store对象的；（这里岔开一点，感觉这个Store的设计理念或许可以借鉴，由于某些原因，我们在使用PHP框架的时候，不能让Model直接连接DB，是不是也可以把数据取回最终拼接成Model对象的这个过程给抽象化成类似ExtJS中Store的这套机制呢？）&lt;/p&gt;
&lt;p&gt;6. View就纯粹是一个界面组件，或者说窗体控件的集合，通过Store来加载数据并且展现到界面上，界面控件的响应都写在Controller里面，View对Controller的存在全无所知，也没有代码上的依赖；&lt;/p&gt;
&lt;p&gt;总结一下，感觉这套系统的好处是在于，将View和Model都给抽象了出来，以至于它们可以更加好地被复用，做好一个面板，所有的地方都可以调用，而真正业务逻辑又被很好的封装在了Controller里面，这样也便于去模块化地开发系统，基本感觉上，是一套非常优秀的框架，由于我对ExtJS 3系列版本，没有任何经验，也就没法做出其相对于先前版本是否有质的飞跃的判断，通过仔细的挖掘，我发现其易用性上确实比我原来想象的要好，开发人员可能没太多必要去纠结于内部原理，只要理解到跟我现在差不多的样子，就可以快速上手去做一些东西出来，当然还是必须看着文档按图索骥的，嘿嘿:)&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;MVC就是个选择题&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmvc-chose-where-to-put-your-code.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fextjs-4-mvc.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;MVC就是个选择题&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;MVC最佳实践&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fextjs-4-mvc.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;MVC最佳实践&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;不可信的眼睛&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Funbelievable-eyes.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fextjs-4-mvc.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/09/16/31419056.jpg&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;不可信的眼睛&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;Micheal Clayton&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmicheal-clayton.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fextjs-4-mvc.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/09/05/28376852.jpg&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Micheal Clayton&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;WordPress插件开发实例--（01）&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Freal-wp-plugins-01.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fextjs-4-mvc.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/22/9193527.png&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;WordPress插件开发实例--（01）&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
	标签：&lt;a href=&quot;http://sexywp.com/tags/analytics&quot; title=&quot;analytics&quot; rel=&quot;tag&quot;&gt;analytics&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/development&quot; title=&quot;development&quot; rel=&quot;tag&quot;&gt;development&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/extjs-2&quot; title=&quot;extjs&quot; rel=&quot;tag&quot;&gt;extjs&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/mvc&quot; title=&quot;MVC&quot; rel=&quot;tag&quot;&gt;MVC&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/yii-2&quot; title=&quot;yii&quot; rel=&quot;tag&quot;&gt;yii&lt;/a&gt;&lt;br /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985488/charlestang/feedsky/s.gif?r=http://sexywp.com/extjs-4-mvc.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://sexywp.com/extjs-4-mvc.htm/feed</wfw:commentRss><slash:comments>0</slash:comments><description>ExtJS是我听说了很久的一个js框架了，但是从来就没有用过，读研期间寝室里有个小哥在用，不过那时候醉心于WordPress开发，也懒得理会了。现在公司里，有个上线系统用到了这个框架中的一个TreePanel组件，整个界面上，就正中间扔了一个tree panel，而且不知道什么原因，CSS还有bug，把按钮都搞破了，弄得丑陋不堪，我于是自告奋勇，仔细调试，终于修复了那个显示上的bug，从此算是初次结识了ExtJS。它真正吸引我的原因是，它能够把富客户端应用的开发，从美工和基础交互中解放出来，只需要专注于业务逻辑开发即可，从而让后台工程师也能够有能力快速开发外观专业的网站应用系统。我觉得这真是功德无量的一个事情。（如果我直觉没错，Flex框架也是这一类东西，这也是我对其有兴趣的原因，当然还没有时间尝试）

&lt;span class=&quot;readmore&quot;&gt;&lt;a href=&quot;http://sexywp.com/extjs-4-mvc.htm&quot; title=&quot;ExtJS 4 的MVC&quot;&gt;Keep Reading --- 1529 words totally&lt;/a&gt;&lt;/span&gt;&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;3&quot; border=&quot;0&quot;  style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot;&gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
        &lt;tr&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;MVC就是个选择题&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmvc-chose-where-to-put-your-code.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fextjs-4-mvc.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;MVC就是个选择题&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;MVC最佳实践&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmvc-best-practice.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fextjs-4-mvc.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;MVC最佳实践&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;食物是怎么活过来的&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flive-fruit-and-bread.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fextjs-4-mvc.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/06/02/10685311.jpg&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;食物是怎么活过来的&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;WordPress插件开发实例--（01）&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Freal-wp-plugins-01.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fextjs-4-mvc.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/05/22/9193527.png&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;WordPress插件开发实例--（01）&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;86&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !important; border-left: 1px solid #DDDDDD !important;&quot;&gt;
                    &lt;a target=&quot;_blank&quot; title=&quot;升级到WordPress2.7版本~~&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fupdate-to-wp27.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fextjs-4-mvc.htm&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 80px !important; height: 80px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/08/30/26374211.png&quot; width=&quot;80px&quot; height=&quot;80px&quot; /&gt;&lt;br /&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;display: block !important; line-height: 15px !important; width: 86px !important; font: 12px/15px arial !important; height: 45px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;升级到WordPress2.7版本~~&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;5&quot; align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985488/charlestang/feedsky/s.gif?r=http://sexywp.com/extjs-4-mvc.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>MVC</category><category>心得体会</category><category>yii</category><category>analytics</category><category>extjs</category><category>ExtJS</category><category>development</category><pubDate>Sun, 10 Jul 2011 01:39:44 +0800</pubDate><author>Charles</author><comments>http://sexywp.com/extjs-4-mvc.htm#comments</comments><guid isPermaLink="false">http://sexywp.com/?p=445</guid><dc:creator>Charles</dc:creator><fs:srclink>http://sexywp.com/extjs-4-mvc.htm</fs:srclink><fs:srcfeed>http://sexywp.com/feed</fs:srcfeed><fs:itemid>feedsky/charlestang/~7274293/604985488/5098041</fs:itemid></item><item><title>VIM常用小窍门收集</title><link>http://sexywp.com/vim-tricks-collections.htm</link><content:encoded>&lt;p&gt;vim应该是现在世界上最流行的编辑器，没有之一。就算你千般百般地不喜欢它，掌握它也成了一件必须的事情了。因为日后你如果做程序员，在非Win系列的服务器上搞开发，vim绝对是无法避免的。你日常能接触到的server，emacs可能没装，但是vi不可能没装，就这样。&lt;/p&gt;
&lt;p&gt;特意开辟这个文章，用于收藏一些工作中常用的操作，主要有这么几个原则：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;非常有用&lt;/li&gt;
&lt;li&gt;不常用&lt;/li&gt;
&lt;li&gt;每次用都想不起来应该怎么用&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;不知道大家是不是经常跟我一样有这种感受呢，我会把我遇到的这类操作，都详细写在这里。&lt;/p&gt;
&lt;h2&gt;将配置文件中的指定列前面加上注释符号&lt;/h2&gt;
&lt;div class=&quot;hl-surround&quot;&gt;&lt;ol class=&quot;hl-main ln-show&quot; title=&quot;Double click to hide line number.&quot; ondblclick = &quot;linenumber(this)&quot;&gt;&lt;li class=&quot;hl-firstline&quot;&gt;#fastcgi.conf&lt;/li&gt;
&lt;li&gt;fastcgi_param&amp;nbsp; GATEWAY_INTERFACE&amp;nbsp; CGI/1.1;&lt;/li&gt;
&lt;li&gt;fastcgi_param&amp;nbsp; SERVER_SOFTWARE&amp;nbsp; &amp;nbsp; nginx;&lt;/li&gt;
&lt;li&gt;fastcgi_param&amp;nbsp; QUERY_STRING&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$query_string;&lt;/li&gt;
&lt;li&gt;fastcgi_param&amp;nbsp; REQUEST_METHOD&amp;nbsp; &amp;nbsp; &amp;nbsp;$request_method;&lt;/li&gt;
&lt;li&gt;fastcgi_param&amp;nbsp; CONTENT_TYPE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$content_type;&lt;/li&gt;
&lt;li&gt;fastcgi_param&amp;nbsp; CONTENT_LENGTH&amp;nbsp; &amp;nbsp; &amp;nbsp;$content_length;&lt;/li&gt;
&lt;li&gt;fastcgi_param&amp;nbsp; SCRIPT_FILENAME&amp;nbsp; &amp;nbsp; $document_root$fastcgi_script_name;&lt;/li&gt;
&lt;li&gt;fastcgi_param&amp;nbsp; SCRIPT_NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $fastcgi_script_name;&lt;/li&gt;
&lt;li&gt;fastcgi_param&amp;nbsp; REQUEST_URI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $request_uri;&lt;/li&gt;
&lt;li&gt;fastcgi_param&amp;nbsp; DOCUMENT_URI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$document_uri;&lt;/li&gt;
&lt;li&gt;fastcgi_param&amp;nbsp; DOCUMENT_ROOT&amp;nbsp; &amp;nbsp; &amp;nbsp; $document_root;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;如上代码是一个很常见的配置文件，我现在要给第2-12行前面都加上一个#号，注释掉他们，在EmEditor里面这个事情无敌简单的，但是到了vi里面，你是不是总也想不起来应该怎么弄？&lt;/p&gt;
&lt;div class=&quot;hl-surround&quot;&gt;&lt;ol class=&quot;hl-main ln-show&quot; title=&quot;Double click to hide line number.&quot; ondblclick = &quot;linenumber(this)&quot;&gt;&lt;li class=&quot;hl-firstline&quot;&gt;:2,12s/^/#/g&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;解释一下，【2,12】在vi中叫range，看帮助的时候，如果看到range，这就是一种写法，表明第2行到12行。&lt;br /&gt;
还有一种写法：&lt;/p&gt;
&lt;div class=&quot;hl-surround&quot;&gt;&lt;ol class=&quot;hl-main ln-show&quot; title=&quot;Double click to hide line number.&quot; ondblclick = &quot;linenumber(this)&quot;&gt;&lt;li class=&quot;hl-firstline&quot;&gt;:s/^/#/g 11&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;
&lt;p&gt;将光标移动到第二行，然后执行上面的命令，后面的【11】代表，执行这个命令，重复11次。这里一直没解释里面那个至关重要的乱码串，那个就是替换的命令了。下次再说。&lt;/p&gt;
&lt;h2&gt;删除的时候使用f和t&lt;/h2&gt;
&lt;p&gt;删除是vim里面非常常用的功能，一个一个字幕删除，用x，可以代替del用。整行删除，dd，应该都会了。删除一个单词，用dw。这些都是简单提一下，我主要想两个很好用的功能，就是f和t。&lt;/p&gt;
&lt;p&gt;f的本意是行查找，fa，就是从光标当前位置开始，在本行中，找到第一个字母a，和d结合起来以后，就非常方便了，比如：&lt;/p&gt;
&lt;div class=&quot;hl-surround&quot;&gt;&lt;div class=&quot;hl-main&quot;&gt;&lt;ol class=&quot;hl-main ln-show&quot; title=&quot;Double click to hide line number.&quot; ondblclick = &quot;linenumber(this)&quot;&gt;&lt;li&gt;&amp;nbsp;&lt;span style=&quot;color: Blue;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Blue;&quot;&gt;test_php&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #00008b;&quot;&gt;$c&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Green;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: Gray;&quot;&gt;;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: Gray;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: Olive;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;在这个代码里，你想删掉第一个参数，可以把光标放在(后面的第一个$上，然后按&quot;df,&quot;，就可以把$a连同后面的逗号都删掉，非常方便。当然了，你可以发挥一下，&quot;d2f,&quot;这个按键序列就是把$a和$b都删掉了，但是呢，用数字这种东西，在实际操作中，我感觉大脑经常反应不过来，需要思考，不实用。&lt;/p&gt;
&lt;p&gt;在来说一下t，t这个东西，跟f非常像，区别就是t把找光标放到找到的那个字符前面一个位子，比如上面那个例子，我把光标放在第一个$上，然后按下&quot;dt)&quot;这个序列，可以把函数的3个参数都删掉，但是却不会删掉括号，非常舒服，在括号里删东西，我经常用这个功能。&lt;/p&gt;
&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td &gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;工作中常用的Linux命令集锦&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Mac OS X上如何实现到Linux主机的ssh免登陆&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fthe-absolute-bare-minimum-vimrc.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Vim最低配置单&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;【边学边用】PHP5函数参数的按引用传递&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fword2007-doesnot-show-pics.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;[Tips]Word2007中看不到图片&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td  align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
	标签：&lt;a href=&quot;http://sexywp.com/tags/tips&quot; title=&quot;tips&quot; rel=&quot;tag&quot;&gt;tips&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/tricks&quot; title=&quot;tricks&quot; rel=&quot;tag&quot;&gt;tricks&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/usage&quot; title=&quot;usage&quot; rel=&quot;tag&quot;&gt;usage&lt;/a&gt;, &lt;a href=&quot;http://sexywp.com/tags/vim&quot; title=&quot;vim&quot; rel=&quot;tag&quot;&gt;vim&lt;/a&gt;&lt;br /&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985489/charlestang/feedsky/s.gif?r=http://sexywp.com/vim-tricks-collections.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://sexywp.com/vim-tricks-collections.htm/feed</wfw:commentRss><slash:comments>3</slash:comments><description>vim应该是现在世界上最流行的编辑器，没有之一。就算你千般百般地不喜欢它，掌握它也成了一件必须的事情了。因为日后你如果做程序员，在非Win系列的服务器上搞开发，vim绝对是无法避免的。你日常能接触到的server，emacs可能没装，但是vi不可能没装，就这样。

特意开辟这个文章，用于收藏一些工作中常用的操作，主要有这么几个原则：



&lt;span class=&quot;readmore&quot;&gt;&lt;a href=&quot;http://sexywp.com/vim-tricks-collections.htm&quot; title=&quot;VIM常用小窍门收集&quot;&gt;Keep Reading --- 615 words totally&lt;/a&gt;&lt;/span&gt;&lt;table class=&quot;wumii-related-items&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;clear: both;&quot;&gt;
    
    &lt;tr&gt;
        &lt;td &gt;&lt;b&gt;&lt;font size=&quot;-1&quot;  style=&quot;display: block !important; padding: 20px 0 5px !important;&quot;&gt;您可能也喜欢：&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
    &lt;/tr&gt;
    
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Flinux-commands-used-when-working.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;工作中常用的Linux命令集锦&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fmac-os-x-ssh-key-pair-login-linux.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Mac OS X上如何实现到Linux主机的ssh免登陆&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fthe-absolute-bare-minimum-vimrc.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Vim最低配置单&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fphp5-pass-param-by-ref.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;【边学边用】PHP5函数参数的按引用传递&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td style=&quot;margin: 0 !important; padding: 0 !important; line-height: 20px !important;&quot;&gt;
                    &lt;img border=&quot;0&quot; src=&quot;http://static.wumii.com/images/widget/widget_solidPoint.gif&quot;&gt;
                    &lt;a target=&quot;_blank&quot; style=&quot;text-decoration: none !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fsexywp.com%2Fword2007-doesnot-show-pics.htm&amp;from=http%3A%2F%2Fsexywp.com%2Fvim-tricks-collections.htm&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;[Tips]Word2007中看不到图片&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td  align=&quot;right&quot;&gt;
            &lt;a style=&quot;text-decoration: none !important;&quot; href=&quot;http://www.wumii.com/widget/relatedItems.htm&quot; target=&quot;_blank&quot; title=&quot;无觅相关文章插件&quot;&gt;
                &lt;font size=&quot;-1&quot; color=&quot;#bbbbbb&quot; style=&quot;display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;&quot;&gt;无觅&lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;img src=&quot;http://www1.feedsky.com/t1/604985489/charlestang/feedsky/s.gif?r=http://sexywp.com/vim-tricks-collections.htm&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>心得体会</category><category>Linux</category><category>tips</category><category>工作相关</category><category>tricks</category><category>vim</category><category>usage</category><pubDate>Tue, 14 Jun 2011 22:31:30 +0800</pubDate><author>Charles</author><comments>http://sexywp.com/vim-tricks-collections.htm#comments</comments><guid isPermaLink="false">http://sexywp.com/?p=440</guid><dc:creator>Charles</dc:creator><fs:srclink>http://sexywp.com/vim-tricks-collections.htm</fs:srclink><fs:srcfeed>http://sexywp.com/feed</fs:srcfeed><fs:itemid>feedsky/charlestang/~7274293/604985489/5098041</fs:itemid></item></channel></rss>
