
<?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>Qesy&#039;s Blog</title>
	<atom:link href="http://www.xinasp.com/qesycn/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.xinasp.com/qesycn</link>
	<description>All of Qesy . You&#039;re welcome !</description>
	<lastBuildDate>Sun, 12 Feb 2012 02:22:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>var_export 类似 var_dump的东东</title>
		<link>http://www.xinasp.com/qesycn/?p=779</link>
		<comments>http://www.xinasp.com/qesycn/?p=779#comments</comments>
		<pubDate>Sun, 12 Feb 2012 02:22:42 +0000</pubDate>
		<dc:creator>Qesy</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.xinasp.com/qesycn/?p=779</guid>
		<description><![CDATA[var_export 类似 var_dump的东东 新发现还有这么好的东西，具体用法不解释 随机文章 JS时间选择（兼容各大主流浏览器）+又加了一款更简单的( 0 ) ASP数组替换函数( 0 ) 酷站收藏( 0 ) 万能图片规则( 0 ) SVN服务端模块配置方法 ( 0 ) 做爸爸后的体会( 0 ) PHP常用函数记录( 0 ) 简单用PHP引出youku的源地址( 0 )]]></description>
		<wfw:commentRss>http://www.xinasp.com/qesycn/?feed=rss2&#038;p=779</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>~p和~w的区别</title>
		<link>http://www.xinasp.com/qesycn/?p=777</link>
		<comments>http://www.xinasp.com/qesycn/?p=777#comments</comments>
		<pubDate>Thu, 09 Feb 2012 09:28:08 +0000</pubDate>
		<dc:creator>Qesy</dc:creator>
				<category><![CDATA[erlang]]></category>

		<guid isPermaLink="false">http://www.xinasp.com/qesycn/?p=777</guid>
		<description><![CDATA[我们在io:format中使用~p代替了~w。这里引用一下用户手册：“~p和~w一样输 出数据，和~w的语法也是一样的，不过它会把一行很长的数据，分成若干行，以使所有数 据可见。它也会检测列表中的可打印字符，并把他们以字符串输出”。 随机文章 关闭vs2005的实时调试器？( 0 ) 最近在研究ASP模版分离以及生成HTML( 0 ) DIV日常布局以及纯CSS纵向下拉菜单(新手)( 0 ) jquery post getJSON 的使用方法( 0 ) 错误类型：(0x8002801D)库没有注册的解决方法( 0 ) PHP获取本月最大天数( 0 ) nodejs安装jade模版引擎( 0 ) erlang 复杂函数( 0 )]]></description>
		<wfw:commentRss>http://www.xinasp.com/qesycn/?feed=rss2&#038;p=777</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>并行编程</title>
		<link>http://www.xinasp.com/qesycn/?p=775</link>
		<comments>http://www.xinasp.com/qesycn/?p=775#comments</comments>
		<pubDate>Thu, 09 Feb 2012 09:11:06 +0000</pubDate>
		<dc:creator>Qesy</dc:creator>
				<category><![CDATA[erlang]]></category>

		<guid isPermaLink="false">http://www.xinasp.com/qesycn/?p=775</guid>
		<description><![CDATA[一个使用Erlang来代替其它面向函数的语言的主要原因是，Erlang可以处理并发和分布 式编程。并发，我们的意思是一种可以处理掌握若干线程同时执行这样的程序。 比如，现在 的操作系统都允许你同时使一个文字处理，一个表格处理，或一个邮箱客户端以及打印任务 在同一时刻运行。当然，每个处理器可能只能处理一个线程，不过它在不停快速的在任务间 切换，这给了我们他们在同时运行的一种错觉。在Erlang中，可以很容易建立出并发的线 程，并允许这些线程间很轻松的的互相通信。在Erlang中，我们称每个线程为一个进程 (process)。 (”进程”经常指线程间没有共享数据，”线程”指他们之间，有共享的数据或共享内存区) Erlang内建函数spawn被用于建立一个新的进程：spawn(模块, 导出的函数, 参数列 表)。考虑下面的模块： -module(tut14). -export([start/0, say_something/2]). say_something(What, 0) -&#62; done; say_something(What, Times) -&#62; io:format(&#34;~p~n&#34;, [What]), say_something(What, Times - 1). start() -&#62; spawn(tut14, say_something, [hello, 3]), spawn(tut14, say_something, [goodbye, 3]). 5&#62; c(tut14). {ok,tut14} 6&#62; tut14:say_something(hello, 3). hello hello hello done 9&#62; tut14:start(). hello goodbye &#38;lt;0.63.0&#62; 随机文章 [...]]]></description>
		<wfw:commentRss>http://www.xinasp.com/qesycn/?feed=rss2&#038;p=775</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sort函数和匿名变量</title>
		<link>http://www.xinasp.com/qesycn/?p=773</link>
		<comments>http://www.xinasp.com/qesycn/?p=773#comments</comments>
		<pubDate>Thu, 09 Feb 2012 09:00:55 +0000</pubDate>
		<dc:creator>Qesy</dc:creator>
				<category><![CDATA[erlang]]></category>

		<guid isPermaLink="false">http://www.xinasp.com/qesycn/?p=773</guid>
		<description><![CDATA[标准模块lists也包含一个函数sort(Fun, List)，Fun是一个带入函数，并带有两个 参数。如果第一个参数比第二个参数小，这个函数应该返回true，反之返回false。我们 在convert_list_to_c中加入排序： c, Temp}}. convert_list_to_c(List) -&#62; New_list = lists:map(fun convert_to_c/1, List), lists:sort(fun({_, {c, Temp1}}, {_, {c, Temp2}}) -&#62; Temp1 &#60; Temp2 end, New_list). 99&#62; c(tut13). {ok,tut13} 100&#62; tut13:convert_list_to_c([{moscow, {c, -10}}, {cape_town, {f, 70}}, {stockholm, {c, -4}}, {paris, {f, 28}}, {london, {f, 36}}]). [{moscow,{c,-10}}, {stockholm,{c,-4}}, {paris,{c,-2}}, {london,{c,2}}, {cape_town,{c,21}}] 在sort函数中，我们使用的fun函数: fun({_, {c, Temp1}}, {_, {c, [...]]]></description>
		<wfw:commentRss>http://www.xinasp.com/qesycn/?feed=rss2&#038;p=773</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>erlang 复杂函数</title>
		<link>http://www.xinasp.com/qesycn/?p=769</link>
		<comments>http://www.xinasp.com/qesycn/?p=769#comments</comments>
		<pubDate>Thu, 09 Feb 2012 07:36:52 +0000</pubDate>
		<dc:creator>Qesy</dc:creator>
				<category><![CDATA[erlang]]></category>

		<guid isPermaLink="false">http://www.xinasp.com/qesycn/?p=769</guid>
		<description><![CDATA[Erlang，像很多主流的函数程序语言一样，有一个复杂函数定义。我们以一个shell例子 来说明 90&#62; Xf = fun(X) -&#62; X * 2 end. #Fun&#60;erl_eval .5.123085357&#62; 91&#62; Xf(5). 10 &#60;/erl_eval&#62; 这两个函数在标准模块list中有提供。foreach带入一下列表，并把每一个元素，作用 于一个函数fun中，map通过一个函数fun来创立出一个新的列表。我们回过头来看 shell，我们从使用map和一个fun函数来添加3到每一个元素中开始： 92&#62; Add_3 = fun(X) -&#62; X + 3 end. #Fun&#60;erl_eval .5.123085357&#62; 93&#62; lists:map(Add_3, [1,2,3]). [4,5,6] &#60;/erl_eval&#62; 现在让我们打印出一个关于城制温度的列表： 95&#62; Print_City = fun({City, {X, Temp}}) -&#62; io:format(&#34;~-15w ~w ~w~n&#34;, [City, X, Temp]) end. #Fun&#60;erl_eval .5.123085357&#62; 96&#62; lists:foreach(Print_City, [...]]]></description>
		<wfw:commentRss>http://www.xinasp.com/qesycn/?feed=rss2&#038;p=769</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>erlang 自带的一些函数</title>
		<link>http://www.xinasp.com/qesycn/?p=757</link>
		<comments>http://www.xinasp.com/qesycn/?p=757#comments</comments>
		<pubDate>Thu, 09 Feb 2012 06:06:30 +0000</pubDate>
		<dc:creator>Qesy</dc:creator>
				<category><![CDATA[erlang]]></category>

		<guid isPermaLink="false">http://www.xinasp.com/qesycn/?p=757</guid>
		<description><![CDATA[这里举了Erlang一些自带函数，我也是刚接触不是了解很多，有多少看多少吧 trunc 去掉小数 使用方法 trunc(Year / 4) * 4 == Year rem 求余 使用方法 Year rem 400 == 0 round 四舍五入 length 字符串和列表的长度 float 转为浮点型 is_atom 不是太了解，看一下例子 82> is_atom(hello). true 83> is_atom(&#8220;hello&#8221;). false is_tuple 不是太了解，看一下例子 84> is_tuple({paris, {c, 30}}). true 85> is_tuple([paris, {c, 30}]). false 所有这些可以用于守卫。现在我们看看不能用于守卫的函数 atom_to_list 87> atom_to_list(hello). &#8220;hello&#8221; list_to_atom 88> list_to_atom(&#8220;goodbye&#8221;). goodbye integer_to_list [...]]]></description>
		<wfw:commentRss>http://www.xinasp.com/qesycn/?feed=rss2&#038;p=757</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>变量的匹配、守卫和作用域</title>
		<link>http://www.xinasp.com/qesycn/?p=755</link>
		<comments>http://www.xinasp.com/qesycn/?p=755#comments</comments>
		<pubDate>Thu, 09 Feb 2012 05:35:07 +0000</pubDate>
		<dc:creator>Qesy</dc:creator>
				<category><![CDATA[erlang]]></category>

		<guid isPermaLink="false">http://www.xinasp.com/qesycn/?p=755</guid>
		<description><![CDATA[-module(tut6). -export([list_max/1]). list_max([Head&#124;Rest]) -&#62; list_max(Rest, Head). list_max([], Res) -&#62; Res; list_max([Head&#124;Rest], Result_so_far) when Head &#62; Result_so_far -&#62; list_max(Rest, Head); list_max([Head&#124;Rest], Result_so_far) -&#62; list_max(Rest, Result_so_far). 39&#62; c(tut6). {ok,tut6} 40&#62; tut6:list_max([1,2,3,4,5,7,4,3,2,1]). 7 首先注意我们这里有两个同名的函数list_max。虽然每个都带有不同数据的参数。在 Erlang这些都会被认为是完全不同的函数。我们需要通过“名称/参数数量”区分这些我们 写的函数，比如在这里是list_max/1和list_max/2。 在这里我们遍历一个列表的并取得值，在这里用Result_so_fat。list_max/1简单的 假设最大值是列表中第一个元素，并且调用list_max/2，并把列表中剩余的值以及列表 中第一个元素做为参数传给它，上面的例子，是 list_max([2,3,4,5,7,4,3,2,1],1).。如果我们试着使用list_max/1，并带有一 个空列表的，或试着使它带有一个非列表的东西做为参数，我们可能引发一个错误。注意， Erlang哲学是不处理这样函数中的错误的，但是在其它地方可能这样做。我们在后面说明。 在list_max/2中，遍历列表，当Head > Result_so_far的时候，使用Head代替 Result_so_far。在->之前的特定字符，表示－－我们只会在这个特定的条件满足的时候， 才会执行函数的这个部分。我们叫这种类型的测试，叫守卫(guard)。如果守卫不是‘真’ (我们称它为守卫失败)，我们会尝试执行函数的下一个部分。这种情况下如果Head不大于 - 14 - Result_so_far的话，它必定是小于等于它，所以我们在下一部分中，不需要再使用守卫。 一些守卫中常见的操作符有< 小于，> 大于，== 等于，>= 大于等于，=< 小于等于，/= [...]]]></description>
		<wfw:commentRss>http://www.xinasp.com/qesycn/?feed=rss2&#038;p=755</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>获取列表的长度</title>
		<link>http://www.xinasp.com/qesycn/?p=752</link>
		<comments>http://www.xinasp.com/qesycn/?p=752#comments</comments>
		<pubDate>Wed, 08 Feb 2012 11:49:04 +0000</pubDate>
		<dc:creator>Qesy</dc:creator>
				<category><![CDATA[erlang]]></category>

		<guid isPermaLink="false">http://www.xinasp.com/qesycn/?p=752</guid>
		<description><![CDATA[第一次接触这个真有点搞 直接上代码 -module(tut4). -export([list_length/1]). list_length([]) -&#62; 0; list_length([First &#124; Rest]) -&#62; 1 + list_length(Rest). 编译执行 c(tut4). {ok,tut4} tut4:list_length([1,2,3,4,5,6,7]). 7 随机文章 ubuntu给网卡增加IP地址( 0 ) 数字型转换成字符串型( 0 ) 对rar文件批量添加注释和文件( 0 ) 建立单页自动生成HTML页面代码的解除( 0 ) JQ轮显，还不错，用了FOR( 0 ) 下表是元字符及其在正则表达式上下文中的行为的一个完整列表( 0 ) 使用CSS控制你网页图片宽度的大小( 1 ) php格式化数字函数（包括取整，四舍五入等）( 0 )]]></description>
		<wfw:commentRss>http://www.xinasp.com/qesycn/?feed=rss2&#038;p=752</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>进入erlang的世界</title>
		<link>http://www.xinasp.com/qesycn/?p=750</link>
		<comments>http://www.xinasp.com/qesycn/?p=750#comments</comments>
		<pubDate>Wed, 08 Feb 2012 11:28:47 +0000</pubDate>
		<dc:creator>Qesy</dc:creator>
				<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://www.xinasp.com/qesycn/?p=750</guid>
		<description><![CDATA[-module(qesy). -export([fac/1, mult/2]). fac(1) -&#62; 1; fac(N) -&#62; N * fac(N - 1). mult(X, Y) -&#62; X * Y. 编译 然后运行 tut1:mult(3, 4). 12 随机文章 循环打印DS里的数据( 0 ) JS随机，防止AJAX缓存时候很有用哦( 0 ) MySQL的性能优化( 0 ) RegisterStartupScript的作品和用法( 0 ) PHP PDO学习( 1 ) ExecuteNonQuery() 方法 select 返回-1 ( 0 ) ASP无限分类数据库版( 0 ) php时间戳与日期互转( 0 )]]></description>
		<wfw:commentRss>http://www.xinasp.com/qesycn/?feed=rss2&#038;p=750</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>node express 基本用法</title>
		<link>http://www.xinasp.com/qesycn/?p=746</link>
		<comments>http://www.xinasp.com/qesycn/?p=746#comments</comments>
		<pubDate>Fri, 13 Jan 2012 02:21:55 +0000</pubDate>
		<dc:creator>Qesy</dc:creator>
				<category><![CDATA[nodejs]]></category>

		<guid isPermaLink="false">http://www.xinasp.com/qesycn/?p=746</guid>
		<description><![CDATA[设置和获取SESSION ： req.session.name = &#8216;Qesy&#8217; 获取POST : req.body.username; MYSQL数据库操作 var mysqlClient = require('mysql').Client;&#160; var mysql = new mysqlClient();&#160; mysql.host = '127.0.0.1'; mysql.port = 3306; mysql.database = 'node'; mysql.user = 'root'; mysql.password = '1234!@#$'; &#160; mysql.query(&#34;INSERT INTO guest (Mail, Content) VALUES ('&#34;+ req.body.Mail +&#34;', '&#34;+ req.body.Content +&#34;')&#34;, function(err, result){ console.log(err); if(err){ console.log('Insert Error: ' + err.message); [...]]]></description>
		<wfw:commentRss>http://www.xinasp.com/qesycn/?feed=rss2&#038;p=746</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

