<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.feedsky.com/styles/temp01.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/reedboat" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/reedboat" type="application/rss+xml"></fs:self_link><lastBuildDate>Wed, 23 Nov 2011 13:51:50 GMT</lastBuildDate><title>苇叶舟</title><description>波涛汹涌的江面，逆流而上的小船。</description><link>http://weiye.info/blog</link><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><language>en</language><pubDate>Thu, 24 Nov 2011 01:20:41 GMT</pubDate><item><title>这一年的工作</title><link>http://weiye.info/blog/2011/11/thisyear/</link><content:encoded>&lt;p&gt;阅米从开始到现在做了半年了。加上之前产品的摸索阶段，来每讯有一年了。从开始学习模仿Flipboard和zite，到慢慢形成自己的特点。邀请码内测了很久, 不断的完善，用户较少，心里没有底。 现在在Q+平台上, 终于用户开始有较快的增长，活跃度也还不错，不禁有一些欣慰。当然产品还有很多需要完善的地方，推荐算法也要进一步改进。还有手机和ipad客户端，希望尽快的能够上线使用。这一年收获很多，研究了不少东西&lt;/p&gt;
&lt;h3&gt;热文发现：&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;从微博，RSS中发现热门的内容&lt;/li&gt;
&lt;li&gt;按照热度排序.&lt;/li&gt;
&lt;li&gt;按照时间衰减。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;自然语言处理：&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;网页正文提取, 过滤广告、导航等内容，只保留文章主体。&lt;/li&gt;
&lt;li&gt;文章标题提取, 自动去掉标题中含有的网站名称、标语等噪音。&lt;/li&gt;
&lt;li&gt;制作缩略图,制作不同的缩略图，适用不同的版式和终端展示。&lt;/li&gt;
&lt;li&gt;文本去重，内容相同或者相近的文章识别并只保留一篇。&lt;/li&gt;
&lt;li&gt;文本分类，自动将内容划分到合适的分类。&lt;/li&gt;
&lt;li&gt;来源提取，友好的文章来源展示。&lt;/li&gt;
&lt;li&gt;关键词提取，分词并自动提取适用于展示给用户的关键词。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;社会化：&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;接入腾讯微博、新浪微博&lt;/li&gt;
&lt;li&gt;Q+、人人等开放平台&lt;/li&gt;
&lt;li&gt;社会化分享&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;个性化算法：&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;用户喜好模型的建立, 用户的主动、被动行为分析。&lt;/li&gt;
&lt;li&gt;用户模型的快速生成和更新，用于冷启动。&lt;/li&gt;
&lt;li&gt;新闻按照用户个人喜好等排序.&lt;/li&gt;
&lt;li&gt;微博过滤，按照时间、热门度、用户关系、用户兴趣排序&lt;/li&gt;
&lt;li&gt;即时计算用户喜欢的文章列表。&lt;/li&gt;
&lt;li&gt;各种个性化因子的权重优化、评价。&lt;/li&gt;
&lt;li&gt;LDA话题模型。&lt;/li&gt;
&lt;li&gt;计算用户间的亲密度&lt;/li&gt;
&lt;li&gt;杂志化自动排版技术。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;跨平台：&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;普通的Web版本, Q+版。&lt;/li&gt;
&lt;li&gt;手机web版&lt;/li&gt;
&lt;li&gt;未能完成的HTML5版本&lt;/li&gt;
&lt;li&gt;即将推出的Andoroid、IPhone手机版本&lt;/li&gt;
&lt;li&gt;即将推出的IPad客户端&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;语言层面：&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;在php, javascript之外，也写了一些Java，C++, Python 的代码。&lt;/li&gt;
&lt;li&gt;此外还研究了HTML5, NodeJs, Objective C等等。&lt;/li&gt;
&lt;/ul&gt;
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;
&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;
&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;&gt;&lt;/a&gt;
&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;
&lt;div style=&quot;padding:5px 10px&quot;&gt;
&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;
&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。&lt;br /&gt;
PHP、JS职业攻城师。&lt;br /&gt;
SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;
&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=%E8%BF%99%E4%B8%80%E5%B9%B4%E7%9A%84%E5%B7%A5%E4%BD%9C&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2010%2F10%2Fone-evaluate-rank%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;一个评价排名算法&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%2Fweiye.info%2Fblog%2F2010%2F10%2Ffirefox-extensions-recommand%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;推荐几款好用的firefox插件&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%2Fweiye.info%2Fblog%2F2010%2F09%2Finfo-extract-tech%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;信息提取技术&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%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;yield的简单理解&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/580255145/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/11/thisyear/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://weiye.info/blog/2011/11/thisyear/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>阅米从开始到现在做了半年了。加上之前产品的摸索阶段，来每讯有一年了。从开始学习模仿Flipboard和zite，到慢慢形成自己的特点。邀请码内测了很久, 不断的完善，用户较少，心里没有底。 现在在Q+平台上, 终于用户开始有较快的增长，活跃度也还不错，不禁有一些欣慰。当然产品还有很多需要完善的地方，推荐算法也要进一步改进。还有手机和ipad客户端，希望尽快的能够上线使用。这一年收获很多，研究了不少东西 热文发现： 从微博，RSS中发现热门的内容 按照热度排序. 按照时间衰减。 自然语言处理： 网页正文提取, 过滤广告、导航等内容，只保留文章主体。 文章标题提取, 自动去掉标题中含有的网站名称、标语等噪音。 制作缩略图,制作不同的缩略图，适用不同的版式和终端展示。 文本去重，内容相同或者相近的文章识别并只保留一篇。 文本分类，自动将内容划分到合适的分类。 来源提取，友好的文章来源展示。 关键词提取，分词并自动提取适用于展示给用户的关键词。 社会化： 接入腾讯微博、新浪微博 Q+、人人等开放平台 社会化分享 个性化算法： 用户喜好模型的建立, 用户的主动、被动行为分析。 用户模型的快速生成和更新，用于冷启动。 新闻按照用户个人喜好等排序. 微博过滤，按照时间、热门度、用户关系、用户兴趣排序 即时计算用户喜欢的文章列表。 各种个性化因子的权重优化、评价。 LDA话题模型。 计算用户间的亲密度 杂志化自动排版技术。 跨平台： 普通的Web版本, Q+版。 手机web版 未能完成的HTML5版本 即将推出的Andoroid、IPhone手机版本 即将推出的IPad客户端 语言层面： 在php, javascript之外，也写了一些Java，C++, Python 的代码。 此外还研究了HTML5, NodeJs, Objective C等等。 关于作者 reedboat, 每讯网, 研发经理 执着的技术人，完美的追求者。 PHP、JS职业攻城师。 [...]
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;/&gt;&lt;/a&gt;&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;&lt;div style=&quot;padding:5px 10px&quot;&gt;&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。
PHP、JS职业攻城师。
SNS、SCM、IOS、敏捷开发、推荐算法...&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=%E8%BF%99%E4%B8%80%E5%B9%B4%E7%9A%84%E5%B7%A5%E4%BD%9C&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2010%2F10%2Fone-evaluate-rank%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;一个评价排名算法&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%2Fweiye.info%2Fblog%2F2010%2F10%2Ffirefox-extensions-recommand%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;推荐几款好用的firefox插件&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%2Fweiye.info%2Fblog%2F2010%2F09%2Fssh-by-expect%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;使用expect命令快速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%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;IOS下的Safari的一些特性&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/580255145/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/11/thisyear/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>产品</category><category>个性化阅读</category><category>文本挖掘</category><category>全网热文发现</category><category>推荐算法</category><category>阅米</category><pubDate>Wed, 23 Nov 2011 21:51:50 +0800</pubDate><author>reedboat</author><comments>http://weiye.info/blog/2011/11/thisyear/#comments</comments><guid isPermaLink="false">http://weiye.info/blog/2011/11/zhe_yi_nian_de_gong_zuo/</guid><dc:creator>reedboat</dc:creator><fs:srclink>http://weiye.info/blog/2011/11/thisyear/</fs:srclink><fs:srcfeed>http://weiye.info/blog/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/reedboat/~8349280/580255145/6452771</fs:itemid></item><item><title>Objective C 学习笔记(3)　–　实现特点</title><link>http://weiye.info/blog/2011/06/objective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian/</link><content:encoded>&lt;h3&gt;objc的内存管理方式&lt;/h3&gt;
&lt;p&gt;　1. retain count. 对象创建的时候（new, alloc, copy）系统自动为对象指定了计数１.　当向向对象发送retain消息的时候，计数+１，当发送release消息的时候，技术-１.　如果计数为０，对象就被销毁，并发送dealloc消息。 注意手工发送retain方法的时候，retain和release必须对应上，保持平衡。&lt;/p&gt;
&lt;p&gt;  2. 还可以向对象发送autorelease消息，该对象将被放到一个NSAutorelasePool对象池中。当对象池被销毁的时候，会给其中的每个对象，发送release消息.　这些对象的计数都会-１，如果计数减为０，对象就会被销毁.  如果使用Appkit, 会在特定的时间给对象池发送销毁消息，比如当前的用户事件处理完后。&lt;/p&gt;
&lt;p&gt;  3. 垃圾回收机制。编译的时候，指定-fobjc-gc-only选项，将启用gc机制。用户不需要自己管理内存，像java一样，系统自动识别哪些对象没有指针指向了，自动释放这些内存。.　GUI程序中，gc也在事件处理完后触发。 只是目前iphone开发中还不能用这个特性.&lt;/p&gt;
&lt;h3&gt;对象初始化&lt;/h3&gt;
&lt;p&gt;  objc的对象初始化包括两步&lt;br /&gt;
　1.  分配内存[ClassName alloc],alloc方法继承自NSObject，分配内存，并清空置０.&lt;br /&gt;
  2. 初始化[Object init], 返回对象实例;　注意init方法有可能返回的是跟alloc取得的不同的对象. init 是个普通的方法，类可以有多个初始化方法.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container objc default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;objc codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;&lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;id&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt; init &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #a61390;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;self &lt;span style=&quot;color: #002200;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;super init&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: #a61390;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;self&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;
