<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://www.luochunhui.com/feeds/atom.xml" rel="self" title="大罗-PHP/Python博客" type="application/atom+xml" />
    <link href="http://www.luochunhui.com/"                        rel="alternate"    title="大罗-PHP/Python博客" type="text/html" />
    <link href="http://www.luochunhui.com/rss.php?version=2.0"     rel="alternate"    title="大罗-PHP/Python博客" type="application/rss+xml" />
    <title type="html">大罗-PHP/Python博客</title>
    <subtitle type="html">标准的八零年代青年，充分的自信，追求自由。在真实的上海，虚拟的网络中拼搏，为了自己人生的目标，追求着，永不松懈 </subtitle>
    
    <id>http://www.luochunhui.com/</id>
    <updated>2010-01-31T05:53:24Z</updated>
    <generator uri="http://www.s9y.org/" version="1.5.1">Serendipity 1.5.1 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/537" rel="alternate" title="博客回国" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2010-01-31T05:53:24Z</published>
        <updated>2010-01-31T05:53:24Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=537</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=537</wfw:commentRss>
    
    
        <id>http://www.luochunhui.com/index.php?/id/537</id>
        <title type="html">博客回国</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                  域名解析到国内有一段时间了，网太监们还没有找我的麻烦。所以，正式启用luochunhui.com，替换原来的ID及域名 rollenc.com 。原有域名将跳转到luochunhui.com.<br />
<br />
  同时还有其他改动：<br />
  邮箱： rollenc@G邮箱.com 改变为 <i>wo</i><font style="display:none">i</font><b>@</b><i>luochunhui.com</i><br />
  Twitter: @rollenc 改变为 @luo1<br />
<br />
后续迁移继续进行中，逐渐废弃rollenc这个ID。<br />
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/536" rel="alternate" title="我/职业发展/阿斯伯格症" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2010-01-14T23:52:37Z</published>
        <updated>2010-01-15T00:31:23Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=536</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=536</wfw:commentRss>
    
    
        <id>http://www.luochunhui.com/index.php?/id/536</id>
        <title type="html">我/职业发展/阿斯伯格症</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                从性格上，我比较符合<a href="http://www.luochunhui.com/id/535">阿斯伯格症</a>的特点，上文也提到了，是否治疗，由自己决定，根据自己的职业规划来决定。<br />
<br />
在国内职业环境中，往往重管理不重技术。这凸显出了阿症的性格劣势。所以，有人确实需要治疗，需要突破。<a href="http://www.luochunhui.com/id/535">上文</a>所列的牛人们中，大多的遭遇都十分凄惨，特别是梵高，伽利略以及爱迪生的童年。<br />
<br />
再回忆我在09年一年中的迷惘，其实就是自己是否需要对自己阿症的一种突破的迷惘。我是否需要突破自己的性格，去发展自己的社交（管理）技能，还是在技术岗位继续前进；是转型做为一个蹩脚的项目经理，还是继续作一个优秀的程序员。<br />
<br />
挣扎了一年，最终的选择还是走技术的路线。在技术领域中，才能让自己的思维得到最大的发挥。至于以后的管理内容，我的计划是使用技术魅力来管理。<br />
<br />
方向明确了，接下来几年的发展阶段及对应职位：<br />
<br />
发展阶段　　　　　　　　　　　　　职位　　　　　　　　　实现里程碑<br />
优秀程序员（当前）  　　　　　　工程师／高级工程师　　　 不为没有工作而发愁，公司会应为你的加入而高兴<br />
著名程序员（１～3/5年）　　　　高级工程师／架构师　　　领域中有由自己制造的，被广泛使用的产品和学习资料。<br />
成功的程序员（3/５年后）　　　　ＣＴＯ　　　　　　　　　有自己的公司<br />
不朽程序员（还没想过）　　　　　墓穴居住者　　　　　　　还没想过<br />
<br />
*发展阶段参考： http://www.letrails.cn/archives/eight-levels-of-programmer<br />
<br />
最后给自己一些希望，《亚当》这部电影结尾处的片段中，亚当找到了自己合适的职位，找到了欣赏自己的听众，也愿意去帮助前台MM帮忙抱抱邮递箱子，和路上的同事会说声hi，对贝丝写的童话，也有了遐想。<br />
嗯，足够了。这是一个美好的结局。<br />
<br />
<br />
<br />
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/535" rel="alternate" title="阿斯伯格症" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2010-01-14T23:42:56Z</published>
        <updated>2010-01-15T00:12:35Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=535</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=535</wfw:commentRss>
    
    
        <id>http://www.luochunhui.com/index.php?/id/535</id>
        <title type="html">阿斯伯格症</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                很书面的<strong>临床特征描述</strong>如下：<br />
