<?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>Rady&#039;s Blog  知者不博，博者不知</title>
	<atom:link href="http://www.radys.cn/feed" rel="self" type="application/rss+xml" />
	<link>http://www.radys.cn</link>
	<description></description>
	<lastBuildDate>Thu, 08 Dec 2011 16:24:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>USING BTREE引起的MySQL导入错误</title>
		<link>http://www.radys.cn/archives/733.html</link>
		<comments>http://www.radys.cn/archives/733.html#comments</comments>
		<pubDate>Thu, 08 Dec 2011 16:24:17 +0000</pubDate>
		<dc:creator>Rady Huang</dc:creator>
				<category><![CDATA[后端]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.radys.cn/?p=733</guid>
		<description><![CDATA[最近一个项目中使用的使用mysql导入sql脚本时间出现错误 MySQL导入脚本命令 mysql -u username -p dbname  &#60; dbsql.sql 几次尝试没有成功，由于对Linux下命令行不是很熟悉，尝试使用phpMyAdmin来救急吧，安装完后运行SQL脚本出现以下错误： ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8&#8242; at line 11 问Google后以为是版本中默认语言样式不一样导致的错误，于是把代码改为了 ENGINE=InnoDB  COLLATE=&#8217;utf8_general_ci&#8217; phpMyAdmin运行SQL后仍然出错误，不过这次SQL运行到一个表的Create Table位置退出的，再对比这个表SQL与其它表SQL发现了 USING BTREE,这时我的反应是十有八九是它导致的了。于是把这个表前后的SQL分别运行，没错！！这也证明了之前的想法。接下来就容易办了，查找 USING BTREE mysql，你会看到很多这样的例子，mysql 5.14版本之前不认识 USING BTREE。解决办法有两个： 1、直接删除 USING BTREE 2、导出脚本时开启兼容性 mysqldump &#8211;compatible=mysql40 以下几个关于USING BTREE 的链接 USING BTREE mysql http://stackoverflow.com/questions/3767753/mysql-error-using-btree 关于USING BTREE Bug http://bugs.mysql.com/bug.php?id=25162]]></description>
			<content:encoded><![CDATA[<p>最近一个项目中使用的使用mysql导入sql脚本时间出现错误</p>
<p>MySQL导入脚本命令</p>
<p>mysql -u username -p dbname  &lt; dbsql.sql</p>
<p>几次尝试没有成功，由于对Linux下命令行不是很熟悉，尝试使用phpMyAdmin来救急吧，安装完后运行SQL脚本出现以下错误：</p>
<p>ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8&#8242; at line 11</p>
<p>问Google后以为是版本中默认语言样式不一样导致的错误，于是把代码改为了</p>
<p>ENGINE=InnoDB  COLLATE=&#8217;utf8_general_ci&#8217;</p>
<p>phpMyAdmin运行SQL后仍然出错误，不过这次SQL运行到一个表的Create Table位置退出的，再对比这个表SQL与其它表SQL发现了 <strong><a title="USING BTREE错误" href="http://www.radys.cn/archives/733.html" target="_blank">USING BTREE</a>,</strong>这时我的反应是十有八九是它导致的了。于是把这个表前后的SQL分别运行，没错！！这也证明了之前的想法。接下来就容易办了，查找 <a title="USING BTREE MySQL" href="http://www.radys.cn/archives/733.html" target="_blank">USING BTREE mysql</a>，你会看到很多这样的例子，mysql 5.14版本之前不认识 USING BTREE。解决办法有两个：</p>
<p>1、直接删除 USING BTREE</p>
<p>2、导出脚本时开启兼容性 mysqldump &#8211;compatible=mysql40</p>
<p>以下几个关于USING BTREE 的链接</p>
<p><a title="Google 查询结果，可以放心点击。" href="http://goo.gl/wvaWY" target="_blank">USING BTREE mysql</a></p>
<p><a href="http://stackoverflow.com/questions/3767753/mysql-error-using-btree">http://stackoverflow.com/questions/3767753/mysql-error-using-btree</a></p>
<p>关于USING BTREE Bug <a href="http://bugs.mysql.com/bug.php?id=25162">http://bugs.mysql.com/bug.php?id=25162</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radys.cn/archives/733.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>博客恢复更新</title>
		<link>http://www.radys.cn/archives/730.html</link>
		<comments>http://www.radys.cn/archives/730.html#comments</comments>
		<pubDate>Tue, 06 Dec 2011 16:41:53 +0000</pubDate>
		<dc:creator>Rady Huang</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://www.radys.cn/?p=730</guid>
		<description><![CDATA[今天终于有时间再看一下博客，之前的一篇文章竟然是5月份的！！OMG~~ 我的博客已经这么长时间没有更新了。我觉得有以下几个原因： 首先，今年是我出来创业的第一个年份，要处理的事非常多，打理博客时间少了。 第二、我在玩微博 weibo.com/rady4 和 推@rady4 ，他们占了我很多碎片化时间，真正思考的时间反而少了。 第三、从原来的.net转向 LAMP 也费了很多时间。 不过理由再多也只是借口。 接下来可以抽出一点时间打理博客了，继续在这里记录我的生活。。。]]></description>
			<content:encoded><![CDATA[<p>今天终于有时间再看一下博客，之前的一篇文章竟然是5月份的！！OMG~~</p>
<p>我的博客已经这么长时间没有更新了。我觉得有以下几个原因：</p>
<p>首先，今年是我出来创业的第一个年份，要处理的事非常多，打理博客时间少了。</p>
<p>第二、我在玩微博 weibo.com/rady4 和 推@rady4 ，他们占了我很多碎片化时间，真正思考的时间反而少了。</p>
<p>第三、从原来的.net转向 LAMP 也费了很多时间。</p>
<p>不过理由再多也只是借口。</p>
<p>接下来可以抽出一点时间打理博客了，继续在这里记录我的生活。。。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.radys.cn/archives/730.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE label img click bug点击bug</title>
		<link>http://www.radys.cn/archives/718.html</link>
		<comments>http://www.radys.cn/archives/718.html#comments</comments>
		<pubDate>Sun, 15 May 2011 15:11:40 +0000</pubDate>
		<dc:creator>Rady Huang</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[IE bug]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.radys.cn/?p=718</guid>
		<description><![CDATA[IE下label中包含img时label点击无响应BUG,jQuery下修复。]]></description>
			<content:encoded><![CDATA[<p>IE下label中包含img时label点击无响应BUG,jQuery下修复。</p>
<pre class="brush: jscript; title: ; notranslate">
if($.browser.msie){
      $(&quot;label img&quot;).live(&quot;click&quot;, function() {
		  $(&quot;#&quot; + $(this).parents(&quot;label&quot;).attr(&quot;for&quot;)).click();
	  });
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.radys.cn/archives/718.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>实时汇率函数，人民币转港币汇率，港币转人民币汇率</title>
		<link>http://www.radys.cn/archives/712.html</link>
		<comments>http://www.radys.cn/archives/712.html#comments</comments>
		<pubDate>Sat, 14 May 2011 14:06:08 +0000</pubDate>
		<dc:creator>Rady Huang</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[人民币转港币汇率]]></category>
		<category><![CDATA[人民币转美元汇率]]></category>
		<category><![CDATA[实时汇率]]></category>
		<category><![CDATA[港币转人民币汇率]]></category>
		<category><![CDATA[美元转人民币汇率]]></category>

		<guid isPermaLink="false">http://www.radys.cn/?p=712</guid>
		<description><![CDATA[php中从百度抓取汇率的函数。 人民币转港币汇率 港币转人民币汇率 人民币转美元汇率 美元转人民币汇率]]></description>
			<content:encoded><![CDATA[<p>php中从百度抓取汇率的函数。</p>
<p>人民币转港币汇率</p>
<pre class="brush: php; title: ; notranslate">
//人民币转港币汇率
function Get_Exchange_RMB2HKD()
{
       $url = &quot;http://www.baidu.com/s?rn=50&amp;bs=%C8%CB%C3%F1%B1%D2%B6%D2%BB%BB%B8%DB%B1%D2%BB%E3%C2%CA+%BD%D3%BF%DA&amp;f=8&amp;wd=%C8%CB%C3%F1%B1%D2%B6%D2%BB%BB%B8%DB%B1%D2%BB%E3%C2%CA&quot;;
	   $html = file_get_contents($url);
	   $html = iconv(&quot;GBK&quot;, &quot;utf-8&quot;,$html);
	   if (preg_match('/人民币元=(?P&lt;exchange&gt;[0-9\\.]+)/', $html, $regs)) {
		   $result = $regs[exchange];
		} else {
		   $result = &quot;0&quot;;
	   }
	   return $result;
}
</pre>
<p>港币转人民币汇率</p>
<pre class="brush: php; title: ; notranslate">
//港币转人民币汇率
function Get_Exchange_HKD2RMB()
{
        $url = &quot;http://www.baidu.com/s?rn=50&amp;bs=%C8%CB%C3%F1%B1%D2%B6%D2%BB%BB%B8%DB%B1%D2%BB%E3%C2%CA+%BD%D3%BF%DA&amp;f=8&amp;wd=%C8%CB%C3%F1%B1%D2%B6%D2%BB%BB%B8%DB%B1%D2%BB%E3%C2%CA&quot;;
	   $html = file_get_contents($url);
	   $html = iconv(&quot;GBK&quot;, &quot;utf-8&quot;,$html);
	   if (preg_match('/港币=(?P&lt;exchange&gt;[0-9\\.]+)/', $html, $regs)) {
		   $result = $regs[exchange];
		} else {
		   $result = &quot;0&quot;;
	   }
	   return $result;
}
</pre>
<p>人民币转美元汇率</p>
<pre class="brush: php; title: ; notranslate">
//人民币转美元汇率
function Get_Exchange_RMB2USD()
{
         $url = &quot;http://www.baidu.com/s?rn=50&amp;bs=%B0%C4%C3%C5%B1%D2%BB%BB%C8%CB%C3%F1%B1%D2&amp;f=8&amp;wd=%C3%C0%D4%AA%BB%BB%C8%CB%C3%F1%B1%D2&quot;;
	   $html = file_get_contents($url);
	   $html = iconv(&quot;GBK&quot;, &quot;utf-8&quot;,$html);
	   if (preg_match('/人民币元=(?P&lt;exchange&gt;[0-9\\.]+)/', $html, $regs)) {
		   $result = $regs[exchange];
		} else {
		   $result = &quot;0&quot;;
	   }
	   return $result;
}
</pre>
<p>美元转人民币汇率</p>
<pre class="brush: php; title: ; notranslate">
//美元转人民币汇率
function Get_Exchange_USD2RMB()
{
         $url = &quot;http://www.baidu.com/s?rn=50&amp;bs=%B0%C4%C3%C5%B1%D2%BB%BB%C8%CB%C3%F1%B1%D2&amp;f=8&amp;wd=%C3%C0%D4%AA%BB%BB%C8%CB%C3%F1%B1%D2&quot;;
	   $html = file_get_contents($url);
	   $html = iconv(&quot;GBK&quot;, &quot;utf-8&quot;,$html);
	   if (preg_match('/美元=(?P&lt;exchange&gt;[0-9\\.]+)/', $html, $regs)) {
		   $result = $regs[exchange];
		} else {
		   $result = &quot;0&quot;;
	   }
	   return $result;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.radys.cn/archives/712.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android 2.3.3 （update-cm-7.0.0-buzz-signed）使用体验与问题</title>
		<link>http://www.radys.cn/archives/707.html</link>
		<comments>http://www.radys.cn/archives/707.html#comments</comments>
		<pubDate>Fri, 13 May 2011 15:36:10 +0000</pubDate>
		<dc:creator>Rady Huang</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[刷机]]></category>

		<guid isPermaLink="false">http://www.radys.cn/?p=707</guid>
		<description><![CDATA[昨天晚上把Android Wildfire刷机到CM7.0.0 Android 2.3.3这个版本的，原来系统是官方Android 2.1 update版 官方版本的好处是稳定，缺点是无效程序太多（YouTuBe、Facebook、Twitter都是被墙的），内存占有严重，无法App2SD，不知道别人的怎么样，我的机器虽然Root成功了，但是是死活改不了HOST,也无法把程序安装到SD卡中，也可能我是菜鸟的原因~~ 刷机的教程很多，给大家推荐一篇 http://android.tgbus.com/lab/break/201102/342106.shtml 新系统体验： 1、画面比较炫，动画比原来流畅很多 2、重力感应灵敏度比原来好很多 3、wifi好像不太稳定，原来Android 2.1时在屋里使用一般不会掉网，但是刷机后有时找不到wifi，连上后会偶然断网 4、使用Google地图无法定位 5、vpn连接后一段时间就断 6、Google Android Market（电子市场）无法打开，打开就自动关闭 目前使用到现在就这么多问题]]></description>
			<content:encoded><![CDATA[<p>昨天晚上把Android Wildfire刷机到CM7.0.0 Android 2.3.3这个版本的，原来系统是官方Android 2.1 update版</p>
<p>官方版本的好处是稳定，缺点是无效程序太多（YouTuBe、Facebook、Twitter都是被墙的），内存占有严重，无法App2SD，不知道别人的怎么样，我的机器虽然Root成功了，但是是死活改不了HOST,也无法把程序安装到SD卡中，也可能我是菜鸟的原因~~</p>
<p>刷机的教程很多，给大家推荐一篇 <a href="http://android.tgbus.com/lab/break/201102/342106.shtml" target="_blank">http://android.tgbus.com/lab/break/201102/342106.shtml</a></p>
<p><a href="http://www.radys.cn/wp-content/uploads/2011/05/Android-2.3.3.png"><img class="alignnone size-full wp-image-708" title="Android-2.3.3" src="http://www.radys.cn/wp-content/uploads/2011/05/Android-2.3.3.png" alt="Android-2.3.3" width="236" height="447" /></a></p>
<p>新系统体验：</p>
<p>1、画面比较炫，动画比原来流畅很多</p>
<p>2、重力感应灵敏度比原来好很多</p>
<p>3、wifi好像不太稳定，原来Android 2.1时在屋里使用一般不会掉网，但是刷机后有时找不到wifi，连上后会偶然断网</p>
<p>4、使用Google地图无法定位</p>
<p>5、vpn连接后一段时间就断</p>
<p>6、Google Android Market（电子市场）无法打开，打开就自动关闭</p>
<p>目前使用到现在就这么多问题</p>
]]></content:encoded>
			<wfw:commentRss>http://www.radys.cn/archives/707.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>给php项目添加facebook的登录</title>
		<link>http://www.radys.cn/archives/698.html</link>
		<comments>http://www.radys.cn/archives/698.html#comments</comments>
		<pubDate>Thu, 12 May 2011 15:16:54 +0000</pubDate>
		<dc:creator>Rady Huang</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://www.radys.cn/?p=698</guid>
		<description><![CDATA[facebook已经超越Google,twitter和其它登录，国外项目基本上都有添加facebook登录需求，那么接下来就是跟着我们来给你的php添加fb登录吧（针对国内的项目就不用想了）。 先从https://github.com/facebook/php-sdk下载facebook的php sdk 然后把压缩包中的facebook.php文件添加到你的项目中 比如目录./lib/facebook.php 压缩包中有一个exmaple.php的文件打开它，可以看到基本的使用方法 facebook app申请地址 http://www.facebook.com/developers/apps.php 在需要使用登录的页面添加facebook js引用 和 在需要显示登录框的位置添加 如果需要获取用户email需要email的授权 如果获取用户的好友列表则需要read_friendlists授权 更多权限列表参考网址 http://developers.facebook.com/docs/authentication/permissions/]]></description>
			<content:encoded><![CDATA[<p>facebook已经超越Google,twitter和其它登录，国外项目基本上都有添加facebook登录需求，那么接下来就是跟着我们来给你的php添加fb登录吧（针对国内的项目就不用想了）。<br />
先从<a title="facebook php sdk" href="https://github.com/facebook/php-sdk" target="_blank">https://github.com/facebook/php-sdk</a>下载facebook的php sdk</p>
<p>然后把压缩包中的facebook.php文件添加到你的项目中</p>
<p>比如目录./lib/facebook.php</p>
<p>压缩包中有一个exmaple.php的文件打开它，可以看到基本的使用方法</p>
<pre class="brush: php; title: ; notranslate">
    //引用facebook
    require_once(dirname(__FILE__) . '/lib/facebook.php');
    $facebook = new Facebook(array(
    'appId'  =&gt; '应用ID（AppID）',
    'secret' =&gt; '密钥（App Secret）',
    'cookie' =&gt; true,
    ));
</pre>
<p>facebook app申请地址 <a href="http://www.facebook.com/developers/apps.php" target="_blank">http://www.facebook.com/developers/apps.php</a><br />
在需要使用登录的页面添加facebook js引用</p>
<pre class="brush: jscript; title: ; notranslate">
    &lt;script&gt;
      window.fbAsyncInit = function() {
        FB.init({
          appId   : '&lt;?php echo $facebook-&gt;getAppId(); ?&gt;',
          session : &lt;?php echo json_encode($session); ?&gt;, // don't refetch the session when PHP already has it
          status  : true, // check login status
          cookie  : true, // enable cookies to allow the server to access the session
          xfbml   : true // parse XFBML
        });

        // whenever the user logs in, we refresh the page
        FB.Event.subscribe('auth.login', function() {
          window.location.reload();
        });
      };

      (function() {
        var e = document.createElement('script');
        e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
        e.async = true;
        document.getElementById('fb-root').appendChild(e);
      }());
    &lt;/script&gt;
</pre>
<p>和</p>
<pre class="brush: xml; title: ; notranslate">&lt;div id=&quot;fb-root&quot;&gt;&lt;/div&gt;</pre>
<p>在需要显示登录框的位置添加</p>
<pre class="brush: xml; title: ; notranslate">&lt;fb:login-button&gt;&lt;/fb:login-button&gt;</pre>
<p>如果需要获取用户email需要email的授权</p>
<pre class="brush: xml; title: ; notranslate">&lt;fb:login-button perms=&quot;email&quot;&gt;&lt;/fb:login-button&gt;</pre>
<p>如果获取用户的好友列表则需要<code>read_friendlists授权</code> <code>更多权限列表参考网址 <a href="http://developers.facebook.com/docs/authentication/permissions/" target="_blank">http://developers.facebook.com/docs/authentication/permissions/</a></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radys.cn/archives/698.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>通过userAgent判断iPad,iPhone,iPod并添加特定CSS</title>
		<link>http://www.radys.cn/archives/692.html</link>
		<comments>http://www.radys.cn/archives/692.html#comments</comments>
		<pubDate>Wed, 11 May 2011 15:37:12 +0000</pubDate>
		<dc:creator>Rady Huang</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPod]]></category>
		<category><![CDATA[UserAgent]]></category>

		<guid isPermaLink="false">http://www.radys.cn/?p=692</guid>
		<description><![CDATA[使用js通过userAgent判断iPad,iPhone和iPod然后添加指定css到head代码如下： 注意：以上代码运行在jQuery环境下。]]></description>
			<content:encoded><![CDATA[<p>使用js通过userAgent判断iPad,iPhone和iPod然后添加指定css到head代码如下：</p>
<pre class="brush: jscript; title: ; notranslate">
       if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) {
             $(&quot;head&quot;).append(&quot;&lt;link&gt;&quot;);
             var css = $(&quot;head&quot;).children(&quot;:last&quot;);
             css.attr({
                 rel:  &quot;stylesheet&quot;,
                 type: &quot;text/css&quot;,
                 href: &quot;static/css/ipad.css&quot;
               });
        }
</pre>
<p>注意：以上代码运行在jQuery环境下。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.radys.cn/archives/692.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>图片延迟加载处理</title>
		<link>http://www.radys.cn/archives/686.html</link>
		<comments>http://www.radys.cn/archives/686.html#comments</comments>
		<pubDate>Tue, 10 May 2011 14:58:46 +0000</pubDate>
		<dc:creator>Rady Huang</dc:creator>
				<category><![CDATA[前端页面]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[图片延迟加载]]></category>

		<guid isPermaLink="false">http://www.radys.cn/?p=686</guid>
		<description><![CDATA[页面中图片过多能够让图片延迟加载会大大提高页面的加载速度，提高用户可用性。 1、有的页面是页面过长或过宽，可以考虑只加载显示区域附近的图片。 2、图片所在窗口不显示，比如Tab内容切换，内容轮播等也要考虑把没有显示的图片延迟加载 第一种情况推荐使用jQuery.LazyLoad插件。 jQuery.LazyLoad.js插件使用方法非常简单 页面头引入js文件 使用对所有图片都使用延迟加载 或者使用选择符给部分图片延迟加载如下 设置敏感性，也就是距离边界的距离，默认是0 设置点位图片 设置图片加载事件：这里可以设置一切jQuery的事件，也可以自定义事件名称 设置图片加载效果 更新详细的使用方法请移步官方http://www.appelsiini.net/projects/lazyload 第二种情况隐藏区域内容的图片，上面的插件就不起作用了这里可以考虑作如下处理 标签如下： 可以通过HTML5验证。 &#160;]]></description>
			<content:encoded><![CDATA[<p>页面中图片过多能够让图片延迟加载会大大提高页面的加载速度，提高用户可用性。</p>
<p>1、有的页面是页面过长或过宽，可以考虑只加载显示区域附近的图片。</p>
<p>2、图片所在窗口不显示，比如Tab内容切换，内容轮播等也要考虑把没有显示的图片延迟加载</p>
<p>第一种情况推荐使用jQuery.LazyLoad插件。</p>
<p>jQuery.LazyLoad.js插件使用方法非常简单</p>
<p>页面头引入js文件</p>
<pre class="brush: jscript; title: ; notranslate">
 &lt;script src=&quot;jquery.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
 &lt;script src=&quot;jquery.lazyload.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
</pre>
<p>使用对所有图片都使用延迟加载</p>
<pre class="brush: jscript; title: ; notranslate">$(&quot;img&quot;).lazyload();</pre>
<p>或者使用选择符给部分图片延迟加载如下</p>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;img.lazy&quot;).lazyload();
$(&quot;#contrainer img&quot;).lazyload();
$(&quot;.slideshow img&quot;).lazyload();
</pre>
<p>设置敏感性，也就是距离边界的距离，默认是0</p>
<pre class="brush: jscript; title: ; notranslate">$(&quot;img&quot;).lazyload({ threshold : 200 });</pre>
<p>设置点位图片</p>
<pre class="brush: jscript; title: ; notranslate">$(&quot;img&quot;).lazyload({ placeholder : &quot;img/grey.gif&quot; });</pre>
<p>设置图片加载事件：这里可以设置一切jQuery的事件，也可以自定义事件名称</p>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;img&quot;).lazyload({
    placeholder : &quot;img/grey.gif&quot;,
    event : &quot;click&quot;
});
</pre>
<p>设置图片加载效果</p>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;img&quot;).lazyload({
    placeholder : &quot;img/grey.gif&quot;,
    effect : &quot;fadeIn&quot;
});
</pre>
<p>更新详细的使用方法请移步官方<a href="http://www.appelsiini.net/projects/lazyload" target="_blank">http://www.appelsiini.net/projects/lazyload</a></p>
<p>第二种情况隐藏区域内容的图片，上面的插件就不起作用了这里可以考虑作如下处理<br />
标签如下：<br />
<img alt="" /></p>
<pre class="brush: plain; title: ; notranslate">container.find('img[data-src]').each(function() {
$(this).attr('src', $(this).attr('data-src'))
.removeAttr('data-src');
});</pre>
<p>可以通过HTML5验证。</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.radys.cn/archives/686.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>伸出你的手－帮助樂思蜀度过难关</title>
		<link>http://www.radys.cn/archives/677.html</link>
		<comments>http://www.radys.cn/archives/677.html#comments</comments>
		<pubDate>Mon, 28 Mar 2011 08:32:41 +0000</pubDate>
		<dc:creator>Rady Huang</dc:creator>
				<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://www.radys.cn/?p=677</guid>
		<description><![CDATA[一个SEO人员，一个普通的站长，一个热情的SEO分享者－乐思蜀 需要大家的帮助。 下面内容转自Robin博客 如果你曾经泡过点石论坛，或者参加过点石线下活动，肯定对乐思蜀有印象。 如果你经常访问 seobbs.net ，也肯定知道乐思蜀。 乐思蜀，在SEO圈子里以乐意助人被人所熟悉了解。 如今我们亲爱的兄弟正在遭遇人生变故，他的女儿患上了重症肺炎，心脏也有问题。孩子在重症病房里已经呆了将近一个月之久，乐思蜀夫妻俩为了幼女身心憔悴。他们已经为女儿治病，已经花光了所存积蓄。 如果你认识乐思蜀，不妨发个短信关心慰问一下，他的手机号码：13488323566 如果能有闲钱支配的，不妨借点钱帮助他度过这个难关吧。 以下是他的银行账号信息： 王志炜 0029 1258 8265 招商银行西安分行城东支行 李朝霞 6225 8802 9207 8822 招商银行西安分行小寨支行 备注提示：王志炜为乐思蜀真名，李朝霞为王志伟爱人。 最新更新，应大家要求，向乐思蜀所要了他支付宝账号，公布如下： 王志炜 wzwmail@gmail.com PS：如果你无法提供金钱上的帮助，请把这个消息转给更多的人，让更多的人知道。 乐思蜀的个人网站http://www.lesishu.com/ 帮助樂思蜀相关链接 http://www.seozac.com/internet-web/help-seo-lesishu/ http://woshao.com/article/5686799258fa11e099b5000c2959fd2a/]]></description>
			<content:encoded><![CDATA[<p>一个SEO人员，一个普通的站长，一个热情的SEO分享者－乐思蜀 需要大家的帮助。</p>
<p>下面内容转自Robin博客</p>
<p>如果你曾经泡过点石论坛，或者参加过点石线下活动，肯定对乐思蜀有印象。</p>
<p>如果你经常访问 seobbs.net ，也肯定知道乐思蜀。</p>
<p>乐思蜀，在SEO圈子里以乐意助人被人所熟悉了解。</p>
<p>如今我们亲爱的兄弟正在遭遇人生变故，他的女儿患上了重症肺炎，心脏也有问题。孩子在重症病房里已经呆了将近一个月之久，乐思蜀夫妻俩为了幼女身心憔悴。他们已经为女儿治病，已经花光了所存积蓄。</p>
<p>如果你认识乐思蜀，不妨发个短信关心慰问一下，他的手机号码：13488323566</p>
<p>如果能有闲钱支配的，不妨借点钱帮助他度过这个难关吧。</p>
<p>以下是他的银行账号信息：</p>
<p>王志炜 0029 1258 8265 招商银行西安分行城东支行</p>
<p>李朝霞 6225 8802 9207 8822 招商银行西安分行小寨支行</p>
<p>备注提示：王志炜为乐思蜀真名，李朝霞为王志伟爱人。</p>
<p>最新更新，应大家要求，向乐思蜀所要了他支付宝账号，公布如下：</p>
<p>王志炜 wzwmail@gmail.com</p>
<p><span style="color: #ff0000;">PS：如果你无法提供金钱上的帮助，请把这个消息转给更多的人，让更多的人知道。</span></p>
<p><img class="alignnone size-thumbnail wp-image-678" title="樂思蜀" src="http://www.radys.cn/wp-content/uploads/2011/03/lesishu-150x100.jpg" alt="" width="150" height="100" /></p>
<p>乐思蜀的个人网站<a href="http://www.lesishu.com/">http://www.lesishu.com/</a></p>
<p>帮助樂思蜀相关链接</p>
<p><a href="http://www.seozac.com/internet-web/help-seo-lesishu/">http://www.seozac.com/internet-web/help-seo-lesishu/</a></p>
<p><a href="http://woshao.com/article/5686799258fa11e099b5000c2959fd2a/">http://woshao.com/article/5686799258fa11e099b5000c2959fd2a/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.radys.cn/archives/677.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>停用wordpress 3.0以上版本shortlink函数</title>
		<link>http://www.radys.cn/archives/674.html</link>
		<comments>http://www.radys.cn/archives/674.html#comments</comments>
		<pubDate>Sun, 06 Mar 2011 15:18:38 +0000</pubDate>
		<dc:creator>Rady Huang</dc:creator>
				<category><![CDATA[未分类]]></category>
		<category><![CDATA[shortlink]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.radys.cn/?p=674</guid>
		<description><![CDATA[新版本wp3.0版本之后添加了一个名称为shortlink的函数，会在前台页面生成以下格式代码 这个标签会直接影响搜索引擎收录这个链接而不是我们“固定链接”文章地址，这并不是我们想要的。那么可以通过以下方法停用此函数。 在模板目录找到function.php文件，编辑文件在最后添加]]></description>
			<content:encoded><![CDATA[<p>新版本wp3.0版本之后添加了一个名称为shortlink的函数，会在前台页面生成以下格式代码</p>
<pre class="brush: xml; title: ; notranslate">&lt;link rel=’shortlink’ href=’http://www.radys.cn/?p=xxx’ /&gt;</pre>
<p>这个标签会直接影响搜索引擎收录这个链接而不是我们“<strong>固定链接</strong>”文章地址，这并不是我们想要的。那么可以通过以下方法停用此函数。</p>
<p>在模板目录找到function.php文件，编辑文件在最后添加</p>
<pre class="brush: php; title: ; notranslate">remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.radys.cn/archives/674.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