&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
object &lt;span style=&quot;color: #002200;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;ClassName alloc&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt; init&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;;&lt;/div&gt;&lt;/div&gt;
&lt;h3&gt;categories&lt;/h3&gt;
&lt;p&gt;作用:　给已经存在的类增加新的对象方法&lt;br /&gt;
用法&lt;br /&gt;
1. 将类的实现代码拆分到多个文件，如果很多的话&lt;br /&gt;
2. 创建私有方法的前向引用&lt;br /&gt;
3. 给对象增加非正式的协议&lt;/p&gt;
&lt;h3&gt;动态特性 [待补充]&lt;/h3&gt;
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;
&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;
&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;&gt;&lt;/a&gt;
&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;
&lt;div style=&quot;padding:5px 10px&quot;&gt;
&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;
&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。&lt;br /&gt;
PHP、JS职业攻城师。&lt;br /&gt;
SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;
&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=Objective+C+%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%29%E3%80%80%26%238211%3B%E3%80%80%E5%AE%9E%E7%8E%B0%E7%89%B9%E7%82%B9&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2011%2F06%2Fobject_c_xue_xi_bi_ji%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Objective C 学习笔记(1) — 语法&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%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;IOS下的Safari的一些特性&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/580255146/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/06/objective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://weiye.info/blog/2011/06/objective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>objc的内存管理方式 　1. retain count. 对象创建的时候（new, alloc, copy）系统自动为对象指定了计数１.　当向向对象发送retain消息的时候，计数+１，当发送release消息的时候，技术-１.　如果计数为０，对象就被销毁，并发送dealloc消息。 注意手工发送retain方法的时候，retain和release必须对应上，保持平衡。 2. 还可以向对象发送autorelease消息，该对象将被放到一个NSAutorelasePool对象池中。当对象池被销毁的时候，会给其中的每个对象，发送release消息.　这些对象的计数都会-１，如果计数减为０，对象就会被销毁. 如果使用Appkit, 会在特定的时间给对象池发送销毁消息，比如当前的用户事件处理完后。 3. 垃圾回收机制。编译的时候，指定-fobjc-gc-only选项，将启用gc机制。用户不需要自己管理内存，像java一样，系统自动识别哪些对象没有指针指向了，自动释放这些内存。.　GUI程序中，gc也在事件处理完后触发。 只是目前iphone开发中还不能用这个特性. 对象初始化 objc的对象初始化包括两步 　1. 分配内存[ClassName alloc],alloc方法继承自NSObject，分配内存，并清空置０. 2. 初始化[Object init], 返回对象实例;　注意init方法有可能返回的是跟alloc取得的不同的对象. init 是个普通的方法，类可以有多个初始化方法. - &amp;#40;id&amp;#41; init &amp;#123; &amp;#160; &amp;#160; if &amp;#40;self = &amp;#91;super init&amp;#93;&amp;#41;&amp;#123; &amp;#160; &amp;#160; &amp;#125; &amp;#160; &amp;#160; return &amp;#40;self&amp;#41;; &amp;#125; object = &amp;#91;&amp;#91;ClassName alloc&amp;#93; init&amp;#93;; categories 作用:　给已经存在的类增加新的对象方法 用法 1. 将类的实现代码拆分到多个文件，如果很多的话 [...]
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;/&gt;&lt;/a&gt;&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;&lt;div style=&quot;padding:5px 10px&quot;&gt;&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。
PHP、JS职业攻城师。
SNS、SCM、IOS、敏捷开发、推荐算法...&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=Objective+C+%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%283%29%E3%80%80%26%238211%3B%E3%80%80%E5%AE%9E%E7%8E%B0%E7%89%B9%E7%82%B9&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2011%2F06%2Fobject_c_xue_xi_bi_ji%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Objective C 学习笔记(1) — 语法&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%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;IOS下的Safari的一些特性&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%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;这一年的工作&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%2Fweiye.info%2Fblog%2F2010%2F09%2Fssh-by-expect%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;使用expect命令快速ssh到另一台主机&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/580255146/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/06/objective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>ios</category><category>编程</category><pubDate>Fri, 10 Jun 2011 07:15:02 +0800</pubDate><author>reedboat</author><comments>http://weiye.info/blog/2011/06/objective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian/#comments</comments><guid isPermaLink="false">http://weiye.info/blog/?p=119</guid><dc:creator>reedboat</dc:creator><fs:srclink>http://weiye.info/blog/2011/06/objective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian/</fs:srclink><fs:srcfeed>http://weiye.info/blog/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/reedboat/~8349280/580255146/6452771</fs:itemid></item><item><title>Objective C 学习笔记(1) — 语法</title><link>http://weiye.info/blog/2011/06/object_c_xue_xi_bi_ji/</link><content:encoded>&lt;p&gt;objective c 是在C语言上扩展出来的，C的各种语法特性仍然适用。&lt;/p&gt;
&lt;p&gt;#import 引用头文件,比#include 好的地方在于头文件只会包含一次，不用再写#ifdef 了. &lt;/p&gt;
&lt;p&gt;NSLog Cocoa提供的函数库，统一以NS作为前缀，以示同C标准库的差别. NSLog与printf类似。&lt;/p&gt;
&lt;p&gt;@&amp;#8221;strings&amp;#8221; @后接双引号字符串，代表NSString类型的字符序列，比普通的字符串有更多的用法。&lt;/p&gt;
&lt;p&gt;main方法，同c语言一致 int main(int argc, const char * argv[]){return (0);}&lt;/p&gt;
&lt;p&gt;面向对象.&lt;/p&gt;
&lt;p&gt;id：对象指针类型&lt;br /&gt;
方法调用 [shape draw] ,调用shape对象的draw方法.shape 是id类型&lt;/p&gt;
&lt;div class=&quot;codecolorer-container objc default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;objc codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;circle draw&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;//带参数的调用，green是参数&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;circle setFillColor&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;green&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;@interface 声明类接口 &lt;/p&gt;
&lt;div class=&quot;codecolorer-container objc default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;objc codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;@interface&lt;/span&gt; Circle &lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt;&lt;a href=&quot;http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/&quot;&gt;&lt;span style=&quot;color: #400080;&quot;&gt;NSObject&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ShapeColor fillColor;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ShapeRect bounds;&lt;br /&gt;
&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt; setFillColor&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;ShapeColor&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt; fillColor;&lt;br /&gt;
&lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt; setBounds&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;ShapeRect&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt; bounds;&lt;br /&gt;
&lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt; draw;&lt;br /&gt;
&lt;span style=&quot;color: #a61390;&quot;&gt;@end&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;@implementation 实现类&lt;/p&gt;
&lt;div class=&quot;codecolorer-container objc default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;objc codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;@implementation&lt;/span&gt; Circle. 实现代码中省略掉了self self&lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt;&amp;gt;fillColor &lt;span style=&quot;color: #002200;&quot;&gt;=&lt;/span&gt; c;&lt;br /&gt;
&lt;span style=&quot;color: #002200;&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #a61390;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt; setFillColor&lt;span style=&quot;color: #002200;&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#40;&lt;/span&gt; ShapeColor &lt;span style=&quot;color: #002200;&quot;&gt;&amp;#41;&lt;/span&gt; c &lt;br /&gt;
&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; fillColor &lt;span style=&quot;color: #002200;&quot;&gt;=&lt;/span&gt; c;&lt;br /&gt;
&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #a61390;&quot;&gt;@end&lt;/span&gt; &lt;span style=&quot;color: #11740a; font-style: italic;&quot;&gt;//Circle&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;创建新实例, 调用类的new方法&lt;/p&gt;
&lt;div class=&quot;codecolorer-container objc default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;objc codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#91;&lt;/span&gt;Circle new&lt;span style=&quot;color: #002200;&quot;&gt;&amp;#93;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;构造方法&lt;br /&gt;
init&lt;/p&gt;
&lt;p&gt;访问器 getter/setter&lt;br /&gt;
set方法需要带上set前缀，get方法不需要，保持跟属性一致即可。&lt;br /&gt;
@property 可以简化访问器. 声明同数据成员相同的属性，可以省去访问器方法的编写&lt;br /&gt;
@property (选项) 类型 名字;选项包括readwrite/readonly/assign/retain/copy/atomicity等。&lt;br /&gt;
在实现中需要用@synthesize让编译器获取实现代码&lt;br /&gt;
之后可以用.来引用属性来读取和写入，而不需要调用方法。&lt;/p&gt;
&lt;p&gt;继承/组合&lt;br /&gt;
super 访问父类&lt;br /&gt;
self&lt;/p&gt;
&lt;p&gt;@class 声明使用的类，可以不需要#import a.h,  避免循环引用&lt;/p&gt;
&lt;p&gt;静态方法, 以+开头&lt;br /&gt;
+ (void) instance;&lt;/p&gt;
&lt;p&gt;@protocol 协议，类似其他语言中的接口。　遵循协议就必须实现其中规定的方法。&lt;br /&gt;
一个类可以同时遵循多种协议。还可以用@optional指定非必须实现的方法&lt;/p&gt;
&lt;div class=&quot;codecolorer-container text default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;text codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;@protocol NSCoding&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
- (void) encodeWithCoder: (NSCoder *) aCoder;&lt;br /&gt;
- (id) initWithCoder: (NScoder *) aDecoder;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@end&lt;br /&gt;
&lt;br /&gt;
@interface Car: NSObject &lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
@end&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;　&lt;/p&gt;
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;
&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;
&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;&gt;&lt;/a&gt;
&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;
&lt;div style=&quot;padding:5px 10px&quot;&gt;
&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;
&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。&lt;br /&gt;
PHP、JS职业攻城师。&lt;br /&gt;
SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;
&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=Objective+C+%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%281%29+%26%238212%3B+%E8%AF%AD%E6%B3%95&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobject_c_xue_xi_bi_ji%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobject_c_xue_xi_bi_ji%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Objective C 学习笔记(3)　–　实现特点&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%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobject_c_xue_xi_bi_ji%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;IOS下的Safari的一些特性&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/580255147/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/06/object_c_xue_xi_bi_ji/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://weiye.info/blog/2011/06/object_c_xue_xi_bi_ji/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>objective c 是在C语言上扩展出来的，C的各种语法特性仍然适用。 #import 引用头文件,比#include 好的地方在于头文件只会包含一次，不用再写#ifdef 了. NSLog Cocoa提供的函数库，统一以NS作为前缀，以示同C标准库的差别. NSLog与printf类似。 @&amp;#8221;strings&amp;#8221; @后接双引号字符串，代表NSString类型的字符序列，比普通的字符串有更多的用法。 main方法，同c语言一致 int main(int argc, const char * argv[]){return (0);} 面向对象. id：对象指针类型 方法调用 [shape draw] ,调用shape对象的draw方法.shape 是id类型 &amp;#91;circle draw&amp;#93; //带参数的调用，green是参数 &amp;#91;circle setFillColor:green&amp;#93; @interface 声明类接口  @interface Circle :NSObject &amp;#123; &amp;#160; &amp;#160; ShapeColor fillColor; &amp;#160; &amp;#160; ShapeRect bounds; &amp;#125; - &amp;#40;void&amp;#41; setFillColor: &amp;#40;ShapeColor&amp;#41; fillColor; - &amp;#40;void&amp;#41; [...]
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;/&gt;&lt;/a&gt;&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;&lt;div style=&quot;padding:5px 10px&quot;&gt;&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。
PHP、JS职业攻城师。
SNS、SCM、IOS、敏捷开发、推荐算法...&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=Objective+C+%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%281%29+%26%238212%3B+%E8%AF%AD%E6%B3%95&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobject_c_xue_xi_bi_ji%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobject_c_xue_xi_bi_ji%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Objective C 学习笔记(3)　–　实现特点&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%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobject_c_xue_xi_bi_ji%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;IOS下的Safari的一些特性&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%2Fweiye.info%2Fblog%2F2011%2F11%2Fyuemee%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobject_c_xue_xi_bi_ji%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;这一年的工作&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%2Fweiye.info%2Fblog%2F2010%2F10%2Fshow-my-twitter%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F06%2Fobject_c_xue_xi_bi_ji%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;引入了twitter内容&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/580255147/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/06/object_c_xue_xi_bi_ji/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>ios</category><category>编程</category><pubDate>Wed, 08 Jun 2011 13:30:53 +0800</pubDate><author>reedboat</author><comments>http://weiye.info/blog/2011/06/object_c_xue_xi_bi_ji/#comments</comments><guid isPermaLink="false">http://weiye.info/blog/2011/06/object_c_xue_xi_bi_ji/</guid><dc:creator>reedboat</dc:creator><fs:srclink>http://weiye.info/blog/2011/06/object_c_xue_xi_bi_ji/</fs:srclink><fs:srcfeed>http://weiye.info/blog/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/reedboat/~8349280/580255147/6452771</fs:itemid></item><item><title>新的一天</title><link>http://weiye.info/blog/2011/03/xin_de_yi_tian/</link><content:encoded>&lt;p&gt;太阳每天都是新的。早上起来，看着太阳，深吸一口新鲜空气，微笑着张开双臂，拥抱着这美好的新一天。&lt;/p&gt;
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;
&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;
&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;&gt;&lt;/a&gt;
&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;
&lt;div style=&quot;padding:5px 10px&quot;&gt;
&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;
&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。&lt;br /&gt;
PHP、JS职业攻城师。&lt;br /&gt;
SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;
&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=%E6%96%B0%E7%9A%84%E4%B8%80%E5%A4%A9&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F03%2Fxin_de_yi_tian%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2011%2F11%2Fyuemee%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F03%2Fxin_de_yi_tian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;这一年的工作&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%2Fweiye.info%2Fblog%2F2011%2F01%2Finternet-big-things-2011%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F03%2Fxin_de_yi_tian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;回想这一年的互联网&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%2Fweiye.info%2Fblog%2F2010%2F09%2Fssh-by-expect%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F03%2Fxin_de_yi_tian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;使用expect命令快速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%2Fweiye.info%2Fblog%2F2010%2F08%2Fmy-useful-vim-plugins%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F03%2Fxin_de_yi_tian%2F&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/580255148/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/03/xin_de_yi_tian/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://weiye.info/blog/2011/03/xin_de_yi_tian/feed/</wfw:commentRss><slash:comments>2</slash:comments><description>太阳每天都是新的。早上起来，看着太阳，深吸一口新鲜空气，微笑着张开双臂，拥抱着这美好的新一天。 关于作者 reedboat, 每讯网, 研发经理 执着的技术人，完美的追求者。 PHP、JS职业攻城师。 SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230; Facebook 豆瓣 新浪微博 Twitter 向文章付费
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;/&gt;&lt;/a&gt;&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;&lt;div style=&quot;padding:5px 10px&quot;&gt;&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。
PHP、JS职业攻城师。
SNS、SCM、IOS、敏捷开发、推荐算法...&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=%E6%96%B0%E7%9A%84%E4%B8%80%E5%A4%A9&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F03%2Fxin_de_yi_tian%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2011%2F11%2Fyuemee%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F03%2Fxin_de_yi_tian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;这一年的工作&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%2Fweiye.info%2Fblog%2F2011%2F01%2Finternet-big-things-2011%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F03%2Fxin_de_yi_tian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;回想这一年的互联网&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%2Fweiye.info%2Fblog%2F2010%2F09%2Fssh-by-expect%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F03%2Fxin_de_yi_tian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;使用expect命令快速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%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F03%2Fxin_de_yi_tian%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;yield的简单理解&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/580255148/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/03/xin_de_yi_tian/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>杂乱</category><pubDate>Thu, 10 Mar 2011 07:38:06 +0800</pubDate><author>reedboat</author><comments>http://weiye.info/blog/2011/03/xin_de_yi_tian/#comments</comments><guid isPermaLink="false">http://weiye.info/blog/2011/03/xin_de_yi_tian/</guid><dc:creator>reedboat</dc:creator><fs:srclink>http://weiye.info/blog/2011/03/xin_de_yi_tian/</fs:srclink><fs:srcfeed>http://weiye.info/blog/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/reedboat/~8349280/580255148/6452771</fs:itemid></item><item><title>IOS下的Safari的一些特性</title><link>http://weiye.info/blog/2011/02/ios_xia_de_safari_te_xing/</link><content:encoded>&lt;p&gt;1. viewport&lt;/p&gt;
&lt;p&gt;iOS Sarari 浏览器允许网页 Head 里存在一个 Viewport 声明，用来规范浏览器对此页面的缩放特性，完整的声明如下：&lt;/p&gt;
&lt;div class=&quot;codecolorer-container text default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;text codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;&amp;lt;meta name=&amp;quot;viewport&amp;quot; content=&amp;quot;width=device-width,&lt;br /&gt;
&amp;nbsp;initial-scale=1, minimum-scale=1, &lt;br /&gt;
maximum-scale=2, user-scalable=no&amp;quot; /&amp;gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Viewport 里目前有五个可以设置的属性，它们各自的作用如下：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;width：设置 viewport 的宽度，即 iPhone 最初模拟 PC 浏览器的宽度，之后 iPhone/iPad 会这个宽度展现的页面同比缩放到 iPhone/iPad 屏幕上。设置 width=device-width 后就不会再进行缩放了，因为宽度正好和 iPhone/iPad 的宽度相同（前提是没有设置缩放比例）。&lt;/li&gt;
&lt;li&gt;minimum-scale 和 maximum-scale：是控制用户允许设置的最大/最小缩放比例的。&lt;/li&gt;
&lt;li&gt;user-scalable：标识是否允许对页面进行缩放，取值有两个 yes 和 no。设置为 no 则不允许进行页面缩放了。&lt;/li&gt;
&lt;li&gt;initial-scale：设置页面的初始化缩放比例。&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;通过控制这个，将网页的主体内容扩展到整个界面，能够给用户更好的阅读体验。&lt;/p&gt;
&lt;p&gt;2. 横竖屏切换。&lt;/p&gt;
&lt;p&gt;Mobile Safari for iPad 可以直接在 link 或者 style 标签的 media 属性里声明该样式是竖屏的还是横屏的。可以利用来在横竖屏下面做一些不同的内容布局。&lt;/p&gt;
&lt;div class=&quot;codecolorer-container text default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;text codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;/* 竖屏时使用的样式 */&lt;br /&gt;
&amp;lt;style media=&amp;quot;all and (orientation:portrait)&amp;quot; type=&amp;quot;text/css&amp;quot;&amp;gt;&lt;br /&gt;
#landscape { display: none; }&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
/* 横屏时使用的样式 */&lt;br /&gt;
&amp;lt;style media=&amp;quot;all and (orientation:landscape)&amp;quot; type=&amp;quot;text/css&amp;quot;&amp;gt;&lt;br /&gt;
#portrait { display: none; }&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;/div&gt;&lt;/div&gt;
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;
&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;
&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;&gt;&lt;/a&gt;
&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;
&lt;div style=&quot;padding:5px 10px&quot;&gt;
&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;
&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。&lt;br /&gt;
PHP、JS职业攻城师。&lt;br /&gt;
SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;
&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=IOS%E4%B8%8B%E7%9A%84Safari%E7%9A%84%E4%B8%80%E4%BA%9B%E7%89%B9%E6%80%A7&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2011%2F06%2Fobject_c_xue_xi_bi_ji%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Objective C 学习笔记(1) — 语法&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%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Objective C 学习笔记(3)　–　实现特点&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%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;这一年的工作&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%2Fweiye.info%2Fblog%2F2011%2F01%2Finternet-big-things-2011%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;回想这一年的互联网&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/580255149/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/02/ios_xia_de_safari_te_xing/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://weiye.info/blog/2011/02/ios_xia_de_safari_te_xing/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>1. viewport iOS Sarari 浏览器允许网页 Head 里存在一个 Viewport 声明，用来规范浏览器对此页面的缩放特性，完整的声明如下： &amp;#60;meta name=&amp;#34;viewport&amp;#34; content=&amp;#34;width=device-width, &amp;#160;initial-scale=1, minimum-scale=1, maximum-scale=2, user-scalable=no&amp;#34; /&amp;#62; Viewport 里目前有五个可以设置的属性，它们各自的作用如下： width：设置 viewport 的宽度，即 iPhone 最初模拟 PC 浏览器的宽度，之后 iPhone/iPad 会这个宽度展现的页面同比缩放到 iPhone/iPad 屏幕上。设置 width=device-width 后就不会再进行缩放了，因为宽度正好和 iPhone/iPad 的宽度相同（前提是没有设置缩放比例）。 minimum-scale 和 maximum-scale：是控制用户允许设置的最大/最小缩放比例的。 user-scalable：标识是否允许对页面进行缩放，取值有两个 yes 和 no。设置为 no 则不允许进行页面缩放了。 initial-scale：设置页面的初始化缩放比例。 通过控制这个，将网页的主体内容扩展到整个界面，能够给用户更好的阅读体验。 2. 横竖屏切换。 Mobile Safari for iPad 可以直接在 link 或者 style [...]
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;/&gt;&lt;/a&gt;&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;&lt;div style=&quot;padding:5px 10px&quot;&gt;&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。
PHP、JS职业攻城师。
SNS、SCM、IOS、敏捷开发、推荐算法...&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=IOS%E4%B8%8B%E7%9A%84Safari%E7%9A%84%E4%B8%80%E4%BA%9B%E7%89%B9%E6%80%A7&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2011%2F06%2Fobject_c_xue_xi_bi_ji%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Objective C 学习笔记(1) — 语法&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%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Objective C 学习笔记(3)　–　实现特点&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%2Fweiye.info%2Fblog%2F2011%2F11%2Fyuemee%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;这一年的工作&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%2Fweiye.info%2Fblog%2F2010%2F08%2Fhello-world%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Hello world!&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/580255149/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/02/ios_xia_de_safari_te_xing/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>杂乱</category><pubDate>Mon, 28 Feb 2011 15:08:56 +0800</pubDate><author>reedboat</author><comments>http://weiye.info/blog/2011/02/ios_xia_de_safari_te_xing/#comments</comments><guid isPermaLink="false">http://weiye.info/blog/?p=114</guid><dc:creator>reedboat</dc:creator><fs:srclink>http://weiye.info/blog/2011/02/ios_xia_de_safari_te_xing/</fs:srclink><fs:srcfeed>http://weiye.info/blog/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/reedboat/~8349280/580255149/6452771</fs:itemid></item><item><title>读《中国近代史》</title><link>http://weiye.info/blog/2011/02/chinese-recent-history/</link><content:encoded>&lt;p&gt;中国近代这一百多年，跟春秋战国时期，魏晋南北朝时期,属于中国历史上最为波澜壮阔的宏大社会变革期，都需要仔细的去了解和品味。&lt;br /&gt;
之前听说了徐中约教授的饮誉中外的《中国近代史》,这本书讲了自清初到二十世纪九十年代初的大约400年的历史，书中的史料非常详尽, 讲述了很多教科书上不曾提到或者一笔带过的重大事件。这本书总共42章，但是大陆出版的像广电总局审电影似的了剪掉了非常多的史料，最后只剩下29章。推荐看看香港中文大学出版的那个版本。&lt;/p&gt;
&lt;p&gt;我们在课本上学习的历史，往往将单一的历史事件割裂开来，对于事件的起因和后续的影响简单的带过。事实上历史是连续的。这本书中从清初开始讲起，是为了说明中国近代史并不是被鸦片战争的炮声突然轰开的，它有着之前深刻的社会背景,此前的200多年，西方的很多传教士进入了中国,已经将很多的先进技术带入了中国，只是中国并不重视，只是作为玩具和观赏艺术来对待。之前的西方国家也不敢小瞧这个巨大的国度，只是在后续的几次交锋中逐步摸清了中国虚弱的本质。&lt;/p&gt;
&lt;p&gt;鸦片战争之后，中国先从经济军事、政治制度、思想文化上学习西方.二次鸦片战争之后开始了30年的以慈禧，奕訢、曾国藩、李鸿章等人领导的“中学为体，西学为用”的洋务运动，学习制造西方的现代船炮，打造了一支亚洲领先的北洋海军。然而中日甲午海战的惨败宣告仅仅学习经济军事是不够的。之后又开始了政治制度的学习，康有为梁启超学习英国和日本的君主立宪制度，孙中山学习美国的民主共和制度。最终戌变法失败了，辛亥革命成功了但却面临之后的多次复辟混乱,最终导致了军阀割据。说明中国还没有为这暂新的制度做好准备。强烈的挫败感和危机感，使得中国人又开始从思想文化上学习西方,陈独秀，胡适，鲁迅等领导的新文化运动，主张学习西方的科学和民主，矛头直指传统的儒家思想。运动动摇了封建思想的统治地位，大大解放了人民的思想。不过很多人带有非常偏激的情绪，主张摈弃中国民族文化，全盘西化，对中国传统思想文化,价值观念造成了相当大的破坏。不过建立起现代中国的社会基础已经准备好了。&lt;/p&gt;
&lt;p&gt;北伐战争的胜利，使得中国重新统一了。但是国民党政府没有抓住历史的契机，进行土地改革，改善民生。而是忙于奔命处理内部不和，通货膨胀，与共产党内战和日本侵略等问题。最终赢得了抗日战争之后，却失去了民心的支持，逃往了台湾。中国也真正完成了三民主义中的民族革命。&lt;/p&gt;
&lt;p&gt;对于新中国的历史，几乎还没有其他书籍做过系统的整理,历史课本就不用提了。看了这本书之后，相信对于大跃进，对于文革，对于改革开放,对于许多的历史人物，等等都会有更深刻的理解。例如中苏的交恶，文化大革命的发起，林彪的叛乱，80年代的通货膨胀。不能说太细了，不然我的博客要被墙了。&lt;/p&gt;
&lt;p&gt;对于很多的历史人物和事件，我们需要更全面的去评价他们的成败得失。&lt;/p&gt;
&lt;p&gt;对于中日甲午海战之后的百日维新戊戌变法，往往都说它是失败的，是一部悲剧。但是它对宪政，对民主起了很大的宣传作用，点燃了许多中国民众心中等政治火炬，大大加速了帝制的灭亡。&lt;/p&gt;
&lt;p&gt;有一些人说孙中山又没有打过仗，辛亥革命发生的时候，孙中山甚至都不在国内，甚至都不一定知道有这回事。完全是个投机者。读了这段历史会发现，孙中山为了达到最后的目的，有时候真的有些不择手段。但是他的思想和远见，着实具有深刻的指导意义。他学习西方又不唯西方，而是结合中国社会背景，提出的三民主义和五权宪法，直到现在都有现实的价值。可惜我们现在也只是实现了民族主义，民权主义和民生主义还远未达到。五权宪法在孟德斯鸠的立法、司法、行政三权之外加上了考试权和监察权。科举考试是中国古代的非常重要和先进的一项人才选拔制度，后来出现问题不是考试制度的问题而是所考的内容出现了重大问题，变成了无用的八股文。监察权相信也是因为中国历史上贪污腐败横行而独立出来的，不过如果立法和司法真能够独立的话，相信监察权也许就不需要单独提出了。&lt;/p&gt;
&lt;p&gt;喜欢看这段历史的童鞋，不妨去新浪爱问http://ishare.iask.sina.com.cn/上搜索下徐中约，中国近代史 42章,相信不少。徐中约的这本书提供了丰富的史料让我们了解这段历史，不过更多的体现在外交和国际关系层面上。社会和文化层面上，不知道你们有没有什么更详尽的书推荐.&lt;/p&gt;
&lt;p&gt;中国每次的大变革时期，都是思想文化最开放的时期，为之后辉煌灿烂的文明打下坚实的思想文化和政治制度的基础，比如战国之后的秦汉，南北朝之后的隋唐。希望这一次也一样。&lt;/p&gt;
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;
&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;
&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;&gt;&lt;/a&gt;
&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;
&lt;div style=&quot;padding:5px 10px&quot;&gt;
&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;
&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。&lt;br /&gt;
PHP、JS职业攻城师。&lt;br /&gt;
SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;
&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=%E8%AF%BB%E3%80%8A%E4%B8%AD%E5%9B%BD%E8%BF%91%E4%BB%A3%E5%8F%B2%E3%80%8B&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fchinese-recent-history%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&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;3&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;102&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !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%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fchinese-recent-history%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/11/23/11355199.jpg&quot; width=&quot;96px&quot; height=&quot;96px&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: 102px !important; font: 12px/15px arial !important; height: 60px !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;102&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%2Fweiye.info%2Fblog%2F2011%2F01%2Finternet-big-things-2011%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fchinese-recent-history%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;96px&quot; height=&quot;96px&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: 102px !important; font: 12px/15px arial !important; height: 60px !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;102&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%2Fweiye.info%2Fblog%2F2010%2F09%2Finfo-extract-tech%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fchinese-recent-history%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;96px&quot; height=&quot;96px&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: 102px !important; font: 12px/15px arial !important; height: 60px !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;3&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/580255150/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/02/chinese-recent-history/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://weiye.info/blog/2011/02/chinese-recent-history/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>中国近代这一百多年，跟春秋战国时期，魏晋南北朝时期,属于中国历史上最为波澜壮阔的宏大社会变革期，都需要仔细的去了解和品味。 之前听说了徐中约教授的饮誉中外的《中国近代史》,这本书讲了自清初到二十世纪九十年代初的大约400年的历史，书中的史料非常详尽, 讲述了很多教科书上不曾提到或者一笔带过的重大事件。这本书总共42章，但是大陆出版的像广电总局审电影似的了剪掉了非常多的史料，最后只剩下29章。推荐看看香港中文大学出版的那个版本。 我们在课本上学习的历史，往往将单一的历史事件割裂开来，对于事件的起因和后续的影响简单的带过。事实上历史是连续的。这本书中从清初开始讲起，是为了说明中国近代史并不是被鸦片战争的炮声突然轰开的，它有着之前深刻的社会背景,此前的200多年，西方的很多传教士进入了中国,已经将很多的先进技术带入了中国，只是中国并不重视，只是作为玩具和观赏艺术来对待。之前的西方国家也不敢小瞧这个巨大的国度，只是在后续的几次交锋中逐步摸清了中国虚弱的本质。 鸦片战争之后，中国先从经济军事、政治制度、思想文化上学习西方.二次鸦片战争之后开始了30年的以慈禧，奕訢、曾国藩、李鸿章等人领导的“中学为体，西学为用”的洋务运动，学习制造西方的现代船炮，打造了一支亚洲领先的北洋海军。然而中日甲午海战的惨败宣告仅仅学习经济军事是不够的。之后又开始了政治制度的学习，康有为梁启超学习英国和日本的君主立宪制度，孙中山学习美国的民主共和制度。最终戌变法失败了，辛亥革命成功了但却面临之后的多次复辟混乱,最终导致了军阀割据。说明中国还没有为这暂新的制度做好准备。强烈的挫败感和危机感，使得中国人又开始从思想文化上学习西方,陈独秀，胡适，鲁迅等领导的新文化运动，主张学习西方的科学和民主，矛头直指传统的儒家思想。运动动摇了封建思想的统治地位，大大解放了人民的思想。不过很多人带有非常偏激的情绪，主张摈弃中国民族文化，全盘西化，对中国传统思想文化,价值观念造成了相当大的破坏。不过建立起现代中国的社会基础已经准备好了。 北伐战争的胜利，使得中国重新统一了。但是国民党政府没有抓住历史的契机，进行土地改革，改善民生。而是忙于奔命处理内部不和，通货膨胀，与共产党内战和日本侵略等问题。最终赢得了抗日战争之后，却失去了民心的支持，逃往了台湾。中国也真正完成了三民主义中的民族革命。 对于新中国的历史，几乎还没有其他书籍做过系统的整理,历史课本就不用提了。看了这本书之后，相信对于大跃进，对于文革，对于改革开放,对于许多的历史人物，等等都会有更深刻的理解。例如中苏的交恶，文化大革命的发起，林彪的叛乱，80年代的通货膨胀。不能说太细了，不然我的博客要被墙了。 对于很多的历史人物和事件，我们需要更全面的去评价他们的成败得失。 对于中日甲午海战之后的百日维新戊戌变法，往往都说它是失败的，是一部悲剧。但是它对宪政，对民主起了很大的宣传作用，点燃了许多中国民众心中等政治火炬，大大加速了帝制的灭亡。 有一些人说孙中山又没有打过仗，辛亥革命发生的时候，孙中山甚至都不在国内，甚至都不一定知道有这回事。完全是个投机者。读了这段历史会发现，孙中山为了达到最后的目的，有时候真的有些不择手段。但是他的思想和远见，着实具有深刻的指导意义。他学习西方又不唯西方，而是结合中国社会背景，提出的三民主义和五权宪法，直到现在都有现实的价值。可惜我们现在也只是实现了民族主义，民权主义和民生主义还远未达到。五权宪法在孟德斯鸠的立法、司法、行政三权之外加上了考试权和监察权。科举考试是中国古代的非常重要和先进的一项人才选拔制度，后来出现问题不是考试制度的问题而是所考的内容出现了重大问题，变成了无用的八股文。监察权相信也是因为中国历史上贪污腐败横行而独立出来的，不过如果立法和司法真能够独立的话，相信监察权也许就不需要单独提出了。 喜欢看这段历史的童鞋，不妨去新浪爱问http://ishare.iask.sina.com.cn/上搜索下徐中约，中国近代史 42章,相信不少。徐中约的这本书提供了丰富的史料让我们了解这段历史，不过更多的体现在外交和国际关系层面上。社会和文化层面上，不知道你们有没有什么更详尽的书推荐. 中国每次的大变革时期，都是思想文化最开放的时期，为之后辉煌灿烂的文明打下坚实的思想文化和政治制度的基础，比如战国之后的秦汉，南北朝之后的隋唐。希望这一次也一样。 关于作者 reedboat, 每讯网, 研发经理 执着的技术人，完美的追求者。 PHP、JS职业攻城师。 SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230; Facebook 豆瓣 新浪微博 Twitter 向文章付费
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;/&gt;&lt;/a&gt;&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;&lt;div style=&quot;padding:5px 10px&quot;&gt;&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。
PHP、JS职业攻城师。
SNS、SCM、IOS、敏捷开发、推荐算法...&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=%E8%AF%BB%E3%80%8A%E4%B8%AD%E5%9B%BD%E8%BF%91%E4%BB%A3%E5%8F%B2%E3%80%8B&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fchinese-recent-history%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&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;3&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;102&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !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%2Fweiye.info%2Fblog%2F2011%2F11%2Fyuemee%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fchinese-recent-history%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/11/23/11355199.jpg&quot; width=&quot;96px&quot; height=&quot;96px&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: 102px !important; font: 12px/15px arial !important; height: 60px !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;102&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;Hello world!&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fweiye.info%2Fblog%2F2010%2F08%2Fhello-world%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fchinese-recent-history%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;96px&quot; height=&quot;96px&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: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;Hello world!&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;102&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;引入了twitter内容&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fweiye.info%2Fblog%2F2010%2F10%2Fshow-my-twitter%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fchinese-recent-history%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;96px&quot; height=&quot;96px&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: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;引入了twitter内容&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
        &lt;/tr&gt;
    
    &lt;tr&gt;
        &lt;td colspan=&quot;3&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/580255150/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/02/chinese-recent-history/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>徐中约</category><category>历史，近代</category><category>读书</category><pubDate>Sun, 27 Feb 2011 11:58:50 +0800</pubDate><author>reedboat</author><comments>http://weiye.info/blog/2011/02/chinese-recent-history/#comments</comments><guid isPermaLink="false">http://weiye.info/blog/?p=111</guid><dc:creator>reedboat</dc:creator><fs:srclink>http://weiye.info/blog/2011/02/chinese-recent-history/</fs:srclink><fs:srcfeed>http://weiye.info/blog/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/reedboat/~8349280/580255150/6452771</fs:itemid></item><item><title>构建我们的离线Web应用</title><link>http://weiye.info/blog/2011/01/offline-web-application/</link><content:encoded>&lt;p&gt;
    公司希望为我们的Web站点，开发一个html5版本，拓展到Pad端，给使用高级浏览器的用户一个更加完善的用户体验。其中一个重要的功能就是支持离线应用。&lt;/p&gt;