<br />
　　（a）缺乏对他人情感的理解力；<br />
　　（b）不适当的、单方面的社会交往，缺少建立友谊的能力从而导致社会隔离；<br />
　　（c）呆板、单调的语言；<br />
　　（d）非语言交流贫乏；<br />
　　（e）在某些局限的方面，如天气、电视节目表、火车时刻表及地图等，表现出极强的接受能力，但只是机械地记忆，却并不能理解，给人以古怪的印象；<br />
　　（f）笨拙、不协调的动作及奇怪的姿势。<br />
<br />
<strong>通俗实例描述：</strong><br />
<br />
        这些孩子社交技巧极差，往往不能察言观色，对他人的情绪、思考无法设身处地适切的响应，缺乏与他人分享经验或信息的欲望或能力。和父母及成人相处时比较不会有问题，但与同侪相处则往往有许多挫折。他们往往觉得世界很复杂，人与人之间的相处很困难，常常孤孤单单一个人。尤其在没有结构的环境中，例如下课时间在操场上，他们会不知所措，在群体中总是显得特立独行。 <br />
<br />
        虽然语言发展在早期没什么问题(目前以此与自闭症分辨)，但他们在较抽象较复杂的用语上仍会有困难。双关语、比喻、假设性用语是他们常常搞不懂的。有些孩子会有过度说话的情形，往往滔滔不绝，不顾别人是否在听或是否有兴趣。 <br />
<br />
        局限的兴趣是艾斯伯格症候群的另一特点，往往自幼至成年变换多次主题，小时候是汽车、火车、计算机、恐龙，随着成年则愈加复杂，如日历、地图、时刻表，有些高智商的个案常被旁人形容为「小教授」：对于某一主题上穷碧落下黄泉地搜集资料，科幻、军事、历史、天文如数家珍，全然不顾一般人有兴趣的社会新闻、影剧八卦。 <br />
<br />
        艾斯伯格症候群的个案往往在日常生活中显现顽固、坚持、不太有弹性的习惯，对他们最轻松的可能是一成不变的作息：走同样的路、吃同样的东西、上同一个班、跟同一个老师，一旦有所变化，常常让他们备感压力，甚至惊惶逃避。可预见岁月成长带来的变化无疑会引起一次又一次情绪行为上的危机。<br />
<br />
<br />
<strong>治疗？</strong><br />
<br />
首先去要确定是否你需要治疗。在我看来，这只是一个症状，并非是病。顽固、坚持、不太有弹性的习惯，往往被用来作为成功着必须具备的性格。在专一的领域，阿症常表现出genius的才能。爱迪生，爱因斯坦，牛顿，梵高，伽利略这些达人，都是或者可能是这一症候群的人，哦，还有比尔·盖兹。好了，不贴金了。<br />
<br />
但从另一方面讲，对于社交，对于管理，阿症的性格却是一个很大的性格缺陷。<br />
<br />
是否治疗，取决于你以后的发展方向。你自己决定！<br />
<br />
<br />
<strong>电影</strong><br />
<a href="http://www.verycd.com/topics/2789716/">亚当</a> <br />
主角亚当（休·丹西饰）是一个长相帅气的小伙子，并且智商很高，理工科背景，具有着<strong>典型理科男的特征——闷骚、自我封闭、行为古怪等等</strong>，形象化一点说，如果他的智商是100分，那么其社交能力得出现负数。<br />
亚当就是一个典型的阿斯伯格症侯群患者，电影中也提到了。<br />
<br />
ref:<br />
<a href="http://www.achh.com/forum_view.asp?forum_id=2&amp;view_id=1787">http://www.achh.com/forum_view.asp?forum_id=2&view_id=1787</a><br />
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/534" rel="alternate" title="谷歌上海非法献花归来" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2010-01-14T20:35:30Z</published>
        <updated>2010-01-17T20:47:48Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=534</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=534</wfw:commentRss>
    
    
        <id>http://www.luochunhui.com/index.php?/id/534</id>
        <title type="html">谷歌上海非法献花归来</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                上午去的，10点。可惜我迟到了。没有和大部队一起随行上楼。<br />
