<?xml version="1.0" encoding="GB2312"?> 
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en"> 
<title><![CDATA[chaoslawful]]></title>
<link rel="alternate" type="text/html" href="http://plod.popoever.com/" /> 
<modified>2005-07-02T14:11:40Z</modified> 
<tagline type="text/html" mode="escaped"><![CDATA[]]></tagline> 
<generator url="http://www.blogdriver.com/" version="2.0">BlogDriver</generator> 
<copyright>Copyright (c) 2004, chaoslawful</copyright> 

<entry> 
<title><![CDATA[中国互联网随想]]></title> 
<link rel="alternate" type="text/html" href="http://chaoslawful.blogchina.com/2141485.html" />  
<issued>2005-07-02T14:11:39Z</issued> 
<created>2005-07-02T14:11:39Z</created> 
<modified>2005-07-02T14:11:39Z</modified>
<id>tag:chaoslawful.blogchina.com,2005://2141485</id>
<author> 
<name>chaoslawful</name> 
<url>http://chaoslawful.blogchina.com/index.html</url> 
<email>wangxz00@mails.tsinghua.edu.cn</email> 
</author> 
<dc:subject>Opinion</dc:subject> 
<content type="text/html" mode="escaped" xml:lang="cn" xml:base="http://chaoslawful.blogchina.com/"> 
<![CDATA[现在中国互联网的发展算是很快的了，然而空有速度没有质量，内部还分割成几乎互不相通的小网络，无论是网络速度之慢还是收费之高恐怕都是世界首位，最近看到有网友称之为&amp;quot;中国互断网&amp;quot;，实在是再贴切不过了。其原因大概还是可以归咎于电信的垄断地位，看看中国的网络、通讯等几个领域的情况就知道，垄断绝对生不出什么好果子。再这样胡整下去不思进取，后果难以想象啊。
]]> 
</content> 
</entry>
 
<entry> 
<title><![CDATA[让Encode::HanExtra起作用]]></title> 
<link rel="alternate" type="text/html" href="http://chaoslawful.blogchina.com/1900499.html" />  
<issued>2005-06-13T00:32:58Z</issued> 
<created>2005-06-13T00:32:58Z</created> 
<modified>2005-06-13T00:32:58Z</modified>
<id>tag:chaoslawful.blogchina.com,2005://1900499</id>
<author> 
<name>chaoslawful</name> 
<url>http://chaoslawful.blogchina.com/index.html</url> 
<email>wangxz00@mails.tsinghua.edu.cn</email> 
</author> 
<dc:subject>Develop</dc:subject> 
<content type="text/html" mode="escaped" xml:lang="cn" xml:base="http://chaoslawful.blogchina.com/"> 
<![CDATA[
为了支持GB18030编码需要从CPAN上安装Encode::HanExtra模块，但Perl发行版本默认的Encode模块设置没有打开对HanExtra的支持，装了该模块也暂时无法使用GB18030编码。让模块有效的修改方法是：修改Perl发行版的lib/Encode/Config.pm文件，其中的%ExtModule散列表定义了不同的编码对应的模块名称，搜索后会发现包括gb18030在内的几个编码对应的行被注释了，装完Encode::HanExtra模块以后手工去掉这几个注释即可。
]]> 
</content> 
</entry>
 
<entry> 
<title><![CDATA[疯狂的想法：整合所有知识的数据库]]></title> 
<link rel="alternate" type="text/html" href="http://chaoslawful.blogchina.com/1898300.html" />  
<issued>2005-06-12T21:15:28Z</issued> 
<created>2005-06-12T21:15:28Z</created> 
<modified>2005-06-12T21:15:28Z</modified>
<id>tag:chaoslawful.blogchina.com,2005://1898300</id>
<author> 
<name>chaoslawful</name> 
<url>http://chaoslawful.blogchina.com/index.html</url> 
<email>wangxz00@mails.tsinghua.edu.cn</email> 
</author> 
<dc:subject>Opinion</dc:subject> 
<content type="text/html" mode="escaped" xml:lang="cn" xml:base="http://chaoslawful.blogchina.com/"> 
<![CDATA[
搞学术、做技术少不得四处奔波查找参考资料，然而我们本身成长经历的环境局限很大，思维当然也逃不出眼见的那点儿玩意儿，这样一来凭着自己的想法查找资料的方向究竟对不对，谁都不好说。虽然网络早已进入平常生活，但这种被动式的工具不可能弥补我们自己的认识缺陷，关系近一些的资料也许会被关键词揪出来，然而那些不属于你的领域却从另一个方向解决了你的问题的资料呢？恐怕一辈子都不会知道它们的存在。从这方面看，国内国外的情况都差不多，前苏联进行的工程和数学研究对社会产生的推动力有目共睹，然而大概没多少人能看懂那些俄文文献了。每个领域都在不停地进行重复劳动，浪费宝贵的社会资源，减缓了社会发展速度。如果有这样一种数据库，能够将全球历史上所有知识都分门别类的汇总起来，人们只要向系统提出问题，它就能罗列出可能解决问题的相关理论，给人们一个主动的引导，这样大概会大大减少重复工作吧。这样的系统简直就是一个无所不知的智者，拥有高超的理解和判断力，又有着任何人都难以企及的记忆力，远非目前的技术所能达到。不过幻想一下总没坏处，hoho。
]]> 
</content> 
</entry>
 