&lt;p&gt;
    利用html5构建一个离线应用，主要依赖于三个新的特性
    &lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;1. 离线资源缓存：&lt;/dt&gt;
&lt;dd&gt;可以在一个manifest文件中指明离线应用工作所需的资源文件。缓存的文件可以在&lt;b&gt;manifest文件本身&lt;/b&gt;发生变化的时候更新，或者检测window.applicationCache.status，然后调用window.applicationCache.update()更新缓存。&lt;/dd&gt;
&lt;dt&gt;2. 在线状态检测：&lt;/dt&gt;
&lt;dd&gt;html5支持通过navigator.onLine获取当前的在线状态。html5还提供在线和离线事件机制.针对在线状态，我们可以做出不同的处理&lt;/dd&gt;
&lt;dt&gt;3. 本地数据存储：&lt;/dt&gt;
&lt;dd&gt; html5提供了LocalStorage和WebDatabase(WebSQL/indexedDB)两种存储机制。前者提供key/value存储方式，后者提供关系数据库存储功能。&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3&gt;离线资源缓存&lt;/h3&gt;
&lt;p&gt;要使用离线缓存功能，需要在编写manifest文件，并指定使用的manifest.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container css default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;css codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;lt;doctype html5&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;html manifest&lt;span style=&quot;color: #00AA00;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #ff0000;&quot;&gt;&amp;quot;demo.manifest&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;lt;/html&lt;span style=&quot;color: #00AA00;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;manifest文件格式.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; 首行必须是 CACHE MANIFEST。其后，每一行列出一个需要缓存的资源文件名。&lt;/li&gt;
&lt;li&gt; 可根据需要列出在线访问的白名单。白名单中的所有资源不会被缓存，在使用时将直接在线访问。声明白名单使用 NETWORK：标识符。&lt;/li&gt;
&lt;li&gt; 如果在白名单后还要补充需要缓存的资源，可以使用 CACHE：标识符。 &lt;/li&gt;
&lt;li&gt; 如果要声明某 URI 不能访问时的替补 URI，可以使用 FALLBACK：标识符。其后的每一行包含两个 URI，当第一个 URI 不可访问时，浏览器将尝试使用第二个 URI。 &lt;/li&gt;
&lt;li&gt; 注释要另起一行，以 # 号开头。 &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; 文件示例&lt;/p&gt;
&lt;div class=&quot;codecolorer-container css default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;css codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;&amp;nbsp;CACHE MANIFEST&lt;br /&gt;
&amp;nbsp;demo&lt;span style=&quot;color: #6666ff;&quot;&gt;.html&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;demo&lt;span style=&quot;color: #6666ff;&quot;&gt;.css&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;demo.js&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;NETWORK&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;demo.php&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;CACHE&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;demo2.css&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;FALLBACK&lt;span style=&quot;color: #00AA00;&quot;&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;/files/ /default.html&lt;/div&gt;&lt;/div&gt;
&lt;h3&gt;在线状态检测&lt;/h3&gt;
&lt;p&gt;    上面提到过，目前html5提供了两种检测是否在线的方式&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;检测 navigator.onLine &lt;/dt&gt;
&lt;dt&gt;侦听document的online和offline事件&lt;/dt&gt;
&lt;/dl&gt;
&lt;h3&gt;本地数据存储&lt;/h3&gt;
&lt;p&gt;通常我们用cookie来存储数据，但是cookie存储的数据量太小.而且每次发起http请求都要带上，增加了数据的传输量.html5新引入了两种key/value存储方式，提供比较大规模，性能更高安全性更好的存储方式。 localStorage 和 sessionStorage&lt;br /&gt;
sessionStorage只在本次浏览器会话中保存，浏览器关闭之后存储就被丢弃。localStoage则可以比较长期的保存。但是使用方式都一样，非常简单.&lt;br /&gt;
直接&lt;/p&gt;
&lt;div class=&quot;codecolorer-container javascript default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;javascript codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;localStorage.&lt;span style=&quot;color: #660066;&quot;&gt;key1&lt;/span&gt; &lt;span style=&quot;color: #339933;&quot;&gt;=&lt;/span&gt; val1&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;br /&gt;
console.&lt;span style=&quot;color: #660066;&quot;&gt;log&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;&amp;#40;&lt;/span&gt; localStorage.&lt;span style=&quot;color: #660066;&quot;&gt;key1&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #339933;&quot;&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;另一种方式是关系数据库存储，不过虽然chrome提供了websql特性。但是貌似html5工作组停止了这个标准的制定工作，转而支持另一种indexedDb的标准。但是indexedDB目前还没有浏览器实现。我的理解，前者基于Sqlite的Sql来操作数据，后者可能更像是ORM的方式,数据操作更加优雅更加对象化。所以可能暂时这个功能得不到大范围使用。&lt;/p&gt;
&lt;h3&gt;问题&lt;/h3&gt;
&lt;p&gt;利用离线资源缓存，我们就可以能够访问读到应用了。然后利用状态检测和数据存储功能，我们就可以在离线的时候，将用户的操作保存起来，等到在线的时候，再将它们发布到服务器上。做了一些demo后发现，已经能实现一些简单的应用了, 还有一些问题需要解决，包括。&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt; manifest文件不支持通配符，因此我们的一些通过动态生成的文件，比如合并压缩的js和css文件，不太好缓存。以及很多根据ID通过ajax生成的数据也不容易缓存。&lt;/li&gt;
&lt;li&gt;一些离线状态下的操作，比如发表的评论和执行的转发操作。即时能够通过在线的时候同步，但是也可能面对失去了时效性之类的问题。而且下次再次离线上来的时候，还没能够同步到服务器的这些离线操作内容不容易呈现出来。&lt;/li&gt;
&lt;li&gt;如何在线上的内容更新的时候，通知客户端更新缓存。动态生成manifest文件，可能导致所有的内容都更新。&lt;/li&gt;
&lt;li&gt;httpCache和offlineCache的内容无法共享，导致的客户端存储空间浪费。&lt;/li&gt;
&lt;/ol&gt;
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;
&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;
&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;&gt;&lt;/a&gt;
&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;
&lt;div style=&quot;padding:5px 10px&quot;&gt;
&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;
&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。&lt;br /&gt;
PHP、JS职业攻城师。&lt;br /&gt;
SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;
&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=%E6%9E%84%E5%BB%BA%E6%88%91%E4%BB%AC%E7%9A%84%E7%A6%BB%E7%BA%BFWeb%E5%BA%94%E7%94%A8&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Foffline-web-application%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2010%2F09%2Fflipboard-implement-research%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Foffline-web-application%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;flipboard简单分析&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%2Fweiye.info%2Fblog%2F2010%2F12%2Fredis-for-store-rank%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Foffline-web-application%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;用Redis来做排行榜存储&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%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Foffline-web-application%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;这一年的工作&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%2Fweiye.info%2Fblog%2F2010%2F08%2Fhello-world%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Foffline-web-application%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Hello world!&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/580255151/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/01/offline-web-application/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://weiye.info/blog/2011/01/offline-web-application/feed/</wfw:commentRss><slash:comments>1</slash:comments><description>公司希望为我们的Web站点，开发一个html5版本，拓展到Pad端，给使用高级浏览器的用户一个更加完善的用户体验。其中一个重要的功能就是支持离线应用。 利用html5构建一个离线应用，主要依赖于三个新的特性 1. 离线资源缓存： 可以在一个manifest文件中指明离线应用工作所需的资源文件。缓存的文件可以在manifest文件本身发生变化的时候更新，或者检测window.applicationCache.status，然后调用window.applicationCache.update()更新缓存。 2. 在线状态检测： html5支持通过navigator.onLine获取当前的在线状态。html5还提供在线和离线事件机制.针对在线状态，我们可以做出不同的处理 3. 本地数据存储： html5提供了LocalStorage和WebDatabase(WebSQL/indexedDB)两种存储机制。前者提供key/value存储方式，后者提供关系数据库存储功能。 离线资源缓存 要使用离线缓存功能，需要在编写manifest文件，并指定使用的manifest. &amp;#160; &amp;#160; &amp;#60;doctype html5&amp;#62; &amp;#160; &amp;#160; &amp;#60;html manifest=&amp;#34;demo.manifest&amp;#34;&amp;#62; &amp;#160; &amp;#160; ... &amp;#160; &amp;#160; &amp;#60;/html&amp;#62; manifest文件格式. 首行必须是 CACHE MANIFEST。其后，每一行列出一个需要缓存的资源文件名。 可根据需要列出在线访问的白名单。白名单中的所有资源不会被缓存，在使用时将直接在线访问。声明白名单使用 NETWORK：标识符。 如果在白名单后还要补充需要缓存的资源，可以使用 CACHE：标识符。 如果要声明某 URI 不能访问时的替补 URI，可以使用 FALLBACK：标识符。其后的每一行包含两个 URI，当第一个 URI 不可访问时，浏览器将尝试使用第二个 URI。 注释要另起一行，以 # 号开头。 文件示例 &amp;#160;CACHE MANIFEST &amp;#160;demo.html &amp;#160;demo.css &amp;#160;demo.js &amp;#160;NETWORK: &amp;#160;demo.php [...]
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;/&gt;&lt;/a&gt;&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;&lt;div style=&quot;padding:5px 10px&quot;&gt;&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。
PHP、JS职业攻城师。
SNS、SCM、IOS、敏捷开发、推荐算法...&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=%E6%9E%84%E5%BB%BA%E6%88%91%E4%BB%AC%E7%9A%84%E7%A6%BB%E7%BA%BFWeb%E5%BA%94%E7%94%A8&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Foffline-web-application%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2010%2F09%2Fflipboard-implement-research%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Foffline-web-application%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;flipboard简单分析&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%2Fweiye.info%2Fblog%2F2010%2F12%2Fredis-for-store-rank%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Foffline-web-application%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;用Redis来做排行榜存储&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%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Foffline-web-application%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;这一年的工作&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%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Foffline-web-application%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;yield的简单理解&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/580255151/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/01/offline-web-application/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>离线应用</category><category>html5</category><category>产品</category><category>web</category><category>webapp</category><category>本地存储</category><category>编程</category><pubDate>Sun, 16 Jan 2011 11:10:52 +0800</pubDate><author>reedboat</author><comments>http://weiye.info/blog/2011/01/offline-web-application/#comments</comments><guid isPermaLink="false">http://weiye.info/blog/?p=108</guid><dc:creator>reedboat</dc:creator><fs:srclink>http://weiye.info/blog/2011/01/offline-web-application/</fs:srclink><fs:srcfeed>http://weiye.info/blog/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/reedboat/~8349280/580255151/6452771</fs:itemid></item><item><title>SCRUM方式项目开发</title><link>http://weiye.info/blog/2011/01/scrum%e4%bd%bf%e7%94%a8/</link><content:encoded>&lt;p&gt;看到同事写的一片博客，&lt;a href=&quot;http://yinwm.com/2011/01/cards-in-a-simple-scrum-project/&quot;&gt;项目开发中的小纸条&lt;/a&gt;，想想在他的带动下，这一年也试验了很多敏捷开发的方式。包括一开始使用的燃尽图，封闭开发期间推行的单元测试，现在使用的任务小纸条。应该说效果还是非常明显的，虽然不是在所有的项目中都采用了，但是在我们团队多人配合的周期在三周以上的大点的项目中，基本都是采用了。&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;aligncenter size-full wp-image-104&quot; src=&quot;http://weiye.info/blog/wp-content/uploads/2011/01/scrum_and_xp1.png&quot; alt=&quot;&quot; width=&quot;426&quot; height=&quot;279&quot; /&gt;&lt;/p&gt;
&lt;p&gt;使用燃尽图的时候，产品的理想开发周期应该在三周左右。我们一开始将任务拆分出来，粒度在半天左右的。列出开发计划，每一天完成多少个功能点。需求不明确的，要尽快跟产品人员沟通确认。在白纸上或者白板上，以功能点个数为纵轴，开发工作日为横轴的坐标上，标出每天的剩余的未完成功能点数，连成曲线。然后每天标出实际的剩余功能点数，汇出另外一条曲线。如果发现实际曲线高于计划曲线，说明项目进度慢于预期，那么项目将可能面临延期的风险。如果实际曲线低于计划曲线，并且差距越来越大，说明项目可能能够提前完成。理想的情况应该是两条曲线基本吻合，否则要么是我们的估计出现了偏差，要么是项目中出现了意外情况。根据曲线的偏离情况，可能需要及时的做出调整，保证项目的正常完成。项目中团队每天下班前需要碰一下，报告完成的功能点数。&lt;br /&gt;
根据项目的情况，我们可以在几个关键的功能点上标明项目的里程碑，重点关注几个里程碑的开发进度。相对完整的功能块及时提交给测试人员。使得他们能够提前介入测试，缩短项目周期。&lt;br /&gt;
任务条的部分我们是上一个项目开始使用的，详细情况参见同事的文章。&lt;/p&gt;
&lt;p&gt;燃尽图和小纸条都属与scrum开发方式的组成部分。它要求我们一开始就将任务能够拆分的足够细致。开发过程中发现曲线偏离过大的，及时的做出风险提示，并尽快找到原因，作出修正。每天团队有短暂的会议来相互沟通，跟踪进度。测试能够尽快进入。实现产品需求的快速迭代。&lt;/p&gt;
&lt;p&gt;这些技术应该說还是不难使用的，最关键的地方还是一开始的功能拆分，需要完全理解产品的需求，不明确的尽快沟通。任务需要拆分的足够细致，并分配到具体的人，才能做好开发的时间评估。这个工作要一整天甚至更多的时间。之后需要每天通过短暂的会议沟通，坚持绘制曲线和移动小纸条。需要注意的是任务的完成需要以能够提交给QA测试为标准，而不是差不多完成了。說差不多完成了的时候，往往还需要一半的时间来做到真正的完成。&lt;/p&gt;
&lt;p&gt;至于单元测试的东西，改天我再写一写当初我们的经历。&lt;br /&gt;
最后感兴趣的朋友我推荐一本书&lt;br /&gt;
硝烟中的Scrum和xp 网上可以免费下载。&lt;/p&gt;
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;
&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;
&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;&gt;&lt;/a&gt;
&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;
&lt;div style=&quot;padding:5px 10px&quot;&gt;
&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;
&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。&lt;br /&gt;
PHP、JS职业攻城师。&lt;br /&gt;
SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;
&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=SCRUM%E6%96%B9%E5%BC%8F%E9%A1%B9%E7%9B%AE%E5%BC%80%E5%8F%91&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fscrum%25e4%25bd%25bf%25e7%2594%25a8%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2010%2F08%2Fproject-tools-selection%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fscrum%25E4%25BD%25BF%25E7%2594%25A8%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;每讯项目管理工具选型&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%2Fweiye.info%2Fblog%2F2010%2F09%2Fsmall-electronic-paymen-style%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fscrum%25E4%25BD%25BF%25E7%2594%25A8%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;设想的小额电子支付方式&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%2Fweiye.info%2Fblog%2F2011%2F11%2Fyuemee%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fscrum%25E4%25BD%25BF%25E7%2594%25A8%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;这一年的工作&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%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fscrum%25E4%25BD%25BF%25E7%2594%25A8%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;IOS下的Safari的一些特性&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/580255152/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/01/scrum%e4%bd%bf%e7%94%a8/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://weiye.info/blog/2011/01/scrum%e4%bd%bf%e7%94%a8/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>看到同事写的一片博客，项目开发中的小纸条，想想在他的带动下，这一年也试验了很多敏捷开发的方式。包括一开始使用的燃尽图，封闭开发期间推行的单元测试，现在使用的任务小纸条。应该说效果还是非常明显的，虽然不是在所有的项目中都采用了，但是在我们团队多人配合的周期在三周以上的大点的项目中，基本都是采用了。 使用燃尽图的时候，产品的理想开发周期应该在三周左右。我们一开始将任务拆分出来，粒度在半天左右的。列出开发计划，每一天完成多少个功能点。需求不明确的，要尽快跟产品人员沟通确认。在白纸上或者白板上，以功能点个数为纵轴，开发工作日为横轴的坐标上，标出每天的剩余的未完成功能点数，连成曲线。然后每天标出实际的剩余功能点数，汇出另外一条曲线。如果发现实际曲线高于计划曲线，说明项目进度慢于预期，那么项目将可能面临延期的风险。如果实际曲线低于计划曲线，并且差距越来越大，说明项目可能能够提前完成。理想的情况应该是两条曲线基本吻合，否则要么是我们的估计出现了偏差，要么是项目中出现了意外情况。根据曲线的偏离情况，可能需要及时的做出调整，保证项目的正常完成。项目中团队每天下班前需要碰一下，报告完成的功能点数。 根据项目的情况，我们可以在几个关键的功能点上标明项目的里程碑，重点关注几个里程碑的开发进度。相对完整的功能块及时提交给测试人员。使得他们能够提前介入测试，缩短项目周期。 任务条的部分我们是上一个项目开始使用的，详细情况参见同事的文章。 燃尽图和小纸条都属与scrum开发方式的组成部分。它要求我们一开始就将任务能够拆分的足够细致。开发过程中发现曲线偏离过大的，及时的做出风险提示，并尽快找到原因，作出修正。每天团队有短暂的会议来相互沟通，跟踪进度。测试能够尽快进入。实现产品需求的快速迭代。 这些技术应该說还是不难使用的，最关键的地方还是一开始的功能拆分，需要完全理解产品的需求，不明确的尽快沟通。任务需要拆分的足够细致，并分配到具体的人，才能做好开发的时间评估。这个工作要一整天甚至更多的时间。之后需要每天通过短暂的会议沟通，坚持绘制曲线和移动小纸条。需要注意的是任务的完成需要以能够提交给QA测试为标准，而不是差不多完成了。說差不多完成了的时候，往往还需要一半的时间来做到真正的完成。 至于单元测试的东西，改天我再写一写当初我们的经历。 最后感兴趣的朋友我推荐一本书 硝烟中的Scrum和xp 网上可以免费下载。 关于作者 reedboat, 每讯网, 研发经理 执着的技术人，完美的追求者。 PHP、JS职业攻城师。 SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230; Facebook 豆瓣 新浪微博 Twitter 向文章付费
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;/&gt;&lt;/a&gt;&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;&lt;div style=&quot;padding:5px 10px&quot;&gt;&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。
PHP、JS职业攻城师。
SNS、SCM、IOS、敏捷开发、推荐算法...&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=SCRUM%E6%96%B9%E5%BC%8F%E9%A1%B9%E7%9B%AE%E5%BC%80%E5%8F%91&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fscrum%25e4%25bd%25bf%25e7%2594%25a8%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2010%2F09%2Fsmall-electronic-paymen-style%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fscrum%25E4%25BD%25BF%25E7%2594%25A8%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;设想的小额电子支付方式&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%2Fweiye.info%2Fblog%2F2010%2F08%2Fproject-tools-selection%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fscrum%25E4%25BD%25BF%25E7%2594%25A8%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;每讯项目管理工具选型&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%2Fweiye.info%2Fblog%2F2011%2F11%2Fyuemee%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fscrum%25E4%25BD%25BF%25E7%2594%25A8%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;这一年的工作&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%2Fweiye.info%2Fblog%2F2010%2F09%2Finfo-extract-tech%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fscrum%25E4%25BD%25BF%25E7%2594%25A8%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;信息提取技术&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/580255152/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/01/scrum%e4%bd%bf%e7%94%a8/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>敏捷开发</category><category>产品</category><category>任务条</category><category>燃尽图</category><category>xp</category><category>scrum</category><pubDate>Sat, 15 Jan 2011 00:40:37 +0800</pubDate><author>reedboat</author><comments>http://weiye.info/blog/2011/01/scrum%e4%bd%bf%e7%94%a8/#comments</comments><guid isPermaLink="false">http://weiye.info/blog/?p=100</guid><dc:creator>reedboat</dc:creator><fs:srclink>http://weiye.info/blog/2011/01/scrum%e4%bd%bf%e7%94%a8/</fs:srclink><fs:srcfeed>http://weiye.info/blog/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/reedboat/~8349280/580255152/6452771</fs:itemid></item><item><title>别做正常的傻瓜</title><link>http://weiye.info/blog/2011/01/book-not-abnormal-foolish/</link><content:encoded>&lt;p&gt;最近跟同事们吃饭的时候，经常问他们一些有意思的问题,当然得到的答案有时候也很有意思。&lt;br /&gt;
这里列一些问题。&lt;/p&gt;
&lt;p&gt;1.假如你患有一种病，除了在5年之内有1/1000的可能突然死亡之外，没有其他症状。&lt;br /&gt;
如果有一家公司开发出了一种能够治愈你并且没有其他副作用的药，你愿意花钱买么，最多愿意出多少钱？&lt;br /&gt;
又比如这家公司开发出了一种药物，这种药物有1/1000的可能导致5年内突然死亡，并无其他毒副作用。现在他们&lt;br /&gt;
要花钱找人试验这种新药，公司最少给你多少钱你才愿意尝试么？&lt;/p&gt;
&lt;p&gt;2. 阿Q之前听到了内幕消息说，一只股票行情看好。于是阿Q10块钱买了这支股票10000股.今天一看，现在跌到了5块钱。假如股票交易不用支付任何成本。阿Q很生气，打开电脑准备抛掉，鼠标悬在售出的按钮上的时候，阿Q很犹豫，因为内幕消息大多比较准确。是你的话你选择抛售还是持有？&lt;br /&gt;
正在犹豫的时候,一个电话打过来了，阿Q去接了个电话。他们家里的猫不小心踩到了鼠标上。按下了抛出按钮。阿Q发现之后，你觉得他是应该在买回来还是不买回来？&lt;/p&gt;
&lt;p&gt;3.假如你期待一场音乐会很久了，虽然门票比较贵，1000块钱。但是你还是狠心买了一张门票，晚上正准备出门的时候,发现门票丢了。你会去再买一张么?&lt;br /&gt;
假如你白天并没有买这张门票，晚上要出门的时候，发现丢掉了一张1000块钱的电话卡，你还会去买音乐会的门票么？&lt;/p&gt;
&lt;p&gt;4.假如你现在在一家商场，想买一辆摩托车，价格5000块钱。正打算买的时候，你的朋友告诉你，一公里外的另一家商场,同样的摩托车只卖4950元。你会到另一家商场去买么。假如你买的不是摩托车。而是自行车，价格300块钱，同样的你朋友告诉你，一公里外的另一家商场，同样的自行车只卖250元，你会到另一家商场买么？&lt;/p&gt;
&lt;p&gt;5. 假如你要从巴黎飞往上海，你很想要在飞机上睡一觉，但是你平常都要吃一种药物才睡的着。你在巴黎找到这种药后发现,巴黎的这种药需要200元一片，而在上海要卖500元. 你会买一片么？&lt;br /&gt;
同样的情况，如果在上海这种药只卖2块钱，巴黎卖200块钱，你还会买么？&lt;/p&gt;
&lt;p&gt;6. 假如你是一家公司的总裁，你们正在做一个项目，已经忙碌了9个月投入了,500万元，再有一个月投入50万元就完成了。这个时候一份比较准确的调查报告显示，你们的产品投放到市场上面，不考虑已有投入的情况下，有10%的可能盈利2500万元，有90%的可能亏损500万元。那么你会选择坚持这个项目么？&lt;/p&gt;
&lt;p&gt;这些问题都来自一本书《别做正常的傻瓜》,作者奚恺元.  书中还有很多其他的有趣问题。虽然有些问题仔细想想，也其实存在一些漏洞。向大家强烈推荐这本书。书中通过这些生活化的例子展示, 很多人在生活中的所作出的选择和决定，虽然符合在大多数人的正常思维，但其实不是理性的,他们是“正常的傻瓜”。书里面具体分析为何人们会作出不理性的选择，原因包括心理账户，交易偏见，沉没成本误区，过于自信，和适应性偏见,损失规避,忽视未得收益等方面。 同时也在教我们如何才能做出理智的选择,脱离正常的傻瓜行列。&lt;/p&gt;
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;
&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;
&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;&gt;&lt;/a&gt;
&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;
&lt;div style=&quot;padding:5px 10px&quot;&gt;
&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;
&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。&lt;br /&gt;
PHP、JS职业攻城师。&lt;br /&gt;
SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;
&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=%E5%88%AB%E5%81%9A%E6%AD%A3%E5%B8%B8%E7%9A%84%E5%82%BB%E7%93%9C&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fbook-not-abnormal-foolish%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2010%2F10%2Fmusic-learning%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fbook-not-abnormal-foolish%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;学点音乐&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%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fbook-not-abnormal-foolish%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;这一年的工作&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%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fbook-not-abnormal-foolish%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;yield的简单理解&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%2Fweiye.info%2Fblog%2F2010%2F08%2Fhello-world%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fbook-not-abnormal-foolish%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Hello world!&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/580255153/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/01/book-not-abnormal-foolish/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://weiye.info/blog/2011/01/book-not-abnormal-foolish/feed/</wfw:commentRss><slash:comments>2</slash:comments><description>最近跟同事们吃饭的时候，经常问他们一些有意思的问题,当然得到的答案有时候也很有意思。 这里列一些问题。 1.假如你患有一种病，除了在5年之内有1/1000的可能突然死亡之外，没有其他症状。 如果有一家公司开发出了一种能够治愈你并且没有其他副作用的药，你愿意花钱买么，最多愿意出多少钱？ 又比如这家公司开发出了一种药物，这种药物有1/1000的可能导致5年内突然死亡，并无其他毒副作用。现在他们 要花钱找人试验这种新药，公司最少给你多少钱你才愿意尝试么？ 2. 阿Q之前听到了内幕消息说，一只股票行情看好。于是阿Q10块钱买了这支股票10000股.今天一看，现在跌到了5块钱。假如股票交易不用支付任何成本。阿Q很生气，打开电脑准备抛掉，鼠标悬在售出的按钮上的时候，阿Q很犹豫，因为内幕消息大多比较准确。是你的话你选择抛售还是持有？ 正在犹豫的时候,一个电话打过来了，阿Q去接了个电话。他们家里的猫不小心踩到了鼠标上。按下了抛出按钮。阿Q发现之后，你觉得他是应该在买回来还是不买回来？ 3.假如你期待一场音乐会很久了，虽然门票比较贵，1000块钱。但是你还是狠心买了一张门票，晚上正准备出门的时候,发现门票丢了。你会去再买一张么? 假如你白天并没有买这张门票，晚上要出门的时候，发现丢掉了一张1000块钱的电话卡，你还会去买音乐会的门票么？ 4.假如你现在在一家商场，想买一辆摩托车，价格5000块钱。正打算买的时候，你的朋友告诉你，一公里外的另一家商场,同样的摩托车只卖4950元。你会到另一家商场去买么。假如你买的不是摩托车。而是自行车，价格300块钱，同样的你朋友告诉你，一公里外的另一家商场，同样的自行车只卖250元，你会到另一家商场买么？ 5. 假如你要从巴黎飞往上海，你很想要在飞机上睡一觉，但是你平常都要吃一种药物才睡的着。你在巴黎找到这种药后发现,巴黎的这种药需要200元一片，而在上海要卖500元. 你会买一片么？ 同样的情况，如果在上海这种药只卖2块钱，巴黎卖200块钱，你还会买么？ 6. 假如你是一家公司的总裁，你们正在做一个项目，已经忙碌了9个月投入了,500万元，再有一个月投入50万元就完成了。这个时候一份比较准确的调查报告显示，你们的产品投放到市场上面，不考虑已有投入的情况下，有10%的可能盈利2500万元，有90%的可能亏损500万元。那么你会选择坚持这个项目么？ 这些问题都来自一本书《别做正常的傻瓜》,作者奚恺元. 书中还有很多其他的有趣问题。虽然有些问题仔细想想，也其实存在一些漏洞。向大家强烈推荐这本书。书中通过这些生活化的例子展示, 很多人在生活中的所作出的选择和决定，虽然符合在大多数人的正常思维，但其实不是理性的,他们是“正常的傻瓜”。书里面具体分析为何人们会作出不理性的选择，原因包括心理账户，交易偏见，沉没成本误区，过于自信，和适应性偏见,损失规避,忽视未得收益等方面。 同时也在教我们如何才能做出理智的选择,脱离正常的傻瓜行列。 关于作者 reedboat, 每讯网, 研发经理 执着的技术人，完美的追求者。 PHP、JS职业攻城师。 SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230; Facebook 豆瓣 新浪微博 Twitter 向文章付费
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;/&gt;&lt;/a&gt;&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;&lt;div style=&quot;padding:5px 10px&quot;&gt;&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。
PHP、JS职业攻城师。
SNS、SCM、IOS、敏捷开发、推荐算法...&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=%E5%88%AB%E5%81%9A%E6%AD%A3%E5%B8%B8%E7%9A%84%E5%82%BB%E7%93%9C&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fbook-not-abnormal-foolish%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&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%2Fweiye.info%2Fblog%2F2010%2F10%2Fmusic-learning%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fbook-not-abnormal-foolish%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;学点音乐&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%2Fweiye.info%2Fblog%2F2011%2F11%2Fyuemee%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fbook-not-abnormal-foolish%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;这一年的工作&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%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fbook-not-abnormal-foolish%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;yield的简单理解&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%2Fweiye.info%2Fblog%2F2011%2F06%2Fobjective_c_xue_xi_bi_ji_3_-_shi_xian_te_dian%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fbook-not-abnormal-foolish%2F&quot;&gt;
                        &lt;font size=&quot;-1&quot; color=&quot;#333333&quot; style=&quot;line-height: 1.65em; font-size: 12px !important;&quot;&gt;Objective C 学习笔记(3)　–　实现特点&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/580255153/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/01/book-not-abnormal-foolish/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>选择</category><category>行为决策学</category><category>交易</category><category>读书</category><pubDate>Fri, 14 Jan 2011 23:30:09 +0800</pubDate><author>reedboat</author><comments>http://weiye.info/blog/2011/01/book-not-abnormal-foolish/#comments</comments><guid isPermaLink="false">http://weiye.info/blog/?p=99</guid><dc:creator>reedboat</dc:creator><fs:srclink>http://weiye.info/blog/2011/01/book-not-abnormal-foolish/</fs:srclink><fs:srcfeed>http://weiye.info/blog/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/reedboat/~8349280/580255153/6452771</fs:itemid></item><item><title>yield的简单理解</title><link>http://weiye.info/blog/2011/01/python-yield/</link><content:encoded>&lt;p&gt;python中的yield关键字，之前没有仔细看。今天看了一下。我的理解是这样的, yield将一个函数打断成了多段,形成了一个迭代器(简单的理解成一个数组，数组中的每个元素是一段代码)。每次调用该迭代器的next()或者send()方法的时候，执行这个函数的下一段，然后保存函数执行中的各个变量的值和当前的控制流程，等待下次执行next()或者send()的时候恢复。&lt;/p&gt;
