<?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>Ruby 语言 思想驱动生活</title>
	<atom:link href="http://liubin.nanshapo.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://liubin.nanshapo.com</link>
	<description>Ruby,Rails,编程是一种乐趣。</description>
	<lastBuildDate>Tue, 12 Jan 2010 09:21:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google Android SDK 2.1正式发布</title>
		<link>http://liubin.nanshapo.com/2010/01/12/google-android-sdk-2-1%e6%ad%a3%e5%bc%8f%e5%8f%91%e5%b8%83/</link>
		<comments>http://liubin.nanshapo.com/2010/01/12/google-android-sdk-2-1%e6%ad%a3%e5%bc%8f%e5%8f%91%e5%b8%83/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 09:21:17 +0000</pubDate>
		<dc:creator>liubin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[android sdk google]]></category>

		<guid isPermaLink="false">http://liubin.nanshapo.com/2010/01/12/google-android-sdk-2-1%e6%ad%a3%e5%bc%8f%e5%8f%91%e5%b8%83/</guid>
		<description><![CDATA[1月12日，来自Google Android开发团队博客的消息，之前有报道说无限期推迟发布的Android 2.1源代码已经发布，可以到这里了解更多详情：http://developer.android.com/sdk/android-2.1.html。
此前据国外网站报道，上周随着Nexus One手机的问世，谷歌宣布给它配置Android 2.1操作系统。但由于谷歌发布未向业内开放源代码的Android2.1操作系统，媒体担忧可能引起不公平竞争，断送手机开放联盟协议建立的协作基础。而就在刚刚，Android的开发团队宣布Android 2.1 SDK发布。
Android SDK 2.1主要的变化是在框架API中。增加了一个存储在系统中的整数标识符，名为API级别，可以用来在安装前正确确定应用程序是否与系统兼容。Android 2.1对应的标识符值为7，在应用程序manifest中元素的属性中设定。
API的变化主要有：
为开发动画墙纸提供了更多API，如新的android.service.wallpaper包、新的WallpaperInfo类，更新了allpaperManager。
电话功能方面新增了SignalStrength类和onDataConnectionStateChanged(int, int)回调函数。
视图方面，新增View方法：isOpaque()和onDrawScrollBars(Canvas)等，RemoteViews方法：addView(int, RemoteViews)和removeAllViews(int)，ViewGroup方法 isChildrenDrawingOrderEnabled()和setChildrenDrawingOrderEnabled(boolean)。
此外，WebKit方面也增加了新的WebStorage方法（操作Web存储数据库）、GeolocationPermissions方法（从 WebView上获取并设置Geolocation许可）、几个WebSettings方法（管理应用缓存、Web存储等设置）、新的 WebChromeClient方法（管理视频、浏览历史等）。
]]></description>
			<content:encoded><![CDATA[<p>1月12日，来自Google Android开发团队博客的消息，之前有报道说无限期推迟发布的Android 2.1源代码已经发布，可以到这里了解更多详情：http://developer.android.com/sdk/android-2.1.html。</p>
<p>此前据国外网站报道，上周随着Nexus One手机的问世，谷歌宣布给它配置Android 2.1操作系统。但由于谷歌发布未向业内开放源代码的Android2.1操作系统，媒体担忧可能引起不公平竞争，断送手机开放联盟协议建立的协作基础。而就在刚刚，Android的开发团队宣布Android 2.1 SDK发布。</p>
<p>Android SDK 2.1主要的变化是在框架API中。增加了一个存储在系统中的整数标识符，名为API级别，可以用来在安装前正确确定应用程序是否与系统兼容。Android 2.1对应的标识符值为7，在应用程序manifest中<uses-sdk>元素的属性中设定。</p>
<p>API的变化主要有：</p>
<p>为开发动画墙纸提供了更多API，如新的android.service.wallpaper包、新的WallpaperInfo类，更新了allpaperManager。<br />
电话功能方面新增了SignalStrength类和onDataConnectionStateChanged(int, int)回调函数。<br />
视图方面，新增View方法：isOpaque()和onDrawScrollBars(Canvas)等，RemoteViews方法：addView(int, RemoteViews)和removeAllViews(int)，ViewGroup方法 isChildrenDrawingOrderEnabled()和setChildrenDrawingOrderEnabled(boolean)。<br />
此外，WebKit方面也增加了新的WebStorage方法（操作Web存储数据库）、GeolocationPermissions方法（从 WebView上获取并设置Geolocation许可）、几个WebSettings方法（管理应用缓存、Web存储等设置）、新的 WebChromeClient方法（管理视频、浏览历史等）。</p>
]]></content:encoded>
			<wfw:commentRss>http://liubin.nanshapo.com/2010/01/12/google-android-sdk-2-1%e6%ad%a3%e5%bc%8f%e5%8f%91%e5%b8%83/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>undefined method `^&#8217; for &#8220;6&#8243;:String</title>
		<link>http://liubin.nanshapo.com/2009/11/24/undefined-method-for-6string/</link>
		<comments>http://liubin.nanshapo.com/2009/11/24/undefined-method-for-6string/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 11:04:13 +0000</pubDate>
		<dc:creator>liubin</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://liubin.nanshapo.com/?p=217</guid>
		<description><![CDATA[Rails 2.3.4
Ruby 1.9.1
脚手架刚生成都出错。
原来是个BUG：
https://rails.lighthouseapp.com/projects/8994/tickets/3144-undefined-method-for-string-ror-234
]]></description>
			<content:encoded><![CDATA[<p>Rails 2.3.4<br />
Ruby 1.9.1<br />
脚手架刚生成都出错。<br />
原来是个BUG：<br />
<a href="https://rails.lighthouseapp.com/projects/8994/tickets/3144-undefined-method-for-string-ror-234">https://rails.lighthouseapp.com/projects/8994/tickets/3144-undefined-method-for-string-ror-234</a></p>
]]></content:encoded>
			<wfw:commentRss>http://liubin.nanshapo.com/2009/11/24/undefined-method-for-6string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ROMA开源</title>
		<link>http://liubin.nanshapo.com/2009/10/24/roma%e5%bc%80%e6%ba%90/</link>
		<comments>http://liubin.nanshapo.com/2009/10/24/roma%e5%bc%80%e6%ba%90/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 12:52:04 +0000</pubDate>
		<dc:creator>liubin</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[roma]]></category>

		<guid isPermaLink="false">http://liubin.nanshapo.com/?p=215</guid>
		<description><![CDATA[ROMA是日本乐天（和yahoo并列的网络店铺）公司用Ruby开发的分散型KeyValue存储结构结构。
目前乐天公司的产品“乐天市场”，“乐天旅游”中用来存储用户浏览信息。
ROMA的源代码主页可见http://github.com/roma/roma/
RUBY作者松本幸弘是乐天公司的特别研究员。
]]></description>
			<content:encoded><![CDATA[<p>ROMA是日本乐天（和yahoo并列的网络店铺）公司用Ruby开发的分散型KeyValue存储结构结构。<br />
目前乐天公司的产品“乐天市场”，“乐天旅游”中用来存储用户浏览信息。<br />
ROMA的源代码主页可见<a href="http://github.com/roma/roma/">http://github.com/roma/roma/</a><br />
RUBY作者松本幸弘是乐天公司的特别研究员。</p>
]]></content:encoded>
			<wfw:commentRss>http://liubin.nanshapo.com/2009/10/24/roma%e5%bc%80%e6%ba%90/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>小胖六个月</title>
		<link>http://liubin.nanshapo.com/2009/07/16/%e5%b0%8f%e8%83%96%e5%85%ad%e4%b8%aa%e6%9c%88/</link>
		<comments>http://liubin.nanshapo.com/2009/07/16/%e5%b0%8f%e8%83%96%e5%85%ad%e4%b8%aa%e6%9c%88/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 14:26:50 +0000</pubDate>
		<dc:creator>liubin</dc:creator>
				<category><![CDATA[小胖]]></category>
		<category><![CDATA[生活]]></category>

		<guid isPermaLink="false">http://liubin.nanshapo.com/?p=212</guid>
		<description><![CDATA[Oracle还没收购完SUN，IBM和RedHat就跳出来说从Solaris过来的用户给你们大优惠了。
Twitter员工公的Google Docs帐号被盗，据说偷走了近100多个文档。当然有公司内部信息了。
2门考试没过，一门差1分，一门差8分，太可惜了。
就为了一分，还要等一年。
最后说正事，今天小胖6个月了，最近加班忙，根本没有时间陪小胖了，下周一还要上班&#8230;

祝小胖健康成长。
]]></description>
			<content:encoded><![CDATA[<p>Oracle还没收购完SUN，IBM和RedHat就跳出来说从Solaris过来的用户给你们大优惠了。<br />
Twitter员工公的Google Docs帐号被盗，据说偷走了近100多个文档。当然有公司内部信息了。<br />
2门考试没过，一门差1分，一门差8分，太可惜了。<br />
就为了一分，还要等一年。</p>
<p>最后说正事，今天小胖6个月了，最近加班忙，根本没有时间陪小胖了，下周一还要上班&#8230;</p>
<p><a href="http://liubin.nanshapo.com/wp-content/uploads/2009/07/img_5756.jpg"><img src="http://liubin.nanshapo.com/wp-content/uploads/2009/07/img_5756-300x225.jpg" alt="img_5756" title="img_5756" width="300" height="225" class="aligncenter size-medium wp-image-213" /></a></p>
<p>祝小胖健康成长。</p>
]]></content:encoded>
			<wfw:commentRss>http://liubin.nanshapo.com/2009/07/16/%e5%b0%8f%e8%83%96%e5%85%ad%e4%b8%aa%e6%9c%88/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google的又一波(Google Wave)</title>
		<link>http://liubin.nanshapo.com/2009/05/30/google%e7%9a%84%e5%8f%88%e4%b8%80%e6%b3%a2google-wave/</link>
		<comments>http://liubin.nanshapo.com/2009/05/30/google%e7%9a%84%e5%8f%88%e4%b8%80%e6%b3%a2google-wave/#comments</comments>
		<pubDate>Sat, 30 May 2009 15:29:25 +0000</pubDate>
		<dc:creator>liubin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://liubin.nanshapo.com/?p=190</guid>
		<description><![CDATA[28日，Google I/O 2009上发表了即时信息和协作系统Wave。同日发布了预览版，并提供了测试帐号，以便听取各种用户的意见来完善wave产品，并于年内向一般用户发布。同时，作为wave产品的服务器端软件，也将会按照apache2.0的许可证进行发布。Google Wave的主页可以看这里，Google Wave Developer Preview at Google I/O 2009的视频可以看这里（youtube）

   Wave是一个即时信息和协作系统，所以，兼容了邮件和IM的功能，从上面这个图也能看出来，挺像Gmail的。但它是真正“即时”的，对方每输入一个字，你都会看到。同时，它是大包容的，多人可以同时编辑共同的内容，像Google Doc一样，或者像wiki一样。文档内容也多种多样，文本，图片，视频，自不必说，通过API，还可以和blog，twitter系统互通。
  3P

如上图所示，Google Wave由这3个P构成：产品（product），平台（platform），协议（protocol）。
第一个P说协议。Wave 服务器是Google自己开发的基于SMTP的HTTP服务器。在通常的HTTP协议上和客户端通过Wave协议（很小的XML文件）通信。和SMTP不同的是在同一服务器上的用户通信时，不是点对点的，而是基于服务器中共享Wave对象的模型。这很像Comet。客户端正在输入中的用户的输入会被一个字一个字的送到服务器，然后服务器会再发送给各个参与者，会话速度会变快。

Wave的文档都是够造化的文档，别人正在发言的时候，其他人也可以在途中插话，或者修改别人说话的话。这些编辑也会即时的反映到所有参加者的客户端上。
第二个P是产品，也就是Google的HTML的客户端。除了支持各种PC浏览器之外，Wave也会支持iphone和android的手机浏览。同时因为Wave的协议是公开的，所以客户端可以是任何形式的软件，不一定非要局限于浏览器。demo还展示类似UNIX的字符终端的客户端。
第三个P就更重要了，平台P。各个Wave对象都是XML文件+annotation ，既可以像mail，IM那样即时通信，也可以像wiki，Google Doc那样协同办公，这就是作为平台来完成各种工作。
Wave和普通的邮件不太一样，它是把最初的发信和后来的各种回信作为一个具有编辑历史的完整文档来保存，服务器的对象是共有的，谁在什么时候对什么做了什么修改，都可以保留历史记录的，也就是说Wave可以像wiki一样工作。

由于Wave记录了各种变更，也可以用Wave来写各种设计书。

xml+annotation还能高亮显示等。

而且，途中参加会话的人，还可以“倒带”回去看看之前他们是不是说了自己坏话了。
不知道Wave出了之后，是不是会扼杀掉一些其他的软件或服务呢？Google真可怕。
付：Google Wave Developer Preview at Google I/O 2009 视频

]]></description>
			<content:encoded><![CDATA[<p>28日，Google I/O 2009上发表了即时信息和协作系统Wave。同日发布了预览版，并提供了测试帐号，以便听取各种用户的意见来完善wave产品，并于年内向一般用户发布。同时，作为wave产品的服务器端软件，也将会按照apache2.0的许可证进行发布。<a href="http://wave.google.com">Google Wave的主页可以看这里</a>，Google Wave Developer Preview at Google I/O 2009的视频可以<a href="http://www.youtube.com/watch?v=v_UyVmITiYQ">看这里（youtube）</a><br />
<a href="http://liubin.nanshapo.com/wp-content/uploads/2009/05/waveinbox.jpg"><img src="http://liubin.nanshapo.com/wp-content/uploads/2009/05/waveinbox.jpg" alt="waveinbox" title="waveinbox" width="400" class="alignnone size-medium wp-image-191" /></a><br />
   Wave是一个即时信息和协作系统，所以，兼容了邮件和IM的功能，从上面这个图也能看出来，挺像Gmail的。但它是真正“即时”的，对方每输入一个字，你都会看到。同时，它是大包容的，多人可以同时编辑共同的内容，像Google Doc一样，或者像wiki一样。文档内容也多种多样，文本，图片，视频，自不必说，通过API，还可以和blog，twitter系统互通。</p>
<p>  3P<br />
<a href="http://liubin.nanshapo.com/wp-content/uploads/2009/05/3p.jpg"><img src="http://liubin.nanshapo.com/wp-content/uploads/2009/05/3p.jpg" alt="3p" title="3p" width="480" height="387" class="aligncenter size-full wp-image-194" /></a><br />
如上图所示，Google Wave由这3个P构成：产品（product），平台（platform），协议（protocol）。<br />
第一个P说协议。Wave 服务器是Google自己开发的基于SMTP的HTTP服务器。在通常的HTTP协议上和客户端通过Wave协议（很小的XML文件）通信。和SMTP不同的是在同一服务器上的用户通信时，不是点对点的，而是基于服务器中共享Wave对象的模型。这很像Comet。客户端正在输入中的用户的输入会被一个字一个字的送到服务器，然后服务器会再发送给各个参与者，会话速度会变快。</p>
<p><a href="http://liubin.nanshapo.com/wp-content/uploads/2009/05/tree.jpg"><img src="http://liubin.nanshapo.com/wp-content/uploads/2009/05/tree.jpg" alt="tree" title="tree" width="400" height="443" class="alignnone size-full wp-image-193" /></a><br />
Wave的文档都是够造化的文档，别人正在发言的时候，其他人也可以在途中插话，或者修改别人说话的话。这些编辑也会即时的反映到所有参加者的客户端上。</p>
<p>第二个P是产品，也就是Google的HTML的客户端。除了支持各种PC浏览器之外，Wave也会支持iphone和android的手机浏览。同时因为Wave的协议是公开的，所以客户端可以是任何形式的软件，不一定非要局限于浏览器。demo还展示类似UNIX的字符终端的客户端。</p>
<p>第三个P就更重要了，平台P。各个Wave对象都是XML文件+annotation ，既可以像mail，IM那样即时通信，也可以像wiki，Google Doc那样协同办公，这就是作为平台来完成各种工作。<br />
Wave和普通的邮件不太一样，它是把最初的发信和后来的各种回信作为一个具有编辑历史的完整文档来保存，服务器的对象是共有的，谁在什么时候对什么做了什么修改，都可以保留历史记录的，也就是说Wave可以像wiki一样工作。<br />
<a href="http://liubin.nanshapo.com/wp-content/uploads/2009/05/specedit.jpg"><img src="http://liubin.nanshapo.com/wp-content/uploads/2009/05/specedit.jpg" alt="specedit" title="specedit"  class="aligncenter size-full wp-image-197" /></a><br />
由于Wave记录了各种变更，也可以用Wave来写各种设计书。<br />
<a href="http://liubin.nanshapo.com/wp-content/uploads/2009/05/annotation.jpg"><img src="http://liubin.nanshapo.com/wp-content/uploads/2009/05/annotation.jpg" alt="annotation" title="annotation" width="480" height="437" class="aligncenter size-full wp-image-198" /></a><br />
xml+annotation还能高亮显示等。</p>
<p><a href="http://liubin.nanshapo.com/wp-content/uploads/2009/05/playback.jpg"><img src="http://liubin.nanshapo.com/wp-content/uploads/2009/05/playback.jpg" alt="playback" title="playback" width="400" height="551" class="aligncenter size-full wp-image-199" /></a><br />
而且，途中参加会话的人，还可以“倒带”回去看看之前他们是不是说了自己坏话了。</p>
<p>不知道Wave出了之后，是不是会扼杀掉一些其他的软件或服务呢？Google真可怕。<br />
付：Google Wave Developer Preview at Google I/O 2009 视频</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/v_UyVmITiYQ&#038;hl=zh_CN&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/v_UyVmITiYQ&#038;hl=zh_CN&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="400" ></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://liubin.nanshapo.com/2009/05/30/google%e7%9a%84%e5%8f%88%e4%b8%80%e6%b3%a2google-wave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>微软的大饼(Bing.com)</title>
		<link>http://liubin.nanshapo.com/2009/05/30/%e5%be%ae%e8%bd%af%e7%9a%84%e5%a4%a7%e9%a5%bcbingcom/</link>
		<comments>http://liubin.nanshapo.com/2009/05/30/%e5%be%ae%e8%bd%af%e7%9a%84%e5%a4%a7%e9%a5%bcbingcom/#comments</comments>
		<pubDate>Sat, 30 May 2009 13:58:30 +0000</pubDate>
		<dc:creator>liubin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[bing]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[ms]]></category>

		<guid isPermaLink="false">http://liubin.nanshapo.com/?p=187</guid>
		<description><![CDATA[世界每天都在变。这不就是这两天的事情
1.微软的大饼（bing.com）
微软推新搜索服务和域名bing.com（6.3开始）
为了在全球推广这个bing的域名，据说ms已经买好了澳大利亚（bing.com.au）、新西兰（bing.co.nz）、英国（bing.co.uk）、加拿大（bing.ca）、新加坡（bing.sg）、香港（bing.hk）、德国（bing.de）和法国（bing.fr）等各个地区的。据说中国的bing.cn还没拿到，这个是被CNNIC当作限制域名保存了。（姓氏：邴）
Bing搜索与传统搜索引擎只是单独列出一个搜索结果列表不同，它还会对返回的结果加以处理、分类。界面的左侧会根据搜索结果来显示分类信息，比如输入Microsoft会显示「Products」「IR」「Jobs」等。
并且，bing对“购物”，“旅行”，“地区”，“健康”4个分类进行了强化，比如输入数码照相机的时候，结果不仅是显示产品信息，还有各个在线商店的价格对比，用户评价等。
当然，这些东西最初不是在所有地方都提供的，具体在什么地区提供什么样的功能，还要看具体情况，最初在亚洲可能只是改进界面。
bing有点像WolframAlpha，但是最终会怎么样呢？谁杀了谁，谁又被谁刷了呢。
]]></description>
			<content:encoded><![CDATA[<p>世界每天都在变。这不就是这两天的事情<br />
1.微软的大饼（bing.com）<br />
微软推新搜索服务和域名bing.com（6.3开始）<br />
为了在全球推广这个bing的域名，据说ms已经买好了澳大利亚（bing.com.au）、新西兰（bing.co.nz）、英国（bing.co.uk）、加拿大（bing.ca）、新加坡（bing.sg）、香港（bing.hk）、德国（bing.de）和法国（bing.fr）等各个地区的。据说中国的bing.cn还没拿到，这个是被CNNIC当作限制域名保存了。（姓氏：邴）<br />
Bing搜索与传统搜索引擎只是单独列出一个搜索结果列表不同，它还会对返回的结果加以处理、分类。界面的左侧会根据搜索结果来显示分类信息，比如输入Microsoft会显示「Products」「IR」「Jobs」等。<br />
并且，bing对“购物”，“旅行”，“地区”，“健康”4个分类进行了强化，比如输入数码照相机的时候，结果不仅是显示产品信息，还有各个在线商店的价格对比，用户评价等。<br />
当然，这些东西最初不是在所有地方都提供的，具体在什么地区提供什么样的功能，还要看具体情况，最初在亚洲可能只是改进界面。<br />
bing有点像WolframAlpha，但是最终会怎么样呢？谁杀了谁，谁又被谁刷了呢。</p>
]]></content:encoded>
			<wfw:commentRss>http://liubin.nanshapo.com/2009/05/30/%e5%be%ae%e8%bd%af%e7%9a%84%e5%a4%a7%e9%a5%bcbingcom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>白社会大浆糊</title>
		<link>http://liubin.nanshapo.com/2009/05/30/%e7%99%bd%e7%a4%be%e4%bc%9a%e5%a4%a7%e6%b5%86%e7%b3%8a/</link>
		<comments>http://liubin.nanshapo.com/2009/05/30/%e7%99%bd%e7%a4%be%e4%bc%9a%e5%a4%a7%e6%b5%86%e7%b3%8a/#comments</comments>
		<pubDate>Sat, 30 May 2009 03:33:55 +0000</pubDate>
		<dc:creator>liubin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[sns]]></category>

		<guid isPermaLink="false">http://liubin.nanshapo.com/2009/05/30/%e7%99%bd%e7%a4%be%e4%bc%9a%e5%a4%a7%e6%b5%86%e7%b3%8a/</guid>
		<description><![CDATA[去年出了个开行网，域名kaixin001，有点山寨，据说现在在和比人打官司。
完了几天发现没什么意思。
前几天听说了白社会，进去一看，和开心网很像，
不过，农场页面要load好几分钟，相片也不能上传。
据说百度大浆糊也要推出，还要实名制，要身份证才行。
SNS一点也不好玩，还不如原来的bbs。
也许年轻人上来就遇到SNS也许感觉不一样。
]]></description>
			<content:encoded><![CDATA[<p>去年出了个开行网，域名kaixin001，有点山寨，据说现在在和比人打官司。<br />
完了几天发现没什么意思。<br />
前几天听说了白社会，进去一看，和开心网很像，<br />
不过，农场页面要load好几分钟，相片也不能上传。<br />
据说百度大浆糊也要推出，还要实名制，要身份证才行。<br />
SNS一点也不好玩，还不如原来的bbs。<br />
也许年轻人上来就遇到SNS也许感觉不一样。</p>
]]></content:encoded>
			<wfw:commentRss>http://liubin.nanshapo.com/2009/05/30/%e7%99%bd%e7%a4%be%e4%bc%9a%e5%a4%a7%e6%b5%86%e7%b3%8a/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php的错误捕捉</title>
		<link>http://liubin.nanshapo.com/2008/06/26/php_error_handler/</link>
		<comments>http://liubin.nanshapo.com/2008/06/26/php_error_handler/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 09:19:51 +0000</pubDate>
		<dc:creator>liubin</dc:creator>
				<category><![CDATA[技术]]></category>