<entry> 
<title><![CDATA[Visual C++中编译时产生C1010致命错误的原因]]></title> 
<link rel="alternate" type="text/html" href="http://chaoslawful.blogchina.com/1693031.html" />  
<issued>2005-05-28T22:14:08Z</issued> 
<created>2005-05-28T22:14:08Z</created> 
<modified>2005-05-28T22:14:08Z</modified>
<id>tag:chaoslawful.blogchina.com,2005://1693031</id>
<author> 
<name>chaoslawful</name> 
<url>http://chaoslawful.blogchina.com/index.html</url> 
<email>wangxz00@mails.tsinghua.edu.cn</email> 
</author> 
<dc:subject>Develop</dc:subject> 
<content type="text/html" mode="escaped" xml:lang="cn" xml:base="http://chaoslawful.blogchina.com/"> 
<![CDATA[fatal error C1010是预编译头(precompiled headers)错误，编译时出现该错误一般是因为工程设置中要求使用预编译头，而某些C/C++源文件中没有包含对stdafx.h预编译头文件的include，解决方法：1、不使用预编译头。直接在工程设置里关闭使用预编译头的选项。2、使用预编译头。由于预编译头辅助文件为stdafx.cpp，是C++文件类型，因此产生的预编译头也只适用于C++环境，不能用于C环境下，这样就要求工程中必须只包含纯粹的C++源文件，每个源文件必须在开头加入#include &amp;quot;stdafx.h&amp;quot;以包含stdafx.h，这时无法进行C/C++混合编译。
]]> 
</content> 
</entry>
 