&lt;p&gt;例如 下面定义的add函数&lt;/p&gt;
&lt;div class=&quot;codecolorer-container python default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;python codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; add&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;
&amp;nbsp; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt; a&lt;br /&gt;
&amp;nbsp; a=a+&lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;yield&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt; a&lt;br /&gt;
&lt;br /&gt;
c=add&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
c.&lt;span style=&quot;color: black;&quot;&gt;next&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;调用add函数的时候，并不执行add函数中的代码。而是返回一个迭代器 . （ c=add(10) ）c就是一个迭代器。调用c.next()方法的时候，才开始执行add函数的内容。第一次调用的时候执行到yield这一行中止了，输出a的值10。下一次调用c.next()才输出11。&lt;/p&gt;
&lt;p&gt;yield 后面还可以跟一个参数，当调用next()方法的时候，就会返回这个值，外界也可以得到。如果用send(msg)方法，那么yield就直接返回msg值。&lt;/p&gt;
&lt;div class=&quot;codecolorer-container python default&quot; style=&quot;overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;&quot;&gt;&lt;div class=&quot;python codecolorer&quot; style=&quot;padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap&quot;&gt;&lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;def&lt;/span&gt; add&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;a&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;
&amp;nbsp; b = &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;yield&lt;/span&gt; &lt;span style=&quot;color: #ff4500;&quot;&gt;1&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; a = a+b&lt;br /&gt;
&amp;nbsp; &lt;span style=&quot;color: #ff7700;font-weight:bold;&quot;&gt;print&lt;/span&gt; a&lt;br /&gt;
&lt;br /&gt;
c = add&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #ff4500;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
c.&lt;span style=&quot;color: black;&quot;&gt;next&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;上面的这个例子。&lt;br /&gt;
第二次执行的时候，如果用c.next(), 那么b=1,c.next()的返回值也是1，输出内容是11。&lt;br /&gt;
如果使用c.send(5), 那么b=5,输出内容将是15。&lt;/p&gt;
&lt;p&gt;yield这种使用方式，改变的通常的编写程序的思路，在循环递归中的用法就比较复杂了，还需要慢慢体会。&lt;/p&gt;
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;
&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;
&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;&gt;&lt;/a&gt;
&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;
&lt;div style=&quot;padding:5px 10px&quot;&gt;
&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;
&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。&lt;br /&gt;
PHP、JS职业攻城师。&lt;br /&gt;
SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;
&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;
&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=yield%E7%9A%84%E7%AE%80%E5%8D%95%E7%90%86%E8%A7%A3&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&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;3&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;102&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !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%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/11/23/11355199.jpg&quot; width=&quot;96px&quot; height=&quot;96px&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: 102px !important; font: 12px/15px arial !important; height: 60px !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;102&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;IOS下的Safari的一些特性&quot; style=&quot;text-decoration: none !important; cursor: pointer !important;&quot; href=&quot;http://app.wumii.com/ext/redirect.htm?url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F02%2Fios_xia_de_safari_te_xing%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;96px&quot; height=&quot;96px&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: 102px !important; font: 12px/15px arial !important; height: 60px !important; margin: 3px 0 0 0 !important; padding: 0 !important; overflow: hidden !important;&quot;&gt;IOS下的Safari的一些特性&lt;/font&gt;
                    &lt;/a&gt;
                &lt;/td&gt;
                &lt;td width=&quot;102&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%2Fweiye.info%2Fblog%2F2011%2F01%2Finternet-big-things-2011%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;96px&quot; height=&quot;96px&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: 102px !important; font: 12px/15px arial !important; height: 60px !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;3&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/580255154/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/01/python-yield/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</content:encoded><wfw:commentRss>http://weiye.info/blog/2011/01/python-yield/feed/</wfw:commentRss><slash:comments>0</slash:comments><description>python中的yield关键字，之前没有仔细看。今天看了一下。我的理解是这样的, yield将一个函数打断成了多段,形成了一个迭代器(简单的理解成一个数组，数组中的每个元素是一段代码)。每次调用该迭代器的next()或者send()方法的时候，执行这个函数的下一段，然后保存函数执行中的各个变量的值和当前的控制流程，等待下次执行next()或者send()的时候恢复。 例如 下面定义的add函数 def add&amp;#40;a&amp;#41;: &amp;#160; print a &amp;#160; a=a+1 &amp;#160; yield &amp;#160; print a c=add&amp;#40;10&amp;#41; c.next&amp;#40;&amp;#41; 调用add函数的时候，并不执行add函数中的代码。而是返回一个迭代器 . （ c=add(10) ）c就是一个迭代器。调用c.next()方法的时候，才开始执行add函数的内容。第一次调用的时候执行到yield这一行中止了，输出a的值10。下一次调用c.next()才输出11。 yield 后面还可以跟一个参数，当调用next()方法的时候，就会返回这个值，外界也可以得到。如果用send(msg)方法，那么yield就直接返回msg值。 def add&amp;#40;a&amp;#41;: &amp;#160; b = yield 1 &amp;#160; a = a+b &amp;#160; print a c = add&amp;#40;10&amp;#41; c.next&amp;#40;&amp;#41; 上面的这个例子。 第二次执行的时候，如果用c.next(), 那么b=1,c.next()的返回值也是1，输出内容是11。 如果使用c.send(5), 那么b=5,输出内容将是15。 yield这种使用方式，改变的通常的编写程序的思路，在循环递归中的用法就比较复杂了，还需要慢慢体会。 关于作者 reedboat, 每讯网, 研发经理 执着的技术人，完美的追求者。 PHP、JS职业攻城师。 SNS、SCM、IOS、敏捷开发、推荐算法&amp;#8230; [...]