<br />
在来福士找寻花店未遂，在书店门口看到一本大前研一的<strong><a href="http://www.douban.com/subject/4171040/">《再启动》</a></strong>海报，书名不错，正好切题，遂献上。<br />
<br />
献花结束之后，五人一起在来福士B1楼喝茶。<br />
<br />
感谢yaroot的照片： http://picasaweb.google.com/yaroot/Google#<br />
<br />
<br />
Twitter发来贺电：<br />
<br />
@lincsoon 今天上午参与谷歌上海非法献花的有 @himark @slfeng @luosheng @rollenc @majunspace @yaroot @lincsoon 七人 #GooleCN<br />
<br />
今早上海非法献花照片一枚： http://goo.gl/y9Tl #GoogleCN<br />
<br />
<br />
<strong>周五晚场，我将再次前往。</strong><br />
<br />
转发yqz的邮件：<br />
<br />
<blockquote>亲爱的推特网友你好!<br />
<br />
感谢您关注上海推优谷歌献花活动,<br />
不管您能不能来参加活动,<br />
都感谢您对谷歌中国的支持和关注.<br />
<br />
由于申请参加活动的朋友较多,<br />
所以安排了数场分散的活动,<br />
以免造成不必要的麻烦.<br />
请您自发选择合适的场次.<br />
<br />
谷歌上海地址:<br />
上海市黄浦区西藏中路268号来福士广场写字楼16楼(需要从写字楼入口进入,乘手动扶梯至二楼,再乘坐双号电梯至16楼)<br />
<br />
下面是献花活动安排:<br />
2010年1月14日 星期四 晚上6点至自发散场结束<br />
2010年1月15日 星期五 中午12点至下午2点结束<br />
2010年1月15日 星期五 晚上6点至自发散场结束<br />
2010年1月16日 星期六 晚上6点至自发散场结束<br />
2010年1月17日 星期日 晚上6点至自发散场结束<br />
注意事项:<br />
谷歌的工作时间是每周一至五晚上六点下班 所以前三场可能有工作人员接待 后两场则可能没有.<br />
以上只是建议的时间,您可以在任何合适的时间去谷歌传达自己的祝福.<br />
周五晚上和周六晚上两场我会在现场免费提供纸杯和蜡烛,还有网友留言簿;<br />
鲜花和祝福卡片请自备.<br />
<br />
再次感谢大家对谷歌的支持和关注,<br />
我们相信google一定会带着大家往最好的方向奋勇前行,没有什么可以阻挡我们对自由的向往!<br />
<br />
请大家把此邮件转发给身边关注谷歌的朋友们.<br />
如果您有任何问题请按以下联系方式联系我:<br />
苑小 ＃<br />
Gtalk: **********<br />
MP:+86 159 **** ****<br />
Twitter: @yqz<br />
MSN: ***@msn.com<br />
QQ: 15****58</blockquote> 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/533" rel="alternate" title="Django 1.2 alpha1 发布" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2010-01-07T02:39:09Z</published>
        <updated>2010-01-07T03:12:27Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=533</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=533</wfw:commentRss>
    
            <category scheme="http://www.luochunhui.com/index.php?/categories/38" label="技术" term="技术" />
    
        <id>http://www.luochunhui.com/index.php?/id/533</id>
        <title type="html">Django 1.2 alpha1 发布</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                不兼容的改动：<br />
<br />
1. 增加CSRF（防跨域提交表单） 这个改动比较大。相对1.1来说，所有的表单中都需要加上CSRF的HTML标签，不然表单数据将无法通过验证。<br />
2. IF标签将更加强大。 现在可以使用 {%if a==b and b<c%}等基本比较操作符了。and，or等，将不能作为变量名放在{%if%}中了<br />
3. 惰性对象。 提供一个惰性封装，只有在需要获得该对象的值时，才加载数据<br />
4. 在Model对象中__dict__改变，增加了_state属性<br />
5. 在字段类中，get_db_prep_*() 方法改变了，增加了几个参数<br />
6. 模板tags的状态BUG修正。在之前版本中，在使用了模板缓存的情况下，带有状态属性的tags可能导致异常，这一个bug已经修正<br />
7. 测试运行后，将返回状态码0表示正常，或1等其他错误码<br />
<br />
新功能：<br />
1. CSRF支持<br />
2. EMAIL后端支持。 现在可以将错误报告的EMAIL发送到文件，console甚至内存中。<br />
3. 消息框架 django增加了一个message框架，可以基于session或者cookie进行记录。以前只能给已登录用户存储message。（这里的message指的是flash message）<br />
4. 多数据库支持<br />
5. 智能的if标签<br />
6. 模板缓存<br />
7. 原生的key搜索。可使用 self.get(first_name=first_name, last_name=last_name) ，以前只能使用主键ID<br />
8. 更快的测试错误处理<br />
9. 本地化支持改进<br />
10. ModelAdmin中增加readonly_fields<br />
11. 可定制的语法高亮<br />
<br />
<br />
接下来，django团队将在3月2号发布rc版本，3月9号发布1.2的正式版本<br />
<br />
更多信息，请查阅：<a href="http://docs.djangoproject.com/en/dev/releases/1.2-alpha-1/">官方声明</a> 
            </div>
        </content>
        <dc:subject>django</dc:subject>
<dc:subject>python</dc:subject>

    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/532" rel="alternate" title="修复mako html编辑器语法的高亮问题" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2010-01-02T21:06:50Z</published>
        <updated>2010-01-02T21:48:28Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=532</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=532</wfw:commentRss>
    
            <category scheme="http://www.luochunhui.com/index.php?/categories/38" label="技术" term="技术" />
    
        <id>http://www.luochunhui.com/index.php?/id/532</id>
        <title type="html">修复mako html编辑器语法的高亮问题</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                mako中的%标记方式让不少编辑器抓狂，包括aptana,eclipse,textmate等。受asp的影响，&lt;%是作为服务器脚本语言的开始标记，相应的，%&gt;为结束标记。<br />