<entry> 
<title><![CDATA[避免pod2html时中文链接遭到损坏的方法]]></title> 
<link rel="alternate" type="text/html" href="http://chaoslawful.blogchina.com/968098.html" />  
<issued>2005-03-18T22:59:58Z</issued> 
<created>2005-03-18T22:59:58Z</created> 
<modified>2005-03-18T22:59:58Z</modified>
<id>tag:chaoslawful.blogchina.com,2005://968098</id>
<author> 
<name>chaoslawful</name> 
<url>http://chaoslawful.blogchina.com/index.html</url> 
<email>wangxz00@mails.tsinghua.edu.cn</email> 
</author> 
<dc:subject>Develop</dc:subject> 
<content type="text/html" mode="escaped" xml:lang="cn" xml:base="http://chaoslawful.blogchina.com/"> 
<![CDATA[这一问题主要出现在Windows系统下，修改Perl安装目录下的lib/Pod/Html.pm，将其中的anchorify函数修改如下：
sub anchorify {    my ($anchor) = @_;    $anchor = htmlify($anchor);#    $anchor =~ s/\W/_/g;	# 注释此行    return $anchor;}
然后转换时中文链接就不会被替换成下划线了。而*nix系统下可以通过设置LOCALE环境变量使\w包含中文字符。pod2html本来…………]]> 
</content> 
</entry>
 
<entry> 
<title><![CDATA[使用Win32::API模块导入DLL中函数的注意事项]]></title> 
<link rel="alternate" type="text/html" href="http://chaoslawful.blogchina.com/918884.html" />  
<issued>2005-03-12T01:58:30Z</issued> 
<created>2005-03-12T01:58:30Z</created> 
<modified>2005-03-12T01:58:30Z</modified>
<id>tag:chaoslawful.blogchina.com,2005://918884</id>
<author> 
<name>chaoslawful</name> 
<url>http://chaoslawful.blogchina.com/index.html</url> 
<email>wangxz00@mails.tsinghua.edu.cn</email> 
</author> 
<dc:subject>Develop</dc:subject> 
<content type="text/html" mode="escaped" xml:lang="cn" xml:base="http://chaoslawful.blogchina.com/"> 
<![CDATA[
使用Win32::API时需要注意的基本上就3点：
1、DLL中函数的calling convention必须为__stdcall型。这个应该是Win32::API的底层库中引入的一个假设，和Perl没关系；如果你用XS自己写DLL的调用过程，自然可以根据DLL中特定的calling convention自行调整调用方法，这一限制也就不复存在了。
2、导入DLL中的函数时要保证函数标识符的正确性。之所以要提这一点是因为在不使用definition file的情况下，不同的编译器在产生DLL时对导出函数名的处理方法不一样。以VC6为例，当调用规范为__cdecl时，函数func将被改名为_func；调用规范为__stdcall时，函数func被改名为_func@n，其中n是函…………]]> 
</content> 
</entry>
 
<entry> 
<title><![CDATA[Win32下注册COM组件后对注册表产生的变动]]></title> 
<link rel="alternate" type="text/html" href="http://chaoslawful.blogchina.com/892261.html" />  
<issued>2005-03-08T09:30:38Z</issued> 
<created>2005-03-08T09:30:38Z</created> 
<modified>2005-03-08T09:30:38Z</modified>
<id>tag:chaoslawful.blogchina.com,2005://892261</id>
<author> 
<name>chaoslawful</name> 
<url>http://chaoslawful.blogchina.com/index.html</url> 
<email>wangxz00@mails.tsinghua.edu.cn</email> 
</author> 
<dc:subject>Develop</dc:subject> 
<content type="text/html" mode="escaped" xml:lang="cn" xml:base="http://chaoslawful.blogchina.com/"> 
<![CDATA[&amp;#160;&amp;#160;&amp;#160; 在Win32下使用regsvr32 component.dll注册component这个COM组件后，将在注册表的HKEY_CLASSES_ROOT&amp;#92;CLSID下产生一个以该组件的UUID为名字的项，其下的InprocServer32项里就指明了该组件对应的DLL文件所在的路径。
…………]]> 
</content> 
</entry>
 
<entry> 
<title><![CDATA[Perl5.8中读取其他编码的文本文件]]></title> 
<link rel="alternate" type="text/html" href="http://chaoslawful.blogchina.com/839877.html" />  
<issued>2005-02-28T22:50:51Z</issued> 
<created>2005-02-28T22:50:51Z</created> 
<modified>2005-02-28T22:50:51Z</modified>
<id>tag:chaoslawful.blogchina.com,2005://839877</id>
<author> 
<name>chaoslawful</name> 
<url>http://chaoslawful.blogchina.com/index.html</url> 
<email>wangxz00@mails.tsinghua.edu.cn</email> 
</author> 
<dc:subject>Develop</dc:subject> 
<content type="text/html" mode="escaped" xml:lang="cn" xml:base="http://chaoslawful.blogchina.com/"> 
<![CDATA[通过改变PerlIO层的编码即可实现，配合encoding指示符可以使操作过程更为自然，如读取UTF-16编码的文本文件：
use encoding &amp;#39;gbk&amp;#39;;&amp;#160;&amp;#160;  # 系统默认编码为GBK
use open IN=&amp;gt;&amp;#39;:encoding(utf16)&amp;#39;;&amp;#160;&amp;#160;  # 读入文件时认为数据按UTF-16编码，自动根据BOM头判断是LE还是BE
open(FH,&amp;quot;test.txt&amp;quot;) or die;
while(&a…………]]> 
</content> 
</entry>
 
<entry> 
<title><![CDATA[Perl/Tk如何去除窗口标题栏？]]></title> 
<link rel="alternate" type="text/html" href="http://chaoslawful.blogchina.com/797195.html" />  
<issued>2005-02-22T11:05:24Z</issued> 
<created>2005-02-22T11:05:24Z</created> 
<modified>2005-02-22T11:05:24Z</modified>
<id>tag:chaoslawful.blogchina.com,2005://797195</id>
<author> 
<name>chaoslawful</name> 
<url>http://chaoslawful.blogchina.com/index.html</url> 
<email>wangxz00@mails.tsinghua.edu.cn</email> 
</author> 
<dc:subject>Develop</dc:subject> 
<content type="text/html" mode="escaped" xml:lang="cn" xml:base="http://chaoslawful.blogchina.com/"> 
<![CDATA[TopLevel窗口本身没有标题栏，而MainWindow窗口调用overrideredirect(1)就可以去除标题栏及边框，如：
$mw=new MainWindow;
$mw-&amp;gt;overrideredirect(1);&amp;#160;&amp;#160;  # 去除窗口标题栏及边框
...


]]> 
</content> 
</entry>
 
<entry> 
<title><![CDATA[Perl5.8中使用encoding指示符需要注意的问题]]></title> 
<link rel="alternate" type="text/html" href="http://chaoslawful.blogchina.com/743223.html" />  
<issued>2005-02-18T22:28:04Z</issued> 
<created>2005-02-18T22:28:04Z</created> 
<modified>2005-02-18T22:28:04Z</modified>
<id>tag:chaoslawful.blogchina.com,2005://743223</id>
<author> 
<name>chaoslawful</name> 
<url>http://chaoslawful.blogchina.com/index.html</url> 
<email>wangxz00@mails.tsinghua.edu.cn</email> 
</author> 
<dc:subject>Develop</dc:subject> 
<content type="text/html" mode="escaped" xml:lang="cn" xml:base="http://chaoslawful.blogchina.com/"> 
<![CDATA[&amp;#160;&amp;#160;&amp;#160;&amp;#160; Perl5.8中引入了encoding指示符，可以用来设定源代码及输入输出的编码格式，并自动将内部字符串的UTF-8编码转化为所需的编码，方便了在非Unicode编码环境中的字符串操作。但是在使用中需要注意一些问题：
1、encoding指示符仅对源代码、标准输入输出起作用，一般的文件及socket输入输出不受其影响，因此还不能抛弃Encode模块。
2、使用encoding设置编码后，若对任何一个字符串进行chomp操作，则…………]]> 
</content> 
</entry>
 

</feed>