﻿<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>知者无忧 &#187; 计算机技术</title>
	<atom:link href="http://www.notii.com/category/computer/feed" rel="self" type="application/rss+xml" />
	<link>http://www.notii.com</link>
	<description>NOThing Is Impossible! —— 原创文章，谢绝转载！</description>
	<lastBuildDate>Sat, 22 Oct 2011 10:23:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Dancer: 优雅的Perl web框架，推荐！</title>
		<link>http://www.notii.com/2010/01/dancer-elegant-perl-web-framework-recommended.html</link>
		<comments>http://www.notii.com/2010/01/dancer-elegant-perl-web-framework-recommended.html#comments</comments>
		<pubDate>Sat, 02 Jan 2010 04:59:30 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[计算机技术]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.notii.com/?p=645527</guid>
		<description><![CDATA[主页：&#160;&#160;http://dancer.sukria.net/ 作者： sukria，是日本某公司的CTO，知名CPANer 创意： 来自于Ruby的一个框架Sinatra 例子： #!/usr/bin/perl use Dancer; get '/hi' =&#62; sub { &#160;&#160;&#160;&#160;"Hello World!" }; dance; 然后就可以独立运行了： $ perl ./hi.pl &#62;&#62; Listening on 127.0.0.1:3000 == Entering the dance floor ... == GET /hi HTTP/1.0 200 OK 在浏览器里输入 http://your_host:3000/hi/就可以看到Helloworld字样了。默认端口是3000. 这是作者主页的整个代码： #!/usr/bin/perl&#160; use Dancer; use Template; my @pages = qw(quickstart documentation contribute about example); get [...]]]></description>
			<content:encoded><![CDATA[<p><strong>主页：</strong>&nbsp;&nbsp;<a href="http://dancer.sukria.net/" target="_blank">http://dancer.sukria.net/</a><br>
<strong>作者：</strong> sukria，是日本某公司的CTO，知名CPANer<br>
<strong>创意：</strong> 来自于Ruby的一个框架Sinatra<br>
<strong>例子：</strong></p>
<table class="t_table" border="0" width="95%" align="center">
<tbody>
<tr>
<td><span style="font-family: FixedSys;"><span style="color: #000000;"><span style="color: #ff9900;">#!/usr/bin/perl</span><br>
<span style="color: #0000ff;">use</span> Dancer<span style="color: #0000cc;">;</span><br>
get <span style="color: #ff00ff;">'/hi'</span> <span style="color: #0000cc;">=</span><span style="color: #0000cc;">&gt;</span> <span style="color: #0000ff;">sub</span> <span style="color: #0000cc;">{</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #ff00ff;">"Hello World!"</span><br>
<span style="color: #0000cc;">}</span><span style="color: #0000cc;">;</span><br>
dance<span style="color: #0000cc;">;</span></span></span></td>
</tr>
</tbody>
</table>
<p>然后就可以独立运行了：</p>
<table class="t_table" border="0" width="95%" align="center">
<tbody>
<tr>
<td><span style="font-family: FixedSys;">$ perl ./hi.pl<br>
&gt;&gt; Listening on 127.0.0.1:3000<br>
== Entering the dance floor ...<br>
== GET /hi HTTP/1.0 200 OK<br></span></td>
</tr>
</tbody>
</table>
<p>在浏览器里输入 <a href="http://your_host:3000/hi/">http://your_host:3000/hi/</a>就可以看到Helloworld字样了。默认端口是3000.</p>
<p>这是作者主页的整个代码：</p>
<table class="t_table" border="0" width="95%" align="center">
<tbody>
<tr>
<td><span style="font-family: FixedSys;"><span style="color: #000000;"><span style="color: #ff9900;">#!/usr/bin/perl<br></span>&nbsp;<br>
<span style="color: #0000ff;">use</span> Dancer<span style="color: #0000cc;">;</span><br>
<span style="color: #0000ff;">use</span> Template<span style="color: #0000cc;">;</span><br>
<span style="color: #0000ff;">my</span> <span style="color: #0000ff;">@</span><span style="color: #808000;">pages</span> <span style="color: #0000cc;">=</span> <span style="color: #0000ff;">qw</span><span style="color: #0000cc;">(</span>quickstart documentation contribute about example<span style="color: #0000cc;">)</span><span style="color: #0000cc;">;</span><br>
get <span style="color: #ff00ff;">'/'</span> <span style="color: #0000cc;">=</span><span style="color: #0000cc;">&gt;</span> <span style="color: #0000ff;">sub</span> <span style="color: #0000cc;">{</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;template <span style="color: #ff00ff;">'home'</span><span style="color: #0000cc;">;</span><br>
<span style="color: #0000cc;">}</span><span style="color: #0000cc;">;</span><br>
get <span style="color: #ff00ff;">'/:page'</span> <span style="color: #0000cc;">=</span><span style="color: #0000cc;">&gt;</span> <span style="color: #0000ff;">sub</span> <span style="color: #0000cc;">{</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000ff;">my</span> <span style="color: #0000cc;">(</span><span style="color: #0000ff;">$</span><span style="color: #008080;">page</span><span style="color: #0000cc;">)</span> <span style="color: #0000cc;">=</span> params<span style="color: #0000cc;">-</span><span style="color: #0000cc;">&gt;</span><span style="color: #0000cc;">{</span>page<span style="color: #0000cc;">}</span><span style="color: #0000cc;">;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;pass <span style="color: #0000ff;">and</span> <span style="color: #0000ff;">return</span> <span style="color: #0000ff;">false</span> <span style="color: #0000ff;">unless</span> <span style="color: #ff0000;">grep</span> <span style="color: #0000cc;">/</span><span style="color: #0000ff;">$</span><span style="color: #008080;">page</span><span style="color: #0000cc;">/</span><span style="color: #0000cc;">,</span> <span style="color: #0000ff;">@</span><span style="color: #808000;">pages</span><span style="color: #0000cc;">;</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;template <span style="color: #0000ff;">$</span><span style="color: #008080;">page</span><span style="color: #0000cc;">;</span><br>
<span style="color: #0000cc;">}</span><span style="color: #0000cc;">;</span><br>
get <span style="color: #ff00ff;">'/*'</span> <span style="color: #0000cc;">=</span><span style="color: #0000cc;">&gt;</span> <span style="color: #0000ff;">sub</span> <span style="color: #0000cc;">{</span><br>
&nbsp;&nbsp;&nbsp;status <span style="color: #ff00ff;">'not_found'</span><span style="color: #0000cc;">;</span><br>
&nbsp;&nbsp;&nbsp;template <span style="color: #ff00ff;">'not_found'</span><span style="color: #0000cc;">;</span><br>
<span style="color: #0000cc;">}</span><span style="color: #0000cc;">;</span><br>
dance<span style="color: #0000cc;">;</span></span></span></td>
</tr>
</tbody>
</table>
<p><strong>优势：</strong></p>
<ul type="1">
<li>轻量级，可以在这个基础上继续开发；</li>
<li>优雅，符合直觉，比CGI::Application 更方便：</li>
<li>支持PSGI，可用于Apache等支持PSGI的server；</li>
<li>可以单独运行，standalone模式，作为Application Server；现在的默认httpd是http::server::simple。</li>
<li>支持模板dancer::template::simple和template::toolkit</li>
</ul>
<p><strong>问题：</strong><br>
我试用了一下，用simple模板可以，用TT的没有用，页面是空白，哪位用过指点下。<br>
欢迎大家都来用。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notii.com/2010/01/dancer-elegant-perl-web-framework-recommended.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl和C++的上下文</title>
		<link>http://www.notii.com/2009/11/perl-and-c-context.html</link>
		<comments>http://www.notii.com/2009/11/perl-and-c-context.html#comments</comments>
		<pubDate>Sun, 15 Nov 2009 14:43:47 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[计算机技术]]></category>

		<guid isPermaLink="false">http://www.notii.com/?p=644407</guid>
		<description><![CDATA[Perl里面用到的上下文比较多：变量到底是赋了什么值，要看是处于标量还是列表的上下文。学C++的人刚接触Perl，会对里面频繁使用的上下文感到迷惑。 其实哥们不用迷惑，上下文在C++里面也不是什么稀奇的。星号*有时候是乘号，有时候又是对指针的解引用。到底是什么，这也取决于上下文。不过呢，没有人对星号*到底是什么意思感到迷惑，因为只要知道规则就行了。 Perl里面只是用上下文的地方比较多罢了，但是只要你熟悉了规则，也没什么大不了，反倒会感到很方便。毕竟人的自然语言是非常依赖上下文的。Larry Wall又是一个语言学家，所以不免会将自然语言的东西加入计算机语言。 C++和Perl面向计算机的层次不同，所以采取不同的策略是很正常的。一个语言的规则，怎么都好说，习惯成自然，但是就怕自身不一致，这时候就得靠死记硬背了。比如：C++里面，int a,b;表示声明两个整型变量a和b，int* a;表示一个整型指针a，int*是一种类型，这好理解，可是，为什么int* a,b；里面的b不是指针而是int呢？我觉得这个地方是不好理解，只有硬记。]]></description>
			<content:encoded><![CDATA[<p>Perl里面用到的上下文比较多：变量到底是赋了什么值，要看是处于标量还是列表的上下文。学C++的人刚接触Perl，会对里面频繁使用的上下文感到迷惑。</p>
<p>其实哥们不用迷惑，上下文在C++里面也不是什么稀奇的。星号*有时候是乘号，有时候又是对指针的解引用。到底是什么，这也取决于上下文。不过呢，没有人对星号*到底是什么意思感到迷惑，因为只要知道规则就行了。</p>
<p>Perl里面只是用上下文的地方比较多罢了，但是只要你熟悉了规则，也没什么大不了，反倒会感到很方便。毕竟人的自然语言是非常依赖上下文的。Larry Wall又是一个语言学家，所以不免会将自然语言的东西加入计算机语言。</p>
<p>C++和Perl面向计算机的层次不同，所以采取不同的策略是很正常的。一个语言的规则，怎么都好说，习惯成自然，但是就怕自身不一致，这时候就得靠死记硬背了。比如：C++里面，int a,b;表示声明两个整型变量a和b，int* a;表示一个整型指针a，int*是一种类型，这好理解，可是，为什么int* a,b；里面的b不是指针而是int呢？我觉得这个地方是不好理解，只有硬记。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notii.com/2009/11/perl-and-c-context.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>notepad++的自动缩进真是问题</title>
		<link>http://www.notii.com/2009/09/notepad-is-really-of-problem.html</link>
		<comments>http://www.notii.com/2009/09/notepad-is-really-of-problem.html#comments</comments>
		<pubDate>Wed, 02 Sep 2009 14:40:26 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[计算机技术]]></category>
		<category><![CDATA[编辑器]]></category>

		<guid isPermaLink="false">http://www.notii.com/?p=643028</guid>
		<description><![CDATA[notepad++的自动缩进真有问题，其实和没有没什么区别，编辑perl程序简直是煎熬。从上上个版本自动缩进就坏了，上个版本好了，结果最新版又变成老样子了。。。 为什么没有一个编辑器，像ultraedit一样快，但是又像Komodo Edit一样智能呢？ 更新：notepad++的自动缩进和别人理解的不一样，咱们所理解的缩进，在它里面是通过插件实现的。不过，我已经换用Emeditor了，最新版9.0的很好用。当然了，Komodo还继续用，一个轻量一个重量级。]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: small;">notepad++的自动缩进真有问题，其实和没有没什么区别，编辑perl程序简直是煎熬。从上上个版本自动缩进就坏了，上个版本好了，结果最新版又变成老样子了。。。</span></p>
<p><span style="font-size: small;">为什么没有一个编辑器，像ultraedit一样快，但是又像Komodo Edit一样智能呢？</span></p>
<p><span style="font-size: small;">更新：notepad++的自动缩进和别人理解的不一样，咱们所理解的缩进，在它里面是通过插件实现的。不过，我已经换用Emeditor了，最新版9.0的很好用。当然了，Komodo还继续用，一个轻量一个重量级。<br></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.notii.com/2009/09/notepad-is-really-of-problem.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>经典Perl电子书下载</title>
		<link>http://www.notii.com/2009/08/perl_books_download.html</link>
		<comments>http://www.notii.com/2009/08/perl_books_download.html#comments</comments>
		<pubDate>Tue, 11 Aug 2009 05:26:08 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[计算机技术]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.notii.com/?p=642473</guid>
		<description><![CDATA[虽然Perl6即将发布，Perl5仍然是非常强大的工具语言，能够完成绝大部分任务，Perl6只是让干活更容易了些。Perl5在主流平台上还会持续数年，也就是说，Perl6真正进入生产领域，还为时尚早。 所以，Perl5的书籍还是很重要地，言归正传，下载吧！ 通用书籍： OReilly Intermediate Perl (Mar.2006) OReilly Perl Best Practices (Jul.2005) Perl5编程技巧与实例分析.pdf Perl5编程核心技术.pdf Object Oriented Perl.pdf Perl 5 语言命令详解.pdf Perl Cookbook2.chm Perl 参考大全(第二版.pdf Perl实例精解 （第三版）.pdf perl语言编程.CHM PleacPerl.chm 进阶书籍： Advanced Perl Programming （2nd.Edition） Perl Medic Transforming Legacy Code Higher Order.Perl.Transforming.Programs.with.Programs.Mar.2005 Mastering Algorithms with Perl Perl.6.and.Parrot.Essentials.2nd.Edition Oreilly.Practical.Mod_Perl.chm Perl.Template.Toolkit.chm Perl编程思想.pdf perl编程思想应用篇.pdf Perl技术内幕.pdf Oreilly Perl DBI.pdf(中文） effective_perl.pdf extreme_perl.pdf [...]]]></description>
			<content:encoded><![CDATA[<p>虽然Perl6即将发布，Perl5仍然是非常强大的工具语言，能够完成绝大部分任务，Perl6只是让干活更容易了些。Perl5在主流平台上还会持续数年，也就是说，Perl6真正进入生产领域，还为时尚早。</p>
<p>所以，Perl5的书籍还是很重要地，言归正传，下载吧！</p>
<p><span style="text-decoration: underline;"><strong>通用书籍：</strong></span></p>
<ol>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/OReilly.Intermediate.Perl.Mar.2006.chm">OReilly Intermediate Perl (Mar.2006)</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/OReilly.Perl.Best.Practices.Jul.2005.chm">OReilly Perl Best Practices (Jul.2005)</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Perl5%E7%BC%96%E7%A8%8B%E6%8A%80%E5%B7%A7%E4%B8%8E%E5%AE%9E%E4%BE%8B%E5%88%86%E6%9E%90.pdf">Perl5编程技巧与实例分析.pdf</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Perl5%E7%BC%96%E7%A8%8B%E6%A0%B8%E5%BF%83%E6%8A%80%E6%9C%AF.pdf">Perl5编程核心技术.pdf</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/ObjectOrientedPerl.pdf">Object Oriented Perl.pdf</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Perl%205%20%E8%AF%AD%E8%A8%80%E5%91%BD%E4%BB%A4%E8%AF%A6%E8%A7%A3.pdf">Perl 5 语言命令详解.pdf</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Perl%20Cookbook2.chm">Perl Cookbook2.chm</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Perl%20%E5%8F%82%E8%80%83%E5%A4%A7%E5%85%A8%28%E7%AC%AC%E4%BA%8C%E7%89%88.pdf">Perl 参考大全(第二版.pdf</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Perl%E5%AE%9E%E4%BE%8B%E7%B2%BE%E8%A7%A3%20%20%EF%BC%88%E7%AC%AC%E4%B8%89%E7%89%88%EF%BC%89.pdf">Perl实例精解 （第三版）.pdf</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/perl%E8%AF%AD%E8%A8%80%E7%BC%96%E7%A8%8B.CHM">perl语言编程.CHM</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/PleacPerl.chm">PleacPerl.chm</a></li>
</ol>
<p><span style="text-decoration: underline;"><strong>进阶书籍：</strong></span></p>
<ol>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Advanced.Perl.Programming.2nd.Edition.chm">Advanced Perl Programming （2nd.Edition）</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Pearson.Higher.Education.Perl.Medic.Transforming.Legacy.Code.chm">Perl Medic Transforming Legacy Code</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Higher.Order.Perl.Transforming.Programs.with.Programs.Mar.2005.eBook-DDU.pdf">Higher Order.Perl.Transforming.Programs.with.Programs.Mar.2005</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Mastering%20Algorithms%20with%20Perl.pdf">Mastering Algorithms with Perl</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Perl.6.and.Parrot.Essentials.2nd.Edition.chm">Perl.6.and.Parrot.Essentials.2nd.Edition</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Practical.Mod.Perl.rar" target="_blank">Oreilly.Practical.Mod_Perl.chm</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Perl.Template.Toolkit.chm">Perl.Template.Toolkit.chm</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Perl%E7%BC%96%E7%A8%8B%E6%80%9D%E6%83%B3.pdf">Perl编程思想.pdf</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/perl%E7%BC%96%E7%A8%8B%E6%80%9D%E6%83%B3%E5%BA%94%E7%94%A8%E7%AF%87.pdf">perl编程思想应用篇.pdf</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Perl%E6%8A%80%E6%9C%AF%E5%86%85%E5%B9%95.pdf">Perl技术内幕.pdf</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/dbi.pdf">Oreilly Perl DBI.pdf(中文）</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/effective_perl.pdf">effective_perl.pdf</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/extremeperl.pdf">extreme_perl.pdf</a></li>
</ol>
<p><span style="text-decoration: underline;"><strong>生物信息学相关：</strong></span></p>
<ol>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Beginning%20Perl%20for%20Bioinformatics.pdf">Beginning Perl for Bioinformatics</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Mastering.Perl.For.Bioinformatics.chm">mastering Perl for Bioinformatics</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Genomic%20Perl.pdf">Genomic Perl: From Bioinformatics Basics to Working Code</a></li>
<li><a href="http://dl.getdropbox.com/u/358723/perl_books/Bioinformatics%2C%20Biocomputing%20and%20Perl..%20An%20Introduction%20%28Wiley%2C2004%29%28ISBN%20047085331X%29%28485s%29_CsBi_.pdf">Bioinformatics, Biocomputing and Perl.An Introduction (Wiley,2004)(ISBN 047085331X)</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.notii.com/2009/08/perl_books_download.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>“草莓Perl”发布了新版！Perl 5.10.0.6</title>
		<link>http://www.notii.com/2009/08/strawberry-perl-released-a-new-version-perl-51006.html</link>
		<comments>http://www.notii.com/2009/08/strawberry-perl-released-a-new-version-perl-51006.html#comments</comments>
		<pubDate>Mon, 03 Aug 2009 14:33:03 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[计算机技术]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.notii.com/?p=642300</guid>
		<description><![CDATA[现在，在windows平台上使用Perl的首选当然是Strawberry Perl，今天“草莓Perl”发布了新版！ Strawberry Perl for Windows . 这个版本发生了很大的变化，不光是安装程序改变了格式。新的安装文件能做以前不容易做的事情——让安装贯穿于整个公司组织（通过活动目录）——以后的版本会做的更多！ 迫不及待的想安装？直接去strawberryperl.com吧.这个版本的更新如下： 有史以来最大的改进! 第四代基于 WiX 的工具箱 Perl: ist::WiX. 新的.msi安装文件，安装过程有很大的改进。 通过活动目录使安装贯穿整个公司或组织. 卸载程序能正确地删除环境变量. 安装后添加的模块能被卸载程序正确地删除. 整洁的开始菜单，图标也修正了. 内置模块的巨大改进： 包含了 所有Perl 5.10.1 CPAN 的自动升级特性 CPANPLUS 预配置好了 (但还不是默认的). 根据大家伙的一致要求，DBD::mysql包含在了默认的安装中. .msi格式的安装文件要求你得以管理员的身份来安装——因为有一些环境变量和注册表的修改。 好了，就说这么多，Happy perling! Download Strawberry Perl 5.10.0.6 XP/2003/Vista/2008/Win7, English, 31MB, Jul 2009 Download Strawberry Perl 5.8.9.2 XP/2003/Vista/2008/Win7, English, 30MB, Jul 2009 Other D: drive, ZIP, [...]]]></description>
			<content:encoded><![CDATA[<div class="intro">
<p>现在，在windows平台上使用Perl的首选当然是Strawberry Perl，今天“草莓Perl”发布了新版！ <a rel="nofollow" href="http://strawberryperl.com/">Strawberry Perl for Windows</a> .</p>
<p>这个版本发生了很大的变化，不光是安装程序改变了格式。新的安装文件能做以前不容易做的事情——让安装贯穿于整个公司组织（通过活动目录）——以后的版本会做的更多！</p>
<p>迫不及待的想安装？直接去<a rel="nofollow" href="http://strawberryperl.com/">strawberryperl.com</a>吧.这个版本的更新如下：</p>
<ul>
<li><strong>有史以来最大的改进!</strong>
<ul>
<li>第四代基于 WiX 的工具箱 Perl: <img src='http://www.notii.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley'> ist::WiX.</li>
<li>新的.msi安装文件，安装过程有很大的改进。</li>
<li>通过活动目录使安装贯穿整个公司或组织.</li>
<li>卸载程序能正确地删除环境变量.</li>
<li>安装后添加的模块能被卸载程序正确地删除.</li>
<li>整洁的开始菜单，图标也修正了.</li>
</ul>
</li>
<li>内置模块的巨大改进：
<ul>
<li>包含了 所有Perl 5.10.1 CPAN 的自动升级特性</li>
<li>CPANPLUS 预配置好了 (但还不是默认的).</li>
<li>根据大家伙的一致要求，DBD::mysql包含在了默认的安装中.</li>
</ul>
</li>
</ul>
<p>.msi格式的安装文件要求你得以管理员的身份来安装——因为有一些环境变量和注册表的修改。</p>
<p>好了，就说这么多，Happy perling!</p>
</div>
<ul class="downloads">
<li><a href="http://strawberry-perl.googlecode.com/files/strawberry-perl-5.10.0.6.msi"><strong>Download Strawberry Perl 5.10.0.6</strong><br>
XP/2003/Vista/2008/Win7, English, 31MB, Jul 2009</a></li>
<li><a href="http://strawberry-perl.googlecode.com/files/strawberry-perl-5.8.9.2.msi"><strong>Download Strawberry Perl 5.8.9.2</strong><br>
XP/2003/Vista/2008/Win7, English, 30MB, Jul 2009</a></li>
<li><a style="margin-right: 0.2em;" href="http://strawberryperl.com/releases.html"><strong>Other D: drive, ZIP, and Portable editions</strong></a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.notii.com/2009/08/strawberry-perl-released-a-new-version-perl-51006.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>copssh - OpenSSH for Windows</title>
		<link>http://www.notii.com/2009/02/copssh-openssh-for-windows.html</link>
		<comments>http://www.notii.com/2009/02/copssh-openssh-for-windows.html#comments</comments>
		<pubDate>Tue, 24 Feb 2009 08:03:16 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[计算机技术]]></category>

		<guid isPermaLink="false">http://www.notii.com/2009/02/copssh-openssh-for-windows.html</guid>
		<description><![CDATA[习惯了SSH到debian服务器干活，偶尔使用windows的命令行界面还真不适应，表现之一就是经常习惯性地敲ls命令。当然，你可以用cygwin，然后在里面装上OpenSSH，也可以用ssh连接到本机的控制台。不过copssh给我们提供了一个一揽子的解决方案。 copssh其实是OpenSSH和Cygwin的打包。安装非常容易，一路Next之后安装完成。完成后首先要从“开始”菜单中激活一个用户——选择“Activate a user”，因为默认是没有用户的。这样，你就可以用putty等ssh工具连接你的本机了，我喜欢用的client是Xshell。 当然了，常见的unix命令在windows里还是没有，所以最好你还是安装上cygwin的一些常用工具，这样就类似unix环境啦。 我在我的vista上实验成功，“说明文件”中提到对Windows NT/2000/XP/2003/Vista/2008都是适用的。]]></description>
			<content:encoded><![CDATA[<p>习惯了SSH到debian服务器干活，偶尔使用windows的命令行界面还真不适应，表现之一就是经常习惯性地敲ls命令。当然，你可以用cygwin，然后在里面装上OpenSSH，也可以用ssh连接到本机的控制台。不过<a href="http://www.itefix.no/i2/node/27" target="_blank">copssh</a>给我们提供了一个一揽子的解决方案。</p>
<p><a href="http://www.itefix.no/i2/node/27" target="_blank">copssh</a>其实是OpenSSH和Cygwin的打包。安装非常容易，一路Next之后安装完成。完成后首先要从“开始”菜单中激活一个用户——选择“Activate a user”，因为默认是没有用户的。这样，你就可以用putty等ssh工具连接你的本机了，我喜欢用的client是Xshell。</p>
<p>当然了，常见的unix命令在windows里还是没有，所以最好你还是安装上cygwin的一些常用工具，这样就类似unix环境啦。</p>
<p>我在我的vista上实验成功，“说明文件”中提到对Windows NT/2000/XP/2003/Vista/2008都是适用的。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notii.com/2009/02/copssh-openssh-for-windows.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HP520/HP540完美激活vista</title>
		<link>http://www.notii.com/2008/12/hp520hp540-perfect-vista-activation.html</link>
		<comments>http://www.notii.com/2008/12/hp520hp540-perfect-vista-activation.html#comments</comments>
		<pubDate>Wed, 17 Dec 2008 05:01:34 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[计算机技术]]></category>
		<category><![CDATA[HP540]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[完美]]></category>
		<category><![CDATA[激活]]></category>

		<guid isPermaLink="false">http://www.notii.com/2008/12/hp520hp540-perfect-vista-activation.html</guid>
		<description><![CDATA[激活vista有很多方法，但是大多有各种不完美的地方。基于品牌机的OEM vista是最完美的方法。下面介绍HP520/HP540激活vista的方法。这个方法使得HP540的网友也可以用vista啦！ HP520/HP540预装的不是vista系统，并且屏蔽了SLIC表，装oem版不好激活，所以需要一点小技巧。简单的步骤： 1. 最好安装OEM版的vista系统，自己搜搜“21in1”之类的。装完之后，看看系统属性，应该是有“在三天之内激活”之类的提示。 &#160;2. 从这里下载HP.exe，找个u盘放进去； 3. 启动电脑进入纯DOS（可从启动光盘进入，深度xp光盘或者其他光盘都带进入dos的功能；u盘启动之类的也行，反正是进入dos） 。 4. 进入HP.EXE所在的目录，输入HP回车会看到参数说明。你直接运行“HP WRITE SLP ON”就行了， 此参数打开SLP功能，即SLIC表可以全部显示。重启进入vista系统。 5. 如果你在前面装的是oem版的，里面应该自带了导入证书的方法，没有也没关系——下载HPLIC.RAR，解压。导入证书的命令为 slmgr.vbs -ilc&#160;&#160;c:hp.xrm-ms (这里假设解压文件在C盘根目录，你修改成你解压到的目录即可)。 6. 重启系统，看看你的系统属性，激活了吧？恭喜你！！！ &#160;有问题请留言。]]></description>
			<content:encoded><![CDATA[<p>激活vista有很多方法，但是大多有各种不完美的地方。基于品牌机的OEM vista是最完美的方法。下面介绍HP520/HP540激活vista的方法。这个方法使得HP540的网友也可以用vista啦！</p>
<p>HP520/HP540预装的不是vista系统，并且屏蔽了SLIC表，装oem版不好激活，所以需要一点小技巧。简单的步骤：</p>
<p>1. 最好安装OEM版的vista系统，自己搜搜“21in1”之类的。装完之后，看看系统属性，应该是有“在三天之内激活”之类的提示。</p>
<p>&nbsp;2. <a href="http://dl.getdropbox.com/u/358723/HP.EXE" target="_blank">从这里下载HP.exe</a>，找个u盘放进去；</p>
<p>3. 启动电脑进入纯DOS（可从启动光盘进入，深度xp光盘或者其他光盘都带进入dos的功能；u盘启动之类的也行，反正是进入dos） 。</p>
<p>4. 进入HP.EXE所在的目录，输入HP回车会看到参数说明。你直接运行“<font style="background-color: #ffff00" color="#FF0000">HP WRITE SLP ON</font>”就行了， 此参数打开SLP功能，即SLIC表可以全部显示。重启进入vista系统。</p>
<p>5. 如果你在前面装的是oem版的，里面应该自带了导入证书的方法，没有也没关系——<a href="http://dl.getdropbox.com/u/358723/HPlic.rar" target="_blank">下载HPLIC.RAR</a>，解压。导入证书的命令为 <font color="#FF0000"><span style="background-color: #ffff00">slmgr.vbs -ilc&nbsp;&nbsp;c:hp.xrm-ms</span></font> (这里假设解压文件在C盘根目录，你修改成你解压到的目录即可)。</p>
<p>6. 重启系统，看看你的系统属性，激活了吧？恭喜你！！！</p>
<p>&nbsp;有问题请留言。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notii.com/2008/12/hp520hp540-perfect-vista-activation.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google拼音输入法让人失望</title>
		<link>http://www.notii.com/2008/11/google-pinyin.html</link>
		<comments>http://www.notii.com/2008/11/google-pinyin.html#comments</comments>
		<pubDate>Sat, 22 Nov 2008 09:48:35 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[计算机技术]]></category>

		<guid isPermaLink="false">http://www.notii.com/2008/11/google-pinyin.html</guid>
		<description><![CDATA[我删除了搜狗输入法、qq拼音输入法，专门去下载了Google的拼音输入法来用，版本是最新的2.0.1.19。谁知到，在我最爱用的自然码双拼下，很多字都无法输入，比如绿色的绿字，阿姨的阿字。真是搞笑啊。 去google groups去看了下，已经有人提出类似的问题了，回答居然是，目前是测试版，使用双拼的是小众云云。 失望透顶。 目前来说，输入法的排序如下：搜狗拼音--&#62;QQ拼音--&#62;Google拼音。 搜狗开发比较早，功能比较完善； QQ拼音后起之秀，也非常不错，缺点是皮肤设计和英文输入的提示，不过最近的新版本应该能加入； Google紧跟着搜狗做的输入法，还爆出了抄袭词库的丑闻。可是现在看来，还差得远。难道是推倒重来的吗？很多功能不好，比如自定义皮肤、自定义双拼方案、双拼bug、都还很不完善。 罢了，还是用搜狗拼音吧。]]></description>
			<content:encoded><![CDATA[<p>我删除了搜狗输入法、qq拼音输入法，专门去下载了Google的拼音输入法来用，版本是最新的2.0.1.19。谁知到，在我最爱用的自然码双拼下，很多字都无法输入，比如绿色的绿字，阿姨的阿字。真是搞笑啊。</p>
<p>去google groups去看了下，已经有人提出类似的问题了，回答居然是，目前是测试版，使用双拼的是小众云云。 失望透顶。</p>
<p>目前来说，输入法的排序如下：搜狗拼音--&gt;QQ拼音--&gt;Google拼音。</p>
<p>搜狗开发比较早，功能比较完善；</p>
<p>QQ拼音后起之秀，也非常不错，缺点是<strong>皮肤设计和英文输入的提示</strong>，不过最近的新版本应该能加入；</p>
<p>Google紧跟着搜狗做的输入法，还爆出了抄袭词库的丑闻。可是现在看来，还差得远。难道是推倒重来的吗？很多功能不好，比如<strong>自定义皮肤、自定义双拼方案、双拼bug</strong>、都还很不完善。</p>
<p>罢了，还是用搜狗拼音吧。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notii.com/2008/11/google-pinyin.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[BioPerl]怎么把fasta格式的DNA序列切割成一定长度的序列</title>
		<link>http://www.notii.com/2008/11/bioperl-fasta.html</link>
		<comments>http://www.notii.com/2008/11/bioperl-fasta.html#comments</comments>
		<pubDate>Thu, 06 Nov 2008 10:41:11 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[生物科学]]></category>
		<category><![CDATA[计算机技术]]></category>

		<guid isPermaLink="false">http://www.notii.com/2008/11/bioperl-fasta.html</guid>
		<description><![CDATA[Q：想请教一下怎么把fasta格式的DNA序列切割成一定长度的序列？ 现有一个很长的序列，保存为fasta格式，希望切成一定长度的较短的序列。应该怎么输入呢？比如是一段很长的序列，要切割成一小段一小段的70的序列。为：1-70为第一小段，2-71为第二小段，3-72为第三小段。。。这样滑动切割，最后还是保存为fasta格式。 A: use strict; use Bio::SeqIO; my $filename = 'file.fasta'; my $width = 70; my $stream = Bio::SeqIO-&#62;new(-file =&#62; $filename, -format =&#62; 'fasta'); my $seq = $stream-&#62;next_seq; my $len = $seq-&#62;length; for(1 .. $len-$width+1) { my ($start, $end) = ($_, $_+$width-1); print '&#62;',$seq-&#62;id," $start:$endn"; print $seq-&#62;subseq($start,$end),"n"; }]]></description>
			<content:encoded><![CDATA[<p>Q：想请教一下怎么把fasta格式的DNA序列切割成一定长度的序列？<br>
现有一个很长的序列，保存为fasta格式，希望切成一定长度的较短的序列。应该怎么输入呢？比如是一段很长的序列，要切割成一小段一小段的70的序列。为：1-70为第一小段，2-71为第二小段，3-72为第三小段。。。这样滑动切割，最后还是保存为fasta格式。<br>
A:</p>
<pre>
<code class="perl">use strict;
use Bio::SeqIO;
my $filename = 'file.fasta';
my $width = 70;
my $stream = Bio::SeqIO-&gt;new(-file =&gt; $filename, -format =&gt; 'fasta');
my $seq = $stream-&gt;next_seq;
my $len = $seq-&gt;length;
for(1 .. $len-$width+1) {
    my ($start, $end) = ($_, $_+$width-1);
    print '&gt;',$seq-&gt;id," $start:$endn";
    print $seq-&gt;subseq($start,$end),"n";
}</code>
</pre>]]></content:encoded>
			<wfw:commentRss>http://www.notii.com/2008/11/bioperl-fasta.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让你的生活充满乐趣的5个Perl编程技巧(1)</title>
		<link>http://www.notii.com/2008/06/perl-tricks1.html</link>
		<comments>http://www.notii.com/2008/06/perl-tricks1.html#comments</comments>
		<pubDate>Sun, 01 Jun 2008 13:45:50 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[计算机技术]]></category>

		<guid isPermaLink="false">http://www.notii.com/2008/06/perl-tricks1.html</guid>
		<description><![CDATA[Translated from: http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/ 如果你是一个程序员，你就知道新手和老手之间的就是，老手可以轻易写出简洁且很有用的代码。如果你能做到这点，你就可以轻松地提高你的效率和你的代码质量一个数量级。更重要的是，在编码过程中，你获得了很多乐趣。继续阅读，看看如何做到吧。 设想一下吧，用你程序代码的十分之一写个程序，但具有多十倍的功能、更少的bug、更好的性能以及更低的维护成本；这让你从单调重复的劳动中解脱出来，将更多的时间留给你的灵感和洞察。我在我的职业生涯中已在多种语言中做得了这一点，并且随着每学一门新语言，我的效率会更高。 我准备使用Perl来展示达成这个目标的一些技巧。Perl既是我的第一个语言，也是我最近才精通的语言。我想Perl有助于本文的探讨。 技巧 1: map 和 grep 内置的map函数是你的工具箱里最有用的工具之一。map接受一个列表并将一个代码块应用于其每个元素，并返回结果列表。其实你可以把它当作一个流处理：你将一个列表从一端push进去，中间经过处理后，再从另一端取回来。代码块中，使用传统的$_变量代表当前处理的元素。下面是个简单的例子：将列表的每个元素变成大写。 my @lamps = qw(perl php python); my @uc_lamps = map { uc($_) } @lamps; # Result: PERL PHP PYTHON 上面的代码中，我将一个列表从右边推进去，它从右向左穿过，最后从左边冒出来，然后赋值给@uc_lamps。事实上，当map用于列表的变换时它几乎有无穷的牛力！它其实只是一个美化的循环，但如果你把它看作是输入到输出的转换时，你可以用它写出很优美的代码。下面是另一个例子——将分割的字符串变成由键-值组成的哈希： my $input = "a:1,b:2,d:3"; my %output = map { split(/:/, $_) } split(/,/, $input); 弄明白它是怎么回事了吗？和前面一样，我们先从右边开始。split函数将输入的字符串用逗号,切分开，并输出一个列表。输出的这个列表再进入map区块，其每个元素被map切分成哈希的键和值，这些最后都赋值给哈希了。这比用循环来写容易多了，并且一旦你用熟了，这也更易于阅读。 It’s also unsafe code. Here’s why: it doesn’t [...]]]></description>
			<content:encoded><![CDATA[<p>Translated from: http://www.xaprb.com/blog/2006/10/05/five-great-perl-programming-techniques-to-make-your-life-fun-again/</p>
<p>如果你是一个程序员，你就知道新手和老手之间的就是，老手可以轻易写出简洁且很有用的代码。如果你能做到这点，你就可以轻松地提高你的效率和你的代码质量一个数量级。更重要的是，在编码过程中，你获得了很多乐趣。继续阅读，看看如何做到吧。</p>
<p>设想一下吧，用你程序代码的十分之一写个程序，但具有多十倍的功能、更少的bug、更好的性能以及更低的维护成本；这让你从单调重复的劳动中解脱出来，将更多的时间留给你的灵感和洞察。我在我的职业生涯中已在多种语言中做得了这一点，并且随着每学一门新语言，我的效率会更高。</p>
<p>我准备使用Perl来展示达成这个目标的一些技巧。Perl既是我的第一个语言，也是我最近才精通的语言。我想Perl有助于本文的探讨。</p>
<h3>技巧 1: map 和 grep</h3>
<p>内置的map函数是你的工具箱里最有用的工具之一。map接受一个列表并将一个代码块应用于其每个元素，并返回结果列表。其实你可以把它当作一个流处理：你将一个列表从一端push进去，中间经过处理后，再从另一端取回来。代码块中，使用传统的$_变量代表当前处理的元素。下面是个简单的例子：将列表的每个元素变成大写。</p>
<pre>
<code class="perl">my @lamps = qw(perl php python);
my @uc_lamps = map { uc($_) } @lamps;
# Result: PERL PHP PYTHON</code>
</pre>
<p>上面的代码中，我将一个列表从右边推进去，它从右向左穿过，最后从左边冒出来，然后赋值给@uc_lamps。事实上，当map用于列表的变换时它几乎有无穷的牛力！它其实只是一个美化的循环，但如果你把它看作是输入到输出的转换时，你可以用它写出很优美的代码。下面是另一个例子——将分割的字符串变成由键-值组成的哈希：</p>
<pre>
<code class="perl">my $input = "a:1,b:2,d:3";
my %output = map { split(/:/, $_) } split(/,/, $input);</code>
</pre>
<p>弄明白它是怎么回事了吗？和前面一样，我们先从右边开始。split函数将输入的字符串用逗号,切分开，并输出一个列表。输出的这个列表再进入map区块，其每个元素被map切分成哈希的键和值，这些最后都赋值给哈希了。这比用循环来写容易多了，并且一旦你用熟了，这也更易于阅读。</p>
<p>It’s also unsafe code. Here’s why: it doesn’t check for an odd number of elements in the resulting list, which could happen with input that’s not delimited as expected, like this:</p>
<p>这段代码也是不安全的，因为它不检查产生的列表元素的数目的奇偶性，譬如当输入的字符串并不是按预期来分割的时候，就像这样：</p>
<pre>
<code class="perl">my $input = "a1,b:2,d:3,e:f:g";
my %output = map { split(/:/, $_) } split(/,/, $input);</code>
</pre>
<p>用奇数个元素给哈希赋值会打破键值之间的联系。你可以通过声明“use warnings FATAL =&gt; ‘all’”来捕获之，但是修复它比抛出错误要更好一些。这是另一个基于列表的构造——grep——显身手的时候了，它接受右边进入的列表并输出符合某些条件的元素。下面我们增加一个可切分性的检查，再将其只切分成两个元素，最后重排一下代码更便于阅读：</p>
<pre>
<code class="perl">my $input = "a1,b:2,d:3";
my %output =
   map  { split(/:/, $_, 2) }
   grep { m/:/ }
   split(/,/, $input);</code>
</pre>
<p>好了，现在只有那些有效的元素才会进入哈希了。</p>
<h3>技巧2：用||=实现缺省值</h3>
<p>to be continued……</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notii.com/2008/06/perl-tricks1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