在mako中，示例代码如下：<br />
<pre name="code" class="html">
< %inherit file="/base.mako" />
< %def name="head_title()">
    rollenc拼博-PHP博客
</ %def>
<p>Here is a p</p>
</pre>
在这段代码中，由于没有 %&gt; 结束标记，编辑器将认为从一行后所有的代码均为服务器脚本，而非html代码，导致html高亮，格式等功能全部失效。<br />

解决办法：替换&lt;%脚本<br />
mako支持预处理。即在mako模板引擎处理之前，自己写一个脚本来预先替换或作其他操作。将&lt;%inherit file="/base.mako" /&gt; 修改为 &lt;makoinherit file="/base.mako" /&gt; 是个不错的注意。既不违反XHTML的规定，又避免了抓狂的 &lt;%<br />

1. 在建立TemplateLookup对象时，增加preprocessor参数，在交给mako处理之前，还原&lt;mako:为&lt;%<br />
<pre name="code" class="py">
def my_preprocessor(text): 
        text = re.sub(r'<(/?)mako:', r"<\1%", text)
        return text

lookup = TemplateLookup(
        #....
        preprocessor = my_preprocessor,
        )
</pre>
若在pylons中，则修改文件：config/environment.py<br />
<pre name="code" class="py">
# Create the Mako TemplateLookup, with the default auto-escaping
    def my_preprocessor(text): 
        text = re.sub(r'<(/?)mako:', r"<\1%", text)
        return text
    config['pylons.app_globals'].mako_lookup = TemplateLookup(
        directories=paths['templates'],
        error_handler=handle_mako_error,
        module_directory=os.path.join(app_conf['cache_dir'], 'templates'),
        input_encoding='utf-8', default_filters=['escape'],
        imports=['from webhelpers.html import escape'],
        preprocessor = my_preprocessor,
        )
</pre>
增加了2，3，4，11行。

2. 替换.mako模板代码中的&lt;% , &lt;/%。替换后，上面示例代码如下：<br />
<pre name="code" class="html">
<mako:inherit file="/base.mako" />
<mako:def name="head_title()">
    rollenc拼博-PHP博客
</mako:def>
<p>Here is a p</p>
</pre>

 
            </div>
        </content>
        <dc:subject>mako</dc:subject>
<dc:subject>pylons</dc:subject>
<dc:subject>python</dc:subject>

    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/530" rel="alternate" title="How to install Pylons in Ubuntu" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2010-01-01T05:28:40Z</published>
        <updated>2010-01-02T22:50:47Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=530</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=530</wfw:commentRss>
    
            <category scheme="http://www.luochunhui.com/index.php?/categories/38" label="技术" term="技术" />
    
        <id>http://www.luochunhui.com/index.php?/id/530</id>
        <title type="html">How to install Pylons in Ubuntu</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Env:<br />
  Python 2.5<br />
  Ubuntu<br />
<br />
1. Install paste<br />
<pre name="code" class="bash"><br />
sudo easy_install-2.5 paste<br />
</pre><br />
<br />
2. Install pylons<br />
<pre name="code" class="bash"><br />
sudo easy_install-2.5 Pylons<br />
</pre><br />
<br />
3. install SQLAlchemy if you'd like to use<br />
<pre name="code" class="bash"><br />
sudo easy_install-2.5 SQLAlchemy<br />
</pre><br />
<br />
4. create a pylons project:<br />
<pre name="code" class="bash"><br />
paster create --template=pylons test<br />
</pre><br />
That will ask you two questions:<br />
<br />
<blockquote>Enter template_engine (mako/genshi/jinja2/etc: Template language) ['mako']: mako<br />
Enter sqlalchemy (True/False: Include SQLAlchemy 0.5 configuration) [False]: True</blockquote><br />
<br />
5. create a deployment.ini<br />
<pre name="code" class="bash"><br />
cd test<br />
cp test/config/deployment.ini_tmpl test/config/deployment.ini<br />
vi deployment.ini<br />
</pre><br />
modify the email_to, db setting or others to fit in with you<br />
<br />
6. start the test server<br />
<pre name="code" class="bash"><br />
$paster serve --reload development.ini<br />
Starting subprocess with file monitor<br />
Starting server in PID 12212.<br />
serving on http://127.0.0.1:5000<br />
</pre><br />
<br />
You will see a pylons welcome page when you open http://127.0.0.1:5000 in your favorite browser. <br />
<br />
7. create a new controller<br />
<pre name="code" class="bash"><br />
paster controller hello<br />
</pre><br />
Visit http://127.0.0.1:5000/hello/index and you will see a text page: "Hello World"<br />
<br />
All job done. Have your fan.<br />
<br />
Notice: make sure you've added the version 2.5 into <strong>easy_install</strong> command when you have multiply python version in your system.<br />
 
            </div>
        </content>
        <dc:subject>framework</dc:subject>