&lt;div id=&quot;qu42&quot; style=&quot;border:1px solid #ccc;font-size:14px;margin:27px auto;&quot;&gt;&lt;div style=&quot;padding:7px 10px;border-bottom:1px dotted #ccc&quot;&gt;关于作者&lt;/div&gt;&lt;div style=&quot;height:129px;overflow:hidden&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;color:#000;text-decoration:none;float:right;&quot;&gt;&lt;img src=&quot;http://p4.42qu.us/219/894/23422.jpg&quot; style=&quot;padding:3px;width:219px;height:123px;margin:0;background:transparent;border:0;border-left:1px dotted #ccc&quot;/&gt;&lt;/a&gt;&lt;div style=&quot;text-align:left;line-height:23px;margin-right:226px&quot;&gt;&lt;div style=&quot;padding:5px 10px&quot;&gt;&lt;div style=&quot;overflow:hidden;margin:2px 0;float:left;font-size: 14px;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat&quot; style=&quot;text-decoration:none;&quot;&gt;reedboat&lt;/a&gt;, 每讯网, 研发经理&lt;/div&gt;&lt;div style=&quot;clear:left&quot;&gt;执着的技术人，完美的追求者。
PHP、JS职业攻城师。
SNS、SCM、IOS、敏捷开发、推荐算法...&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align:right;border-top:1px dotted #ccc;padding:10px;&quot;&gt;&lt;div style=&quot;float:left;&quot;&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1439&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Facebook&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1438&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;豆瓣&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1436&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;新浪微博&lt;/a&gt; &lt;a target=&quot;_blank&quot; href=&quot;http://reedboat.42qu.com/link/1437&quot; style=&quot;margin-right:7px;text-decoration:none;&quot;&gt;Twitter&lt;/a&gt; &lt;/div&gt;&lt;div&gt;&lt;a target=&quot;_blank&quot; href=&quot;http://42qu.com/reedboat/pay?title=yield%E7%9A%84%E7%AE%80%E5%8D%95%E7%90%86%E8%A7%A3&amp;#038;url=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&amp;#038;rel=blog&quot; style=&quot;text-decoration:none;margin-right:17px&quot;&gt;向文章付费&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&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;3&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;102&quot; valign=&quot;top&quot; style=&quot;padding: 5px !important; margin: 0 !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%2Fweiye.info%2Fblog%2F2011%2F11%2Fthisyear%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;&quot; src=&quot;http://static.wumii.com/site_images/2011/11/23/11355199.jpg&quot; width=&quot;96px&quot; height=&quot;96px&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: 102px !important; font: 12px/15px arial !important; height: 60px !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;102&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%2Fweiye.info%2Fblog%2F2011%2F01%2Finternet-big-things-2011%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;96px&quot; height=&quot;96px&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: 102px !important; font: 12px/15px arial !important; height: 60px !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;102&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%2Fweiye.info%2Fblog%2F2010%2F09%2Finfo-extract-tech%2F&amp;from=http%3A%2F%2Fweiye.info%2Fblog%2F2011%2F01%2Fpython-yield%2F&quot;&gt;
                        &lt;img style=&quot;margin: 0 !important; padding: 2px !important; border: 1px solid #DDDDDD !important; width: 96px !important; height: 96px !important;&quot; src=&quot;http://static.wumii.com/images/blogWidget/wordpress_default.gif&quot; width=&quot;96px&quot; height=&quot;96px&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: 102px !important; font: 12px/15px arial !important; height: 60px !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;3&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/580255154/reedboat/feedsky/s.gif?r=http://weiye.info/blog/2011/01/python-yield/&quot; border=&quot;0&quot; height=&quot;0&quot; width=&quot;0&quot; style=&quot;position:absolute&quot; /&gt;</description><category>interator</category><category>python</category><category>yield</category><category>编程</category><pubDate>Wed, 12 Jan 2011 21:30:18 +0800</pubDate><author>reedboat</author><comments>http://weiye.info/blog/2011/01/python-yield/#comments</comments><guid isPermaLink="false">http://weiye.info/blog/?p=96</guid><dc:creator>reedboat</dc:creator><fs:srclink>http://weiye.info/blog/2011/01/python-yield/</fs:srclink><fs:srcfeed>http://weiye.info/blog/?feed=rss2</fs:srcfeed><fs:itemid>feedsky/reedboat/~8349280/580255154/6452771</fs:itemid></item></channel></rss>