<category>php</category>
		<guid isPermaLink="false">http://liubin.nanshapo.com/2008/06/26/php_error_handler/</guid>
		<description><![CDATA[当php程序出错了，默认的是显示一些错误到页面上的。我们当然希望捕捉到这些错误并处理了。Php提供了set_error_handler这个接口，但是她不是万能的。先看这个文件吧。
&#60;?
error_reporting(E_ALL);
ini_set('display_errors','0');
ini_set('log_errors','1');
ini_set('error_log','/home/liubin/aaaa.log');
ini_set('html_errors','0');
&#160;
set_error_handler('myHandler');
function&#160;myHandler($code, $msg, $file, $line) {
echo&#160;$code;
}
&#160;
echo&#160;$asdf;
method_aaa();
?&#62;
执行之后，页面显示8，即一个notice级别的错误，这是echo $asdf;的错误。myHandler得到了她，aaaa.log没有记录她。而调用不存在的方法的错误，myHandler则得不到。被记到了aaaa.log了。
看了一下手册，好像myHandler不能记录error等错误，详见
http://php.chinaunix.net/manual/zh/function.set-error-handler.php
这可如何是好呢。我要把error捕捉再转向到错误页面难道就没办法了？
]]></description>
			<content:encoded><![CDATA[<p>当php程序出错了，默认的是显示一些错误到页面上的。我们当然希望捕捉到这些错误并处理了。Php提供了set_error_handler这个接口，但是她不是万能的。先看这个文件吧。</p>
<div class="hl-surround"><ol class="hl-main ln-show" title="Double click to hide line number." ondblclick = "linenumber(this)"><li class="hl-firstline"><span style="color: Blue;">&lt;?</span></li>
<li><span style="color: Blue;">error_reporting</span><span style="color: Olive;">(</span><span style="color: Blue;">E_ALL</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Blue;">ini_set</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">display_errors</span><span style="color: #8b0000;">'</span><span style="color: Gray;">,</span><span style="color: #8b0000;">'</span><span style="color: Red;">0</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Blue;">ini_set</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">log_errors</span><span style="color: #8b0000;">'</span><span style="color: Gray;">,</span><span style="color: #8b0000;">'</span><span style="color: Red;">1</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Blue;">ini_set</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">error_log</span><span style="color: #8b0000;">'</span><span style="color: Gray;">,</span><span style="color: #8b0000;">'</span><span style="color: Red;">/home/liubin/aaaa.log</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Blue;">ini_set</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">html_errors</span><span style="color: #8b0000;">'</span><span style="color: Gray;">,</span><span style="color: #8b0000;">'</span><span style="color: Red;">0</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Blue;">set_error_handler</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">myHandler</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;</span></li>
<li><span style="color: Green;">function</span><span style="color: Gray;">&nbsp;</span><span style="color: Blue;">myHandler</span><span style="color: Olive;">(</span><span style="color: #00008b;">$code</span><span style="color: Gray;">, </span><span style="color: #00008b;">$msg</span><span style="color: Gray;">, </span><span style="color: #00008b;">$file</span><span style="color: Gray;">, </span><span style="color: #00008b;">$line</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span></li>
<li><span style="color: Green;">echo</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$code</span><span style="color: Gray;">;</span></li>
<li><span style="color: Olive;">}</span></li>
<li><span style="color: Gray;">&nbsp;</span></li>
<li><span style="color: Green;">echo</span><span style="color: Gray;">&nbsp;</span><span style="color: #00008b;">$asdf</span><span style="color: Gray;">;</span></li>
<li><span style="color: Blue;">method_aaa</span><span style="color: Olive;">()</span><span style="color: Gray;">;</span></li>
<li><span style="color: Blue;">?&gt;</span></li></ol></div>
<p>执行之后，页面显示8，即一个notice级别的错误，这是echo $asdf;的错误。myHandler得到了她，aaaa.log没有记录她。而调用不存在的方法的错误，myHandler则得不到。被记到了aaaa.log了。<br />
看了一下手册，好像myHandler不能记录error等错误，详见<br />
<a href="http://php.chinaunix.net/manual/zh/function.set-error-handler.php">http://php.chinaunix.net/manual/zh/function.set-error-handler.php</a></p>
<p>这可如何是好呢。我要把error捕捉再转向到错误页面难道就没办法了？</p>
]]></content:encoded>
			<wfw:commentRss>http://liubin.nanshapo.com/2008/06/26/php_error_handler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>放弃jquery了</title>
		<link>http://liubin.nanshapo.com/2008/06/19/%e6%94%be%e5%bc%83jquery%e4%ba%86/</link>
		<comments>http://liubin.nanshapo.com/2008/06/19/%e6%94%be%e5%bc%83jquery%e4%ba%86/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 02:30:58 +0000</pubDate>
		<dc:creator>liubin</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://liubin.nanshapo.com/2008/06/19/%e6%94%be%e5%bc%83jquery%e4%ba%86/</guid>
		<description><![CDATA[总感觉稍微慢了点。
可惜我已经写了好几个页面了。不过还是放弃了，打算用yahoo的yui
另一原因就是yui的东西比较全，包括颜色选择都有了，正好。希望她不要太慢了。
]]></description>
			<content:encoded><![CDATA[<p>总感觉稍微慢了点。</p>
<p>可惜我已经写了好几个页面了。不过还是放弃了，打算用yahoo的yui</p>
<p>另一原因就是yui的东西比较全，包括颜色选择都有了，正好。希望她不要太慢了。</p>
]]></content:encoded>
			<wfw:commentRss>http://liubin.nanshapo.com/2008/06/19/%e6%94%be%e5%bc%83jquery%e4%ba%86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>赞一下jquery</title>
		<link>http://liubin.nanshapo.com/2008/06/15/%e8%b5%9e%e4%b8%80%e4%b8%8bjquery/</link>
		<comments>http://liubin.nanshapo.com/2008/06/15/%e8%b5%9e%e4%b8%80%e4%b8%8bjquery/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 02:29:59 +0000</pubDate>
		<dc:creator>liubin</dc:creator>
				<category><![CDATA[技术]]></category>
<category>javascript</category><category>jquery</category>
		<guid isPermaLink="false">http://liubin.nanshapo.com/2008/06/19/%e8%b5%9e%e4%b8%80%e4%b8%8bjquery/</guid>
		<description><![CDATA[用ajax的时候
$.ajax({
type: &#8220;POST&#8221;,
url: &#8220;http://xxx.com/&#8220;,
data: &#8220;value=2a3jkf42saf3gas4aca423&#8243;,
success: function(msg){
this;
},
error:function(msg,status){
this;
}
});
文档是这么写的，但是如果想在success或error里做和上下文相关的处理
但是有不想记住全局唯一的id，想给这个ajax传个参数，还好jquery允许ajax方法
提供非标准参数，比如
$.ajax({
type: &#8220;POST&#8221;,
success: function(msg){
alert(this.oldval);
},
oldval:someVarFromCaller,
});
在调用$.ajax的时候，同时传个oldval过去，在失败的时候处理用。
]]></description>
			<content:encoded><![CDATA[<p>用ajax的时候</p>
<p>$.ajax({<br />
type: &#8220;POST&#8221;,<br />
url: &#8220;<a href="http://xxx.com/">http://xxx.com/</a>&#8220;,<br />
data: &#8220;value=2a3jkf42saf3gas4aca423&#8243;,<br />
success: function(msg){<br />
this;<br />
},<br />
error:function(msg,status){<br />
this;<br />
}<br />
});</p>
<p>文档是这么写的，但是如果想在success或error里做和上下文相关的处理</p>
<p>但是有不想记住全局唯一的id，想给这个ajax传个参数，还好jquery允许ajax方法</p>
<p>提供非标准参数，比如</p>
<p>$.ajax({<br />
type: &#8220;POST&#8221;,<br />
success: function(msg){<br />
alert(this.oldval);<br />
},<br />
oldval:someVarFromCaller,<br />
});<br />
在调用$.ajax的时候，同时传个oldval过去，在失败的时候处理用。</p>
]]></content:encoded>
			<wfw:commentRss>http://liubin.nanshapo.com/2008/06/15/%e8%b5%9e%e4%b8%80%e4%b8%8bjquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