<dc:subject>python</dc:subject>

    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/529" rel="alternate" title="web2py企业级web框架试用" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2010-01-01T04:38:09Z</published>
        <updated>2010-01-01T05:17:19Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=529</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=529</wfw:commentRss>
    
    
        <id>http://www.luochunhui.com/index.php?/id/529</id>
        <title type="html">web2py企业级web框架试用</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a href="http://www.web2py.com/" target="_blank">web2py<sup>TM</sup> Enterprise Web Framework 企业级web框架</a><br />
<br />
Free and open source full-stack enterprise framework for agile development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python . <br />
web2py是完全免费开源的企业级web开发框架, 具有快速开发，可扩展，安全，组建式数据库驱动等特点。语言：python。<br />
<br />
以上文字是web2py的首页给出的。也试用了一番，感觉并不佳。主要缺陷：<br />
<br />
1. 开发一个应用，文件夹太多。新的app的scaffold代码中将包含有十几个文件夹。过于复杂<br />
2. 多个应用中，难以共享数据。比如auth表，只能在一个app中进行。在其他app中难以调用<br />
3. 文档过少。看源码，数据有虚拟字段的功能，但在各个文档中，都没有提到<br />
4. 出错信息体验太糟糕。出错了直接显示错误结果就好了，非得给个链接，造成一次额外的点击。<br />
5. 代码方面import很糟糕，大量的import *，导致在eclipse的源代码分析中，出现大量的类缺失错误<br />
<br />
优点：<br />
1. 修改表结构后，系统会自动同步数据库<br />
2. 后台编辑器很棒，对代码的修改很方便。但我并不习惯直接在web页面中修改源代码，这个安全性隐患太大了，给不便于版本管理。也许处于beta接管的hg组件能便于管理，未测试。<br />
3. 数据库在线设计功能不错，但还不够完善，导入功能不能用，导出的代码需要作修改才能使用。（忽然发现这个是GAE的，和WEB2PY没什么关系）<br />
4. 从代码上看，考虑了GAE。<br />
5. shell功能不错，可以在web中使用shell。<br />
<br />
个人感觉web2py比较糟糕，无法实现其标榜的企业开发。<br />
整体上，web2py给我的感觉是过度设计，过度依赖于web。包括web编辑源码。web使用shell。这个对专业开发没有意义。<br />
在文档上的缺少，很致命。是我抛弃他的最主要原因。<br />
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/528" rel="alternate" title="豆瓣DB开源：beansdb" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2009-12-30T18:01:06Z</published>
        <updated>2009-12-30T18:06:21Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=528</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=528</wfw:commentRss>
    
            <category scheme="http://www.luochunhui.com/index.php?/categories/38" label="技术" term="技术" />
    
        <id>http://www.luochunhui.com/index.php?/id/528</id>
        <title type="html">豆瓣DB开源：beansdb</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <strong>介绍</strong><br />
BeansDB 是一个主要针对大数据量、高可用性的分布式KeyValue存储系统，采用HashTree和简化的版本号来快速同步保证最终一致性（弱），一个简化版的Dynamo。<br />
<br />
它采用类似memcached的去中心化结构，在客户端实现数据路由。目前只提供了Python版本的客户端，其它语言的客户端可以由memcached的客户端稍加改造得到。<br />
<br />
<strong>特性</strong><br />
<br />
高可用：通过多个可读写的用于备份实现高可用<br />
最终一致性：通过哈希树实现快速完整数据同步（短时间内数据可能不一致）<br />
容易扩展：可以在不中断服务的情况下进行容量扩展。<br />
高性能：异步IO和高性能的KeyValue数据TokyoCabinet<br />
可配置的可用性和一致性：通过N,W,R进行配置<br />
简单协议：Memcache兼容协议，大量可用客户端<br />
<br />
<br />
<strong>性能</strong><br />
<br />
在小数据集上，它跟memcached一样快：<br />
<br />
<strong>网址</strong><br />
主页：<a href="http://code.google.com/p/beansdb/">http://code.google.com/p/beansdb/</a><br />
SVN源码: <a href="http://beansdb.googlecode.com/svn/trunk/">http://beansdb.googlecode.com/svn/trunk/</a> 
            </div>
        </content>
        <dc:subject>Database opensource</dc:subject>

    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/527" rel="alternate" title="bpython, A fancy interface to the Python interpreter" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2009-12-29T06:38:29Z</published>
        <updated>2009-12-30T07:43:14Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=527</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=527</wfw:commentRss>
    
            <category scheme="http://www.luochunhui.com/index.php?/categories/38" label="技术" term="技术" />
    
        <id>http://www.luochunhui.com/index.php?/id/527</id>
        <title type="html">bpython, A fancy interface to the Python interpreter</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                bpython is a fancy interface to the Python interpreter for Unix-like operating systems (I hear it works fine on OS X). It is released under the MIT License. It has the following features:<br />
<br />
In-line syntax highlighting.<br />
Readline-like autocomplete with suggestions displayed as you type.<br />
Expected parameter list for any Python function.<br />
"Rewind" function to pop the last line of code from memory and re-evaluate.<br />
Send the code you've entered off to a pastebin.<br />
Save the code you've entered to a file.<br />
Auto-indentation.<br />
<br />
<br />
Install: <br />
<br />
<code><br />
$ sudo apt-get install python-pygments<br />
$ curl http://bpython-interpreter.org/releases/bpython-0.9.5.2.tar.gz<br />
$ tar zxvf bpython-0.9.5.2.tar.gz<br />
$ cd bpy*<br />
$ sudo python setup.py install<br />
</code><br />
<br />
Or use easy_install simplely,<br />
<br />
<code><br />
$ sudo easy_install bpython<br />
</code><br />
<br />
Usage:<br />
<code lang="bash"><br />
$ bpython<br />
</code><br />
<br />
Sceenshot:<br />
<br />
<img src="http://bpython-interpreter.org/static/screenshots/6.png" alt=""  /><br />
<br />
<br />
For more, see <a href="http://bpython-interpreter.org/home/">the bpython home</a> or just <a href="http://bpython-interpreter.org/screenshots/">skip right to the screenshots.</a><br />
<br />
<br />
<br />
<br />
<br />
 
            </div>
        </content>
        <dc:subject>python</dc:subject>

    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/526" rel="alternate" title="Serendipity 1.5 发布" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2009-12-22T05:26:54Z</published>
        <updated>2009-12-22T06:03:06Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=526</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=526</wfw:commentRss>
    
            <category scheme="http://www.luochunhui.com/index.php?/categories/38" label="技术" term="技术" />
    
        <id>http://www.luochunhui.com/index.php?/id/526</id>
        <title type="html">Serendipity 1.5 发布</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                原文： <a href="http://blog.s9y.org/archives/211-Serendipity-1.5-released.html">http://blog.s9y.org/archives/211-Serendipity-1.5-released.html</a><br />
<br />
Serendipity团队很自豪的发布了Serendipity 1.5版本。 之前的beta版本在多数情况下都能正常工作，现在是最终发布的时候了：）<br />
The Serendipity Team is proud to present the final release of Serendipity 1.5. While the earlier beta versions are proven to work fine for many people, it was finally time to package up a real release. ;)<br />
<br />
本版本改变了密码存储机制，使用salted后的SHA1代替了原来简单的MD5编码。这一改变后，黑客将无法通过数据库破解原密码。另一个改变是增加了PHP5.3的兼容性。<br />
This version mainly addresses login security by changing our method how passwords are stored to use salted SHA1 checksums instead of plain MD5 checksums. This makes password retrieval (rainbow attacks, see special blog posting) through the database virtually impossible. Another thing is improved PHP 5.3 compatibility.<br />
<br />
对于使用Xinha 所见即所得编辑器的用户来讲，现在可以通过自定义"my_custom.js"来修改编辑器面板的样式了。该文件在template目录下（在htmlarea/子目录下我们已经准备了一个默认的草稿文件供你参考或还原）。<br />
For users of our Bundled WYSIWYG-Editor Xinha users now have the ability to easily customize the appearance of this panel through a "my_custom.js" file inside the template directory (a draft of such a file can be found as fallback default in the htmlarea/ subdirectory).<br />
<br />
我们给开发者提供了一个很酷的新功能，在模板中可以注册插件API，来执行一些特殊的需求。本功能不需要安装任何事件组件。<br />
One cool new feature for developers is that now also templates can register themselves inside the plugin API hooks to execute specific things, that don't require installation of an event plugin.<br />
<br />
其他新的内容：<br />
新的事件API钩子<br />
修正了PDF缩略图<br />
拖拽组件时，边框将可以自动滚动调整<br />
支持UTC时区<br />
增强了Smarty函数，将S9Y打造成CMS江更为简单<br />
快速搜索中，如果返回结果过少，将启用通配符搜索 (译者注：这个功能使得S9Y支持中文搜索了)<br />
在Akismet新支持Typepad 反垃圾邮件验证<br />
Other news include:<br />
new event API hooks<br />
fixed PDF thumbnail generation<br />
ability to auto-scroll on borders when Drag/Dropping plugins<br />
UTC server time zone support<br />
improvements in the Smarty functions to easier use Serendipity as a CMS for individual entry output.<br />
quicksearch improvements for doing a wildcard-search when too few searchresults were found on a fixed searchterm<br />
support for Typepad anti-spam server-checks, additionally to Akismet<br />
<br />
在1.5beta-1之后的主要更新包括：<br />
兼容PHP5.3.0<br />
禁止上传含有.PHP.的文件，避免apache启用 MimeMagic-Modules产生的安全漏洞<br />
实验PDO,支持SQLite<br />
改进了评论管理，增加了一些有用的工具<br />
<br />
Minor improvements since the 1.5-beta1 release:<br />
more PHP 5.3.0 compatibility improvements<br />
Disallow uploading any files that contain ".php." in the filename for extra security with Apache MimeMagic-Modules<br />
expermiental PDO:SQlite support<br />
usability improvements for the comment moderation panel (bottom-navigation, removed border increase)<br />
<br />
之前的各个版本可以很容易的升级到最新的版本。解压，上传，然后访问你的管理面板进行数据库升级就可以了。在使用旧密码进行第一次登录后，S9Y将使用新的格式存储你的密码。在更新之前，请先做好备份，并认真阅读升级文档。<br />
The current release can be easily installed on any previous Serendipity installation. Just unpack, upload and visit your admin panel to perform possible database upgrades. Upon first login with an old password, Serendipity will store your old password in the new format - please be sure to make a backup of your Database prior to upgrading, and read the upgrade pointers on Upgrading Serendipity.<br />
<br />
祝你使用S9Y愉快。有任何问题，请将它发布到我们的论坛上。<br />
Have fun using Serendipity, and let us know on the Forums if you have any issues!<br />
<br />
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/525" rel="alternate" title="How to Install Trac &amp; MySQL &amp; Subversion &amp; Nginx" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2009-12-17T19:25:39Z</published>
        <updated>2009-12-17T22:55:12Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=525</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=525</wfw:commentRss>
    
            <category scheme="http://www.luochunhui.com/index.php?/categories/38" label="技术" term="技术" />
    
        <id>http://www.luochunhui.com/index.php?/id/525</id>
        <title type="html">How to Install Trac &amp; MySQL &amp; Subversion &amp; Nginx</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                My Env: <br />
  Ubuntu 8.04<br />
  python 2.5<br />
<br />
Step:<br />
1. sudo apt-get install python-subversion python-mysqldb<br />
2. sudo easy_install Trac<br />
3. sudo useradd trac<br />
4. sudo su trac<br />
5. trac-admin /home/trac/luochunhui.com initenv<br />
<blockquote>Project Name [My Project]> Blog<br />
Database connection string [sqlite:db/trac.db]> mysql://username:password@localhost/trac<br />
Repository type [svn]> svn<br />
Path to repository [/path/to/repos]> /home/svn/blog </blockquote><br />
6. nohup tracd --port 8290 -b trac.luochunhui.com /home/trac/luochunhui.com/ &amp;<br />
7. exit <br />
visit trac.luochunhui.com:8290 <br />
<br />
<br />
Next: auth &amp; use nginx<br />
<br />
8. sudo su tracd<br />
9. cd /home/trac<br />
10. trac-admin luochunhui.com/ permission remove anonymous BROWSER_VIEW CHANGESET_VIEW FILE_VIEW LOG_VIEW MILESTONE_VIEW REPORT_SQL_VIEW REPORT_VIEW ROADMAP_VIEW SEARCH_VIEW TICKET_VIEW  WIKI_VIEW TIMELINE_VIEW <br />
11.  trac-admin luochunhui.com/ permission add authenticated BROWSER_VIEW CHANGESET_VIEW FILE_VIEW LOG_VIEW MILESTONE_VIEW REPORT_SQL_VIEW REPORT_VIEW ROADMAP_VIEW SEARCH_VIEW TICKET_VIEW  WIKI_VIEW TIMELINE_VIEW<br />
12. htpasswd  -c  conf/trac.htpasswd username<br />
13. killall tracd<br />
14. nohup tracd --port 8290 -b trac.luochunhui.com /home/trac/luochunhui.com --basic-auth="*",/home/trac/luochunhui.com/conf/trac.htpasswd,trac.luochunhui.com &amp;<br />
15. exit //exit trac user<br />
14. sudo vi /etc/nginx/sites-available/trac.luochunhui.com<br />
<code><br />
upstream trac_rollenc {<br />
	server trac.luochunhui.com:8290;<br />
}<br />
<br />
server {<br />
	listen 80;<br />
	server_name trac.luochunhui.com;<br />
	access_log /var/log/nginx/trac.access.log main;<br />
	error_log /var/log/nginx/trac.error.log info;<br />
	location / {<br />
		proxy_pass http://trac_rollenc;<br />
	#	include         /etc/nginx/proxy.conf;<br />
	}<br />
}<br />
</code><br />
15. sudo ln -sf /etc/nginx/sites-available/trac.luochunhui.com /etc/nginx/sites-enable/trac.luochunhui.com<br />
16. sudo nginx -t<br />
17. sudo /etc/init.d/nginx restart<br />
<br />
visit trac.luochunhui.com<br />
and you will see some error message because the anonymous is deny. <br />
click "login" and input your username and password.<br />
Enjoy it.<br />
<br />
ALL DONE.<br />
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/524" rel="alternate" title="今天一MM加我QQ，她说：" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2009-12-07T01:45:56Z</published>
        <updated>2009-12-12T23:06:19Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=524</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=524</wfw:commentRss>
    
    
        <id>http://www.luochunhui.com/index.php?/id/524</id>
        <title type="html">今天一MM加我QQ，她说：</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <!-- s9ymdb:78 --><img class="serendipity_image_center" width="334" height="342" src="http://www.luochunhui.com/uploads/farm.gif" alt=""  /><br />
<br />
脑残啊，脑残！<br />
杯具啊，杯具！ 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/523" rel="alternate" title="MySQL prepared statements VS Direct execution" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2009-12-01T21:29:35Z</published>
        <updated>2009-12-01T21:50:20Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=523</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=523</wfw:commentRss>
    
            <category scheme="http://www.luochunhui.com/index.php?/categories/38" label="技术" term="技术" />
    
        <id>http://www.luochunhui.com/index.php?/id/523</id>
        <title type="html">MySQL prepared statements VS Direct execution</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                1. Cache<br />
  Direct execution can use MySQL cache when two sqls are the absolutely same .<br />
  Prepared execution can't use MySQL cache, even if no placeholders were employed.  <br />
<br />
2. Speed<br />
  Direct execution query need to be parsed every time. <br />
  Prepared execution query is parsed only once.<br />
  <blockquote>Prepared statements might not provide a performance increase in some situations. For best results, test your application both with prepared and nonprepared statements and choose whichever yields best performance.</blockquote><br />
<br />
3. Network<br />
  Direct execution sends all the query to MySQL services.<br />
  Prepared execution sends twice, The first is for prepared query, then the arguments. <br />
  If you call a prepared more than once, prepared execution can reduce the network traffic.<br />
<br />
4. Safe<br />
  Direct execution might cause a sql inject if the programmer doesn't handle the unsafe input rightly and carefully.<br />
  Prepared execution is safe because the query and the arguments are split.<br />
<br />
<br />
Ref:<br />
1. http://dev.mysql.com/doc/refman/5.0/en/c-api-prepared-statements.html<br />
2. http://dev.mysql.com/doc/refman/5.0/en/query-cache-operation.html<br />
<br />
   
            </div>
        </content>
        <dc:subject>mysql stmt</dc:subject>

    </entry>
    <entry>
        <link href="http://www.luochunhui.com/index.php?/id/521" rel="alternate" title="How to make a screenshot in command" />
        <author>
            <name>rollenc</name>
                    </author>
    
        <published>2009-11-09T19:16:42Z</published>
        <updated>2009-11-09T21:31:57Z</updated>
        <wfw:comment>http://www.luochunhui.com/wfwcomment.php?cid=521</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.luochunhui.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=521</wfw:commentRss>
    
    
        <id>http://www.luochunhui.com/index.php?/id/521</id>
        <title type="html">How to make a screenshot in command</title>
        <content type="xhtml" xml:base="http://www.luochunhui.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Requirement:<br />
<br />
  Linux ( Ubuntu 9.10 )<br />
  vncserver (sudo apt-get install vnc4server )<br />
  firefox<br />
<br />
Command:<br />
<code lang="bash"><br />
$ vncserver -geometry 800x800 -depth 24 #start a virtual screen<br />
New 'rollenc-Ubuntu:1 (rollenc)' desktop is rollenc-Ubuntu:1<br />
<br />
Starting applications specified in /home/rollenc/.vnc/xstartup<br />
Log file is /home/rollenc/.vnc/rollenc-Ubuntu:1.log<br />
<br />
$ DISPLAY=:1 firefox "http://www.luochunhui.com/" &amp;<br />
[1] 21489<br />
Xlib:  extension "RANDR" missing on display ":1.0".<br />
Xlib:  extension "Generic Event Extension" missing on display ":1.0".<br />
Xlib:  extension "Generic Event Extension" missing on display ":1.0".<br />
Xlib:  extension "Generic Event Extension" missing on display ":1.0".<br />
Xlib:  extension "Generic Event Extension" missing on display ":1.0".<br />
<br />
#wait few senconds and then shot and save<br />
$ DISPLAY=:1 import -window root -resize 800x800 lj-shot.jpg<br />
<br />
#So lj-shot.jpg is the shot result.<br />
<br />
#close firefox and vncserver<br />
$ kill 21489 # the pid of firefox<br />
$ vncserver -kill rollenc-Ubuntu:1 <br />
<br />
</code><br />
<a class="serendipity_image_link"  href='http://www.luochunhui.com/uploads/pics/luochunhui.com-shot.jpg' onclick="F1 = window.open('/uploads/pics/luochunhui.com-shot.jpg','Zoom','height=815,width=815,top=112,left=240,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes'); return false;"><!-- s9ymdb:77 --><img class="serendipity_image_left" width="110" height="110" src="http://www.luochunhui.com/uploads/pics/luochunhui.com-shot.Thumb.jpg" alt=""  /></a><br />
 
            </div>
        </content>
        
    </entry>

</feed>