<?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>SLJ.me - 申力军</title>
	<atom:link href="http://slj.me/feed/" rel="self" type="application/rss+xml" />
	<link>http://slj.me</link>
	<description>申力军的博客</description>
	<lastBuildDate>Fri, 30 Jul 2010 07:52:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>10个经典的Android开源应用项目</title>
		<link>http://slj.me/2010/07/10-android-open-source-app/</link>
		<comments>http://slj.me/2010/07/10-android-open-source-app/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 06:47:38 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1923</guid>
		<description><![CDATA[
Android开发又将带来新一轮热潮，很多开发者都投入到这个浪潮中去了，创造了许许多多相当优秀的应用。其中也有许许多多的开发者提供了应用开 源项目，贡献出他们的智慧和创造力。学习开源代码是掌握技术的一个最佳方式。下面推荐几个应用开源项目，这些项目不仅提供了优秀的创意，也可以直接掌握  Android内核的接口使用：
1、Android团队提供的示例项目
如果不是从学习Android SDK中提供的那些样例代码开始，可能没有更好的方法来掌握在Android这个框架上开发。由Android的核心开发团队提供了15个优秀的示例项目，包含了游戏、图像处理、时间显示、开始菜单快捷方式等。
地址：http://code.google.com/p/apps-for-android/
2、 Remote Droid
RemoteDroid是一个Android应用，能够让用户使用自己的无线网络使用无线键盘、触摸屏操作手机。这个项目为开发者提供了如网络连接、触摸屏手指运动等很好的样例。
地址：http://code.google.com/p/remotedroid/
3、 TorProxy和Shadow
TorProxy应用实现了Android手机无线电电传通讯(TOR)，和Shadow应用一起使用，可以使用手机匿名上网。从该项目源代码中，可以掌握socket连接、管理cookie等方法。
地址：http://www.cl.cam.ac.uk/research/dtg/code/svn/android-tor/
4、 Android SMSPopup
SMSPopup可以截获短信内容显示在一个泡泡形状的窗口中。从这个项目中可以掌握到如何使用内置的短信SMS接口。
地址：http://code.google.com/p/android-smspopup/
5、 Standup Timer
Standup Timer应用用于控制站立会议时间，类似秒表倒计时，可以提醒每个人的讲话时间已到，从而保证每个与会者使用时间一样。从该项目的代码中，可以学会如何使用时间函数。另外，这个项目的代码是采用视图view、模型model严格分离的设计思路。
地址：http://github.com/jwood/standup-timer
6、 Foursquare
是Foursquare.com的一个客户端应用，该应用主要分为两个模块：API(com.joelapenna.foursquare)和界面前端  (com.joelapenna.foursquared)两部分。从该项目代码中，可以学会如何同步、多线程、HTTP连接等技术。
地址：http://code.google.com/p/foursquared/
7、 Pedometer
Pedometer应用用于记录你每天走路步数的。尽管记录不一定精准，但是从这个项目中，可以学习几个不同的技术：加速器交互、语音更新、后台运行服务等。
地址：http://code.google.com/p/pedometer/
8、 OpenSudoku-android
OpenSudoku是一个简单的九宫格数独游戏。从代码中可以学习到如何在视图中显示表格数据，以及如何和一个网站交互等技术。
地址：http://code.google.com/p/opensudoku-android/
9、 ConnectBot
ConnectBot是Android平台的一个客户端安全壳应用。从该项目代码中，可以学习到很多Android安全方面的内容，这些是你在开发应用时经常需要考虑的安全问题。
地址：http://code.google.com/p/connectbot/
10、 WordPress的Android应用
当然在最后不能不提WordPress的Android应用了，这是WordPress官方开发团队提供的一个项目。从代码中可以学习到XMLRPC调用（当然还有更多的优秀内容）。
地址：http://android.svn.wordpress.org/trunk/
Related Posts / 相关文章【好书PDF】：Building iPhone Apps with HTML, CSS, and JavaScript]]></description>
			<content:encoded><![CDATA[<p><img height="260" width="595" alt="" src="http://slj.me/wp-content/uploads/2010/07/10-android_post_thumb.png" class="thumb"/><br />
Android开发又将带来新一轮热潮，很多开发者都投入到这个浪潮中去了，创造了许许多多相当优秀的应用。其中也有许许多多的开发者提供了应用开 源项目，贡献出他们的智慧和创造力。学习开源代码是掌握技术的一个最佳方式。下面推荐几个应用开源项目，这些项目不仅提供了优秀的创意，也可以直接掌握  Android内核的接口使用：</p>
<h3><span id="more-1923"></span>1、Android团队提供的示例项目</h3>
<p>如果不是从学习Android SDK中提供的那些样例代码开始，可能没有更好的方法来掌握在Android这个框架上开发。由Android的核心开发团队提供了15个优秀的示例项目，包含了游戏、图像处理、时间显示、开始菜单快捷方式等。<br />
地址：http://code.google.com/p/apps-for-android/</p>
<h3>2、 Remote Droid</h3>
<p>RemoteDroid是一个Android应用，能够让用户使用自己的无线网络使用无线键盘、触摸屏操作手机。这个项目为开发者提供了如网络连接、触摸屏手指运动等很好的样例。<br />
地址：http://code.google.com/p/remotedroid/</p>
<h3>3、 TorProxy和Shadow</h3>
<p>TorProxy应用实现了Android手机无线电电传通讯(TOR)，和Shadow应用一起使用，可以使用手机匿名上网。从该项目源代码中，可以掌握socket连接、管理cookie等方法。<br />
地址：http://www.cl.cam.ac.uk/research/dtg/code/svn/android-tor/</p>
<h3>4、 Android SMSPopup</h3>
<p>SMSPopup可以截获短信内容显示在一个<a name="baidusnap1"></a><strong>泡泡</strong>形状的窗口中。从这个项目中可以掌握到如何使用内置的短信SMS接口。<br />
地址：http://code.google.com/p/android-smspopup/</p>
<h3>5、 Standup Timer</h3>
<p>Standup Timer应用用于控制站立会议时间，类似秒表倒计时，可以提醒每个人的讲话时间已到，从而保证每个与会者使用时间一样。从该项目的代码中，可以学会如何使用时间函数。另外，这个项目的代码是采用视图view、模型model严格分离的设计思路。<br />
地址：http://github.com/jwood/standup-timer</p>
<h3>6、 Foursquare</h3>
<p>是Foursquare.com的一个客户端应用，该应用主要分为两个模块：API(com.joelapenna.foursquare)和界面前端  (com.joelapenna.foursquared)两部分。从该项目代码中，可以学会如何同步、多线程、HTTP连接等技术。<br />
地址：http://code.google.com/p/foursquared/</p>
<h3>7、 Pedometer</h3>
<p>Pedometer应用用于记录你每天走路步数的。尽管记录不一定精准，但是从这个项目中，可以学习几个不同的技术：加速器交互、语音更新、后台运行服务等。<br />
地址：http://code.google.com/p/pedometer/</p>
<h3>8、 OpenSudoku-android</h3>
<p>OpenSudoku是一个简单的九宫格数独游戏。从代码中可以学习到如何在视图中显示表格数据，以及如何和一个网站交互等技术。<br />
地址：http://code.google.com/p/opensudoku-android/</p>
<h3>9、 ConnectBot</h3>
<p>ConnectBot是Android平台的一个客户端安全壳应用。从该项目代码中，可以学习到很多Android安全方面的内容，这些是你在开发应用时经常需要考虑的安全问题。<br />
地址：http://code.google.com/p/connectbot/</p>
<h3>10、 WordPress的Android应用</h3>
<p>当然在最后不能不提WordPress的Android应用了，这是WordPress官方开发团队提供的一个项目。从代码中可以学习到XMLRPC调用（当然还有更多的优秀内容）。<br />
地址：http://android.svn.wordpress.org/trunk/</p>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2010/03/building-iphone-apps-with-html-css-and-javascript/" title="【好书PDF】：Building iPhone Apps with HTML, CSS, and JavaScript">【好书PDF】：Building iPhone Apps with HTML, CSS, and JavaScript</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/07/10-android-open-source-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS中的RGBa色彩</title>
		<link>http://slj.me/2010/07/css-rgba/</link>
		<comments>http://slj.me/2010/07/css-rgba/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 06:25:02 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[rgba]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1920</guid>
		<description><![CDATA[
RGBa是一种在CSS中声明包含透明效果的颜色的方法，它的语法是这样的：
 









div {
   background: rgba(200, 54, 54, 0.5);
}





它允许我们为元素添加透明色。或许我们习惯了使用”opacity“，它很简单易用，但是，opacity会使所有的子元素都变成透明的，而且很难去解决这个问题。
通过RGBa，我们可以将一个元素设置为透明，而不会影响其子元素：

声明一个保留颜色
并非所有的浏览器支持RGBa，所以如果允许的话，可以声明一个保留色彩。这个色彩应该是可靠的——所有的浏览器都支持。不声明就意味着，在不支持RGBa的浏览器里面，没有使用颜色。









div {
   background: rgb(200, 54, 54); /* The Fallback */
   background: rgba(200, 54, 54, 0.5);
}&#60;/code&#62;





不过，这条退路在某些古董级浏览器中依然无效。
RGBa的浏览器支持情况



浏览器，版本，操作系统
测试结果
退路


Firefox 3.0.5 (OS X, Windows XP, Vista)
支持
—


Firefox 2.0.0.18 (PC)
不支持
纯色


Safari 4 (Developer Preview, Mac)
支持
—


Safari 3.2.1 (PC)
支持
—


Mobile Safari (iPhone)
支持
—


Opera 9.6.1
不支持
纯色


IE 5.5 (PC via IETester)
不支持
无色


IE 6 (PC via IETester)
不支持
纯色


IE 7
不支持
纯色


IE 8 [...]]]></description>
			<content:encoded><![CDATA[<p><img height="260" width="595" alt="" src="http://slj.me/wp-content/uploads/2010/07/CSS-rgba_post_thumb.png" class="thumb"/><br />
RGBa是一种在CSS中声明包含透明效果的颜色的方法，它的语法是这样的：</p>
<p><span id="more-8091"> </span></p>
<div class="wp_syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
</pre>
</td>
<td class="code">
<pre class="css" style="font-family: monospace;">div <span style="color: #00aa00;">{</span>
   <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00aa00;">:</span> rgba<span style="color: #00aa00;">(</span><span style="color: #cc66cc;">200</span><span style="color: #00aa00;">,</span> <span style="color: #cc66cc;">54</span><span style="color: #00aa00;">,</span> <span style="color: #cc66cc;">54</span><span style="color: #00aa00;">,</span> <span style="color: #cc66cc;">0.5</span><span style="color: #00aa00;">)</span><span style="color: #00aa00;">;</span>
<span style="color: #00aa00;">}</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>它允许我们为元素添加透明色。或许我们习惯了使用”<em>opacity</em>“，它很简单易用，但是，opacity会使所有的子元素都变成透明的，而且很难去解决这个问题。</p>
<p><span id="more-1920"></span>通过RGBa，我们可以将一个元素设置为透明，而不会影响其子元素：</p>
<p><img src="http://slj.me/wp-content/uploads/2010/07/165017jqc.jpg" alt="" width="500" height="314" /></p>
<h3>声明一个保留颜色</h3>
<p>并非所有的浏览器支持RGBa，所以如果允许的话，可以声明一个保留色彩。这个色彩应该是<strong>可靠的</strong>——所有的浏览器都支持。不声明就意味着，在不支持RGBa的浏览器里面，没有使用颜色。</p>
<div class="wp_syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
</pre>
</td>
<td class="code">
<pre class="css" style="font-family: monospace;">div <span style="color: #00aa00;">{</span>
   <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00aa00;">:</span> <span style="color: #993333;">rgb</span><span style="color: #00aa00;">(</span><span style="color: #cc66cc;">200</span><span style="color: #00aa00;">,</span> <span style="color: #cc66cc;">54</span><span style="color: #00aa00;">,</span> <span style="color: #cc66cc;">54</span><span style="color: #00aa00;">)</span><span style="color: #00aa00;">;</span> <span style="color: #808080; font-style: italic;">/* The Fallback */</span>
   <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00aa00;">:</span> rgba<span style="color: #00aa00;">(</span><span style="color: #cc66cc;">200</span><span style="color: #00aa00;">,</span> <span style="color: #cc66cc;">54</span><span style="color: #00aa00;">,</span> <span style="color: #cc66cc;">54</span><span style="color: #00aa00;">,</span> <span style="color: #cc66cc;">0.5</span><span style="color: #00aa00;">)</span><span style="color: #00aa00;">;</span>
<span style="color: #00aa00;">}</span>&lt;/code<span style="color: #00aa00;">&gt;</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>不过，这条退路在某些古董级浏览器中依然无效。</p>
<h3>RGBa的浏览器支持情况</h3>
<table style="width: 100%; border-collapse: collapse;">
<tbody>
<tr>
<th style="padding: 4px 8px; font-weight: bold;">浏览器，版本，操作系统</th>
<th style="padding: 4px 8px; font-weight: bold;">测试结果</th>
<th style="padding: 4px 8px; font-weight: bold;">退路</th>
</tr>
<tr class="works">
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">Firefox 3.0.5 (OS X, Windows XP, Vista)</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">支持</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">—</td>
</tr>
<tr class="not">
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">Firefox 2.0.0.18 (PC)</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">不支持</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">纯色</td>
</tr>
<tr class="works">
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">Safari 4 (Developer Preview, Mac)</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">支持</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">—</td>
</tr>
<tr class="works">
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">Safari 3.2.1 (PC)</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">支持</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">—</td>
</tr>
<tr class="works">
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">Mobile Safari (iPhone)</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">支持</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">—</td>
</tr>
<tr class="not">
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">Opera 9.6.1</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">不支持</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">纯色</td>
</tr>
<tr class="not">
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">IE 5.5 (PC via IETester)</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">不支持</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">无色</td>
</tr>
<tr class="not">
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">IE 6 (PC via IETester)</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">不支持</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">纯色</td>
</tr>
<tr class="not">
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">IE 7</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">不支持</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">纯色</td>
</tr>
<tr class="not">
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">IE 8 beta 2</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">不支持</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">纯色</td>
</tr>
<tr class="works">
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">Google Chrome 1.0.154.43</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">支持</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">—</td>
</tr>
<tr class="works">
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">Google Chrome 1.0.154.46</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">支持</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">—</td>
</tr>
<tr class="not">
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">Netscape 4.8 (PC)</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">不支持</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">没有颜色</td>
</tr>
<tr class="not">
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">SeaMonkey 1.1.14</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">不支持</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">无色</td>
</tr>
<tr class="not">
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">SeaMonkey 1.1.16</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">不支持</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">纯色</td>
</tr>
<tr class="works">
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">SeaMonkey 2.0 beta3</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">支持</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">—</td>
</tr>
<tr class="works">
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">Sunrise 1.7.5</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">支持</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">—</td>
</tr>
<tr class="works">
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">Stainless 0.2.5</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">支持</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">–</td>
</tr>
<tr class="works">
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">Flock 2.0.2</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">支持</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">–</td>
</tr>
<tr class="works">
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">BlackBerry Storm Browser</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">支持</td>
<td style="background: #caf8c7; padding: 4px; border-bottom: 3px solid white;">纯色</td>
</tr>
<tr class="not">
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">Camino 1.6.6</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">不支持</td>
<td style="background: #f8c7c7; padding: 4px; border-bottom: 3px solid white;">纯色</td>
</tr>
</tbody>
</table>
<h3>对IE浏览器的更好的退路</h3>
<p>因为IE浏览器支持条件注释，我们可以抛弃RGB并使用IE的一个私有CSS滤镜来实现同样的效果：</p>
<div class="wp_syntax">
<table>
<tbody>
<tr>
<td class="line_numbers">
<pre>
</pre>
</td>
<td class="code">
<pre class="html4strict" style="font-family: monospace;"><span style="color: #808080; font-style: italic;">&lt;!--[if IE]&gt;</span>
<span style="color: #808080; font-style: italic;">   &lt;style type="text/css"&gt;</span>
<span style="color: #808080; font-style: italic;">   .color-block {</span>
<span style="color: #808080; font-style: italic;">       background:transparent;</span>
<span style="color: #808080; font-style: italic;">       filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000050,endColorstr=#99000050);</span>
<span style="color: #808080; font-style: italic;">       zoom: 1;</span>
<span style="color: #808080; font-style: italic;">    } </span>
<span style="color: #808080; font-style: italic;">    &lt;/style&gt;</span>
<span style="color: #808080; font-style: italic;">&lt;![endif]--&gt;</span></pre>
</td>
</tr>
</tbody>
</table>
</div>
<p>RGBa颜色可以用于border，不过，不同的浏览器对于border的RGBa支持不太一样，不过唯一的不同是，FF在border的拐角处会出现叠加，比如透明度是0.4，那么在FF中，四个角的透明度会变成0.8，而支持RGBa的<strong>非FF浏览器</strong>不会出现这种情况。</p>
<p><a href="http://css-tricks.com/rgba-browser-support/" target="_blank">转载：css-tricks</a></p>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2010/05/html5%e6%96%b0%e5%8a%9f%e8%83%bd%e6%bc%94%e7%a4%ba/" title="HTML5新功能演示">HTML5新功能演示</a></li><li><a href="http://slj.me/2010/04/%e7%94%a8css%e4%bf%ae%e6%ad%a3%e4%b8%80%e5%88%87%ef%bc%9a20%e5%a4%9a%e4%b8%aa%e5%b8%b8%e8%a7%81bug%e5%8f%8a%e5%85%b6%e4%bf%ae%e6%ad%a3%e6%96%b9%e6%b3%95/" title="用CSS修正一切：20多个常见Bug及其修正方法">用CSS修正一切：20多个常见Bug及其修正方法</a></li><li><a href="http://slj.me/2010/03/ultimate-guide-css-text-typography/" title="[转]CSS文字排版终极指南">[转]CSS文字排版终极指南</a></li><li><a href="http://slj.me/2010/03/building-iphone-apps-with-html-css-and-javascript/" title="【好书PDF】：Building iPhone Apps with HTML, CSS, and JavaScript">【好书PDF】：Building iPhone Apps with HTML, CSS, and JavaScript</a></li><li><a href="http://slj.me/2009/12/tx-qzone-rounded-avatar-css/" title="研究腾讯Qzone圆角头像CSS有感">研究腾讯Qzone圆角头像CSS有感</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/07/css-rgba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 5.3 后被禁止使用的函数</title>
		<link>http://slj.me/2010/07/deprecated-features-for-php5-3/</link>
		<comments>http://slj.me/2010/07/deprecated-features-for-php5-3/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 03:25:32 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1915</guid>
		<description><![CDATA[很久没写博客。最近还是在做Meeplace的Custom works以及2.9版的工作。同时着手准备我们的新项目Meesocial。目前不能透露内容，大家敬请期待吧。。。
今天在MacOS上安装了5.3版的PHP，结果是：对于Meeplace 2.8（调试环境）在一些页面下会警告错误。（产品级不会有警告）。查询后得知PHP5.3已经禁止了一些函数的使用，或者将其更名。在Meeplace 2.9中将兼容PHP 5.3。
官网上的说明：http://cn2.php.net/manual/en/migration53.deprecated.php
下面摘抄PHP5.3被禁止的函数
Deprecated functions:

call_user_method() (use call_user_func() instead)
call_user_method_array() (use call_user_func_array()instead)
define_syslog_variables()
dl()
ereg() (use preg_match() instead)
ereg_replace() (use preg_replace() instead)
eregi() (use preg_match() with the &#8216;i&#8217; modifier instead)
eregi_replace() (use preg_replace() with the &#8216;i&#8217; modifier instead)
set_magic_quotes_runtime() and its alias,magic_quotes_runtime()
session_register() (use the $_SESSION superglobal instead)
session_unregister() (use the $_SESSION superglobal instead)
session_is_registered() (use the $_SESSION superglobal instead)
set_socket_blocking() (use stream_set_blocking() instead)
split() (use preg_split() instead)
spliti() (use preg_split() with the &#8216;i&#8217; modifier instead)
sql_regcase()
mysql_db_query() (use mysql_select_db() andmysql_query() instead)
mysql_escape_string() (use mysql_real_escape_string()instead)
Passing locale category names as [...]]]></description>
			<content:encoded><![CDATA[<p>很久没写博客。最近还是在做Meeplace的Custom works以及2.9版的工作。同时着手准备我们的新项目Meesocial。目前不能透露内容，大家敬请期待吧。。。</p>
<p>今天在MacOS上安装了5.3版的PHP，结果是：对于Meeplace 2.8（调试环境）在一些页面下会警告错误。（产品级不会有警告）。查询后得知PHP5.3已经禁止了一些函数的使用，或者将其更名。在Meeplace 2.9中将兼容PHP 5.3。</p>
<p>官网上的说明：http://cn2.php.net/manual/en/migration53.deprecated.php</p>
<p>下面摘抄PHP5.3被禁止的函数</p>
<p><span id="more-1915"></span>Deprecated functions:</p>
<ul>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.call-user-method.php">call_user_method()</a> (use <a rel="external nofollow" href="http://cn2.php.net/manual/en/function.call-user-func.php">call_user_func()</a> instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.call-user-method-array.php">call_user_method_array()</a> (use <a rel="external nofollow" href="http://cn2.php.net/manual/en/function.call-user-func-array.php">call_user_func_array()</a>instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.define-syslog-variables.php">define_syslog_variables()</a></li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.dl.php">dl()</a></li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.ereg.php">ereg()</a> (use <a rel="external nofollow" href="http://cn2.php.net/manual/en/function.preg-match.php">preg_match()</a> instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.ereg-replace.php">ereg_replace()</a> (use <a rel="external nofollow" href="http://cn2.php.net/manual/en/function.preg-replace.php">preg_replace()</a> instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.eregi.php">eregi()</a> (use <a rel="external nofollow" href="http://cn2.php.net/manual/en/function.preg-match.php">preg_match()</a> with the <em>&#8216;i&#8217;</em> modifier instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.eregi-replace.php">eregi_replace()</a> (use <a rel="external nofollow" href="http://cn2.php.net/manual/en/function.preg-replace.php">preg_replace()</a> with the <em>&#8216;i&#8217;</em> modifier instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.set-magic-quotes-runtime.php">set_magic_quotes_runtime()</a> and its alias,<a rel="external nofollow" href="http://cn2.php.net/manual/en/function.magic-quotes-runtime.php">magic_quotes_runtime()</a></li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.session-register.php">session_register()</a> (use the <var></var><var><a rel="external nofollow" href="http://cn2.php.net/manual/en/reserved.variables.session.php">$_SESSION</a></var> superglobal instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.session-unregister.php">session_unregister()</a> (use the <var></var><var><a rel="external nofollow" href="http://cn2.php.net/manual/en/reserved.variables.session.php">$_SESSION</a></var> superglobal instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.session-is-registered.php">session_is_registered()</a> (use the <var></var><var><a rel="external nofollow" href="http://cn2.php.net/manual/en/reserved.variables.session.php">$_SESSION</a></var> superglobal instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.set-socket-blocking.php">set_socket_blocking()</a> (use <a rel="external nofollow" href="http://cn2.php.net/manual/en/function.stream-set-blocking.php">stream_set_blocking()</a> instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.split.php">split()</a> (use <a rel="external nofollow" href="http://cn2.php.net/manual/en/function.preg-split.php">preg_split()</a> instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.spliti.php">spliti()</a> (use <a rel="external nofollow" href="http://cn2.php.net/manual/en/function.preg-split.php">preg_split()</a> with the <em>&#8216;i&#8217;</em> modifier instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.sql-regcase.php">sql_regcase()</a></li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.mysql-db-query.php">mysql_db_query()</a> (use <a rel="external nofollow" href="http://cn2.php.net/manual/en/function.mysql-select-db.php">mysql_select_db()</a> and<a rel="external nofollow" href="http://cn2.php.net/manual/en/function.mysql-query.php">mysql_query()</a> instead)</li>
<li><a rel="external nofollow" href="http://cn2.php.net/manual/en/function.mysql-escape-string.php">mysql_escape_string()</a> (use <a rel="external nofollow" href="http://cn2.php.net/manual/en/function.mysql-real-escape-string.php">mysql_real_escape_string()</a>instead)</li>
<li>Passing locale category names as strings is now deprecated. Use the LC_* family of constants instead.</li>
<li>The <em><tt>is_dst</tt></em> parameter to <a rel="external nofollow" href="http://cn2.php.net/manual/en/function.mktime.php">mktime()</a>. Use the new timezone handling functions instead.</li>
</ul>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2010/03/godaddy-no-input-file-specified-solution/" title="Godaddy的No input file specified错误（php+fastcgi）">Godaddy的No input file specified错误（php+fastcgi）</a></li><li><a href="http://slj.me/2010/01/syntax-error-unexpected-t_concat_equal/" title="syntax error, unexpected T_CONCAT_EQUAL">syntax error, unexpected T_CONCAT_EQUAL</a></li><li><a href="http://slj.me/2010/01/php-%e5%8f%98%e9%87%8f%e7%9a%84%e5%bc%ba%e5%88%b6%e7%b1%bb%e5%9e%8b%e8%bd%ac%e6%8d%a2/" title="PHP 变量的强制类型转换">PHP 变量的强制类型转换</a></li><li><a href="http://slj.me/2010/01/php-magic_quotes_gpc-magic_quotes_runtime/" title="PHP 中 magic_quotes_gpc 和 magic_quotes_runtime 的区别，作用和用法">PHP 中 magic_quotes_gpc 和 magic_quotes_runtime 的区别，作用和用法</a></li><li><a href="http://slj.me/2009/12/json-on-php-5-2/" title="PHP 5.2 之前的版本中使用 JSON">PHP 5.2 之前的版本中使用 JSON</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/07/deprecated-features-for-php5-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iOS4 新特性简介</title>
		<link>http://slj.me/2010/06/new-features-for-ios4/</link>
		<comments>http://slj.me/2010/06/new-features-for-ios4/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 02:57:39 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1910</guid>
		<description><![CDATA[

iOS4，也就是之前熟知的iPhone OS 啦，这个名字大家现在要适应一下了。下面罗列出iOS4在软件内核上的主要改进，基本上还是不算少了：



多任务 这个自然不用多说,招牌特性.具体细节是这样,点了home键之后,运行的程序并没有被彻底关掉,而是进入到suspended状态,就像虚拟机被暂停一 样,数据和状态都在,只是被freezed,可以随时恢复,当然也有可能随时被彻底干掉,比如在内存低的状况下.所以被suspended应用要随时准 备 着就义. 那么这个多任务究竟体现在哪里呢?

在进入休眠状态之前可以申请很短的时间,保存一些数据或者干点什么坏事.
可以向系统申请一段时间小范围的复活一下,执行一些动作
可以向系统注册local notification,说白了就是订个闹钟,在某特定时间或者特定事件跳出一个类似push notification的东西提醒用户.


 local notification 简单说就是你的app可以在系统中设定一个特定时间或者事件的提醒,就算你的app完全没有被启动也可以.push notification 的local 版本
 event kit 简单的说就是你的应用现在有办法向用户的calander添加一个事件
 core motion 动作侦测,可以提供原始数据,你可以自己做数据处理,也可以提供系统处理后的数据,比如角速度什么的.在拥有陀螺仪的设备上还可以提供陀螺仪的数据
 数据保护 app现在可以设定一些数据是被高度保护的.这些数据会写在系统的一个加密的区域内.一旦用户锁定了机器,这些数据就没有办法被访问.
 core telephony 现在app可以通过这个framework获取当前运营商的一些数据.当有电话进来的时候,app也会收到
 iad 广告系统.值得一提的是iad目前有自己的开发工具和测试工具.开发者portal里面有下载
 高分辨率解决方案 这个基本不需要知道什么,系统自己会帮你处理好就是了
 quick look mac os 里面就是个鸡肋的功能,不知道iphone里面有什么用
 av foundation 比起3.x的强大一些,但是感觉都是一些本来就应该有的,不细说了.
 assets library 给app提供可能去管理用户的照片和video
 image i/o 提供导入导出图片的功能,不知道和uiimage的data转换的api有什么联系 13.block objects 终于引入了闭包的概念.这玩意肯定会火一阵子.不过看结构还是有些奇怪,^,这个符号&#8230;
 GCD 不太明白,回头查资料
 accelerate framework 一开始以为是加速度传感器相关的,看了说明后发现是相当于提供了接口访问协处理器.大数据量的高速处理,iphone 4 的720p拍摄和编辑肯定少不了这个家伙的功劳
 [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste"><img class="thumb" src="http://slj.me/wp-content/uploads/2010/06/iso4_post_thumb.png" alt="" width="595" height="260" /></div>
<div></div>
<div>iOS4，也就是之前熟知的iPhone OS 啦，这个名字大家现在要适应一下了。下面罗列出iOS4在软件内核上的主要改进，基本上还是不算少了：</div>
<div><span id="more-1910"></span></div>
<div id="_mcePaste">
<ol>
<li>多任务 这个自然不用多说,招牌特性.具体细节是这样,点了home键之后,运行的程序并没有被彻底关掉,而是进入到suspended状态,就像虚拟机被暂停一 样,数据和状态都在,只是被freezed,可以随时恢复,当然也有可能随时被彻底干掉,比如在内存低的状况下.所以被suspended应用要随时准 备 着就义. 那么这个多任务究竟体现在哪里呢?
<ol>
<li>在进入休眠状态之前可以申请很短的时间,保存一些数据或者干点什么坏事.</li>
<li>可以向系统申请一段时间小范围的复活一下,执行一些动作</li>
<li>可以向系统注册local notification,说白了就是订个闹钟,在某特定时间或者特定事件跳出一个类似push notification的东西提醒用户.</li>
</ol>
</li>
<li> local notification 简单说就是你的app可以在系统中设定一个特定时间或者事件的提醒,就算你的app完全没有被启动也可以.push notification 的local 版本</li>
<li> event kit 简单的说就是你的应用现在有办法向用户的calander添加一个事件</li>
<li> core motion 动作侦测,可以提供原始数据,你可以自己做数据处理,也可以提供系统处理后的数据,比如角速度什么的.在拥有陀螺仪的设备上还可以提供陀螺仪的数据</li>
<li> 数据保护 app现在可以设定一些数据是被高度保护的.这些数据会写在系统的一个加密的区域内.一旦用户锁定了机器,这些数据就没有办法被访问.</li>
<li> core telephony 现在app可以通过这个framework获取当前运营商的一些数据.当有电话进来的时候,app也会收到</li>
<li> iad 广告系统.值得一提的是iad目前有自己的开发工具和测试工具.开发者portal里面有下载</li>
<li> 高分辨率解决方案 这个基本不需要知道什么,系统自己会帮你处理好就是了</li>
<li> quick look mac os 里面就是个鸡肋的功能,不知道iphone里面有什么用</li>
<li> av foundation 比起3.x的强大一些,但是感觉都是一些本来就应该有的,不细说了.</li>
<li> assets library 给app提供可能去管理用户的照片和video</li>
<li> image i/o 提供导入导出图片的功能,不知道和uiimage的data转换的api有什么联系 13.block objects 终于引入了闭包的概念.这玩意肯定会火一阵子.不过看结构还是有些奇怪,^,这个符号&#8230;</li>
<li> GCD 不太明白,回头查资料</li>
<li> accelerate framework 一开始以为是加速度传感器相关的,看了说明后发现是相当于提供了接口访问协处理器.大数据量的高速处理,iphone 4 的720p拍摄和编辑肯定少不了这个家伙的功劳</li>
<li> xcode里面集成了类似selenium的ui自动化测试工具. 而且测试脚本都是js写的,这..就..奇&#8230;怪&#8230;了&#8230;</li>
<li> uiapplication里面增加了处理提供local notification的api</li>
<li> imagepicker现在可以捕捉视频,并且可以选用哪个摄像头,是否用闪光灯</li>
<li> app现在可以收到来自线控的事件通知了</li>
<li> 正则表达终于被正式支持了,泪! nsregularexpression</li>
<li> nscache出现了,不知道会有什么好处</li>
<li> game kit登场,iphone里面的内置的game center要开始吞噬open feint的地盘了</li>
<li> core location开始支持用手机网络进行粗略定位,并且在所在基站变化(使用者位置有了较大的改变)时向应用发布通知</li>
<li> map kit开始支持annotation的拖放,我泪啊!当年我发现这玩意不能拖放的时候实在无法接受这个现实! map kit开始创建一个复杂的view作为annotation</li>
<li> message UI. big one! 开始支持应用直接在应用内部打开一个message composer,写短信,然后发出去,完全不用切换到短信的应用.</li>
<li> 支持自定义键盘</li>
</ol>
</div>
<h2  class="related_post_title">Other Posts / 其他文章</h2><ul class="related_post"><li><a href="http://slj.me/2009/06/louzui-com-1/" title="漏嘴空想 之一">漏嘴空想 之一</a></li><li><a href="http://slj.me/2010/02/meeplace-2-5-released-feb-4-2010/" title="MeePlace 2.5 Released [Feb 4, 2010]">MeePlace 2.5 Released [Feb 4, 2010]</a></li><li><a href="http://slj.me/2009/04/website-architecture/" title="网站架构（页面静态化，图片服务器分离,负载均衡）方案全解析">网站架构（页面静态化，图片服务器分离,负载均衡）方案全解析</a></li><li><a href="http://slj.me/2010/01/meeclones-2-2-released/" title="MeeClones 2.2 Released [Jan 10, 2010]">MeeClones 2.2 Released [Jan 10, 2010]</a></li><li><a href="http://slj.me/2009/06/php-timezone-setting/" title="PHP中的时区设置 PHP TimeZone">PHP中的时区设置 PHP TimeZone</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/06/new-features-for-ios4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s new for Meeplace 2.8</title>
		<link>http://slj.me/2010/05/whats-new-for-meeplace-2-8/</link>
		<comments>http://slj.me/2010/05/whats-new-for-meeplace-2-8/#comments</comments>
		<pubDate>Fri, 21 May 2010 15:54:46 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[MeePlace]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1859</guid>
		<description><![CDATA[
Chinese Notes:
接近两个月的更新工作，Meeplace 2.8将于明天正式发布啦！新版本将会亮相许多很闪光的功能，而且将原生支持中文哦！不过国内应该还是不能随便开这种可以随.意.言.论的网站吧，有兴趣的童鞋欢迎继续阅读。
English Notes:
After two months&#8217; work, With a lot of cool features integrated, Meeplace 2.8 will be officially released tomorrow. If you are interested in this, please continue reading this article.

Now I will introduce some great features to you:
Feature 1: Multi-language Support

Now, Meeplace can automatically judge the language of the visitor&#8217;s browser. When you [...]]]></description>
			<content:encoded><![CDATA[<p><img class="thumb" src="http://slj.me/wp-content/uploads/2010/05/meeplace2.8-post_thumb.png" alt="What's new for Meeplace 2.8" width="595" height="260" /></p>
<p><strong>Chinese Notes:</strong></p>
<blockquote><p>接近两个月的更新工作，Meeplace 2.8将于明天正式发布啦！新版本将会亮相许多很闪光的功能，而且将原生支持中文哦！不过国内应该还是不能随便开这种可以随.意.言.论的网站吧，有兴趣的童鞋欢迎继续阅读。</p></blockquote>
<p><strong>English Notes:</strong></p>
<blockquote><p>After two months&#8217; work, With a lot of cool features integrated, Meeplace 2.8 will be officially released tomorrow. If you are interested in this, please continue reading this article.</p></blockquote>
<p><span id="more-1859"></span></p>
<h3>Now I will introduce some great features to you:</h3>
<h3>Feature 1: Multi-language Support</h3>
<p><a href="http://slj.me/wp-content/uploads/2010/05/mp-multi-language.png"><img class="alignnone size-full wp-image-1864" title="mp-multi-language" src="http://slj.me/wp-content/uploads/2010/05/mp-multi-language.png" alt="" width="570" height="336" /></a></p>
<p>Now, Meeplace can automatically judge the language of the visitor&#8217;s browser. When you visit Meeplace for the first time, Meeplace will be displayed with the same language as your browser. Also you can click the language you want to switch, and Meeplace will leave a cookie in your browser. Next time you visit Meeplace, the language you set last time will be shown. And in the first release of multi-language, only English and Simplified Chinese added, because I only know these two languages. Also if you are interested in making a new language pack, you can follow the steps. And don&#8217;t forget to contribute your language pack to us if you like. Many thanks!</p>
<blockquote><p>Make a Language Pack for Meeplace:<br />
1. Go to /languages/<br />
2. Create a folder, name it as the region name. like en-us. with all small letters.<br />
3. Copy /languages/zh-cn/text.php as a sample file to the folder you create above.<br />
4. Modify the variables in this file. First you should know English =D<br />
5. Edit /languages/list.php  add two variables.. one is language text which will be shown on the Language Bar on header, another is a flag icon filename.<br />
6. Create a flag icon picture to /theme/default/images/flags. Name it as the file name you leave in Step 5.<strong><br />
</strong></p></blockquote>
<h3>Feature 2: User Galleries</h3>
<p><img class="alignnone size-full wp-image-1869" title="mp-gallery" src="http://slj.me/wp-content/uploads/2010/05/mp-gallery.jpg" alt="" width="470" height="280" /><br />
With a new AJAX user galleries, user can share their photos and set one as avatar.</p>
<h3>Feature 3: Auto Generated Maps</h3>
<p><img class="alignnone size-full wp-image-1870" title="mp-automap" src="http://slj.me/wp-content/uploads/2010/05/mp-automap.jpg" alt="" width="470" height="280" /><br />
Now Meeplace will auto-generate maps for each listing and also give you the option to verify the location is correct.<br />
When you adding a business, after you typed in the business address or selected the city/states, a keyword list will show below the map, you can check the keywords you want to let Google Map search for the accurate position. Or you can also type in the keywords directly.<br />
Also in admin panel, the Map Settings will allow you to locate your physical position with HTML5 technology (IE do not support HTML5).</p>
<h3>Feature 4: Facebook Connect</h3>
<p>Due to Facebook modified their developer API. Now I can&#8217;t get &#8216;Email&#8217; field from Facebook. So after visitor log in Meeplace with FacebookConnect for the first time, Meeplace will guide visitor to complete the email address and optional nickname. With email address, visitors can enjoy fully with Meeplace. What fun? Read the following.</p>
<h3>Feature 5: New Notification</h3>
<p><img src="http://slj.me/wp-content/uploads/2010/05/mp-new-notification.png" alt="" title="mp-new-notification" width="570" height="336" class="alignnone size-full wp-image-1879" /><br />
Yes! Now, when you submit or claim a business, you will receive an email about the result when admin made a decision. Also admin will receive an email when users claim a business, submit a business, or submit an event.</p>
<h3>Feature 6: Star Business Listings</h3>
<p><img class="alignnone size-full wp-image-1871" title="mp-starbiz" src="http://slj.me/wp-content/uploads/2010/05/mp-starbiz.jpg" alt="" width="470" height="280" /><br />
Business will be able to have star listings. Star listings will appear higher then other listings on your site.<br />
Aha! What ideas coming up? Make money? Maybe yes, you can custom the code to make Star Biz a special CSS or some more features.</p>
<p>It&#8217;s very late here, so I gotta sleep right now.<br />
Excited with the new feature Meeplace 2.8 will bring to you? We will release the new version code tomorrow!<br />
Btw, Bryan made a very cool official site, also bring to you tomorrow!</p>
<hr />
<h3>See a full list of What&#8217;s new:</h3>
<blockquote><p>May 22, 2010    MeePlace V2.8<br />
1. New &#8211; Multi Language feature.<br />
2. New &#8211; New Language Packs: English, Chinese Simplified<br />
3. New &#8211; More business fields are available to edit by owner, including adjust map, delete photos.<br />
4. New &#8211; A rating tips when writing a review or posting a business.<br />
5. New &#8211; Business Photo list in admin panel.<br />
6. New &#8211; Able to change business folder to another name from /business<br />
7. New &#8211; Star Business: Allow business to be a special one. Which will differs the business from features.<br />
8. New &#8211; AJAX User Gallery.<br />
9. New &#8211; Auto Address to Map feature when adding a business.<br />
10.New &#8211; Add &#8220;Find My Position&#8221; and &#8220;Address to Map&#8221; for default map settings in admin panel.<br />
11.New &#8211; Add &#8220;Send Email Newsletter&#8221; and &#8220;Send PM Newsletter&#8221; in admin panel.<br />
12. New &#8211; New notifications: &#8216;Business submit&#8217; to admin,<br />
13. New &#8211; New notifications: &#8216;Business approved&#8217; to submitter,<br />
14. New &#8211; New notifications: &#8216;Business claim&#8217; to admin,<br />
15. New &#8211; New notifications: &#8216;Result of business claim&#8217; to requester.<br />
16. New &#8211; New notifications: &#8216;Event submit&#8217; to admin,<br />
17. New &#8211; New notifications: &#8216;Event approved&#8217; to submitter,<br />
18. New &#8211; Allow editing of permalink in admin.<br />
19. New &#8211; Allow claimed user to edit permalink.<br />
20. New &#8211; New AD Position manage allow admin to add unlimited ad position.<br />
21. New &#8211; FB connect users need to complete email and nickname after first login.<br />
22. New &#8211; FB connect users can also set a nickname to hide the true name now.<br />
23. New &#8211; Support grab video URL from YouTube video page URL when adding business.<br />
24. Fix &#8211; Business Review pagination fixed.<br />
25. Fix &#8211; Added NA option for price range when adding or editing business.<br />
26. Fix &#8211; Be able to submit header login form when press Enter.<br />
27. Fix &#8211; Review order fixed for the first page static reviews.<br />
28. Fix &#8211; New rating rule for star picture adjusted.(Score more than 4.75 will be 5 stars)<br />
29. Fix &#8211; Up to 100 items per page for Business List in admin panel.<br />
30. Fix &#8211; Because of the adjustment of Facebook&#8217;s API , Facebook Connect script modified.<br />
31. Fix &#8211; Remove the display of a person&#8217;s last name if they didn&#8217;t enter it in during sign up<br />
32. Fix &#8211; Now allow &#8216; in categories and cities name.<br />
33. Fix &#8211; Fixed if event doesn&#8217;t have a end date, it displays itself in the Today section.<br />
34. Fix &#8211; Fixed permalink bug when adding business.<br />
35. Developer &#8211; Kernal functions like turn_date(), utf_substr() etc upgraded. Fully supported eastern languages, custom time format.<br />
36. Developer &#8211; New kernal files re-coded to be OOP classes.</p></blockquote>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 816px; width: 1px; height: 1px; overflow: hidden;">
<p><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: Simsun; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial,sans-serif; font-size: 13px;"> </span></span></p>
<div><br class="Apple-interchange-newline" /></div>
<div>1. go to /languages/</div>
<div>2. create a folder, as the region name. like en-us. with all small letters.</div>
<div>3. copy /languages/zh-cn/<span class="il" style="background-color: #22a0d3;">text</span>.<span class="il" style="background-color: #22a0d3;">php</span><span class="Apple-converted-space"> </span>to the folder you create</div>
<div>4. modify the variables in this file in your region folder</div>
<div>5.edit /languages/list.<span class="il" style="background-color: #22a0d3;">php</span><span class="Apple-converted-space"> </span> add two variables.. one is language<span class="Apple-converted-space"> </span><span class="il" style="background-color: #22a0d3;">text</span>, one is icon filename.</div>
<div>6. upload the icon picture to /theme/default/images/flags</div>
<p><br class="Apple-interchange-newline" /></p>
</div>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2010/03/multiple-selectable-checkbox-ajax-submit/" title="[原创]多选/全选checkbox，AJAX提交。另附IE的onchange BUG">[原创]多选/全选checkbox，AJAX提交。另附IE的onchange BUG</a></li><li><a href="http://slj.me/2010/02/meeplace-2-6-release-feb-13-2010/" title="Meeplace 2.6 Release [Feb 13, 2010]">Meeplace 2.6 Release [Feb 13, 2010]</a></li><li><a href="http://slj.me/2010/01/%e4%bb%8a%e6%97%a5%e6%96%b0%e9%97%bb%ef%bc%9ameeplace-llc%e5%9c%a8%e5%8c%97%e7%be%8e%e6%b3%a8%e5%86%8c/" title="今日新闻：MeePlace LLC在北美注册">今日新闻：MeePlace LLC在北美注册</a></li><li><a href="http://slj.me/2010/01/%e5%85%b3%e4%ba%8emeeplace-2-4%e7%9a%84%e4%b8%ad%e6%96%87%e7%89%88%e8%af%b4%e6%98%8e/" title="我的近况与MeePlace 2.4说明">我的近况与MeePlace 2.4说明</a></li><li><a href="http://slj.me/2010/01/theme-upgrade-advice-for-meeplace-2-4/" title="Theme Upgrade Advice For MeePlace 2.4">Theme Upgrade Advice For MeePlace 2.4</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/05/whats-new-for-meeplace-2-8/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>我的电脑情缘（流水帐）</title>
		<link>http://slj.me/2010/05/my-footprint/</link>
		<comments>http://slj.me/2010/05/my-footprint/#comments</comments>
		<pubDate>Tue, 11 May 2010 09:04:13 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1786</guid>
		<description><![CDATA[
博客更新，整理一下，把原来的“关于我”换成新做的简历，原来的内容就放到本文里，做个纪念吧。
下文写于：2009年3月22日


奇亚 &#8211; Kiya.cn
申力军(David Shen)
现就读于福建武夷学院
从小爱计算机，现在对WEB开发技术兴趣浓厚，依然在学习和提高自己。

My Memory &#38; Footprints&#8230;.
1997年
小学二年级时开始学习电脑。那时候最喜欢玩DOS下的BAT批处理文件。
觉得Windows 95的开机声音好好听！我到现在还记得！采样率不是很高的“咚~~咚~~  叮~叮叮叮叮&#8230;”好像是这么唱来着。
觉得Netscape比IE难用多了！
1998年
三年级时学习HTML，并用FrontPage做成自己第一个个人网站，起名叫《星空网》，（哇！这三个字写起来好温馨），为了给它起一个英文名，想了半天，最后把新浪网&#8217;sina&#8217;的&#8217;n'改成&#8217;c'，从此叫&#8217;sica&#8217;。学会套JS代码给页面“添彩”。
个人主页空间是网易提供的，网址是什么记不住了，好像是my.163.com/~sica。后来弄了个sica.my163.com的免费二级域名，好高兴。对了，那年用上了Windows 98。
xxxx年
时间记不得了，参加了一个小攒机店举办的一个小比赛，现场用《金山画王》做一幅卡通画，获了一等奖，奖品是在店里随便挑一张盗版光盘，现在想起来是有那么点幼稚，HOHO，不过蛮好玩的，拽贴图就像拽控件一样……
1999年
开始大面积摸索Visual Basic，ASP，Flash……（还有什么也想不起来了）。
好像是这一年开始看的《电脑爱好者》杂志，一看就看到了高中。后来更喜欢《微型计算机》
2000年
小学六年级有三件大事，第一件大事是，第一次参加市级计算机类的比赛，还记得是少年宫举办的&#60;三明市“新天地杯”电脑小报设计大赛&#62;获了市一等奖，从MS Word的小报设计中学到了很多布局的东西，可以说这次比赛对日后的设计审美观起了很大的作用。
第二件大事是，星空网出了第三个版本，用的是ASP，数据库是Access，实质上是一个文章管理系统。
第三件，这一年的暑假，我缠着妈妈买了第一台电脑，联想天禧6610，P3 733，15G硬盘，32M内存，15寸CRT，简直是高配！价值人民币10988元，感谢母亲为我下的血本 =）
 2001年
上了初中，见了陈老师第一面，上了陈老师的第一节电脑课，老陈成了我真正的启蒙恩师。
这一年系统了学习了Flash，研究了Win32 API。我的第一个VB作品《星级云热键专家》进入福建省中小学电脑制作活动，获二等奖，这是人生中第一个省奖。
 2002年
这一年是最自豪的一年。虽然我的第一个FLASH网站作品《家乡三明》未能在省里获奖，但陈老师大力支持的《星级云钢琴键盘》（后更名为《电脑钢琴键盘》）在省创新大赛中获三等奖，决赛是去莆田参加的。
后来我受余校长之聘，担任“数字校园”工作室的CEO。我和工作室的同学们一起创建了三明列东中学网站。这是本市第一个由学生独立创建、制作完成的校园网站，受到三明市科协和市教育局的好评和重视。
Yuzi的BBS 2000从PERL的版本做到了ASP版，我从教务处拷来了全校学生姓名学号的数据库，在论坛注册时加了实名认证。每个周末晚上，我们都会贴海报，请老师在线答疑，举办活动，那年真的好辉煌……
那时那台宝德服务器经常被不到300人的在线数访问挂掉。这也是后来我放弃ASP+Access编程的原因之一。
我用VB写了《星级云出神入画》，是工作室里的ZZ起的名字，她至今还常挂在嘴边，后来我把它开发成共享软件，做了双语版，改名Amazing Picture，随着功能不断扩张，最后变成了一个图形编辑套件，改名Magic Image Studio，在Softreg.com.cn（原来叫“网路”）里一卖就是六七年。同时在海外销售，最多的一次一个月赚了快400块钱。
2003年
这一年我初三了，面对着考进市重点二中的升学压力，我对电脑的学习研究进度也变得很缓慢。
第一个FLASH动画作品《云层移动机》获得了福建省中小学电脑制作活动一等奖。
这三年的计算机获奖让我在中考差二中线5分的情况下加了10分的附加分，顺利正取。
 2004年 &#8211; 2005年
从2003年一直到了2006年的夏天，四年左右的计算机学习停滞让我错过了业内许多东西，当我考上大学之后，我才发现一切都变了！
2006年
我将我的Magic Image Studio图像处理套件软件换了个名字《小画家》，参加了福建省中小学电脑制作活动，很意外的，我作为福建省中小学电脑制作活动一等奖获得者、本省唯一入围全国决赛的高中组选手赴上海参加了中央电教馆举办的第七届全国中小学电脑制作活动，通过机试和答辩，获得该组全国第4名（二等奖）的好成绩，因此也获得了2007年高考保送资格以及高考20分的加分照顾。那年冬天，我的母亲病重住院手术，在全国保送生申报时我未向任何高校递送个人资料，失去了申请保送的机会。
2007年
6月高考，因理综发挥失常，未能取得我应有的成绩。提前批第一志愿，一所新建二本，福建省武夷学院，录取计算机科学与技术专业。开始了大学生涯。
那年的暑假做了两个小项目：为澳洲一慈善机构做了一个静态网站；用VB为本地一个医药公司开发了一个药检单管理与打印软件。
带着ASP的基础开始学习PHP
2008年
自荐加入了校网络中心，重新学习了XHTML+CSS构页，Javascript，AJAX，PHP做了几个项目，开始学习MVC架构，学习Linux，还有很多很多要学……
一步一个脚印，从头开始
申力军
2009年3月22日 于 福建省武夷山市
Update:  May 19, 2010
大学时光过得真快。在这三年里，我还是有一点小成绩的，嘿嘿
2008至今：Meeplace &#8211; 类似“口碑网”的大众评论CMS （收费商业脚本）
2009：PHP Licenser &#8211; 用于PHP产品的许可证管理系统，成功用于Meeplace至今
2009：CutHTML &#8211; 在线PSD转HTML/CSS服务（工作繁忙已暂停）
Other Posts / 其他文章Godaddy上启用 Zend OptimizerBase64 javascript encode decode 另一种不错的方法本人获得2009年福建省高等学校省级三好学生50个最好的WordPress插件20多个漂亮的使用jQuery交互的网站设计欣赏]]></description>
			<content:encoded><![CDATA[<p><img class="thumb" src="http://slj.me/wp-content/uploads/2010/05/my_computer_love_post_thumb.png" alt="我的电脑情缘（流水帐）" width="595" height="260" /></p>
<p>博客更新，整理一下，把原来的“关于我”换成新做的简历，原来的内容就放到本文里，做个纪念吧。</p>
<p>下文写于：2009年3月22日</p>
<p><span id="more-1786"></span></p>
<hr /><span style="color: #993300;"><br />
奇亚 &#8211; Kiya.cn</span></p>
<p>申力军(David Shen)</p>
<p>现就读于福建武夷学院</p>
<p>从小爱计算机，现在对WEB开发技术兴趣浓厚，依然在学习和提高自己。</p>
<p><span style="color: #993300;"><!--more--></span></p>
<h2><span style="color: #ff6600;">My Memory &amp; Footprints&#8230;.</span></h2>
<p><span style="color: #009900;">1997年</span></p>
<p>小学二年级时开始学习电脑。那时候最喜欢玩DOS下的BAT批处理文件。</p>
<p>觉得Windows 95的开机声音好好听！我到现在还记得！采样率不是很高的“咚~~咚~~  叮~叮叮叮叮&#8230;”好像是这么唱来着。</p>
<p>觉得Netscape比IE难用多了！</p>
<p><span style="color: #009900;">1998年</span></p>
<p>三年级时学习HTML，并用FrontPage做成自己第一个个人网站，起名叫《星空网》，（哇！这三个字写起来好温馨），为了给它起一个英文名，想了半天，最后把新浪网&#8217;sina&#8217;的&#8217;n'改成&#8217;c'，从此叫&#8217;sica&#8217;。学会套JS代码给页面“添彩”。</p>
<p>个人主页空间是网易提供的，网址是什么记不住了，好像是my.163.com/~sica。后来弄了个sica.my163.com的免费二级域名，好高兴。对了，那年用上了Windows 98。</p>
<p><span style="color: #009900;">xxxx年</span></p>
<p>时间记不得了，参加了一个小攒机店举办的一个小比赛，现场用《金山画王》做一幅卡通画，获了一等奖，奖品是在店里随便挑一张盗版光盘，现在想起来是有那么点幼稚，HOHO，不过蛮好玩的，拽贴图就像拽控件一样……</p>
<p><span style="color: #009900;">1999年</span></p>
<p>开始大面积摸索Visual Basic，ASP，Flash……（还有什么也想不起来了）。</p>
<p>好像是这一年开始看的《电脑爱好者》杂志，一看就看到了高中。后来更喜欢《微型计算机》</p>
<p><span style="color: #009900;">2000年</span></p>
<p>小学六年级有三件大事，第一件大事是，第一次参加市级计算机类的比赛，还记得是少年宫举办的&lt;三明市“新天地杯”电脑小报设计大赛&gt;获了市一等奖，从MS Word的小报设计中学到了很多布局的东西，可以说这次比赛对日后的设计审美观起了很大的作用。</p>
<p>第二件大事是，星空网出了第三个版本，用的是ASP，数据库是Access，实质上是一个文章管理系统。</p>
<p>第三件，这一年的暑假，我缠着妈妈买了第一台电脑，联想天禧6610，P3 733，15G硬盘，32M内存，15寸CRT，简直是高配！价值人民币10988元，<span style="color: #ff0000;">感谢母亲为我下的血本 =）</span></p>
<p><span style="color: #009900;"> 2001年</span></p>
<p>上了初中，见了陈老师第一面，上了陈老师的第一节电脑课，<span style="color: #ff0000;">老陈成了我真正的启蒙恩师</span>。</p>
<p>这一年系统了学习了Flash，研究了Win32 API。我的第一个VB作品《星级云热键专家》进入福建省中小学电脑制作活动，获二等奖，这是人生中第一个省奖。</p>
<p><span style="color: #009900;"> 2002年</span></p>
<p>这一年是最自豪的一年。虽然我的第一个FLASH网站作品《家乡三明》未能在省里获奖，但陈老师大力支持的《星级云钢琴键盘》（后更名为《电脑钢琴键盘》）在省创新大赛中获三等奖，决赛是去莆田参加的。</p>
<p>后来我受余校长之聘，担任“数字校园”工作室的CEO。我和工作室的同学们一起创建了三明列东中学网站。这是本市第一个由学生独立创建、制作完成的校园网站，受到三明市科协和市教育局的好评和重视。</p>
<p>Yuzi的BBS 2000从PERL的版本做到了ASP版，我从教务处拷来了全校学生姓名学号的数据库，在论坛注册时加了实名认证。每个周末晚上，我们都会贴海报，请老师在线答疑，举办活动，那年真的好辉煌……</p>
<p>那时那台宝德服务器经常被不到300人的在线数访问挂掉。这也是后来我放弃ASP+Access编程的原因之一。</p>
<p>我用VB写了《星级云出神入画》，是工作室里的ZZ起的名字，她至今还常挂在嘴边，后来我把它开发成共享软件，做了双语版，改名Amazing Picture，随着功能不断扩张，最后变成了一个图形编辑套件，改名<a rel="external nofollow" href="http://www.skycn.com/soft/22098.html">Magic Image Studio</a>，在Softreg.com.cn（原来叫“网路”）里一卖就是六七年。同时在海外销售，最多的一次一个月赚了快400块钱。</p>
<p><span style="color: #009900;">2003年</span></p>
<p>这一年我初三了，面对着考进市重点二中的升学压力，我对电脑的学习研究进度也变得很缓慢。</p>
<p>第一个FLASH动画作品《云层移动机》获得了福建省中小学电脑制作活动一等奖。</p>
<p>这三年的计算机获奖让我在中考差二中线5分的情况下加了10分的附加分，顺利正取。</p>
<p><span style="color: #009900;"> 2004年 &#8211; 2005年</span></p>
<p>从2003年一直到了2006年的夏天，四年左右的计算机学习停滞让我错过了业内许多东西，当我考上大学之后，我才发现一切都变了！</p>
<p><span style="color: #009900;">2006年</span></p>
<p>我将我的Magic Image Studio图像处理套件软件换了个名字《小画家》，参加了福建省中小学电脑制作活动，很意外的，我作为福建省中小学电脑制作活动一等奖获得者、本省唯一入围全国决赛的高中组选手赴上海参加了中央电教馆举办的第七届全国中小学电脑制作活动，通过机试和答辩，获得该组全国第4名（二等奖）的好成绩，因此也获得了2007年高考保送资格以及高考20分的加分照顾。那年冬天，我的母亲病重住院手术，在全国保送生申报时我未向任何高校递送个人资料，失去了申请保送的机会。</p>
<p><span style="color: #009900;">2007年</span></p>
<p>6月高考，因理综发挥失常，未能取得我应有的成绩。提前批第一志愿，一所新建二本，福建省武夷学院，录取计算机科学与技术专业。开始了大学生涯。</p>
<p>那年的暑假做了两个小项目：为澳洲一慈善机构做了一个静态网站；用VB为本地一个医药公司开发了一个药检单管理与打印软件。</p>
<p>带着ASP的基础开始学习PHP</p>
<p><span style="color: #009900;">2008年</span></p>
<p>自荐加入了校网络中心，重新学习了XHTML+CSS构页，Javascript，AJAX，PHP做了几个项目，开始学习MVC架构，学习Linux，还有很多很多要学……</p>
<p>一步一个脚印，从头开始</p>
<p style="text-align: left;"><span style="color: #999999;">申力军</span></p>
<p><span style="color: #999999;">2009年3月22日 于 福建省武夷山市</span></p>
<h2><span><span style="color: #ff0000;">Update:  May 19, 2010</span></span></h2>
<p><span style="color: #800000;">大学时光过得真快。在这三年里，我还是有一点小成绩的，嘿嘿</span></p>
<p><span style="color: #800000;">2008至今：<a href="http://www.meeplace.com" target="_blank">Meeplace</a> &#8211; 类似“口碑网”的大众评论CMS （收费商业脚本）</span></p>
<p><span style="color: #800000;">2009：<a href="http://www.phplicenser.com" target="_blank">PHP Licenser</a> &#8211; 用于PHP产品的许可证管理系统，成功用于Meeplace至今</span></p>
<p><span style="color: #800000;">2009：<a href="http://www.cuthtml.com" target="_blank">CutHTML</a> &#8211; 在线PSD转HTML/CSS服务（工作繁忙已暂停）</span></p>
<h2  class="related_post_title">Other Posts / 其他文章</h2><ul class="related_post"><li><a href="http://slj.me/2009/09/compatible-with-ie6-css-picture-middle-vertical-align/" title="完美兼容IE6，摆脱table用CSS实现图片垂直居中">完美兼容IE6，摆脱table用CSS实现图片垂直居中</a></li><li><a href="http://slj.me/2009/10/php-websites-development-project/" title="[转]PHP网站开发方案（开发新人必读）">[转]PHP网站开发方案（开发新人必读）</a></li><li><a href="http://slj.me/2010/03/13-google-chrome-plugin/" title="为网页开发者准备的13个Google Chrome浏览器扩展">为网页开发者准备的13个Google Chrome浏览器扩展</a></li><li><a href="http://slj.me/2009/03/base64-javascript/" title="Base64 javascript encode decode">Base64 javascript encode decode</a></li><li><a href="http://slj.me/2010/03/multiple-selectable-checkbox-ajax-submit/" title="[原创]多选/全选checkbox，AJAX提交。另附IE的onchange BUG">[原创]多选/全选checkbox，AJAX提交。另附IE的onchange BUG</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/05/my-footprint/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HTML5新功能演示</title>
		<link>http://slj.me/2010/05/html5%e6%96%b0%e5%8a%9f%e8%83%bd%e6%bc%94%e7%a4%ba/</link>
		<comments>http://slj.me/2010/05/html5%e6%96%b0%e5%8a%9f%e8%83%bd%e6%bc%94%e7%a4%ba/#comments</comments>
		<pubDate>Sat, 01 May 2010 10:34:18 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1728</guid>
		<description><![CDATA[
这是一个HTML5新功能的演示文档，几乎包括HTML5所有激动人心的新功能的简介和DEMO。
IE系列浏览器无法浏览，firefox、opera等浏览器只能使用部分功能，如果想100%演示成功，请使用最新版的“谷歌浏览器（Google Chrome）”，建议使用最新版。


中文原版：http://directguo.com/html5/
中文镜像：http://ioio.name/html5/html5_zh_CN.html
英文原版：http://apirocks.com/html5/html5.html
英文镜像：http://ioio.name/html5/html5.html
Related Posts / 相关文章揭秘HTML5和CSS3【好书PDF】：Building iPhone Apps with HTML, CSS, and JavaScript转牛X无敌！！！Zen Coding: 一种快速编写HTML/CSS代码的方法关于一些浏览器的的HackCSS中的RGBa色彩]]></description>
			<content:encoded><![CDATA[<p><img height="260" width="595" class="thumb" alt="HTML5新功能演示" src="http://slj.me/wp-content/uploads/2010/05/html5_post_thumb.png"/></p>
<p>这是一个HTML5新功能的演示文档，几乎包括HTML5所有激动人心的新功能的简介和DEMO。<br />
IE系列浏览器无法浏览，firefox、opera等浏览器只能使用部分功能，如果想100%演示成功，请使用最新版的“谷歌浏览器（Google Chrome）”，建议使用最新版。<br />
<span id="more-1728"></span><br />
<img class="alignnone size-full wp-image-1729" title="intohtml5-300x231" src="http://slj.me/wp-content/uploads/2010/05/intohtml5-300x231.gif" alt="" width="300" height="231" /></p>
<p>中文原版：<a href="http://directguo.com/html5/" target="_blank">http://directguo.com/html5/</a><br />
中文镜像：<a href="http://ioio.name/html5/html5_zh_CN.html" target="_blank">http://ioio.name/html5/html5_zh_CN.html</a><br />
英文原版：<a href="http://apirocks.com/html5/html5.html" target="_blank">http://apirocks.com/html5/html5.html</a><br />
英文镜像：<a href="http://ioio.name/html5/html5.html" target="_blank">http://ioio.name/html5/html5.html</a></p>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2009/12/html5-css3/" title="揭秘HTML5和CSS3">揭秘HTML5和CSS3</a></li><li><a href="http://slj.me/2010/03/building-iphone-apps-with-html-css-and-javascript/" title="【好书PDF】：Building iPhone Apps with HTML, CSS, and JavaScript">【好书PDF】：Building iPhone Apps with HTML, CSS, and JavaScript</a></li><li><a href="http://slj.me/2009/12/%e7%89%9bx%e6%97%a0%e6%95%8c%ef%bc%81%ef%bc%81%ef%bc%81zen-coding-%e4%b8%80%e7%a7%8d%e5%bf%ab%e9%80%9f%e7%bc%96%e5%86%99htmlcss%e4%bb%a3%e7%a0%81%e7%9a%84%e6%96%b9%e6%b3%95/" title="转牛X无敌！！！Zen Coding: 一种快速编写HTML/CSS代码的方法">转牛X无敌！！！Zen Coding: 一种快速编写HTML/CSS代码的方法</a></li><li><a href="http://slj.me/2009/03/browser_css_hack_ie_ff/" title="关于一些浏览器的的Hack">关于一些浏览器的的Hack</a></li><li><a href="http://slj.me/2010/07/css-rgba/" title="CSS中的RGBa色彩">CSS中的RGBa色彩</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/05/html5%e6%96%b0%e5%8a%9f%e8%83%bd%e6%bc%94%e7%a4%ba/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>23个iPhone App Store中的开源App及其源码</title>
		<link>http://slj.me/2010/04/open-source-iphone-app-store-apps/</link>
		<comments>http://slj.me/2010/04/open-source-iphone-app-store-apps/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 05:33:42 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1725</guid>
		<description><![CDATA[
There are many code examples for iPhone development, most of the examples found in books or on blogs are incomplete and only designed to illustrate a specific point.  The difference with the open source iphone apps shown on this page is that they are all available in the app store so you can see what [...]]]></description>
			<content:encoded><![CDATA[<p><img height="260" width="595" src="http://slj.me/wp-content/uploads/2010/04/23_iphone_app_post_thumb.png" alt="23个iPhone App Store中的开源App及其源码" class="thumb"/></p>
<p>There are many code examples for iPhone development, most of the examples found in books or on blogs are incomplete and only designed to illustrate a specific point.  The difference with the open source iphone apps shown on this page is that they are all available in the app store so you can see what other developers are really doing.</p>
<p>– Update March 7 – reMail and RobotFindsKitten added</p>
<p><span id="more-1725"></span></p>
<h3>The Apps</h3>
<p>Here they are listed in alphabetical order (name linked to app homepage when possible):</p>
<p><strong>1.</strong><strong> <a onclick="javascript:pageTracker._trackPageview('/outgoing/kwigbo.com/private/305272732/tumblr_kve45bK4RO1qav61q');" href="http://kwigbo.com/private/305272732/tumblr_kve45bK4RO1qav61q" target="_blank">ABC 123</a></strong> – <em>Sequence memorization game.</em> <em>Utilizes Cocos2D.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/abc123-scoreloop/id307911901?mt=8');" href="http://itunes.apple.com/us/app/abc123-scoreloop/id307911901?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/kwigbo.s3.amazonaws.com/source/ABC123.zip');" href="http://kwigbo.s3.amazonaws.com/source/ABC123.zip" target="_blank">source code</a>)</p>
<p><strong>2.</strong><strong> <a onclick="javascript:pageTracker._trackPageview('/outgoing/colloquy.info/');" href="http://colloquy.info/" target="_blank">Colloquy</a></strong> – <em>Conversion of the most popular Mac IRC client to the iPhone.</em>(<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/colloquy-irc-client/id302000478?mt=8');" href="http://itunes.apple.com/us/app/colloquy-irc-client/id302000478?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/colloquy.info/project/browser/trunk/Mobile');" href="http://colloquy.info/project/browser/trunk/Mobile" target="_blank">source code</a>)</p>
<p><strong>3. <a onclick="javascript:pageTracker._trackPageview('/outgoing/infinite-labs.net/');" href="http://infinite-labs.net/" target="_blank">Diceshaker</a> </strong>- <em>Dice rolling simulator designed for role-playing game enthusiasts.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/diceshaker/id287322475?mt=8');" href="http://itunes.apple.com/us/app/diceshaker/id287322475?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/github.com/millenomi/diceshaker');" href="http://github.com/millenomi/diceshaker" target="_blank">source code</a>)</p>
<p><strong>4. <a onclick="javascript:pageTracker._trackPageview('/outgoing/www.idsoftware.com/doom-classic/');" href="http://www.idsoftware.com/doom-classic/" target="_blank">Doom Classic</a> </strong>- <em>Classic 3D first person shooter. </em>(<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/doom-classic/id336347946?mt=8');" href="http://itunes.apple.com/us/app/doom-classic/id336347946?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/www.idsoftware.com/idstuff/doom/doomclassic_iphone_v1.0_source.zip');" href="ftp://www.idsoftware.com/idstuff/doom/doomclassic_iphone_v1.0_source.zip">source code</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/www.idsoftware.com/idstuff/doom/DoomClassicBuildInstructions.txt');" href="ftp://www.idsoftware.com/idstuff/doom/DoomClassicBuildInstructions.txt" target="_blank">build instructions</a>)</p>
<p><strong>5. <a onclick="javascript:pageTracker._trackPageview('/outgoing/community.freshbooks.com/addons/view/minibooks/');" rel="nofollow" href="http://community.freshbooks.com/addons/view/minibooks/" target="_blank">Freshbooks</a></strong> – <em>App that enables usage of Freshbooks web invoicing software from your iPhone.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/minibooks-lite-for-freshbooks/id322591584?mt=8');" href="http://itunes.apple.com/us/app/minibooks-lite-for-freshbooks/id322591584?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/github.com/freshbooks-addons/freshbooks-iphone-project');" href="http://github.com/freshbooks-addons/freshbooks-iphone-project" target="_blank">source code</a>)</p>
<p><strong>6. <a onclick="javascript:pageTracker._trackPageview('/outgoing/gorillas.lhunath.com/');" rel="nofollow" href="http://gorillas.lhunath.com/" target="_blank">Gorillas</a></strong> – <em>Classic Worms/iShoot turn based shooter type game converted to iPhone from basic. Utilizes Cocos2D. </em>(<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/gorillas-lite/id319351334?mt=8');" href="http://itunes.apple.com/us/app/gorillas-lite/id319351334?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/github.com/lhunath/Gorillas');" href="http://github.com/lhunath/Gorillas" target="_blank">source code</a>)</p>
<p><strong>7. <a onclick="javascript:pageTracker._trackPageview('/outgoing/www.last.fm/');" href="http://www.last.fm/" target="_blank">Last.fm</a></strong> – <em>Software that enables usage of the Last.fm platform for personal radio stations. </em>(<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/last-fm/id284916679?mt=8');" href="http://itunes.apple.com/us/app/last-fm/id284916679?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/github.com/c99koder/lastfm-iphone');" href="http://github.com/c99koder/lastfm-iphone" target="_blank">source code</a>)</p>
<p><strong>8. <a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/mobilesynth/');" href="http://code.google.com/p/mobilesynth/" target="_blank">Mobilesynth</a> </strong>- <em>A monophonic synthesizer designed for live performance.</em>(<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/mobilesynth-by-allen-porter/id343230453?mt=8');" href="http://itunes.apple.com/us/app/mobilesynth-by-allen-porter/id343230453?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/mobilesynth/');" href="http://code.google.com/p/mobilesynth/" target="_blank">source code</a>)</p>
<p><strong>9. <a onclick="javascript:pageTracker._trackPageview('/outgoing/www.sunsetlakesoftware.com/molecules');" href="http://www.sunsetlakesoftware.com/molecules" target="_blank">Molecules</a></strong> – <em>Allows you to view 3D models of molecules and manipulate them through touch.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/molecules/id284943090?mt=8');" href="http://itunes.apple.com/us/app/molecules/id284943090?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/www.sunsetlakesoftware.com/molecules');" href="http://www.sunsetlakesoftware.com/molecules" target="_blank">source code</a>)</p>
<p><strong>10. <a onclick="javascript:pageTracker._trackPageview('/outgoing/infinite-labs.net/mover/?_coming_from=mover-its');" href="http://infinite-labs.net/mover/?_coming_from=mover-its" target="_blank">Mover</a></strong> – <em>Allows you to transfer stuff from one iPhone to another by “flicking” it to the other device.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/mover/id320907954?mt=8');" href="http://itunes.apple.com/us/app/mover/id320907954?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/github.com/millenomi/mover-packaging/');" href="http://github.com/millenomi/mover-packaging/" target="_blank">source code</a>)</p>
<p><strong>11. <a onclick="javascript:pageTracker._trackPageview('/outgoing/iphone.natsulion.org/');" rel="nofollow" href="http://iphone.natsulion.org/" target="_blank">Natsulion</a> </strong>- <em>A basic twitter client converted from mac.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/natsulion-for-iphone/id289977677?mt=8');" href="http://itunes.apple.com/us/app/natsulion-for-iphone/id289977677?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/github.com/takuma104/ntlniph/tree/master');" href="http://github.com/takuma104/ntlniph/tree/master" target="_blank">source code</a>)</p>
<p><strong>12. <a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/metasyntactic/');" href="http://code.google.com/p/metasyntactic/" target="_blank">NowPlaying</a></strong> – <em>Allows you to check local theater listings, and check rotten tomato ratings.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/ca/app/now-playing/id284939567?mt=8');" href="http://itunes.apple.com/ca/app/now-playing/id284939567?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/metasyntactic/');" href="http://code.google.com/p/metasyntactic/" target="_blank">source code</a>)</p>
<p><strong>13. <a onclick="javascript:pageTracker._trackPageview('/outgoing/appremix.com/packlog/');" rel="nofollow" href="http://appremix.com/packlog/" target="_blank">Packlog</a></strong> – <em>Backpack journal client.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/packlog/id293882625?mt=8');" href="http://itunes.apple.com/us/app/packlog/id293882625?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/github.com/jdg/packlog');" href="http://github.com/jdg/packlog" target="_blank">source code</a>)</p>
<p><strong>14. <a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/metasyntactic/');" href="http://code.google.com/p/metasyntactic/" target="_blank">PocketFlix</a></strong> – <em>Find movies, and manage your Netflix information.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/pocketflicks/id301386724?mt=8');" href="http://itunes.apple.com/us/app/pocketflicks/id301386724?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/metasyntactic/');" href="http://code.google.com/p/metasyntactic/" target="_blank">source code</a>)</p>
<p><strong>14. <a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/remail-iphone/');" href="http://code.google.com/p/remail-iphone/" target="_blank">reMail</a></strong> – <em>E-mail client featuring ultra-fast search.  Removed from app store, but source made available. </em>(<a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/remail-iphone/');" href="http://code.google.com/p/remail-iphone/" target="_blank">source code</a>)</p>
<p><strong>14. <a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/iphonerfk/');" href="http://code.google.com/p/iphonerfk/" target="_blank">RobotFindsKitten</a></strong> – <em>Port of a very silly “classic” ASCII game.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/app/robotfindskitten/id334461163?mt=8');" href="http://itunes.apple.com/app/robotfindskitten/id334461163?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/iphonerfk/');" href="http://code.google.com/p/iphonerfk/" target="_blank">source code</a>)</p>
<p><strong>15. <a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/hpcalc-iphone/');" rel="nofollow" href="http://code.google.com/p/hpcalc-iphone/" target="_blank">Sci-15 HPCalc</a></strong> – <em>Calculator app based on classic scientific HP-Calculator.</em>(<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/sci-15c-scientific-calculator/id291967860?mt=8');" href="http://itunes.apple.com/us/app/sci-15c-scientific-calculator/id291967860?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/hpcalc-iphone/');" href="http://code.google.com/p/hpcalc-iphone/" target="_blank">source code</a>)</p>
<p><strong>16. <a onclick="javascript:pageTracker._trackPageview('/outgoing/www.taskcoach.org/');" href="http://www.taskcoach.org/" target="_blank">Task Coach</a></strong> – <em>Personal to-do list and task manager.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/now-playing/id311403563?mt=8');" href="http://itunes.apple.com/us/app/now-playing/id311403563?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/dbloete.github.com/ioctocat/');" href="http://dbloete.github.com/ioctocat/" target="_blank">source code</a>)</p>
<p><strong>17. <a onclick="javascript:pageTracker._trackPageview('/outgoing/mbarclay.net/');" href="http://mbarclay.net/" target="_blank">Tubestatus</a></strong> – <em>London train schedule tracker.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/london-tube-status/id285535503?mt=8');" href="http://itunes.apple.com/us/app/london-tube-status/id285535503?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/tubestatus/');" href="http://code.google.com/p/tubestatus/" target="_blank">source code</a>)</p>
<p><strong>18. <a onclick="javascript:pageTracker._trackPageview('/outgoing/iplayful.com/tweejump//');" href="http://iplayful.com/tweejump//" target="_blank">Tweejump</a></strong> – <em>Platform jumping game inspired by Icy Tower. Utilizes Cocos2D. </em>(<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/ca/app/tweejump/id318903704?mt=8');" href="http://itunes.apple.com/ca/app/tweejump/id318903704?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/github.com/haqu/tweejump');" href="http://github.com/haqu/tweejump" target="_blank">source code</a>)</p>
<p><strong>19.  <a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/tweetero/');" href="http://code.google.com/p/tweetero/" target="_blank">Tweetero</a></strong> – <em>Basic twitter client with image uploading.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/tweetero/id312411796?mt=8');" href="http://itunes.apple.com/us/app/tweetero/id312411796?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/tweetero/');" href="http://code.google.com/p/tweetero/" target="_blank">source code</a>)</p>
<p><strong>20. <a onclick="javascript:pageTracker._trackPageview('/outgoing/echofon.com/');" href="http://echofon.com/" target="_blank">Twitterfon</a></strong> – <em>Super-fast intuitive twitter client.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/echofon-for-twitter/id286756410?mt=8');" href="http://itunes.apple.com/us/app/echofon-for-twitter/id286756410?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/github.com/jpick/twitterfon');" href="http://github.com/jpick/twitterfon" target="_blank">source code</a>)</p>
<p><strong>21. <a onclick="javascript:pageTracker._trackPageview('/outgoing/www.wikihow.com/Use-the-wikiHow-iPhone-Application');" rel="nofollow" href="http://www.wikihow.com/Use-the-wikiHow-iPhone-Application" target="_blank">Wikihow</a></strong> – <em>A reader app for the popular how to wiki site. </em>(<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/wikihow-how-to-diy-survival/id309209200?mt=8&amp;ign-mpt=uo%3D2');" href="http://itunes.apple.com/us/app/wikihow-how-to-diy-survival/id309209200?mt=8&amp;ign-mpt=uo%3D2" target="_blank">itunes link</a>) (available by e-mail from support@wikihow.com)</p>
<p><strong>22. <a onclick="javascript:pageTracker._trackPageview('/outgoing/iphone.wordpress.org/');" href="http://iphone.wordpress.org/" target="_blank">Wordpress</a></strong> – <em>Client for managing Wordpress blogs.</em> (<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/wordpress/id335703880?mt=8');" href="http://itunes.apple.com/us/app/wordpress/id335703880?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/iphone.wordpress.org/development/');" href="http://iphone.wordpress.org/development/" target="_blank">source code</a>)</p>
<p><strong>23. <a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/metasyntactic/');" href="http://code.google.com/p/metasyntactic/" target="_blank">YourRights</a></strong> – <em>Pocket database containing a summary of your legal rights. </em>(<a onclick="javascript:pageTracker._trackPageview('/outgoing/itunes.apple.com/us/app/your-rights/id301494200?mt=8');" href="http://itunes.apple.com/us/app/your-rights/id301494200?mt=8" target="_blank">itunes link</a>) (<a onclick="javascript:pageTracker._trackPageview('/outgoing/code.google.com/p/metasyntactic/');" href="http://code.google.com/p/metasyntactic/" target="_blank">source code</a>)</p>
<p>Check them out if you’re working on something similar or think they might have a feature you could use there’s no reason to re-invent the wheel.  Be sure to make sure you understand the licenses though many are GPL and require that you open source your app.</p>
<p>转自：<a href="http://maniacdev.com/open-source-iphone-app-store-apps/" target="_blank">maniacdev.com/open-source-iphone-app-store-apps/</a></p>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2010/03/showcase-of-designs-optimized-for-iphone/" title="iPhone网页设计欣赏与最佳实践 Showcase of Designs Optimized for iPhone">iPhone网页设计欣赏与最佳实践 Showcase of Designs Optimized for iPhone</a></li><li><a href="http://slj.me/2010/03/building-iphone-apps-with-html-css-and-javascript/" title="【好书PDF】：Building iPhone Apps with HTML, CSS, and JavaScript">【好书PDF】：Building iPhone Apps with HTML, CSS, and JavaScript</a></li><li><a href="http://slj.me/2010/02/iphone-push-notification/" title="偷窥iPhone Push Notification的幕后">偷窥iPhone Push Notification的幕后</a></li><li><a href="http://slj.me/2009/10/create-a-promotional-iphone-app-site-in-photoshop/" title="用Photoshop创建一个iPhone程序销售页面">用Photoshop创建一个iPhone程序销售页面</a></li><li><a href="http://slj.me/2009/10/method-to-uncover-google-gmail-google-reader-for-iphone/" title="揭开iPhone版Google，Gmail，Google Reader神秘面纱的方法">揭开iPhone版Google，Gmail，Google Reader神秘面纱的方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/04/open-source-iphone-app-store-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>实习在即，博客即将更新</title>
		<link>http://slj.me/2010/04/new-blog-theme-is-coming-up/</link>
		<comments>http://slj.me/2010/04/new-blog-theme-is-coming-up/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 11:39:14 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[近况]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1717</guid>
		<description><![CDATA[
最近还是一个接着一个的项目，从 PHP &#38; 前端项目一直到 iPhone / Android 项目，还有漏嘴网的更新要做，一直都在忙。
忽然感觉到自己快要实习了。一些该做的事情都还没做完。趁这两天工程不紧张，抓紧把博客的 Theme 设计一下，设计完后还要 Markup，做成 WordPress 的模板。再把简历做好来，放到博客上。所以敬请期待了……
由于明年三月是我们学院的本科评估，学校更是要我们提早选择毕业设计，提早开始做并且在大四上学期期末要完成。
毕业设计，无非又是千篇一律的网站制作，算法论文，程序开发，数据库优化之类之类的。我觉得这些就像是在做机械运动，没有挑战性。
选来选去，最后选中了关于移动开发的几个课题，课题来源于学院的一个外聘教授，不常来学校，但是我和龙兄有足够的信心能够把课题做好。
我们做的是手机门铃（无线监视类的）如果能有闲暇，我还想开发成 iPhone App，放在 App Store 里卖一卖，不过这些都是后话了，毕业设计完成再说吧。
就写到这里，继续做我博客的新主题了……
Related Posts / 相关文章我的近况]]></description>
			<content:encoded><![CDATA[<p><img height="255" width="595" src="http://slj.me/wp-content/uploads/2010/04/new_blog_post_thumb.png" alt="实习在即，博客即将更新" class="thumb"/></p>
<p>最近还是一个接着一个的项目，从 PHP &amp; 前端项目一直到 iPhone / Android 项目，还有漏嘴网的更新要做，一直都在忙。</p>
<p>忽然感觉到自己快要实习了。一些该做的事情都还没做完。趁这两天工程不紧张，抓紧把博客的 Theme 设计一下，设计完后还要 Markup，做成 WordPress 的模板。再把简历做好来，放到博客上。所以敬请期待了……</p>
<p>由于明年三月是我们学院的本科评估，学校更是要我们提早选择毕业设计，提早开始做并且在大四上学期期末要完成。</p>
<p>毕业设计，无非又是千篇一律的网站制作，算法论文，程序开发，数据库优化之类之类的。我觉得这些就像是在做机械运动，没有挑战性。</p>
<p>选来选去，最后选中了关于移动开发的几个课题，课题来源于学院的一个外聘教授，不常来学校，但是我和龙兄有足够的信心能够把课题做好。</p>
<p>我们做的是手机门铃（无线监视类的）如果能有闲暇，我还想开发成 iPhone App，放在 App Store 里卖一卖，不过这些都是后话了，毕业设计完成再说吧。</p>
<p>就写到这里，继续做我博客的新主题了……</p>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2009/04/recent/" title="我的近况">我的近况</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/04/new-blog-theme-is-coming-up/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Twitter Connect 转载自 Twitter 官方 Wiki</title>
		<link>http://slj.me/2010/04/twitter-connect-sign-in-with-twitter/</link>
		<comments>http://slj.me/2010/04/twitter-connect-sign-in-with-twitter/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 05:22:30 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1710</guid>
		<description><![CDATA[
Sign in with Twitter is the pattern of authentication that  allows users to connect their Twitter account with third-party services in as  little is one click. It utilizes OAuth and although the flow is very similar,  the authorization URL and workflow differs slightly as described below.
The normal flow dictates that applications send [...]]]></description>
			<content:encoded><![CDATA[<p><img height="260" width="595" class="thumb" alt="Twitter Connect" src="http://slj.me/wp-content/uploads/2010/04/twitter_connect_post_thumb.png"/></p>
<p><strong>Sign in with Twitter</strong> is the pattern of authentication that  allows users to connect their Twitter account with third-party services in as  little is one click. It utilizes OAuth and although the flow is very similar,  the authorization URL and workflow differs slightly as described below.</p>
<p>The normal flow dictates that applications send request tokens to oauth/authorize in Twitter&#8217;s  implementation of the OAuth Specification. To take advantage of <strong>Sign in  with Twitter</strong>, applications should send request tokens in the oauth_token parameter to oauth/authenticate instead.</p>
<p><span id="more-1710"></span><br />
The oauth/authenticate method  will perform the following:</p>
<ol>
<li>If the user is logged into Twitter.com and has already approved the calling  application, the user will be immediately authenticated and returned to the  callback URL.</li>
<li>If the user is not logged into Twitter.com and has already approved the  calling application, the user will be prompted to login to Twitter.com then will  be immediately authenticated and returned to the callback URL.</li>
<li>If the user is logged into Twitter.com and has not already approved the  calling application, the OAuth authorization prompt will be presented.  Authorizing users will then be redirected to the callback URL.</li>
<li>If the user is not logged into Twitter.com and has not already approved the  calling application, the user will be prompted to login to Twitter.com then will  be presented the authorization prompt before redirecting back to the callback  URL.</li>
</ol>
<p>This behavior is explained in the following flowchart:</p>
<p><img src="http://slj.me/wp-content/uploads/2010/04/oauth_sign_in_with_twitter_flow.png" alt="" /></p>
<h3><strong>Sign in with Twitter</strong> Buttons</h3>
<p>Twitter would prefer your application to use the following buttons. While it  is easy roll your own buttons or create text links, using these standard buttons  will instill user confidence and standardize the experience.</p>
<h4>Darker</h4>
<p><img src="http://slj.me/wp-content/uploads/2010/04/Sign-in-with-Twitter-darker.png" alt="" /></p>
<p><img src="http://slj.me/wp-content/uploads/2010/04/Sign-in-with-Twitter-darker-small.png" alt="" /></p>
<h4>Lighter</h4>
<p><img src="http://slj.me/wp-content/uploads/2010/04/Sign-in-with-Twitter-lighter.png" alt="" /></p>
<p><img src="http://slj.me/wp-content/uploads/2010/04/Sign-in-with-Twitter-lighter-small.png" alt="" /></p>
<p>Peter Denton has also created a <a href="http://twibs.com/oAuthButtons.php" target="_blank">number of buttons</a> to make this experience easy and  beautiful.</p>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2009/07/twitter-ops/" title="从 Twitter 运维技术经验可以学到什么">从 Twitter 运维技术经验可以学到什么</a></li><li><a href="http://slj.me/2009/06/louzui/" title="注册漏嘴网">注册漏嘴网</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/04/twitter-connect-sign-in-with-twitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用CSS修正一切：20多个常见Bug及其修正方法</title>
		<link>http://slj.me/2010/04/%e7%94%a8css%e4%bf%ae%e6%ad%a3%e4%b8%80%e5%88%87%ef%bc%9a20%e5%a4%9a%e4%b8%aa%e5%b8%b8%e8%a7%81bug%e5%8f%8a%e5%85%b6%e4%bf%ae%e6%ad%a3%e6%96%b9%e6%b3%95/</link>
		<comments>http://slj.me/2010/04/%e7%94%a8css%e4%bf%ae%e6%ad%a3%e4%b8%80%e5%88%87%ef%bc%9a20%e5%a4%9a%e4%b8%aa%e5%b8%b8%e8%a7%81bug%e5%8f%8a%e5%85%b6%e4%bf%ae%e6%ad%a3%e6%96%b9%e6%b3%95/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 17:10:33 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[Hack]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1695</guid>
		<description><![CDATA[
毫无疑问，一个合理的布局和结构是最好选择。这不仅是因为你的布局在不同浏览器见表现不同，而且还因为的CSS有很多方法来布局你的每个元素。今天，我们希望与你们分享一些避免在创建CSS布局时容易遇到的错误的技巧。

IE Bug修正
1- Bug修正：IE双倍Margin bug
- 元素是浮动的-并且给元素一个和浮动同一个方向的margin-结果显示两倍的指定margin大小。这个方法非常简单。所有您需要做的就是添加一个display: inline规则到你的浮动元素。所以，你只是把例如这样的代码：
#content {
    float: left;
    width: 500px;
    padding: 10px 15px;
    margin-left: 20px; }
改为如下代码 :
#content {
    float: left;
    width: 500px;
    padding: 10px 15px;
    margin-left: 20px;
    [...]]]></description>
			<content:encoded><![CDATA[<p><img height="260" width="595" src="http://slj.me/wp-content/uploads/2010/04/css_fix_everything_post_thumb.png" alt="用CSS修正一切：20多个常见Bug及其修正方法" class="thumb"/></p>
<p>毫无疑问，一个合理的布局和结构是最好选择。这不仅是因为你的布局在不同浏览器见表现不同，而且还因为的CSS有很多方法来布局你的每个元素。今天，我们希望与你们分享一些避免在创建CSS布局时容易遇到的错误的技巧。</p>
<p><span id="more-1695"></span></p>
<h3>IE Bug修正</h3>
<h3><a rel="external nofollow" href="http://www.cssnewbie.com/double-margin-float-bug/">1- Bug修正：IE双倍Margin bug</a></h3>
<p>- 元素是浮动的-并且给元素一个和浮动同一个方向的margin-结果显示两倍的指定margin大小。这个方法非常简单。所有您需要做的就是添加一个display: inline规则到你的浮动元素。所以，你只是把例如这样的代码：</p>
<pre><code>#content {
    float: left;
    width: 500px;
    padding: 10px 15px;
    margin-left: 20px; }</code></pre>
<p>改为如下代码 :</p>
<pre><code>#content {
    float: left;
    width: 500px;
    padding: 10px 15px;
    margin-left: 20px;
    display:inline;
}</code></pre>
<p><a rel="external nofollow" href="http://www.cssnewbie.com/double-margin-float-bug/"><img src="http://slj.me/wp-content/uploads/2010/04/184446r0i.gif" alt="CSS Tips" /></a></p>
<p><!--more--></p>
<hr />
<h3>2- 克服盒模型hack</h3>
<p>- 如果你想给任一div指定宽度，不要指定padding或margin。只要另建一个内部(嵌套)的没有宽度的div并设定其padding和margin来替代。所以，不要这样做：</p>
<pre><code>#main-div{
width: 150px;
border: 5px;
padding: 20px;
}</code></pre>
<p>这样做:</p>
<pre><code>#main-div{
width: 150px;
}
#main-div div{
border: 5px;
padding: 20px;
}</code></pre>
<hr />
<h3>3-<a rel="external nofollow" href="http://www.cssplay.co.uk/boxes/minheight.html">IE无视min-height属性</a></h3>
<p>- min-height属性在firefox下表现很好但是IE却无视了它，IE的height就像FF的min-height.注意：IE7没有这个bug。</p>
<pre><code>/* 对主流浏览器 */
.container {
width:20em;
padding:0.5em;
border:1px solid #000;
min-height:8em;
height:auto;
}
/* 对IE浏览器 */
/*\*/
* html .container {
height: 8em;
}
/**/</code></pre>
<h3>4-?<a rel="external nofollow" href="http://www.cssplay.co.uk/boxes/minwidth.html">Min-Width for IE</a></h3>
<p>-一个IE的min-width缺陷的修正。</p>
<hr />
<h3>块级元素居中</h3>
<h3>5-<a rel="external nofollow" href="http://css-discuss.incutio.com/?page=CenteringBlockElement">块级元素居中</a></h3>
<p>- 有很多种方法可以使块级元素居中；选择哪种方法取决于你的百分比大小设置或使用更绝对的数值。</p>
<p>整个页面内容居中：</p>
<pre><code>body{
text-align: center;
}
#container
{
text-align: left;
width: 960px;
margin: 0 auto;
}</code></pre>
<hr />
<h3>6-<a rel="external nofollow" href="http://www.badboy.ro/articles/2005-02-20/vertical_align_with_css/">使用CSS垂直对齐</a></h3>
<p>- 如果你想知道怎么才能正确的实现垂直对齐，只需要简单的为你的文本指定和容器等高的line-height。</p>
<pre><code>#wrapper {
	width:530px;
	height:25px;
	background:url(container.gif) no-repeat left top;
	padding:0px 10px;
}
#wrapper p {
	line-height:25px;
}</code></pre>
<hr />
<h3>栏目问题</h3>
<h3>7-?<a rel="external nofollow" href="http://warpspire.com/tipsresources/web-production/css-column-tricks/">你的CSS栏目被搞乱的最大原因</a></h3>
<p>-一个容易理解的就如何解决普遍的CSS栏目的问题的有用的图解和代码片断的文章.</p>
<p><a rel="external nofollow" href="http://warpspire.com/tipsresources/web-production/css-column-tricks/"><img src="http://slj.me/wp-content/uploads/2010/04/184446pba.gif" alt="CSS Tips" /></a></p>
<hr />
<h3>8-?<a rel="external nofollow" href="http://www.positioniseverything.net/explorer/expandingboxbug.html">扩大的盒子Bug</a></h3>
<p>- 当您尝试创建一个两列浮动的布局， IE浏览器将创建一个“浮动下降” ，这是由于在一个固定宽度的浮动DIV内存在超出宽度的内容，这些内容必须融入布局中的一个特定位置。这片文章详述了几种可能的替代方法。</p>
<p><a rel="external nofollow" href="http://www.positioniseverything.net/explorer/expandingboxbug.html"><img src="http://slj.me/wp-content/uploads/2010/04/184447t9q.gif" alt="CSS Tips" /></a></p>
<hr />
<h3>CSS 定位</h3>
<h3>9-?<a rel="external nofollow" href="http://kilianvalkhof.com/2008/css-xhtml/understanding-css-positioning-part-1">理解CSS定位Part 1</a></h3>
<p>-一系列很有趣的文章，这些文章不仅包括定位，还包括包括定义布局的属性，比如display和float ，和对CSS3 布局模型的一个预览。第一部分将会介绍定位和display属性。<a rel="external nofollow" href="http://kilianvalkhof.com/2008/css-xhtml/understanding-css-positioning-part-1/">Part1</a>,?<a rel="external nofollow" href="http://kilianvalkhof.com/2008/css-xhtml/understanding-css-positioning-part-2/">Part2</a>,?<a rel="external nofollow" href="http://kilianvalkhof.com/2008/css-xhtml/understanding-css-positioning-part-3/">Part3</a> 将会带给你对定位的更深的理解.</p>
<p><a rel="external nofollow" href="http://kilianvalkhof.com/2008/css-xhtml/understanding-css-positioning-part-1"><img src="http://slj.me/wp-content/uploads/2010/04/184448aca.gif" alt="CSS Tips" /></a></p>
<hr />
<h3>10-?<a rel="external nofollow" href="http://www.detacheddesigns.com/blog/blogSpecific.aspx?BlogId=52">relative和absolute有什么不同?</a></h3>
<p>- 对于刚开始使用CSS的人来说，无论相对行为还是绝对定位都是非常令人沮丧的。这个问题的答案将会让你的迷惑变的清晰些。</p>
<pre><code>#redSquare
{
position: relative;
bottom: 40px;
right: 40px;
}
</code></pre>
<p>显示这样:</p>
<p><a rel="external nofollow" href="http://www.detacheddesigns.com/blog/blogSpecific.aspx?BlogId=52"><img src="http://slj.me/wp-content/uploads/2010/04/184449ne4.gif" alt="CSS Tips" /></a></p>
<hr />
<h3>11-<a rel="external nofollow" href="http://css-tricks.com/hangtab-create-a-sticky-tag-from-the-edge-of-the-browser-window-even-with-centered-content/">HangTab(固定标签)</a></h3>
<p>- 在浏览器边缘创建一个固定的标签(即使内容居中)。查看<a rel="external nofollow" href="http://www.panic.com/coda/">Panic’s website for their software Coda</a>.</p>
<pre><code>#hang_tab {
position: absolute;
top: 7px;
left: 0px;
width: 157px;
height: 93px;
}</code></pre>
<p><a rel="external nofollow" href="http://css-tricks.com/examples/HangTab/"><img src="http://slj.me/wp-content/uploads/2010/04/1844492oj.jpg" alt="CSS Tips" /></a></p>
<hr />
<h3>CSS 浮动概念</h3>
<h3>12-?<a rel="external nofollow" href="http://www.smashingmagazine.com/2007/05/01/css-float-theory-things-you-should-know/">CSS 浮动原理：你应该知道的事情</a></h3>
<p>-?<a rel="external nofollow" href="http://www.smashingmagazine.com/">SmashingMagazine</a> 浏览几十个相关文章，并选择了在用float开发基于CSS的布局时你应该牢记的最重要的东西。</p>
<pre><code>&lt;div&gt; &lt;!-- float container --&gt;
&lt;div style="float:left; width:30%;"&gt;&lt;p&gt;Some content&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Text not inside the float&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>
<hr />
<h3>13-?<a rel="external nofollow" href="http://css.maxdesign.com.au/floatutorial/">Floatutorial: CSS float的简单教程</a></h3>
<p>- Floatutorial带你查看浮动元素的基本原理，例如图片，下拉菜单，下一个和返回按钮，相册，内部列表和多列布局。</p>
<p><a rel="external nofollow" href="http://css.maxdesign.com.au/floatutorial/"><img src="http://slj.me/wp-content/uploads/2010/04/18445099l.gif" alt="CSS Tips" /></a></p>
<hr />
<h3>14-?<a rel="external nofollow" href="http://dtott.com/thoughts/2007/12/10/clear-your-floats-the-right-way/">清除浮动- 正确的方法</a></h3>
<p>- 清除浮动可以说是CSS开发中的一个最令人沮丧的方面，最佳方法之一是在您的网站上使用<a rel="external nofollow" href="http://dtott.com/thoughts/2007/12/10/clear-your-floats-the-right-way/">EasyClearing</a> .</p>
<pre><code>/* EasyClearing http://www.positioniseverything.net/easyclearing.html */
#container:after
{
	content: ".";
	display: block;
	height: 0;
	clear: both;
	visibility: hidden;
}

#container
{display: inline-block;}

/* Hides from IE-mac \*/
* html #container
{height: 1%;}

#container
{display: block;}
/* End hide from IE-mac */</code></pre>
<p><a rel="external nofollow" href="http://dtott.com/thoughts/2007/12/10/clear-your-floats-the-right-way/"><img src="http://slj.me/wp-content/uploads/2010/04/1844518xr.gif" alt="CSS Tips" /></a></p>
<hr />
<h3>更简单的圆角实现</h3>
<h3>15-?<a rel="external nofollow" href="http://www.askthecssguy.com/2007/11/mike_asks_the_css_guy_for_reco_1.html">迈克询问CSS圆角建议</a></h3>
<p>- “最简单的方法是使用一个大的gif图片，然后我将给我的盒子编码”</p>
<pre><code>&lt;div&gt;
  &lt;p&gt;beautifully-encapsulated paragraph&lt;/p&gt;
  &lt;div&gt;&lt;/div&gt;
&lt;/div&gt;</code></pre>
<p>“并给它添加背景”</p>
<pre><code>.roundBox {
  background:transparent url(roundBox.gif) no-repeat top left;
  width:340px;
  padding:20px;
}
.roundBox .boxBottom {
  background:white url(roundBox.gif) no-repeat bottom left;
  font-size:1px;
  line-height:1px;
  height:14px;
  margin:0 -20px -20px -20px;
}</code></pre>
<hr />同样?<a rel="external nofollow" href="http://www.askthecssguy.com/">Askthecssguy</a> 介绍了?<a rel="external nofollow" href="http://www.askthecssguy.com/2008/03/one_pixel_notched_corners_as_u.html">Google Analytics中使用的技术</a>, 他是通过在每个角留下1px的边框来实现圆角的效果，这是一种不用静态图片实现圆角的新方法。你可以在<a rel="external nofollow" href="http://www.askthecssguy.com/examples/notchedcorners/index.html">这里</a>查看一个示例.</p>
<p><a rel="external nofollow" href="http://www.askthecssguy.com/2008/03/one_pixel_notched_corners_as_u.html"><img src="http://slj.me/wp-content/uploads/2010/04/184452152.gif" alt="CSS Tips" /></a></p>
<hr />
<h3>16-<a rel="external nofollow" href="http://cssglobe.com/post/1415/3-simple-steps-in-coding-a-rounded-corners-layout">3 个简单的步骤实现圆角</a></h3>
<p>- Alen Grakalic研究了通过三个步骤来编写一个固定宽度的圆角布局. 他也创建了一个<a rel="external nofollow" href="http://cssglobe.com/articles/3steps/">demo </a>.</p>
<p><a rel="external nofollow" href="http://cssglobe.com/articles/3steps/"><img src="http://slj.me/wp-content/uploads/2010/04/184452fum.jpg" alt="CSS Tips" /></a></p>
<hr />
<h3>CSS表单问题</h3>
<h3>17-?<a rel="external nofollow" href="http://css-tricks.com/tips-for-creating-great-web-forms/">创建伟大的网页表单的技巧</a></h3>
<p>- Cris Coyer和我们分享了浮动标签，:focus伪类，使用建议等技巧。他同样建立了<a rel="external nofollow" href="http://css-tricks.com/examples/NiceSimpleContactForm/">又好又简单的联系表单</a>, 他首先将它发布在<a rel="external nofollow" href="http://css-tricks.com/nice-and-simple-contact-form/">这里</a>.</p>
<pre><code>label {
	float: left;
	text-align: right;
	margin-right: 15px;
	width: 100px;
}</code></pre>
<hr /><a rel="external nofollow" href="http://css-tricks.com/examples/NiceSimpleContactForm/"><img src="http://slj.me/wp-content/uploads/2010/04/184453mi3.gif" alt="CSS Tips" /></a></p>
<hr />
<h3>18-?<a rel="external nofollow" href="http://woork.blogspot.com/2008/06/clean-and-pure-css-form-design.html">简洁而纯粹的CSS表单设计</a></h3>
<p>- 对于的CSS爱好者来说，本教程表述了一个如何设计纯粹的CSS表单而不使用HTML表格的建议。你可以在<a rel="external nofollow" href="http://www.box.net/shared/1zbtouuwws">这里</a>抓取代码.</p>
<p><a rel="external nofollow" href="http://woork.blogspot.com/2008/06/clean-and-pure-css-form-design.html"><img src="http://slj.me/wp-content/uploads/2010/04/184454ybj.gif" alt="CSS Tips" /></a></p>
<hr />
<h3>19-<a rel="external nofollow" href="http://www.456bereastreet.com/archive/200710/autopopulating_text_input_fields_with_javascript/">用javascript自动填充文本输入框</a></h3>
<p>- 有时候，我们需要向用户解释他们理应填写文本输入框。当没有标签可以显示，一个通用的解决方案是，把一些占位符文本放在文本框中，并让它当标签来用。本教程介绍了一种很好的解决办法，并启用JavaScript ，label 元素是隐藏的，而且input 元素的title 属性值被复制到value 属性. 如果已禁用JavaScript ，标签显示在被留空的文字输入框的上面。一个简单的演示，您可以在<a rel="external nofollow" href="http://www.456bereastreet.com/lab/autopopulating-text-input-fields/">这里</a>看到演示.</p>
<p><a rel="external nofollow" href="http://www.456bereastreet.com/lab/autopopulating-text-input-fields/"><img src="http://slj.me/wp-content/uploads/2010/04/184455ejp.gif" alt="CSS Tips" /></a></p>
<hr />
<h3>值得检验的css技巧</h3>
<h3>20-<a rel="external nofollow" href="http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&amp;postId=4361&amp;productId=1&amp;loc=en_US"> 跨浏览器的用背景图的水平线</a></h3>
<p>- 你或许想使用一个定制的图片来创建一个跨浏览器的水平线作为内容的分隔。</p>
<pre><code>div.hr {
background: #fff url(myhrimg.gif) no-repeat scroll center;
height: 10px
}
div.hr hr {
display: none
}</code></pre>
<hr />你的代码可以像这样:</p>
<pre><code>&lt;div&gt;&lt;hr /&gt;&lt;/div&gt;

本文翻译自：<a rel="external nofollow" href="http://www.noupe.com/css/using-css-to-fix-anything-20-common-bugs-and-fixes.html" target="_blank">http://www.noupe.com/css/using-css-to-fix-anything-20-common-bugs-and-fixes.html</a>
转载请注明来源，谢谢</code></pre>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2009/06/10-astonishing-css-hacks-and-techniques/" title="【译】10个惊人的CSS hack和技术 (10 astonishing CSS hacks and techniques)">【译】10个惊人的CSS hack和技术 (10 astonishing CSS hacks and techniques)</a></li><li><a href="http://slj.me/2009/03/browser_css_hack_ie_ff/" title="关于一些浏览器的的Hack">关于一些浏览器的的Hack</a></li><li><a href="http://slj.me/2010/07/css-rgba/" title="CSS中的RGBa色彩">CSS中的RGBa色彩</a></li><li><a href="http://slj.me/2010/05/html5%e6%96%b0%e5%8a%9f%e8%83%bd%e6%bc%94%e7%a4%ba/" title="HTML5新功能演示">HTML5新功能演示</a></li><li><a href="http://slj.me/2010/03/ultimate-guide-css-text-typography/" title="[转]CSS文字排版终极指南">[转]CSS文字排版终极指南</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/04/%e7%94%a8css%e4%bf%ae%e6%ad%a3%e4%b8%80%e5%88%87%ef%bc%9a20%e5%a4%9a%e4%b8%aa%e5%b8%b8%e8%a7%81bug%e5%8f%8a%e5%85%b6%e4%bf%ae%e6%ad%a3%e6%96%b9%e6%b3%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>15个Google为网站开发者打造的工具</title>
		<link>http://slj.me/2010/04/15%e4%b8%aagoogle%e4%b8%ba%e7%bd%91%e7%ab%99%e5%bc%80%e5%8f%91%e8%80%85%e6%89%93%e9%80%a0%e7%9a%84%e5%b7%a5%e5%85%b7/</link>
		<comments>http://slj.me/2010/04/15%e4%b8%aagoogle%e4%b8%ba%e7%bd%91%e7%ab%99%e5%bc%80%e5%8f%91%e8%80%85%e6%89%93%e9%80%a0%e7%9a%84%e5%b7%a5%e5%85%b7/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 15:09:13 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1691</guid>
		<description><![CDATA[
Google 的使命是 Web，在 Google 眼中，未来的一切应用都将 Web 化，一直以来，Google 为 Web 开发与设计者推出了大量免费工具，让他们更好地创建，维护，改善他们的 Web 站点，这些工具包含了开发，分析，维护，修补等等用途，本文将介绍15款这样的工具。

1. Google Chrome Developer Tools

这是 Google Chrome 中类似 Firefox Firebug 以及 Web Developer Toolbar 的一个扩展，用于调试你的网页，包含一个 DOM 探测器，一个 JavaScript 调试台，可以设置执行断点和跟踪，一个类似 YSlow 的执行分析器。
2. Webmaster Tools

一个对网站拥有者来说非常有用的程序，可以帮助你从各个角度改善自己的站点。可以发现站点中的恶意程序，发现搜索引擎爬虫遇到的错误，可以发现你的 HTML 代码中需要改进的部分。还可以帮你发现你的站点中最热门的网页，并发现你站点中的错误链接。
3. Google Web Toolkit

Google Web Tootlkit （GWT）是一个 Web 开发基础框架，为开发者提供了一些基础类库，GWT 同 Google 的其它产品，如 AdWords，FeedBurner，Google Ajax 类库等紧密集成，这里有一个 Google Docs 教程。
4. Google Code [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://slj.me/wp-content/uploads/2010/04/15_google_tools_post_thumb2.png" alt="15个Google为网站开发者打造的工具" class="thumb"/></p>
<p>Google 的使命是 Web，在 Google 眼中，未来的一切应用都将 Web 化，一直以来，Google 为 Web 开发与设计者推出了大量免费工具，让他们更好地创建，维护，改善他们的 Web 站点，这些工具包含了开发，分析，维护，修补等等用途，本文将介绍15款这样的工具。</p>
<p><span id="more-1691"></span><br />
1. <a rel="external nofollow" href="http://blog.chromium.org/2009/06/developer-tools-for-google-chrome.html">Google Chrome Developer Tools</a><br />
<a rel="external nofollow" href="http://blog.chromium.org/2009/06/developer-tools-for-google-chrome.html"><img src="http://images.sixrevisions.com/2010/04/17-03_developer_tools.png" alt="" /></a></p>
<p><!--more-->这是 Google Chrome 中类似 Firefox Firebug 以及 <a rel="external nofollow" href="http://sixrevisions.com/tools/firefox_web_developer_extension_toolbar/">Web Developer Toolbar</a> 的一个扩展，用于调试你的网页，包含一个 DOM 探测器，一个 JavaScript 调试台，可以设置执行断点和跟踪，一个类似 YSlow 的执行分析器。<br />
2. <a rel="external nofollow" href="https://www.google.com/webmasters/tools/home?hl=en">Webmaster Tools</a><br />
<a rel="external nofollow" href="https://www.google.com/webmasters/tools/home?hl=en"><img src="http://images.sixrevisions.com/2010/04/17-04_webmaster_tools.png" alt="" /></a></p>
<p>一个对网站拥有者来说非常有用的程序，可以帮助你从各个角度改善自己的站点。可以发现站点中的恶意程序，发现搜索引擎爬虫遇到的错误，可以发现你的 HTML 代码中需要改进的部分。还可以帮你发现你的站点中最热门的网页，并发现你站点中的错误链接。<br />
3. <a rel="external nofollow" href="http://code.google.com/webtoolkit/">Google Web Toolkit</a><br />
<a rel="external nofollow" href="http://code.google.com/webtoolkit/"><img src="http://images.sixrevisions.com/2010/04/17-05_gwt.png" alt="" /></a></p>
<p>Google Web Tootlkit （GWT）是一个 Web 开发基础框架，为开发者提供了一些基础类库，GWT 同 Google 的其它产品，如 AdWords，FeedBurner，Google Ajax 类库等紧密集成，<a rel="external nofollow" href="http://code.google.com/webtoolkit/doc/latest/tutorial/">这里有一个 Google Docs 教程</a>。<br />
4. <a rel="external nofollow" href="http://www.google.com/codesearch">Google Code Search</a><br />
<a rel="external nofollow" href="http://www.google.com/codesearch"><img src="http://images.sixrevisions.com/2010/04/17-06_code_search.png" alt="" /></a></p>
<p>帮助开发者搜索代码，支持正则表达式搜索，或在一个<a rel="external nofollow" href="http://www.google.com/codesearch/advanced_code_search">高级搜索界面</a>中，很直观地搜索那些可能会让你事半功倍的公共代码。<br />
5. <a rel="external nofollow" href="http://code.google.com/speed/page-speed/">Page Speed</a><br />
<a rel="external nofollow" href="http://code.google.com/speed/page-speed/"><img src="http://images.sixrevisions.com/2010/04/17-07_page_speed.png" alt="" /></a></p>
<p>Google 现在已经<a rel="external nofollow" href="http://www.mattcutts.com/blog/site-speed/">将网站加载速度算到搜索排名算法</a>中，<em>Page Speed</em> 可以帮助你分析你的网站性能，基于<a rel="external nofollow" href="http://code.google.com/speed/page-speed/docs/rules_intro.html"> Google Web 性能最佳实践</a>。<br />
6. <a rel="external nofollow" href="http://browsersize.googlelabs.com/">Browser Size</a><br />
<a rel="external nofollow" href="http://browsersize.googlelabs.com/"><img src="http://images.sixrevisions.com/2010/04/17-08_browser_size.png" alt="" /></a></p>
<p>该工具帮你分析，你的网页在不同浏览器，不同浏览尺寸下的显示状况，非常适合看看自己的网页在不滚动的情况下，在各种浏览尺寸下显示到哪里。<br />
7. <a rel="external nofollow" href="http://code.google.com/apis/ajaxlibs/">Google Ajax Libraries API</a><br />
<a rel="external nofollow" href="http://code.google.com/apis/ajaxlibs/"><img src="http://images.sixrevisions.com/2010/04/17-09_ajax_libraries.png" alt="" /></a></p>
<p><em>Google Ajax Libraries API</em> 包含多种流行的 JavaScript 库（目前有10种），并可以从 Google 高性能的 CDN 网络中加载，既节省了你的服务器带宽，同时，由于用户可能已经在别的网站加载过这个库，因此可以显著加快这些库的加载速度。<br />
8. <a rel="external nofollow" href="http://www.google.com/websiteoptimizer/b/index.html">Google Website Optimizer</a><br />
<a rel="external nofollow" href="http://www.google.com/websiteoptimizer/b/index.html"><img src="http://images.sixrevisions.com/2010/04/17-02_website_optimizer.jpg" alt="" /></a></p>
<p>接着这个工具，你可以对自己的网站进行<a rel="external nofollow" href="http://sixrevisions.com/user-interface/an-introduction-to-website-split-testing/"> A/B 测试</a>，并对网站进行优化。<br />
9. <a rel="external nofollow" href="http://sites.google.com/">Sites</a><br />
<a rel="external nofollow" href="http://sites.google.com/"><img src="http://images.sixrevisions.com/2010/04/17-10_google_sites.png" alt="" /></a></p>
<p>顾名思义，Google Sites 可以帮你创建一个托管的网站，可以将包括 YouTube，幻灯，Gmail 日历，Google Gear 小程序，Google Docs 一类的应用集成其中。如果将站点设置为不公开，你可以将这个工具用于个人文档工具。<br />
10. <a rel="external nofollow" href="http://code.google.com/webtoolkit/speedtracer/">Speed Tracer</a><br />
<a rel="external nofollow" href="http://code.google.com/webtoolkit/speedtracer/"><img src="http://images.sixrevisions.com/2010/04/17-12_speed_tracer.jpg" alt="" /></a></p>
<p>以可视化方式，帮你分析你的 Web 程序中各种元素的加载或运行速度与实践，<a rel="external nofollow" href="http://code.google.com/webtoolkit/speedtracer/speed-tracer-examples.html">这里有一些关于这个工具的用例</a>。<br />
11. <a rel="external nofollow" href="http://code.google.com/hosting/">Project Hosting</a><br />
<a rel="external nofollow" href="http://code.google.com/hosting/"><img src="http://images.sixrevisions.com/2010/04/17-13_project_hosting.png" alt="" /></a></p>
<p>这是 Google Code 项目的一部分，可以帮你<a rel="external nofollow" href="http://sixrevisions.com/resources/15-fantastic-finds-on-the-google-code-repository/">托管你的开源项目</a>，Web 开发与设计者还可以在这里找到大量现成的项目以供借鉴或套用。<br />
12. <a rel="external nofollow" href="http://code.google.com/appengine/">Google App Engine</a><br />
<a rel="external nofollow" href="http://code.google.com/appengine/"><img src="http://images.sixrevisions.com/2010/04/17-11_app_engine.png" alt="" /></a></p>
<p>这是一个可用来托管自己的 Web 程序的地方，甚至可以使用自己的域名。这里有一个教程，讲解如何<a rel="external nofollow" href="http://code.google.com/appengine/docs/python/gettingstarted/">使用 Google App Engine 来创建一个留言本</a>。Google App Engine 中已经<a rel="external nofollow" href="http://appgallery.appspot.com/">托管了大量的 Web 程序</a>。<br />
13. <a rel="external nofollow" href="http://code.google.com/apis/charttools/">Google Chart Tools</a><br />
<a rel="external nofollow" href="http://code.google.com/apis/charttools/"><img src="http://images.sixrevisions.com/2010/04/17-14_chart_tools.png" alt="" /></a></p>
<p><em>Google Chart Tools</em> 可以帮助你将数据转化为图表，并嵌入自己的网页，这些图表还拥有交互功能，可以钻入，或通过鼠标盘旋获取详细信息，还可以实现动画图表。<br />
14. <a rel="external nofollow" href="http://code.google.com/closure/">Closure Tools</a><br />
<a rel="external nofollow" href="http://code.google.com/closure/"><img src="http://images.sixrevisions.com/2010/04/17-15_closure_compiler.png" alt="" /></a></p>
<p><em>Closure Tools</em> 是 Google Labs 的一个开发套件，包含3个工具，闭包编译器（一个 JavaScript 优化器），闭包函数库（用于 Ajax 程序开发）以及一个用于动态生成 HTML 的闭包模板。<br />
15. <a rel="external nofollow" href="http://www.google.com/analytics/">Google Analytics</a><br />
<a rel="external nofollow" href="http://www.google.com/analytics/"><img src="http://images.sixrevisions.com/2010/04/17-16_google_analytics.png" alt="" /></a></p>
<p>经典的 Google 流量分析统计工具。</p>
<p>来源：Six Revisions - <a rel="external nofollow" href="http://sixrevisions.com/tools/the-top-15-google-products-for-people-who-build-websites/">The Top 15 Google Products for People Who Build Websites</a></p>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2009/10/method-to-uncover-google-gmail-google-reader-for-iphone/" title="揭开iPhone版Google，Gmail，Google Reader神秘面纱的方法">揭开iPhone版Google，Gmail，Google Reader神秘面纱的方法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/04/15%e4%b8%aagoogle%e4%b8%ba%e7%bd%91%e7%ab%99%e5%bc%80%e5%8f%91%e8%80%85%e6%89%93%e9%80%a0%e7%9a%84%e5%b7%a5%e5%85%b7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL: group by &#8230; having &#8230;</title>
		<link>http://slj.me/2010/04/mysql-group-by-having/</link>
		<comments>http://slj.me/2010/04/mysql-group-by-having/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 04:41:49 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[select]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1689</guid>
		<description><![CDATA[group by就是按照不同的字段进行分组，数值可以实现汇总
例如数据库中有A表，包括学生，学科，成绩三个字段
数据库结构为
学生 学科 成绩
张三 语文 80
张三 数学 100
李四 语文 70
李四 数学 80
李四 英语 80
那么
select 学生,sum(成绩) from A group by 学生;
得到如下结果
学生 成绩
张三 180
李四 230
==============================================================
如果考虑having
语句写成：
select 学生,sum(成绩) from A group by 学生 having 成绩=80;
得到结果就是这样的
学生 成绩
张三 80
李四 160
用having比 JOIN ON 相对好理解一些，简单一些。
Related Posts / 相关文章MySql取整函数好书推荐-《PHP与MySQL程序设计（第3版）》]]></description>
			<content:encoded><![CDATA[<p>group by就是按照不同的字段进行分组，数值可以实现汇总<br />
例如数据库中有A表，包括学生，学科，成绩三个字段<br />
数据库结构为<br />
学生 学科 成绩<br />
张三 语文 80<br />
张三 数学 100<br />
李四 语文 70<br />
李四 数学 80<br />
李四 英语 80</p>
<p>那么<br />
select 学生,sum(成绩) from A group by 学生;<br />
得到如下结果</p>
<p>学生 成绩<br />
张三 180<br />
李四 230<br />
==============================================================<br />
如果考虑having<br />
语句写成：<br />
select 学生,sum(成绩) from A group by 学生 having 成绩=80;<br />
得到结果就是这样的</p>
<p>学生 成绩<br />
张三 80<br />
李四 160</p>
<p>用having比 JOIN ON 相对好理解一些，简单一些。</p>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2010/01/mysql%e5%8f%96%e6%95%b4%e5%87%bd%e6%95%b0/" title="MySql取整函数">MySql取整函数</a></li><li><a href="http://slj.me/2009/05/book-beginingphpandmysql/" title="好书推荐-《PHP与MySQL程序设计（第3版）》">好书推荐-《PHP与MySQL程序设计（第3版）》</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/04/mysql-group-by-having/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>转：使用 Dojo 开发离线应用</title>
		<link>http://slj.me/2010/04/%e8%bd%ac%ef%bc%9a%e4%bd%bf%e7%94%a8-dojo-%e5%bc%80%e5%8f%91%e7%a6%bb%e7%ba%bf%e5%ba%94%e7%94%a8/</link>
		<comments>http://slj.me/2010/04/%e8%bd%ac%ef%bc%9a%e4%bd%bf%e7%94%a8-dojo-%e5%bc%80%e5%8f%91%e7%a6%bb%e7%ba%bf%e5%ba%94%e7%94%a8/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 14:11:44 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1679</guid>
		<description><![CDATA[Dojo 离线功能简介
所谓离线，指的是用户能够在没有网络的环境下也可以进行工作，并且当网络环境恢复后，之前的操作能够自动地同步到服务器上。目前，离线应用可以分为两种，一种是桌面应用，其中以 IBM Lotus Notes 为代表。另外一种则是近来比较热门的 Web 离线应用，其中最具代表的为 Google 的离线应用，如 Google Docs, Gmail, Google Reader 等。而本文介绍的 Dojo 离线功能，则是目前最为流行的实现第二种离线应用的框架。

















回页首







Dojo 离线原理
Dojo Offline 是一个免费的开放源代码的离线开发工具，它可以轻松地让 Web 开发人员开发离线应用。Dojo Offline 构建于 Google Gear 之上，它使得在 Google Gear 上开发离线应用变得更加简单。Dojo Offline 对 Google Gears 的 API 进行了封装，能够更方便地以 JavaScript 的方式访问数据；另外，Dojo Offline 还提供了如下功能：

Offline Widget：开发人员只要添加几行代码，就能够将这个离线的 widget 嵌入自己的应用中，之后，就能够自动获得网络反馈 , 同步消息以及离线操作配置说明等。
同步框架：保存离线数据，并且在网络恢复后将这些操作和服务器进行同步。
自动的网络和应用程序状态监控机制：离线应用可以基于这些监控结果来决定采取什么样的操作。
slurp() 方法：通过 slurp() 方法来自动扫描页面，找出需要缓存到本地的资源，包括图片，样式，脚本等。这使得 Web 开发人员能够集中精力地去开发业务逻辑和展示页面，而不需要考虑具体哪些资源需要缓存到本地。
提供两种本地存储实现方法：Dojo Storage 和 Dojo [...]]]></description>
			<content:encoded><![CDATA[<p><a name="1.Dojo 离线功能简介 |outline">Dojo 离线功能简介</a></p>
<p>所谓离线，指的是用户能够在没有网络的环境下也可以进行工作，并且当网络环境恢复后，之前的操作能够自动地同步到服务器上。目前，离线应用可以分为两种，一种是桌面应用，其中以 IBM Lotus Notes 为代表。另外一种则是近来比较热门的 Web 离线应用，其中最具代表的为 Google 的离线应用，如 Google Docs, Gmail, Google Reader 等。而本文介绍的 Dojo 离线功能，则是目前最为流行的实现第二种离线应用的框架。</p>
<p><span id="more-1679"></span></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://www.ibm.com/i/v14/rules/blue_rule.gif" alt="" width="100%" height="1" /><br />
<img src="http://www.ibm.com/i/c.gif" border="0" alt="" width="8" height="6" /></td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" align="right">
<tbody>
<tr align="right">
<td><img src="http://www.ibm.com/i/c.gif" alt="" width="100%" height="4" /></p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="middle"><img src="http://www.ibm.com/i/v14/icons/u_bold.gif" border="0" alt="" width="16" height="16" /></td>
<td align="right" valign="top"><a href="http://www.ibm.com/developerworks/cn/web/0906_dojo_offline_hehj/#main"><strong>回页首</strong></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p><a name="2.Dojo 离线原理 |outline">Dojo 离线原理</a></p>
<p>Dojo Offline 是一个免费的开放源代码的离线开发工具，它可以轻松地让 Web 开发人员开发离线应用。Dojo Offline 构建于 Google Gear 之上，它使得在 Google Gear 上开发离线应用变得更加简单。Dojo Offline 对 Google Gears 的 API 进行了封装，能够更方便地以 JavaScript 的方式访问数据；另外，Dojo Offline 还提供了如下功能：</p>
<ol>
<li>Offline Widget：开发人员只要添加几行代码，就能够将这个离线的 widget 嵌入自己的应用中，之后，就能够自动获得网络反馈 , 同步消息以及离线操作配置说明等。</li>
<li>同步框架：保存离线数据，并且在网络恢复后将这些操作和服务器进行同步。</li>
<li>自动的网络和应用程序状态监控机制：离线应用可以基于这些监控结果来决定采取什么样的操作。</li>
<li>slurp() 方法：通过 slurp() 方法来自动扫描页面，找出需要缓存到本地的资源，包括图片，样式，脚本等。这使得 Web 开发人员能够集中精力地去开发业务逻辑和展示页面，而不需要考虑具体哪些资源需要缓存到本地。</li>
<li>提供两种本地存储实现方法：Dojo Storage 和 Dojo SQL。Dojo Storage 使用哈希表来存储离线数据，为开发人员屏蔽了重量级的 Google Gears 的 SQL 使用方法，我们可以通过 Dojo Storage 将数据保存到 Google Gears 里去。Dojo SQL 通过执行 SQL 命令，对一般的 JavaScript 对象进行存取。</li>
<li>加密和解密关键字 ENCRYPT() 和 DECRYPT()：提供对下载后的离线数据加密和解密方法。</li>
<li>Dojo 其他模块的集成：如果用户选择 Dojo Offline，毫无疑问，其应用可以受益于 Dojo 的其他功能，比如完善的事件处理机制，Ajax 框架等等。</li>
</ol>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://www.ibm.com/i/v14/rules/blue_rule.gif" alt="" width="100%" height="1" /><br />
<img src="http://www.ibm.com/i/c.gif" border="0" alt="" width="8" height="6" /></td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" align="right">
<tbody>
<tr align="right">
<td><img src="http://www.ibm.com/i/c.gif" alt="" width="100%" height="4" /></p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="middle"><img src="http://www.ibm.com/i/v14/icons/u_bold.gif" border="0" alt="" width="16" height="16" /></td>
<td align="right" valign="top"><a href="http://www.ibm.com/developerworks/cn/web/0906_dojo_offline_hehj/#main"><strong>回页首</strong></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p><a name="3.Google Gears 简介 |outline">Google Gears 简介</a></p>
<p>Google Gears 是 Google 开发的一个自由和开源软件，以 BSD 许可证发布。主要是为了能够让用户可以在离线时能够继续使用 Web 应用。这套软件透过 SQLite 数据库让本地端能够把资料暂存起来。所以网页是透过缓存取得的，而不是从实际的网络上取得。而且，Web 相关的程序可以周期性的透过 Gears 将本地缓存的资料与网络上的资料做同步。如果网络暂时无法使用，这个同步过程将会延后，直到网络恢复为止。Google Gears 通过以浏览器扩展的方式添加 JavaScript API，使得浏览器的脚本能够访问本地的缓存数据库。该扩展目前支持 Firefox，Internet Explorer 和 Safari，并需工作于 Windows、Mac OS X，或是 Linux 下。</p>
<p>Google Gears 有几个主要的组件：</p>
<ol>
<li>一个本地服务器，用来存储和读取离线程序资源（包括 HTML 文件 , JavaScript 文件 , 图片等）。</li>
<li>一个小型数据库（基于 SQLite 轻量数据库），用来储存本地数据。</li>
<li>一个工作池，用来让开发者将本地数据与服务器端后台同步。</li>
<li>一个桌面模型，可使网络程序的操作贴近桌面程序。</li>
<li>一个地理定位模型，能够让网络程序侦测到目前用户的地理位置。</li>
</ol>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://www.ibm.com/i/v14/rules/blue_rule.gif" alt="" width="100%" height="1" /><br />
<img src="http://www.ibm.com/i/c.gif" border="0" alt="" width="8" height="6" /></td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" align="right">
<tbody>
<tr align="right">
<td><img src="http://www.ibm.com/i/c.gif" alt="" width="100%" height="4" /></p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="middle"><img src="http://www.ibm.com/i/v14/icons/u_bold.gif" border="0" alt="" width="16" height="16" /></td>
<td align="right" valign="top"><a href="http://www.ibm.com/developerworks/cn/web/0906_dojo_offline_hehj/#main"><strong>回页首</strong></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p><a name="4. 开发 Dojo 离线应用程序 |outline">开发 Dojo 离线应用程序</a></p>
<p>一般来说开发一个离线应用有以下几个步骤：</p>
<ol>
<li>应用加载时缓存所引用的资源。</li>
<li>应用加载之后设置必要的离线事件处理函数。如：与服务器进行同步操作时的下载事件、下载完成事件，重放事件等。</li>
<li>检查应用是否在线，读取应用所需的数据。如果离线则从本地读取数据；如果在线则与服务器数据进行同步：首先上传离线数据（如果有的话），然后从服务器上下载最新数据。</li>
<li>初始化应用程序。</li>
</ol>
<p>下面我们会先分别介绍如何保存离线资源，保存和使用应用离线数据以及如何与服务器的数据保持同步等相关技术，然后以一个具体的例子说明如何按上述步骤开发一个离线应用。</p>
<p><a name="N10125">保存离线资源</a></p>
<p>为了使页面能够在离线情况下操作，在页面加载时必须要保存页面所引用的 HTML 文件，JavaScript 文件，CSS 文件，图片文件等资源，这样在与服务器断开连接时，页面便能够从本地缓存中提取到页面及相关的资源。Dojo 提供了一个功能非常强大的函数 slurp 来实现这一功能。slurp 函数在页面加载之后会自动分析页面所引用的资源，并得到一个资源文件的 url 列表，然后抓取 url 的内容，保存到 Google Gears 中。slurp 函数能够缓存大部分的资源文件，包括引用 CSS 文件里的图片，但是对于使用内联方式指定的 CSS 图片以及用 JavaScript 动态产生的引用 slurp 则无法进行缓存。这种情况可以通过调用 dojox.off.files.cache () 方法来手动添加要缓存的资源，具体用法详见后文。</p>
<p>Dojo Offline 还提供了在调试时查看已缓存资源文件的方法，首先以 debug 方式加载 Dojo，然后在页面和 Dojo Offline 加载完之后调用 dojox.off.files.printURLs() 函数。这个函数会在控制台以调试的方式打印出已缓存的资源文件的 url。</p>
<p><a name="N10131">保存和使用离线数据</a></p>
<p>一般来说，离线应用不仅要缓存页面所引用的 HTML 文件，JavaScript，CSS，图片等资源，还要缓存页面所使用的数据。Dojo 对 Google Gears 的访问接口进行了封装，提供了 Dojo Storage 和 Dojo SQL 两种方式操作离线数据。通过这两种方式，用户可以方便、灵活地保存和读取离线数据。</p>
<ul>
<li>Dojo Storage</li>
</ul>
<p>提供了一种类似哈希表的方式对数据进行操作，数据以键值对的方式存取。</p>
<p>保存：dojox.storage.put(key,value) — key 是字符串类型，value 可以是字符串和可序列化的 JavaScript 对象，但是浏览器对象（如 DOM 节点和 XMLHttpRequest 对象）是不能够保存的。</p>
<p>读取：var value = dojox.storage.get(key) —获取字符串 key 对应的值。<br />
<a name="N1014A"><strong>清单 1</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>var car = {type: "Nissan", color: "white", price: 20000, optional:
 "air-conditioner, stereo"};
dojox.storage.put("complexKey", car);

var value = dojox.storage.get("someKey");
var car = dojox.storage.get("complexKey");
if(car)
alert(car.type);</pre>
</td>
</tr>
</tbody>
</table>
<p>上述代码先将一个对象 car 放置在 Dojox.Storage 里，然后又从中取出并展示。</p>
<ul>
<li>Dojo SQL</li>
</ul>
<p>通过 Dojo SQL 对 Google Gears 关系存储层的封装，能够以更适合 JavaScript 对象的访问方式对关系表进行操作。如下所示，我们对 Documents 表进行了创建，插入，查询操作：<br />
<a name="N1015D"><strong>清单 2</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>//create Documents table if not exist
dojox.sql("CREATE TABLE IF NOT EXISTS DOCUMENTS ("
+ "fileName		TEXT NOT NULL PRIMARY KEY UNIQUE,"
+ "content		TEXT NOT NULL) ");
//insert a record
dojox.sql("INSERT INTO DOCUMENTS (fileName, content) VALUES (?, ?)", fileName, contents);
//query
var results = dojox.sql("SELECT * FROM DOCUMENTS WHERE fileName = ?", someFileName);</pre>
</td>
</tr>
</tbody>
</table>
<p>Dojo 查询操作返回的是一个记录对象的数组，如访问第一条记录的 fileName 字段，可以使用 results[0].fileName，访问 content 字段则可以使用 results[0].content。</p>
<p><a name="N10166">与服务器同步数据</a></p>
<p>离线操作所产生的新数据，在与服务器连接可用时需要上传到服务器；并且，在该用户离线期间，其他用户也可能已经更改过数据，因此重新连接服务器时需要下载最新的数据。Dojo 的同步操作发生的时机有两个，一是在页面首次加载并且在线的时候，或是离线后又检测到连接恢复的时候，具体包括 3 个步骤：</p>
<ol>
<li>下载并缓存最新的页面资源，包括由 slurp 函数以及用户手动缓存的资源。Dojo Offline Widget 会自动更新相应的状态，如下图所示：
<p><a name="N10174"><strong>图 1. 下载状态 </strong></a><br />
<img src="http://www.ibm.com/developerworks/cn/web/0906_dojo_offline_hehj/image003.jpg" alt="下载状态" width="164" height="140" /></li>
<li>上传用户在离线期间所创建的数据。
<p><a name="N10185"><strong>图 2. 上传状态 </strong></a><br />
<img src="http://www.ibm.com/developerworks/cn/web/0906_dojo_offline_hehj/image005.jpg" alt="上传状态" width="166" height="142" /></li>
<li>下载服务器最新数据进行展示。
<p><a name="N10196"><strong>图 3. 同步成功 </strong></a><br />
<img src="http://www.ibm.com/developerworks/cn/web/0906_dojo_offline_hehj/image007.jpg" alt="同步成功" width="166" height="140" /></p>
<p>如上所示，Dojo Offline 提供了一个 UI 控件来通知用户当前的状态，如下载，上传以及网络连接状态等。Dojo Offline Widget 处理了大部分的逻辑，开发人员可以直接在页面中使用该控件。使用 Offline Widget 很简单，只需在页面加入一个占位符即可。Offline Widget 也提供了扩展机制，以更改所使用的图片和样式来跟页面风格保持一致。</li>
</ol>
<p><a name="N101A7">Dojo 离线应用示例</a></p>
<p>Dojo Offline 随附的开发包中提供了 3 个例子，下面以 hello world 为例说明如何构建一个简单的离线应用。hello world 程序模拟了用户与服务器简单的消息交互。用户界面包括一个输入框和一个发送按钮，在输入框里输入文本，点击发送按钮将消息发送到服务器。为了保持用例的简单，实际上消息并没有真正被发送到服务器，而只是简单地将其弹出。在应用离线时，点击发送按钮则会先在本地保存该消息，当应用重新连接时再重新执行该操作。</p>
<ol>
<li>首先加载 Dojo 及离线所使用的 JavaScript 文件。
<p><a name="N101B5"><strong>清单 3</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>&lt;script type="text/javascript" src="../../../../dojo/dojo.js"
djConfig="isDebug: true"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="../../../../dojox/off/offline.js"&gt;
&lt;/script&gt;</pre>
</td>
</tr>
</tbody>
</table>
<p>当然，我们也可以用 dojo.require 方法进行加载：</p>
<p><a name="N101C0"><strong>清单 4</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>&lt;script type="text/javascript" src="../../../../dojo/dojo.js"
djConfig="isDebug: true"&gt;&lt;/script&gt;
&lt;script type="text/javascript" &gt;
 dojo.require(“dojox.off.offline”);
 &lt;/script&gt;</pre>
</td>
</tr>
</tbody>
</table>
</li>
<li>设置应用程序的名字，这个名字会显示在 Dojo Offline Widget 上。
<p><a name="N101CB"><strong>清单 5</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>dojox.off.ui.appName = "Hello World";</pre>
</td>
</tr>
</tbody>
</table>
</li>
<li>缓存页面资源文件。要使离线功能正常工作，这个函数必须在 Dojo Offline 初始化之前调用，即 dojox.off.initialize 函数调用之前。
<p><a name="N101D5"><strong>清单 6</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>dojox.off.files.slurp();</pre>
</td>
</tr>
</tbody>
</table>
</li>
<li>初始化应用程序，设置离线操作的一些事件响应函数。
<p><a name="N101DF"><strong>清单 7</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>initialize: function(){
	console.debug("helloWorld.initialize");
	var self = this;
	dojo.connect(dojox.off.sync, "onSync", this, function(type){
		if(type == "download"){
			self._messages.push("Hi! This is fake downloaded data!");
			dojox.storage.put("messages", self._messages);
			dojox.off.sync.finishedDownloading();
		}else if(type == "finished"){
			this._messages = [];
			dojox.storage.remove("messages");
		}
	});
	dojo.connect(dojox.off.sync.actions, "onReplay", this,
				function(action, actionLog){
					if(action.name == "new hello world message"){
						var message = action.data;
						self.sendMessage(message);
						actionLog.continueReplay();
				}
	});
	if(!dojox.off.isOnline){
		this.loadOfflineData();
	}
	this.printMessages();
}</pre>
</td>
</tr>
</tbody>
</table>
<p>可以看到，此处最主要的两个操作是设置 dojox.off.sync 对象的 onSync 事件和 dojox.off.sync.actions 对象的 onReplay 事件。其中，onSync 用来处理与服务器的同步，download 事件发生在第一次加载页面或是网络重新连接的时候，在该事件中我们应该从服务器下载数据，并在下载完毕之后调用 dojox.off.sync.finishedDownloading() 方法，以便告诉 Dojo Offline Widget 更新当前状态。finished 事件则说明从服务器下载数据结束，可以更新应用程序了。</p>
<p>Dojo Offline 使用 action log 来记录用户在离线时所执行的操作，并在重新获得网络连接时再次执行这些操作，将数据上传到服务器。</p>
<p>一般来说，程序初始化时首先要判断应用是否在线，如果不在线则加载本地数据进行页面展示。值得注意的是，这些事件何时触发是由 Dojo Offline 的同步框架根据当前应用程序状态决定的，开发人员只需设置相应的事件处理函数即可。</li>
<li>保存离线数据，这是通过创建 action log 来实现的。在与服务器重新连接时 action log 会自动重新执行。
<p><a name="N101F2"><strong>清单 8</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>saveOfflineSend: function(message){
	this._messages.push(message);
	dojox.storage.put("messages", this._messages);
	var action = {name: "new hello world message", data: message};
	dojox.off.sync.actions.add(action);
	alert("This message has been saved for sending when we go back online");</pre>
</td>
</tr>
</tbody>
</table>
</li>
<li>Dojo 的离线功能要在页面加载完及 Dojo Offline 初始化之后才能工作，因此页面本身的代码要在 Dojo Offline 初始化完成之后执行。Dojo Offline 的初始化完成可以用 dojox.off.ui 的 onLoad 事件来标识。我们首先将页面的初始化函数绑定到 dojox.off.ui 的 onLoad 事件，然后调用 dojox.off.initialize 函数对 Dojo Offline 进行初始化。
<p><a name="N101FD"><strong>清单 9</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>dojo.connect(dojox.off.ui, "onLoad", helloWorld, "initialize");
dojox.off.initialize();</pre>
</td>
</tr>
</tbody>
</table>
</li>
<li>加载 Dojo Offline Widget。实际上任何 html 元素，只要 id 为“dot-widget”都可以作为 Offline Widget 的占位符。Dojo Offline 初始化的时候会对这个元素进行填充。
<p><a name="N10208"><strong>清单 10</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>&lt;div id="dot-widget"&gt;&lt;/div&gt;</pre>
</td>
</tr>
</tbody>
</table>
</li>
<li>为页面加入展示元素。
<p><a name="N10213"><strong>清单 11</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>&lt;div id="helloMessage" style="margin: 1em;"&gt;
&lt;label for="helloInput" 	style="margin-right: 0.2em;"&gt;
Enter Hello World Message:
&lt;/label&gt;
&lt;input name="helloInput" id="helloInput" 	style="margin-right: 0.2em;"&gt;
&lt;button id="sendMessage" onclick="helloWorld.send()" style="margin-right: 0.2em;"&gt;
Send&lt;/button&gt;
&lt;/div&gt;
&lt;p&gt;Debug output:&lt;/p&gt;</pre>
</td>
</tr>
</tbody>
</table>
</li>
<li>运行 hello world
<p>hello world 示例程序不涉及服务器端代码，因此并不一定需要部署才能执行。但是为了便于测试在线 / 离线操作，最好还是通过服务器访问。</p>
<p>在 Dojo Offline 里随附的例子中，Moxie 编辑器是一个包括服务器和客户端的完整应用程序，它使用 Jetty 作为 Web 容器，使用 Derby 作为数据库。我们可以启动 Moxie 应用所在的 Jetty 容器来访问 hello world 应用。</p>
<p>首先请安装 jdk1.5 或以上版本，在 dojox/off/demos/editor/server/ 目录下，运行：</p>
<p>java -jar editor.jar</p>
<p>在浏览器地址栏输入 http://localhost:8000/dojox/off/demos/helloworld/helloworld.html 即可访问 hello world 应用。可以通过关闭 / 打开 Jetty 来观察 hello world 和 Dojo Offline Widget 在离线、在线及同步时的行为。</li>
</ol>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://www.ibm.com/i/v14/rules/blue_rule.gif" alt="" width="100%" height="1" /><br />
<img src="http://www.ibm.com/i/c.gif" border="0" alt="" width="8" height="6" /></td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" align="right">
<tbody>
<tr align="right">
<td><img src="http://www.ibm.com/i/c.gif" alt="" width="100%" height="4" /></p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="middle"><img src="http://www.ibm.com/i/v14/icons/u_bold.gif" border="0" alt="" width="16" height="16" /></td>
<td align="right" valign="top"><a href="http://www.ibm.com/developerworks/cn/web/0906_dojo_offline_hehj/#main"><strong>回页首</strong></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p><a name="5. 高级议题 |outline">高级议题</a></p>
<p><a name="N10235">网页资源的手工缓存</a></p>
<p>尽管利用 slurp() 方法可以为我们完成很多自动化的工作，但一些出现在 JavaScript 中的动态加载的资源是 slurp() 所无法分析得到的。因此，在实际应用中作为补充，我们往往还需要将一些 slurp 过程中的“漏网之鱼”手工加入本地缓存中。而 Dojo Offline 也为我们提供了相应的功能以支持这一需求。</p>
<p>手工将网络资源加入本地缓存的方法十分简单，例如，假设我们要将一个名为 big_and_little_fish.jpg 的文件缓存起来，可以执行如下方法：<br />
<a name="N10243"><strong>清单 12</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>dojox.off.files.cache("images/big_and_little_fish.jpg");</pre>
</td>
</tr>
</tbody>
</table>
<p>不仅如此，Dojo Offline 还提供了一次性指定多个文件的功能，调用方法如下所示：<br />
<a name="N1024F"><strong>清单 13</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>dojox.off.files.cache([
 "images/fish1.png",
 "images/fish2.png",
 "scripts/some_dynamic_fish.js"
 ]);</pre>
</td>
</tr>
</tbody>
</table>
<p>我们可以多次调用 cache() 方法，假如调用过程中指定了多个同名文件，则最后一次被缓存的文件将会替换前面的同名文件。利用这一方法，再结合前述的 slurp() 方法，我们就可以很好的将离线所需的全部资源在本地缓存起来了。</p>
<p><a name="N10258">数据的加密与解密</a></p>
<p>将数据下载到本地进行缓存是离线功能得以实现的重要步骤，但是假如这些数据中包含有敏感信息，例如身份证号码，而本地环境又不甚安全时，则对数据进行加密处理是很有必要的。前面曾经提到，我们在利用 Dojo Offline 进行数据存储时可以选择使用 Dojo SQL。而 Dojo SQL 允许我们很方便的对数据的某些字段进行加密和解密。</p>
<p>假设我们以前面的 DOCUMENT 表为例，假定其中的“content”字段属于敏感信息。</p>
<p>Dojo SQL 提供了两个特殊的关键字，ENCRYPT() 和 DECRYPT()，分别用以实现加密和解密操作。以 content 为例，调用方式类似如下：<br />
<a name="N10269"><strong>清单 14</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>var password = "password";
dojox.sql("INSERT INTO DOCUMENTS VALUES (?,ENCRYPT(?))", "helloworld.txt",
"sensitive content", password,
function(results, error, errorMsg){
if(error){ alert(errorMsg); return; }
});</pre>
</td>
</tr>
</tbody>
</table>
<p>在上述代码中，我们在后一个字段加上了 ENCRYPT 关键字，声明对其进行加密。除此以外，我们还提供了一个 password 参数，这是底层加密机制所必须的。当我们启用应用系统时，系统会提示输入这一密码。出于对本地数据安全性的考虑，请不要将其存于 Cookie，Dojo Storage，或是 Dojo SQL 中，否则他人就可以轻易利用这一密码解开存于本地的敏感数据。另外，上述代码里还定义了一个回调函数。该回调函数将会在加密过程结束之后被调用。如果加密成功，results 对象中将会包含经过加密后的数据；如果加密失败，则 error 值将会为 true，并且 errorMsg 中会包含对错误原因的描述信息。</p>
<p>和加密一样，对数据进行解密的过程也十分简单。我们只需对需要解密的字段调用 DECRYPT 关键字即可。示例代码如下：<br />
<a name="N10277"><strong>清单 15</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>var password = "password";
dojox.sql("SELECT fileName, DECRYPT(content) FROM DOCUMENTS",
password,
function(results, error, errorMsg){
if(error){ alert(errorMsg); return; }
// go through decrypted results
alert("First document info: "
+ results[0].fileName + " "
+ results[0].content);
});</pre>
</td>
</tr>
</tbody>
</table>
<p>在上述代码中，我们利用 alert 语句将加密后的第一条结果数据打印了出来。其中的 password 必须与加密时所使用的完全一致，否则解密将会失败，结果数据将仍然是加密后的样子。</p>
<p>假如我们要对多个字段进行加密，Dojo SQL 的 ENCRYPT 还有一种很方便的书写方法，即：ENCRYPT(?, ?)；同样的，对于 DECRYPT 也存在类似的书写方式，已完成一次性对多个数据字段进行解密：DECRYPT(fileName, content)</p>
<p><a name="N10283">定制 Offline Widget</a></p>
<p>虽然利用 Dojo Offline Widget 可以省去我们很多的功夫，但是在某些情况下，其默认行为并不一定能够很好的满足我们的需要，例如：默认的样式风格与我们的应用程序不一致，此时，我们就可以对 Offline Widget 进行一定程度的定制。</p>
<p>事实上，我们在页面上所见到的 Offline Widget 有其对应的模板文件，该文件位于 dojox/off/resources/offline-widget.html，其中包含有一系列的 HTML 元素，这些元素都有相应的 ID，比如：dot-widget-network-indicator，Offline Widget 就是利用默认的 CSS 文件对其进行控制的，该 CSS 文件位于：dojox/off/resources/offline-widget.css。我们可以通过自定义 CSS 的方式来改变 HTML 元素的样式，从而改变 Offline Widget 在页面中的展现风格。</p>
<p>除了改变展现风格，有时我们可能还需要改变展现的内容，我们可以将 offline-widget.html 中的内容选择性的复制到我们自己的 HTML 页面中，这样我们就可以根据自己的需要随意设计 Offline Widget 的展现内容，而无需定义一个 ID 为 dot-widget 的特定 DIV 了。</p>
<p>此外，如果我们只是想修改 Offline Widget 所使用的默认图标的话，则还有更为简单的做法。那就是对如下几个 JavaScript 变量进行修改：</p>
<ul>
<li>dojox.off.ui.onlineImagePath：表示在线状态的图标</li>
<li>dojox.off.ui.offlineImagePath：表示离线状态的图标</li>
<li>dojox.off.ui.rollerImagePath：表示同步正在进行的图标</li>
<li>dojox.off.ui.checkmarkImagePath：表示同步结束的图标</li>
</ul>
<p>例如，如果我们想将表示在线状态的绿色小圆球状图标替换为自己设计的图标，则可以修改如下：</p>
<p>dojox.off.ui.onlineImagePath = &#8220;images/myonlineball.png&#8221;;</p>
<p>最后，假如我们对默认的“Learn How”页面不甚满意的话，则还可以对 dojox/off/resources/learnhow.html 进行修改，其对应的 CSS 样式也定义与 dojox/off/resources/offline-widget.css 中。</p>
<p><a name="N102AC">性能问题</a></p>
<p>Dojo Offline 每次在对数据进行同步时，始终都会刷新缓存于本地的资源，这一点有可能会对同步的性能构成较大的影响，因为毕竟并非每一次同步都需要刷新所有的本地数据。为了提高同步的效率，Dojo Offline 提供了一种可选的方案，即由应用程序提供一个名为 version.js 的特殊文件，并将其置于应用程序的主路径下。假如该文件存在的话，则同步期间 Dojo Offline 会去读取该文件的内容，并判断其内容是否改变，以此来选择性的刷新本地缓存文件。</p>
<p>我们在 version.js 文件中所提供的内容其实非常简单，可以是一个字符串，也可以是一个数字，形式不限。例如：&#8221;03-15-2009.9&#8243;。只要能够让 Dojo Offline 判断出内容的变化即可。</p>
<p>除了同步时候的性能问题外，另一个可能会遇到的性能问题是数据的存储。当我们使用 Dojo SQL 来存储数据时，必须先将底层所依赖的 Google Gears 的存储数据库打开，而后才能进行数据的存储，而当数据存储完毕之后，还需将数据库关闭。通常情况下，我们并不需要关心这一点，因为 Dojo SQL 会自动为我们完成这一切，每次当我们执行一句 SQL 语句时，底层代码都会自动处理数据库的打开和关闭。</p>
<p>不过，假如我们是在批量的向本地缓存插入数据的话，比如在一个循环次数为上百次的 for 循环中执行数据插入操作，那么每执行一次 SQL 语句都要打开和关闭一次数据库或许是一种很低效做法。为了提高效率，我们可以在批量操作数据之前通过调用 dojox.sql.open() 手工将数据库打开，等所有操作完成之后后再通过调用 dojox.sql.close() 手工将其关闭。插入数据期间，Dojo SQL 会自动判断数据库的连接状态，并保持连接一直处于打开状态，直至手工关闭为止：<br />
<a name="N102C0"><strong>清单 16</strong></a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td>
<pre>var dataSet = getDataSet(); // get an array that has a bunch of data
//in it
dojox.sql.open();
for(var i = 0; i &lt; dataSet.length; i++){
 dojox.sql("INSERT INTO DOCUMENTS (fileName, content) VALUES (?, ?)",
 dataSet[i].fileName, dataSet[i].content);
}
dojox.sql.close();</pre>
</td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><img src="http://www.ibm.com/i/v14/rules/blue_rule.gif" alt="" width="100%" height="1" /><br />
<img src="http://www.ibm.com/i/c.gif" border="0" alt="" width="8" height="6" /></td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" align="right">
<tbody>
<tr align="right">
<td><img src="http://www.ibm.com/i/c.gif" alt="" width="100%" height="4" /></p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="middle"><img src="http://www.ibm.com/i/v14/icons/u_bold.gif" border="0" alt="" width="16" height="16" /></td>
<td align="right" valign="top"><a href="http://www.ibm.com/developerworks/cn/web/0906_dojo_offline_hehj/#main"><strong>回页首</strong></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p><a name="6. 总结 |outline">总结</a></p>
<p>本文介绍了 Dojo Offline 的强大功能。通过阅读本文，读者能够了解到 Dojo Offline 的基本工作原理和一定的高级定制功能，从而掌握如何使用 Dojo Offline 进行 Web 离线应用程序开发的技能。</p>
<p>申明：</p>
<p>本文仅代表作者个人观点。</p>
<p><a name="resources">参考资料</a></p>
<p><strong>学习</strong></p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Dojo_Toolkit">Dojo 的 Wiki</a>：对 dojo 进行了全面的介绍，是一个入门的好地方。</li>
<li><a href="http://dojotoolkit.org/">Dojo 官方网站</a>：提供了最全面的资料，包括 dojo 源码，各种文档，实例等等。</li>
<li>参考 <a href="http://dojotoolkit.org/book/dojo-book-0-9/part-5-dojox/dojo-offline">Dojo offline</a> 官方文档。</li>
<li><a href="http://dojotoolkit.org/docs">Dojo 官方文档库</a>：在这里您可以找到全部和 Dojo 开发相关的文档资料。</li>
<li>参考 <a href="http://gears.google.com/">Google Gear</a> 相关文档，了解更多 Google Gear 的内容。</li>
<li>参考 W3C <a href="http://www.w3.org/TR/offline-webapps/">Offline Web Applications</a> 规范。</li>
<li><a href="http://www.ibm.com/developerworks/cn/web/wa-dojotoolkit/">developerWorks Dojo 专题</a>：汇集了大量与 Dojo 相关的技术资源。</li>
<li>通过 developerWorks <a href="http://www.ibm.com/developerworks/cn/web/">Web 开发专区</a> 内有关 Web 技术的文章和教程（包括本专栏之前的各期文章）扩展您的站点开发技能。</li>
</ul>
<p><strong>获得产品和技术</strong></p>
<ul>
<li><a href="http://www.ibm.com/developerworks/cn/downloads/">IBM 试用软件</a>：使用这些可直接从 developerWorks 下载的软件构建您的下一个开发项目。</li>
</ul>
<p><strong>讨论</strong></p>
<ul>
<li>通过参与 <a href="http://www.ibm.com/developerworks/blogs/?S_TACT=105AGX52&amp;S_CMP=cn-a-wa">developerWorks blog</a> 加入 developerWorks 社区。</li>
</ul>
<p><a name="author">作者简介</a></p>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td colspan="3"><img src="http://www.ibm.com/i/c.gif" alt="" width="100%" height="5" /></td>
</tr>
<tr align="left" valign="top">
<td><img src="http://www.ibm.com/developerworks/cn/web/0906_dojo_offline_hehj/hehuijian.jpg" alt="/developerworks/cn/web/0906_dojo_offline_hehj/hehuijian.jpg" align="left" /></td>
<td><img src="http://www.ibm.com/i/c.gif" alt="" width="4" height="5" /></td>
<td width="100%">何辉剑，现在 IBM 中国软件开发实验室 Lotus 开发中心工作，目前从事 Lotus Quickr 的开发定制以及客户支持工作。对 Dojo，Web2.0 相关技术和社会化软件有丰富的经验。</td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td colspan="3"><img src="http://www.ibm.com/i/c.gif" alt="" width="100%" height="5" /></td>
</tr>
<tr align="left" valign="top">
<td><img src="http://www.ibm.com/developerworks/cn/web/0906_dojo_offline_hehj/zhangshun.jpg" alt="/developerworks/cn/web/0906_dojo_offline_hehj/zhangshun.jpg" align="left" /></td>
<td><img src="http://www.ibm.com/i/c.gif" alt="" width="4" height="5" /></td>
<td width="100%">张顺，现在 IBM 中国软件开发实验室 Lotus 开发中心工作，目前从事 Lotus Quickr 的开发定制以及客户支持工作。对 Web 服务，Web2.0 相关技术有浓厚的兴趣。</td>
</tr>
</tbody>
</table>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td colspan="3"><img src="http://www.ibm.com/i/c.gif" alt="" width="100%" height="5" /></td>
</tr>
<tr align="left" valign="top">
<td><img src="http://www.ibm.com/developerworks/cn/web/0906_dojo_offline_hehj/moying.jpg" alt="/developerworks/cn/web/0906_dojo_offline_hehj/moying.jpg" align="left" /></td>
<td><img src="http://www.ibm.com/i/c.gif" alt="" width="4" height="5" /></td>
<td width="100%">莫映，现在IBM中国软件开发实验室Lotus开发中心工作，目前从事Lotus Quickr的Platform Service开发。热衷于Web 2.0相关技术及智能Web 2.0应用的构建。</td>
</tr>
</tbody>
</table>
<h2  class="related_post_title">Other Posts / 其他文章</h2><ul class="related_post"><li><a href="http://slj.me/2009/10/22-photoshop-web-design-interface-tutorial-sites/" title="22个Photoshop网页设计教程网站推荐">22个Photoshop网页设计教程网站推荐</a></li><li><a href="http://slj.me/2010/05/my-footprint/" title="我的电脑情缘（流水帐）">我的电脑情缘（流水帐）</a></li><li><a href="http://slj.me/2010/07/deprecated-features-for-php5-3/" title="PHP 5.3 后被禁止使用的函数">PHP 5.3 后被禁止使用的函数</a></li><li><a href="http://slj.me/2010/03/%e6%bc%8f%e5%98%b4%e7%bd%91%e5%8d%b3%e5%b0%86%e4%b8%8a%e7%ba%bf/" title="漏嘴网即将上线">漏嘴网即将上线</a></li><li><a href="http://slj.me/2009/10/beautiful-gradient-typography-in-web-design/" title="网站设计中漂亮的文字渐变效果 ">网站设计中漂亮的文字渐变效果 </a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/04/%e8%bd%ac%ef%bc%9a%e4%bd%bf%e7%94%a8-dojo-%e5%bc%80%e5%8f%91%e7%a6%bb%e7%ba%bf%e5%ba%94%e7%94%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[下载] Dojo 中文手册《实战Dojo工具包》PDF</title>
		<link>http://slj.me/2010/03/%e4%b8%8b%e8%bd%bd-dojo-%e4%b8%ad%e6%96%87%e6%89%8b%e5%86%8c%e3%80%8a%e5%ae%9e%e6%88%98dojo%e5%b7%a5%e5%85%b7%e5%8c%85%e3%80%8bpdf/</link>
		<comments>http://slj.me/2010/03/%e4%b8%8b%e8%bd%bd-dojo-%e4%b8%ad%e6%96%87%e6%89%8b%e5%86%8c%e3%80%8a%e5%ae%9e%e6%88%98dojo%e5%b7%a5%e5%85%b7%e5%8c%85%e3%80%8bpdf/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 09:22:01 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[pdf]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1672</guid>
		<description><![CDATA[实战Dojo工具包
一个品质远远超出“原型建造”的Ajax库
点击下载PDF：Dojo中文手册
Related Posts / 相关文章【转】使用 Dojo 的 Ajax 应用开发进阶教程 : 富含语义的 HTML]]></description>
			<content:encoded><![CDATA[<h2>实战Dojo工具包</h2>
<p>一个品质远远超出“原型建造”的Ajax库</p>
<p><a href="http://slj.me/wp-content/uploads/2010/03/Dojo中文手册.pdf" target="_blank">点击下载PDF：Dojo中文手册</a></p>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2009/07/dojo-ajax-semanticize-html/" title="【转】使用 Dojo 的 Ajax 应用开发进阶教程 : 富含语义的 HTML">【转】使用 Dojo 的 Ajax 应用开发进阶教程 : 富含语义的 HTML</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/03/%e4%b8%8b%e8%bd%bd-dojo-%e4%b8%ad%e6%96%87%e6%89%8b%e5%86%8c%e3%80%8a%e5%ae%9e%e6%88%98dojo%e5%b7%a5%e5%85%b7%e5%8c%85%e3%80%8bpdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用回车键提交网页表单的条件</title>
		<link>http://slj.me/2010/03/%e4%bd%bf%e7%94%a8%e5%9b%9e%e8%bd%a6%e9%94%ae%e6%8f%90%e4%ba%a4%e7%bd%91%e9%a1%b5%e8%a1%a8%e5%8d%95%e7%9a%84%e6%9d%a1%e4%bb%b6/</link>
		<comments>http://slj.me/2010/03/%e4%bd%bf%e7%94%a8%e5%9b%9e%e8%bd%a6%e9%94%ae%e6%8f%90%e4%ba%a4%e7%bd%91%e9%a1%b5%e8%a1%a8%e5%8d%95%e7%9a%84%e6%9d%a1%e4%bb%b6/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 16:03:51 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[回车]]></category>
		<category><![CDATA[表单]]></category>

		<guid isPermaLink="false">http://slj.me/2010/03/%e4%bd%bf%e7%94%a8%e5%9b%9e%e8%bd%a6%e9%94%ae%e6%8f%90%e4%ba%a4%e7%bd%91%e9%a1%b5%e8%a1%a8%e5%8d%95%e7%9a%84%e6%9d%a1%e4%bb%b6/</guid>
		<description><![CDATA[
回车键提交表单是我们经常操作的一个动作，而什么条件下能使回车键提交却很少有人关心！
我们有时候希望回车键敲在文本框（input element）里来提交表单（form），但有时候又不希望如此。比如搜索行为，希望输入完关键词之后直接按回车键立即提交表单，而有些复杂表单，可能要避免回车键误操作在未完成表单填写的时候就触发了表单提交。
要控制这些行为，不需要借助JS，浏览器已经帮我们做了这些处理，这里总结几条规则：
1、如果表单里有一个type=”submit”的按钮，回车键生效。
2、如果表单里只有一个type=”text”的input，回车键生效。
3、如果按钮不是用input，而是用button，并且没有加type，IE下默认为type=button，FX默认为type=submit。
4、其他表单元素如textarea、select不影响。
实际应用的时候，要让表单响应回车键很容易，保证表单里有个type=”submit”的按钮就行。而当只有一个文本框又不希望响应回车键怎么办呢？我的方法有点别扭，就是再写一个无意义的文本框，隐藏起来。根据第4条规则，我们在用button的时候，尽量显式声明type以使浏览器表现一致。
一个demo，列出了一些例子

Other Posts / 其他文章GZIP 在各种网站上的万能应用 （以WordPress举例）来用实用的CSS3来制作你的酷炫按钮吧你能否成为一名Web设计师？精选15个国外CSS框架[下载] Dojo 中文手册《实战Dojo工具包》PDF]]></description>
			<content:encoded><![CDATA[<div id="content_body">
<p>回车键提交表单是我们经常操作的一个动作，而什么条件下能使回车键提交却很少有人关心！</p>
<p>我们有时候希望回车键敲在文本框（input element）里来提交表单（form），但有时候又不希望如此。比如搜索行为，希望输入完关键词之后直接按回车键立即提交表单，而有些复杂表单，可能要避免回车键误操作在未完成表单填写的时候就触发了表单提交。</p>
<p>要控制这些行为，不需要借助JS，浏览器已经帮我们做了这些处理，这里总结几条规则：<br />
1、如果表单里有一个type=”submit”的按钮，回车键生效。<br />
2、如果表单里只有一个type=”text”的input，回车键生效。<br />
3、如果按钮不是用input，而是用button，并且没有加type，IE下默认为type=button，FX默认为type=submit。<br />
4、其他表单元素如textarea、select不影响。</p>
<p>实际应用的时候，要让表单响应回车键很容易，保证表单里有个type=”submit”的按钮就行。而当只有一个文本框又不希望响应回车键怎么办呢？我的方法有点别扭，就是再写一个无意义的文本框，隐藏起来。根据第4条规则，我们在用button的时候，尽量显式声明type以使浏览器表现一致。</p>
<p>一个<a href="http://ued.koubei.com/wp-content/uploads/2009/01/submit.html">demo</a>，列出了一些例子</p>
</div>
<h2  class="related_post_title">Other Posts / 其他文章</h2><ul class="related_post"><li><a href="http://slj.me/2010/03/css3-please-the-cross-browser-css3-rule-generator/" title="CSS3, Please! The Cross-Browser CSS3 Rule Generator">CSS3, Please! The Cross-Browser CSS3 Rule Generator</a></li><li><a href="http://slj.me/2009/12/the-best-jquery-plugins-of-2009/" title="2009 年度最佳 jQuery 插件">2009 年度最佳 jQuery 插件</a></li><li><a href="http://slj.me/2009/04/w3c-html5-exciting-new-features/" title="W3C小组公布HTML5激动人心的特性">W3C小组公布HTML5激动人心的特性</a></li><li><a href="http://slj.me/2010/03/light-web-useful-firefox-ie-plugin/" title="“点亮网页”：一个实用的Firefox和IE插件">“点亮网页”：一个实用的Firefox和IE插件</a></li><li><a href="http://slj.me/2009/07/javascript-%e5%9b%be%e7%89%87%e5%88%87%e5%89%b2%e6%95%88%e6%9e%9c/" title="JavaScript 图片切割效果 ">JavaScript 图片切割效果 </a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/03/%e4%bd%bf%e7%94%a8%e5%9b%9e%e8%bd%a6%e9%94%ae%e6%8f%90%e4%ba%a4%e7%bd%91%e9%a1%b5%e8%a1%a8%e5%8d%95%e7%9a%84%e6%9d%a1%e4%bb%b6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>漏嘴网即将上线</title>
		<link>http://slj.me/2010/03/%e6%bc%8f%e5%98%b4%e7%bd%91%e5%8d%b3%e5%b0%86%e4%b8%8a%e7%ba%bf/</link>
		<comments>http://slj.me/2010/03/%e6%bc%8f%e5%98%b4%e7%bd%91%e5%8d%b3%e5%b0%86%e4%b8%8a%e7%ba%bf/#comments</comments>
		<pubDate>Sun, 28 Mar 2010 06:08:07 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[louziu.com]]></category>
		<category><![CDATA[漏嘴网]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1669</guid>
		<description><![CDATA[最近一直没更新博客是因为最近比较忙。
一是继续丰富Meeplace的内容，目前已经出到了2.78版，有兴趣可以去官网看看
其次，我将Meeplace开发了多语言，现在已经支持8国语言了。
其中我自己也将这个自己开发的产品用在自己身上。和小平一起经营起漏嘴网。
http://www.louzui.com
先从学院附近开始做起吧。希望有一天，传单就被我们取代了。大家想看看哪好吃，哪好玩，饮食折扣，景区折扣，都可以来漏嘴网，我们会成为一个导吃，导购，导租咨询站。
Other Posts / 其他文章从Kiya.cn到slj.me关于网页设计的一些好收藏HTML5新功能演示2009年淘宝UED团队招聘前端工程师Ajax Loading 在线图片生成]]></description>
			<content:encoded><![CDATA[<p>最近一直没更新博客是因为最近比较忙。<br />
一是继续丰富Meeplace的内容，目前已经出到了2.78版，有兴趣可以去官网看看</p>
<p>其次，我将Meeplace开发了多语言，现在已经支持8国语言了。<br />
其中我自己也将这个自己开发的产品用在自己身上。和小平一起经营起<a href="http://www.louzui.com" target="_blank">漏嘴网</a>。<br />
<a href="http://www.louzui.com" target="_blank">http://www.louzui.com</a></p>
<p>先从学院附近开始做起吧。希望有一天，传单就被我们取代了。大家想看看哪好吃，哪好玩，饮食折扣，景区折扣，都可以来漏嘴网，我们会成为一个导吃，导购，导租咨询站。</p>
<h2  class="related_post_title">Other Posts / 其他文章</h2><ul class="related_post"><li><a href="http://slj.me/2010/01/js%e8%8e%b7%e5%8f%96%e6%b5%8f%e8%a7%88%e5%99%a8%e7%aa%97%e5%8f%a3%e5%a4%a7%e5%b0%8f-%e8%8e%b7%e5%8f%96%e5%b1%8f%e5%b9%95%ef%bc%8c%e6%b5%8f%e8%a7%88%e5%99%a8%ef%bc%8c%e7%bd%91%e9%a1%b5%e9%ab%98/" title="JS获取浏览器窗口大小 获取屏幕，浏览器，网页高度宽度 ">JS获取浏览器窗口大小 获取屏幕，浏览器，网页高度宽度 </a></li><li><a href="http://slj.me/2010/05/whats-new-for-meeplace-2-8/" title="What&#8217;s new for Meeplace 2.8">What&#8217;s new for Meeplace 2.8</a></li><li><a href="http://slj.me/2009/03/50-top-wordpress-plugin-widgets/" title="50个最好的WordPress插件">50个最好的WordPress插件</a></li><li><a href="http://slj.me/2010/03/multiple-selectable-checkbox-ajax-submit/" title="[原创]多选/全选checkbox，AJAX提交。另附IE的onchange BUG">[原创]多选/全选checkbox，AJAX提交。另附IE的onchange BUG</a></li><li><a href="http://slj.me/2009/04/regular-expression-manual/" title="半小时教你学会正则表达式">半小时教你学会正则表达式</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/03/%e6%bc%8f%e5%98%b4%e7%bd%91%e5%8d%b3%e5%b0%86%e4%b8%8a%e7%ba%bf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用OpenID、OAuth和Facebook Connect武装你的站点</title>
		<link>http://slj.me/2010/03/%e4%bd%bf%e7%94%a8openid%e3%80%81oauth%e5%92%8cfacebook-connect%e6%ad%a6%e8%a3%85%e4%bd%a0%e7%9a%84%e7%ab%99%e7%82%b9/</link>
		<comments>http://slj.me/2010/03/%e4%bd%bf%e7%94%a8openid%e3%80%81oauth%e5%92%8cfacebook-connect%e6%ad%a6%e8%a3%85%e4%bd%a0%e7%9a%84%e7%ab%99%e7%82%b9/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 15:56:26 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[Web Structure]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[openid]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1662</guid>
		<description><![CDATA[如果你正在盘算着如何为你的新网站创建身份管理系统（通常也称为用户管理系统或权限管理系统）的话，在动手之前你一定要看看Dion Hinchcliffe写的这篇题为《现代Web身份：为什么你的Web应用应该支持OpenID、OAuth，以及可能应该支持Facebook Connect》的文章，你或许会在读完之后改变你的主意。在他看来，使用这些新一代Web身份管理系统是完成这一工作更快的做法，而且功能更强且更好。他认为通过这种方法：


可以更容易、更快捷和更安全地让使用者在你的站点建立他们身份。
可以让业务可以单点登录到你的应用。
把你的站点转变成为一个针对于第三方应用的平台，让这些应用可以安全地访问用户数据。
可以将你的站点或应用集成到使用者及其关系网的社交体验（social experience）中。


在简要回顾企业单点登录和Web身份管理的历史之后，Dion给出了当今实现Web单点登录的新思路：使用OpenID、OAuth和（可选的）Facebook Connect。

OpenID
OpenID背后的想法其实很简单：
让使用者在登录你的应用时使用自己选择的身份提供商，而不是让他们去填写一个在线表格，然后把这些信息捕获到使用者不可能信任或不长期信任的私有本地账户中。
由此，OpenID为使用者提供了一种访问新站点更简单的方法（还记得上次为了下载一份资料，而不得不在那个站点上注册一个你自己也知道以后可能再也不会使用的账户么？:)）。Dion把OpenID的好处总结为：

更快、更简单的登录，因为消除或简化了注册过程。
更好的登录过程和生命周期，因为用户从此只需使用一个ID和口令。
一致的Web身份，因为ID的统一，让其他人通过这个ID就可将之与实际的用户划上等号。

使用OpenID并不要求使用者有什么改变，事实上，很多使用者很可能本身就已经有了一个OpenID，而他自己却还不知道。看看支持OpenID的提供商列表，开始你的OpenID使用之旅吧。
既然支持OpenID显然会给网站带来更大的流量，那么支持它当然是势在必行。其方式不外乎自己动手实现规范，或利用现成类库两种。这样的类库并不难找，因为目前的主流语言都已经有了相应的OpenID库。
值得注意的是，支持OpenID并不意味着站点或应用就放弃了对用户信息的收集，在这种情况下它们依旧可以捕获一些使用者相关的信息，只不过这些信息是在OpenID的上下文中，而不是使用者不想给出的口令或其他保密信息。
OAuth
为站点提供编程接口可以让其知名度更上层楼，然而在流量增加的同时，站点面临的安全压力也在同比增长。OAuth正是该背景下的产物，它可以让第3方应用安全使用你的站点数据。说到使用OAuth来保护API的好处，Dion列举如下：

安全、保密的第3方数据访问
对于第3方访问的控制是声明性的
大量第3方应用的使用将有助于推动本地站点的使用

和OpenID一样，在主流语言中你同样可以找到对OAuth的支持。对于有兴趣了解OAuth规范的读者则可以参考这里。
Facebook Connect
和以上两个都是开放标准不同，Faccebook Connect是一个私有标准。至于选择它的原因，Dion给出的解释是“缺乏开放、被广泛的社交身份系统，而该类系统的影响却越来越大。”。同时，他还援引了Facebook的数据：
对大多数站点来讲，“2/3的新注册是通过Facebook Connect来的，而且这些使用者大约有一半以上都开始使用这些站点”。
Dion以自己为例对Facebook Connect的使用效果进行了说明：
例如，我经常使用一个视频共享站点Vimeo，但我的很多朋友并不使用，甚至没有那里的账户。但是，在我发布视频的时候，通过显示我视频的Facebook Connect链接，他们可以在自己的活动流（activity stream）中看到我在Vimeo上做的事情。然后，他们可以决定是否观看这个视频，或者是访问Vimeo。
Facebook Connect的功能和优点如下：


一键登录，使用者可以使用自己的Facebook身份并让你的站点访问他们的Facebook信息。
更多的参与，利用使用者个人兴趣来提供更具针对性的信息，交付朋友自己定制的内容。
新的分发模型，通过Facebook上的活动流或其他社交渠道，使用者可以和Facebook上的联系人分享内容和发生在你站点上的行动。
直接访问Facebook，使用该API，可以让超过70万的开发者构建大量应用。


Facebook Connect的使用并不复杂，因为它本身就是一组Javascript库和XML标记，关于它的使用可以参考Dion给出的入门指南。
幸运的是，这3种工具并非排他的。完全可以结合使用，Dion在文中给出了结合使用OpenID和OAuth的例子：Step2项目。您是否已经建立您的站点，是否考虑开放您网站的API，是否考虑拥抱Facebook？那么Dion Hinchcliffe的这篇文章绝对应该在你的阅读范围之列。
Related Posts / 相关文章[译]Facebook是如何设计的Facebook 如何存储150亿张、1.5PB的照片]]></description>
			<content:encoded><![CDATA[<p>如果你正在盘算着如何为你的新网站创建身份管理系统（通常也称为用户管理系统或权限管理系统）的话，在动手之前你一定要看看<a rel="external nofollow" href="http://hinchcliffe.org/">Dion Hinchcliffe</a>写的这篇题为<a rel="external nofollow" href="http://hinchcliffe.org/archive/2009/04/15/16745.aspx">《现代Web身份：为什么你的Web应用应该支持OpenID、OAuth，以及可能应该支持Facebook Connect》</a>的文章，你或许会在读完之后改变你的主意。在他看来，使用这些新一代Web身份管理系统是完成这一工作更快的做法，而且功能更强且更好。他认为通过这种方法：</p>
<blockquote>
<ul>
<li>可以更容易、更快捷和更安全地让使用者在你的站点建立他们身份。</li>
<li>可以让业务可以单点登录到你的应用。</li>
<li>把你的站点转变成为一个针对于第三方应用的平台，让这些应用可以安全地访问用户数据。</li>
<li>可以将你的站点或应用集成到使用者及其关系网的社交体验（social experience）中。</li>
</ul>
</blockquote>
<p>在简要回顾企业单点登录和Web身份管理的历史之后，Dion给出了当今实现Web单点登录的新思路：使用<a rel="external nofollow" href="http://openid.net/">OpenID</a>、<a rel="external nofollow" href="http://oauth.net/">OAuth</a>和（可选的）<a rel="external nofollow" href="http://developers.facebook.com/connect.php">Facebook Connect</a>。<br />
<span id="more-1662"></span></p>
<h2>OpenID</h2>
<p>OpenID背后的想法其实很简单：</p>
<blockquote><p>让使用者在登录你的应用时使用自己选择的身份提供商，而不是让他们去填写一个在线表格，然后把这些信息捕获到使用者不可能信任或不长期信任的私有本地账户中。</p></blockquote>
<p>由此，OpenID为使用者提供了一种访问新站点更简单的方法（还记得上次为了下载一份资料，而不得不在那个站点上注册一个你自己也知道以后可能再也不会使用的账户么？:)）。Dion把OpenID的好处总结为：</p>
<ul>
<li>更快、更简单的登录，因为消除或简化了注册过程。</li>
<li>更好的登录过程和生命周期，因为用户从此只需使用一个ID和口令。</li>
<li>一致的Web身份，因为ID的统一，让其他人通过这个ID就可将之与实际的用户划上等号。</li>
</ul>
<p>使用OpenID并不要求使用者有什么改变，事实上，很多使用者很可能本身就已经有了一个OpenID，而他自己却还不知道。看看<a rel="external nofollow" href="http://openid.net/get/">支持OpenID的提供商列表</a>，开始你的OpenID使用之旅吧。</p>
<p>既然支持OpenID显然会给网站带来更大的流量，那么支持它当然是势在必行。其方式不外乎自己动手实现<a rel="external nofollow" href="http://openid.net/developers/specs/">规范</a>，或利用现成类库两种。这样的类库并不难找，因为目前的主流语言都已经有了相应的<a rel="external nofollow" href="http://wiki.openid.net/Libraries">OpenID库</a>。</p>
<p>值得注意的是，支持OpenID并不意味着站点或应用就放弃了对用户信息的收集，在这种情况下它们依旧可以捕获一些使用者相关的信息，只不过这些信息是在OpenID的上下文中，而不是使用者不想给出的口令或其他保密信息。</p>
<h2>OAuth</h2>
<p>为站点提供编程接口可以让其知名度更上层楼，然而在流量增加的同时，站点面临的安全压力也在同比增长。OAuth正是该背景下的产物，它可以让第3方应用安全使用你的站点数据。说到使用OAuth来保护API的好处，Dion列举如下：</p>
<ul>
<li>安全、保密的第3方数据访问</li>
<li>对于第3方访问的控制是声明性的</li>
<li>大量第3方应用的使用将有助于推动本地站点的使用</li>
</ul>
<p>和OpenID一样，在主流语言中你同样可以找到<a rel="external nofollow" href="http://oauth.net/code">对OAuth的支持</a>。对于有兴趣了解OAuth规范的读者则可以参考<a rel="external nofollow" href="http://oauth.net/documentation/spec">这里</a>。</p>
<h2>Facebook Connect</h2>
<p>和以上两个都是开放标准不同，Faccebook Connect是一个私有标准。至于选择它的原因，Dion给出的解释是“缺乏开放、被广泛的社交身份系统，而该类系统的影响却越来越大。”。同时，他还援引了Facebook的数据：</p>
<blockquote><p>对大多数站点来讲，“2/3的新注册是通过Facebook Connect来的，而且这些使用者大约有一半以上都开始使用这些站点”。</p></blockquote>
<p>Dion以自己为例对Facebook Connect的使用效果进行了说明：</p>
<blockquote><p>例如，我经常使用一个视频共享站点<a rel="external nofollow" href="http://vimeo.com/">Vimeo</a>，但我的很多朋友并不使用，甚至没有那里的账户。但是，在我发布视频的时候，通过显示我视频的Facebook Connect链接，他们可以在自己的活动流（activity stream）中看到我在Vimeo上做的事情。然后，他们可以决定是否观看这个视频，或者是访问Vimeo。</p></blockquote>
<p>Facebook Connect的功能和优点如下：</p>
<blockquote>
<ul>
<li><strong>一键登录</strong>，使用者可以使用自己的Facebook身份并让你的站点访问他们的Facebook信息。</li>
<li><strong>更多的参与</strong>，利用使用者个人兴趣来提供更具针对性的信息，交付朋友自己定制的内容。</li>
<li><strong>新的分发模型</strong>，通过Facebook上的活动流或其他社交渠道，使用者可以和Facebook上的联系人分享内容和发生在你站点上的行动。</li>
<li><strong>直接访问Facebook</strong>，使用该API，可以让超过70万的开发者构建大量应用。</li>
</ul>
</blockquote>
<p>Facebook Connect的使用并不复杂，因为它本身就是一组Javascript库和XML标记，关于它的使用可以参考Dion给出的<a rel="external nofollow" href="http://wiki.developers.facebook.com/index.php/Trying_Out_Facebook_Connect">入门指南</a>。</p>
<p>幸运的是，这3种工具并非排他的。完全可以结合使用，Dion在文中给出了结合使用OpenID和OAuth的例子：<a rel="external nofollow" href="http://code.google.com/p/step2/">Step2项目</a>。您是否已经建立您的站点，是否考虑开放您网站的API，是否考虑拥抱Facebook？那么Dion Hinchcliffe的<a rel="external nofollow" href="http://hinchcliffe.org/archive/2009/04/15/16745.aspx">这篇文章</a>绝对应该在你的阅读范围之列。</p>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2009/10/design-at-facebook/" title="[译]Facebook是如何设计的">[译]Facebook是如何设计的</a></li><li><a href="http://slj.me/2009/05/efficient-storage-of-billions-of-photos/" title="Facebook 如何存储150亿张、1.5PB的照片">Facebook 如何存储150亿张、1.5PB的照片</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/03/%e4%bd%bf%e7%94%a8openid%e3%80%81oauth%e5%92%8cfacebook-connect%e6%ad%a6%e8%a3%85%e4%bd%a0%e7%9a%84%e7%ab%99%e7%82%b9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[英,转]45个新鲜有用的JS与jQuery技术和工具</title>
		<link>http://slj.me/2010/03/45-fresh-useful-javascript-and-jquery-techniques-and-tools/</link>
		<comments>http://slj.me/2010/03/45-fresh-useful-javascript-and-jquery-techniques-and-tools/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 06:10:09 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[工具]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1617</guid>
		<description><![CDATA[45 Fresh Useful JavaScript and jQuery Techniques and Tools
Yes, this is another round-up of fresh and useful Javascript techniques, tools and resources. But don’t close the tab yet, as you might find this one very useful. In this selection we present calendars, forms, buttons, navigation, debugging, optimization and compatibility tables as well as handy resources [...]]]></description>
			<content:encoded><![CDATA[<h2>45 Fresh Useful JavaScript and jQuery Techniques and Tools</h2>
<p>Yes, this is another round-up of <strong>fresh and useful Javascript techniques, tools and resources</strong>. But don’t close the tab yet, as you might find this one very useful. In this selection we present calendars, forms, buttons, navigation, debugging, optimization and compatibility tables as well as handy resources and tools. We also cover various jQuery-plugins that will help you extend the functionality of your website and improve user experience with ready components or coding solutions.</p>
<p>The last section also covers a number of useful educational resources such as a compilation of useful JavaScript coding practices, a detailed comparison of JavaScript frameworks and general JavaScript programming conventions. We are looking forward to your feedback.</p>
<p><span id="more-1617"></span>You may be interested in the following related posts:</p>
<ul>
<li><a rel="external nofollow" href="http://www.smashingmagazine.com/2009/06/21/50-fresh-javascript-tools-that-will-improve-your-workflow/">50 Fresh JavaScript Tools That Will Improve Your Workflow</a></li>
<li><a rel="external nofollow" href="http://www.smashingmagazine.com/2010/01/12/45-powerful-css-javascript-techniques/">45 Powerful CSS/JavaScript-Techniques</a></li>
<li><a rel="external nofollow" href="http://www.smashingmagazine.com/2009/03/08/70-new-useful-ajax-and-javascript-techniques/">70 Useful AJAX And JavaScript Techniques</a></li>
</ul>
<p>[By the way, did you know there is a brand new <a rel="external nofollow" href="http://creatives.commindo-media.de/www/delivery/ck.php?oaparams=2__bannerid=1339__zoneid=0__cb=a279a7c66d__oadest=http%3A%2F%2Fshop.smashingmagazine.com%2Fsmashingbook-dispatcher.php%3Fd%3Dsmashing-wordpress%26utm_source%3DSmashing%252BMagazine%26utm_medium%3Deditorialbox2%26utm_campaign%3DSmashing%252BWordPress%2520-%2520BTW%2520Editorial%2520Box">Smashing Wordpress Book</a>? Push WordPress past its limits!]</p>
<h3>Calendars and Timelines</h3>
<p><a rel="external nofollow" href="http://www.radoslavdimov.com/jquery-plugins/jquery-plugin-digiclock/">jDigiClock – Digital Clock (HTC Hero inspired)</a><br />
jDigiClock is a jQuery plugin inspired from HTC Hero Clock Widget.</p>
<p><a rel="external nofollow" href="http://www.radoslavdimov.com/jquery-plugins/jquery-plugin-digiclock/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-82.jpg" alt="Javascript-techniques-82 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://home.comcast.net/~vonholdt/test/clock_slide/index.htm">jQuery Sliding Clock v1.1</a><br />
jQuery transpearant Slider clock with CSS sprites.</p>
<p><a rel="external nofollow" href="http://home.comcast.net/~vonholdt/test/clock_slide/index.htm"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-67.jpg" alt="Javascript-techniques-67 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://home.jongsma.org/software/js/datepicker">Date / Time Picker</a><br />
Note that this control is not designed to work in IE6; although it will function correctly in most cases, the positioning of the calendar may be way off depending on how your page is styled.</p>
<p><a rel="external nofollow" href="http://home.jongsma.org/software/js/datepicker"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-05.jpg" alt="Javascript-techniques-05 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<h3>JavaScript Debugging and Validation Tools</h3>
<p><a rel="external nofollow" href="http://www.mozilla.org/projects/venkman/">Venkman JavaScript Debugger project page</a><br />
Venkman is the code name for Mozilla’s JavaScript Debugger. Venkman aims to provide a powerful JavaScript debugging environment for Gecko-based browsers namely Firefox 3.x, the Netscape 7.x series of browsers, Netscape 9.x series, Mozilla Seamonkey 1.x and Mozilla Seamonkey 2.x. It does not include Gecko-based browsers such as K-Meleon 1.x, Galeon 2.x and Netscape 8.x. The debugger is available as an add-on package in XPI format. Venkman JavaScript Debugger has been provided as part of the Mozilla install distribution since October 3rd 2001.</p>
<p><a rel="external nofollow" href="http://www.mozilla.org/projects/venkman/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-14.jpg" alt="Javascript-techniques-14 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://www.my-debugbar.com/wiki/CompanionJS/HomePage">CompanionJS</a><br />
Companion.JS (pronounced Companion dot JS or CJS) is a Javascript debugger for IE.</p>
<p><a rel="external nofollow" href="http://www.my-debugbar.com/wiki/CompanionJS/HomePage"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-32.jpg" alt="Javascript-techniques-32 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-test-your-javascript-code-with-qunit/">How to Test your JavaScript Code with QUnit</a><br />
QUnit is a powerful JavaScript unit testing framework that helps you to debug code. It’s written by members of the jQuery team, and is the official test suite for jQuery. But QUnit is general enough to test any regular JavaScript code, and it’s even able to test server-side JavaScript via some JavaScript engine like Rhino or V8.</p>
<p><a rel="external nofollow" href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-test-your-javascript-code-with-qunit/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-44.jpg" alt="Javascript-techniques-44 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://jsbin.com/">JS Bin – Collaborative JavaScript Debugging</a><br />
JS Bin is an open source collaborative JavaScript debugging tool.</p>
<p><a rel="external nofollow" href="http://jsbin.com/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-12.jpg" alt="Javascript-techniques-12 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<h3>Forms, Buttons &amp; Navigation</h3>
<p><a rel="external nofollow" href="http://tutorialzine.com/2009/10/google-wave-history-slider-jquery/">Making a Google Wave History Slider</a><br />
Here is shown how to create a Google Wave-like history slider. Using it will enable visitors to go back and forth in time to view the changes that take place on a comment thread.</p>
<p><a rel="external nofollow" href="http://tutorialzine.com/2009/10/google-wave-history-slider-jquery/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-73.jpg" alt="Javascript-techniques-73 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://theodin.co.uk/blog/design/fancy-radio-buttons-jquery.html">Fancy Radio Buttons With jQuery</a><br />
Creation of 2 mandatory option sets that a user could choose, while hiding off the radio button inputs and using an anchor links to make it a bit more usable.</p>
<p><a rel="external nofollow" href="http://theodin.co.uk/blog/design/fancy-radio-buttons-jquery.html"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-62.jpg" alt="Javascript-techniques-62 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://www.tutorial9.net/web-tutorials/creative-button-animations-with-sprites-and-jquery-part-2/">Creative Button Animations with Sprites and JQuery</a><br />
Fading hover effect for which the transition is smoothed with JavaScript, using jQuery library.</p>
<p><a rel="external nofollow" href="http://www.tutorial9.net/web-tutorials/creative-button-animations-with-sprites-and-jquery-part-2/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-83.jpg" alt="Javascript-techniques-83 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://www.vileworks.com/password-unmasking">Password (un)Masking</a><br />
JavaScript jQuery that toggles the masking and unmasking of the password field.</p>
<p><a rel="external nofollow" href="http://www.vileworks.com/password-unmasking"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-68.jpg" alt="Javascript-techniques-68 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://css-tricks.com/jquery-magicline-navigation/">jQuery MagicLine Navigation</a><br />
These “sliding” style navigation bars have been around a while, and turns out it’s really pretty darn easy. Here are put two examples together.</p>
<p><a rel="external nofollow" href="http://css-tricks.com/jquery-magicline-navigation/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-49.jpg" alt="Javascript-techniques-49 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://tympanus.net/codrops/2009/12/11/fixed-fade-out-menu-a-css-and-jquery-tutorial/">Fixed Fade Out Menu: A CSS and jQuery Tutorial</a><br />
The aim is to have a fixed navigation that follows the user when he scrolls, and only subtly showing itself by fading out and becoming almost transparent. When the user hovers over it, the menu then becomes opaque again. Inside of the navigation we will have some links, a search input and a top and bottom button that let the user navigate to the top or the bottom of the page.</p>
<p><a rel="external nofollow" href="http://tympanus.net/codrops/2009/12/11/fixed-fade-out-menu-a-css-and-jquery-tutorial/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-52.jpg" alt="Javascript-techniques-52 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://cssglobe.com/post/7161/jquery-plugin-simplest-twitterlike-dynamic-character-count-for-textareas">jQuery plugin: Simplest Twitter-like dynamic character count for textareas and input fields</a><br />
The best way to explain what this plugin does is to mention Twitter. Twitter posts are limited to 140 characters. While typing the Twitter post there is this always present information about how many characters the users have before reaching the limit. The information is not only provided merely by displaying a number, there are different colors applied to certain stages to notify the user about the status.</p>
<p><a rel="external nofollow" href="http://www.csskarma.com/blog/sliding-labels-v2/">Sliding Labels v2</a><br />
Form label keeping the label inline, but sliding it off to the left rather than going away on click.</p>
<p><a rel="external nofollow" href="http://www.csskarma.com/blog/sliding-labels-v2/"><img src="http://media.smashingmagazine.com/cdn_smash/wp-content/uploads/2010/03/javascript-techniques-87.jpg" alt="Javascript-techniques-87 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="100" /></a></p>
<p><a rel="external nofollow" href="http://demos.usejquery.com/ketchup-plugin/index.html">Ketchup Plugin</a><br />
Ketchup is a slim jQuery Plugin that validates your forms. It aims to be very flexible and extendable for its appearance and functionality.</p>
<p><a rel="external nofollow" href="http://demos.usejquery.com/ketchup-plugin/index.html"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-84.jpg" alt="Javascript-techniques-84 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<h3>Layout tools</h3>
<p><a rel="external nofollow" href="http://www.kromosome.net/cssdesignergrid/">jQuery {css}designerGrid Plugin</a><br />
{css} designerGrid is A jQuery Plugin developed for website interface developers who use the grid system of layout. {css} designerGrid is intended to assist these developers with CSS prototyping.</p>
<p><a rel="external nofollow" href="http://www.kromosome.net/cssdesignergrid/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-80.jpg" alt="Javascript-techniques-80 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://code.google.com/p/css-template-layout/">css-template-layout</a><br />
JavaScript (jQuery) implementation of the CSS Template Layout Module</p>
<p><a rel="external nofollow" href="http://code.google.com/p/css-template-layout/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-33.jpg" alt="Javascript-techniques-33 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://blog.creativityden.com/fluid-grid-using-jquery/">How to create a fluid grid with jQuery</a><br />
Grid-based layout is probably the more preferred way to style up a webpage to give it more magazine-like look and feel. This tutorial is about how to use CSS and Javascript to create a fluid grid-based layout (See demo here). The algorithm/procedure used in this tutorial is very simple and straightforward. There are more advanced algorithms out there which can handle multiple scenarios. But the purpose is to understand the basic logic on how to create such layout. So here it goes…</p>
<p><a rel="external nofollow" href="http://blog.creativityden.com/fluid-grid-using-jquery/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-51.jpg" alt="Javascript-techniques-51 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://code.google.com/p/closure-templates/">closure-templates</a><br />
Closure Templates are a client- and server-side templating system that helps you dynamically build reusable HTML and UI elements. They are easy to learn and customizable to fit your application’s needs. Closure Templates support JavaScript and Java and use a data model and expression syntax that works for either language. You can also use the built-in message support to easily localize your applications.</p>
<p><a rel="external nofollow" href="http://code.google.com/p/closure-templates/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-46.jpg" alt="Javascript-techniques-46 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<h3>Useful jQuery Plugins</h3>
<p><a rel="external nofollow" href="http://code.drewwilson.com/entry/tiptip-jquery-plugin">TipTip jQuery Plugin</a><br />
TipTip detects the edges of the browser window and will make sure the tooltip stays within the current window size. As a result the tooltip will adjust itself to be displayed above, below, to the left or to the right of the element with TipTip applied to it, depending on what is necessary to stay within the browser window. TipTip is a very lightweight and intelligent custom tooltip jQuery plugin. It uses ZERO images and is completely customizable via CSS. It’s also only 3.5kb minified!</p>
<p><a rel="external nofollow" href="http://code.drewwilson.com/entry/tiptip-jquery-plugin"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-65.jpg" alt="Javascript-techniques-65 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://fredhq.com/projects/roundabout/">jQuery Roundabout</a><br />
Roundabout is a jQuery plugin that converts a structure of static HTML elements into a highly customizable turntable-like interactive area. (And now, not just turntables, but many shapes!)</p>
<p><a rel="external nofollow" href="http://fredhq.com/projects/roundabout/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-69.jpg" alt="Javascript-techniques-69 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://jparse.kylerush.net/">jParse – jQuery XML Parse Plugin</a><br />
jParse is a jQuery plugin that allows you to parse XML that was fetched with the jQuery .ajax method (making it fully customizable).</p>
<p><a rel="external nofollow" href="http://jparse.kylerush.net/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-72.jpg" alt="Javascript-techniques-72 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://razorjack.net/quicksand/">jQuery Quicksand plugin</a><br />
Reorder and filter items with a nice shuffling animation.</p>
<p><a rel="external nofollow" href="http://razorjack.net/quicksand/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-48.jpg" alt="Javascript-techniques-48 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://thinkinginweb.com/sections/articles/18-11-2009-typeQuery-change-website-typography-with-jquery.aspx">typeQuery, change website typography with jquery</a><br />
typeQuery gives the flexibility to change the font-family for everything you define with class, id, or tag, this example is referring to the selected item on a select object with id=”tag” and the font-family value at select object with id=”family”: <code>$($("#tag").val()).css("font-family", $("#family").val());</code></p>
<p><a rel="external nofollow" href="http://thinkinginweb.com/sections/articles/18-11-2009-typeQuery-change-website-typography-with-jquery.aspx"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-70.jpg" alt="Javascript-techniques-70 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://lab.smashup.it/flip/">Flip! A jQuery plugin v0.9.9</a><br />
Flip is a jQuery plugin that will flip easily your elements in four directions.</p>
<p><a rel="external nofollow" href="http://lab.smashup.it/flip/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-55.jpg" alt="Javascript-techniques-55 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://www.webresourcesdepot.com/data-encryption-with-javascript-jcryption/">Data Encryption With JavaScript: jCryption</a><br />
jCryption is a jQuery plugin for encrypting POST/GET data submitted by forms. It uses public-key algorithm of RSA for the encryption &amp; has a PHP file for handling the decryption of data.</p>
<p><a rel="external nofollow" href="http://www.webresourcesdepot.com/data-encryption-with-javascript-jcryption/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-24.jpg" alt="Javascript-techniques-24 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://trif3cta.com/blog/entry/jquery-plugins-under-4k/">Minimalist jQuery: 11 useful plugins under 4K</a><br />
jQuery makes our lives easier. So much so that it’s tempting to use it all the time, inadvertently slowing our page load times (cue <a rel="external nofollow" href="http://developer.yahoo.com/yslow/">YSlow</a> and <a rel="external nofollow" href="http://stevesouders.com/hammerhead/">Hammerhead</a>). Combining, compressing, and delivering scripts at the end of your page helps in the HTTP request department. On the file size front, below are jQuery plugins that give solid bang for your performance buck.</p>
<p><a rel="external nofollow" href="http://trif3cta.com/blog/entry/jquery-plugins-under-4k/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-79.jpg" alt="Javascript-techniques-79 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://jscott.me/jquery.undoable.html">Undo/Redo in jQuery</a><br />
An easy-to-use plugin for adding undo/redo capabilities to a jQuery application. It is based loosely on the Objective-C/Cocoa way of doing things.</p>
<p><a rel="external nofollow" href="http://jscott.me/jquery.undoable.html"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-81.jpg" alt="Javascript-techniques-81 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://code.google.com/p/editease/">editease</a><br />
editEase – jQuery CMS | no fuss, no database, no worries</p>
<p><a rel="external nofollow" href="http://code.google.com/p/editease/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-78.jpg" alt="Javascript-techniques-78 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://www.jgc.org/blog/2009/10/what-is-jshub.html">jsHub</a><br />
jsHub is a single piece of JavaScript (a “tag”) that can handle reading different sorts of page information and then send them to many different vendors’ products. One piece of code to send to Google Analytics, Omniture SiteCatalyst, WebTrends and Mixpanel. Instead of one piece of JavaScript per vendor, jsHub has a single piece of code (the “hub”) and plugins that know how to translate into the required wire protocol for each vendor. Vendors only maintain the plugin for their product.</p>
<p><a rel="external nofollow" href="http://www.jgc.org/blog/2009/10/what-is-jshub.html"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-22.jpg" alt="Javascript-techniques-22 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<h3>Educational JavaScript Resources and Tutorials</h3>
<p><a rel="external nofollow" href="http://justin.harmonize.fm/index.php/2009/09/an-introduction-to-javascripts-this/">Caffeinated Simpleton </a><br />
JavaScript is an amazing little language, but it’s got some quirks that turn a lot of people off. One of those quirks is <code>this</code>, and how it’s not necessarily what you expect it to be. <code>this</code> isn’t that complicated, but there are very few explanations of how it works on the internet. This article is an attempt to explain how <code>this</code> works and how to use it properly.</p>
<p><a rel="external nofollow" href="http://justin.harmonize.fm/index.php/2009/09/an-introduction-to-javascripts-this/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-07.jpg" alt="Javascript-techniques-07 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://www.smashingmagazine.com/2009/08/01/what-you-need-to-know-about-javascript-scope/">What You Need To Know About JavaScript Scope</a><br />
This article discusses how JavaScript handles scope and how various JavaScript libraries provide methods for dealing with it and how they smooth out a few bumps. We’ll also look at how you can get back to basics and do some interesting scope wrangling without a library, a useful approach if you’re writing code that needs to stand alone.</p>
<p><a rel="external nofollow" href="http://www.smashingmagazine.com/2009/08/01/what-you-need-to-know-about-javascript-scope/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-25.jpg" alt="Javascript-techniques-25 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://ejohn.org/apps/learn/">Learning Advanced JavaScript</a><br />
A very nice tutorial to learn JavaScript, containing code and discussion from the upcoming book Secrets of the JavaScript Ninja by John Resig.</p>
<p><a rel="external nofollow" href="http://ejohn.org/apps/learn/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-30.jpg" alt="Javascript-techniques-30 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://www.brucelawson.co.uk/2010/highlight-search-terms-automagically-with-javascript-and-mark/">Highlight search terms automagically with JavaScript and mark</a><br />
Script surrounding the search term(s) with the <code>mark</code> element rather than a <code>span</code>, although the class <var>searchword</var> is retained in case you want to style these <code>mark</code>s differently from others. In the CSS, the rule <code>article mark </code>is just added to turn it a gentle shade of pink.</p>
<p><a rel="external nofollow" href="http://net.tutsplus.com/tutorials/javascript-ajax/10-super-helpful-traversing-functions-in-jquery/">10 Really Helpful Traversing Functions in jQuery</a><br />
With jQuery, selecting HTML elements is laughably easy. But at times, we may wish to further refine the selection, which can be a hassle when the HTML structure is complicated. In this tutorial, we’ll explore ten ways that we can refine and extend a set of wrapped elements that we wish to operate upon.</p>
<p><a rel="external nofollow" href="http://net.tutsplus.com/tutorials/javascript-ajax/10-super-helpful-traversing-functions-in-jquery/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-74.jpg" alt="Javascript-techniques-74 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://www.catswhocode.com/blog/using-keyboard-shortcuts-in-javascript">Using keyboard shortcuts in Javascript</a><br />
If you want to enhance your web app, Javascript keyboards shortcuts is definitely something to consider. In this article, you’ll learn to use JS keyboard shortcuts, with and without the JQuery framework.</p>
<p><a rel="external nofollow" href="http://www.catswhocode.com/blog/using-keyboard-shortcuts-in-javascript"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-29.jpg" alt="Javascript-techniques-29 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://javascript.crockford.com/code.html">Code Conventions for the JavaScript Programming Language</a><br />
This is a set of coding conventions and rules for use in JavaScript programming.</p>
<p><a rel="external nofollow" href="http://javascript.crockford.com/code.html"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-31.jpg" alt="Javascript-techniques-31 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://www.myphpetc.com/2009/03/jquery-select-element-cheat-sheet.html">jQuery – Select element cheat sheet</a><br />
This cheat sheet helps you to find the index of a selected option, set the selected option by value, set the selected option by text, insert a new option before or after another and get the text or value of the selected option.</p>
<p><a rel="external nofollow" href="http://www.myphpetc.com/2009/03/jquery-select-element-cheat-sheet.html"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-76.jpg" alt="Javascript-techniques-76 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://www.ibm.com/developerworks/web/library/wa-jsframeworks/index.html">Compare JavaScript frameworks</a><br />
Modern Web sites and Web applications tend to rely quite heavily on client-side JavaScript to provide rich interactivity, particularly through the advent of asynchronous HTTP requests that do not require page refreshes to return data or responses from a server-side script or database system. In this article, you will discover how JavaScript frameworks make it easier and faster to create highly interactive and responsive Web sites and Web applications.</p>
<p><a rel="external nofollow" href="http://www.ibm.com/developerworks/web/library/wa-jsframeworks/index.html"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-77.jpg" alt="Javascript-techniques-77 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://dailyjs.com/2010/01/27/pro-practices-1/">Park your Horse, Code Cowboy: Professional JavaScript Workflows, Part 1</a><br />
In this series, we’ll talk about tools &amp; techniques you can use to cover those No’s, and cut a lot of strife &amp; embarrassment from your JavaScript experience.</p>
<p><a rel="external nofollow" href="http://dailyjs.com/2010/01/27/pro-practices-1/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-47.jpg" alt="Javascript-techniques-47 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://www.java2s.com/Code/JavaScriptReference/CatalogJavaScriptReference.htm">JavaScript Reference examples (example source code)</a><br />
JavaScript Reference examples, organized by Objects, Properties, Methods &amp; Collections. Some Event Handlers Reference are also available.</p>
<p><a rel="external nofollow" href="http://www.java2s.com/Code/JavaScriptReference/CatalogJavaScriptReference.htm"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-20.jpg" alt="Javascript-techniques-20 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://dev.opera.com/articles/view/javascript-best-practices/">JavaScript best practices</a><br />
A compilation of best practices and good advice I’ve amassed over the years, much of it learnt the hard way (experimentation and suchlike). Take the advice below to heart and keep it in a part of your brain that has a quick access route so you can apply it without thinking about it. I am sure you will find things to disagree with, and that is a good thing – you should question what you read, and strive to find better solutions. However, I have found that following these principles has made me a more effective developer and allowed other developers to build upon my work more easily.</p>
<p><a rel="external nofollow" href="http://dev.opera.com/articles/view/javascript-best-practices/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-15.jpg" alt="Javascript-techniques-15 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p><a rel="external nofollow" href="http://wtfjs.com/">wtfjs</a><br />
JavaScript is a language we love despite it giving us so much to hate. This is a collection of those very special irregularities, inconstancies and just plain painfully unintuitive moments for the language of the web.</p>
<p><a rel="external nofollow" href="http://wtfjs.com/"><img src="http://slj.me/wp-content/uploads/2010/03/javascript-techniques-41.jpg" alt="Javascript-techniques-41 in 45 Fresh Useful JavaScript and jQuery Techniques and Tools" width="480" height="300" /></a></p>
<p>转自：http://www.smashingmagazine.com/2010/03/12/45-fresh-useful-javascript-and-jquery-techniques-and-tools/</p>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2009/04/jquery-float-menu/" title="一个利用jQuery实现菜单跟随页面滚动而移动的代码">一个利用jQuery实现菜单跟随页面滚动而移动的代码</a></li><li><a href="http://slj.me/2009/04/dreamweaver-jquery-code-association/" title="在Dreamweaver中加入jQuery代码编写联想提示">在Dreamweaver中加入jQuery代码编写联想提示</a></li><li><a href="http://slj.me/2009/03/galleriffic-jquery/" title="Galleriffic-jQuery相片展示插件">Galleriffic-jQuery相片展示插件</a></li><li><a href="http://slj.me/2009/03/nyromodal-jquery-plugin/" title="NyroModal-jQuery的一个遮罩层插件">NyroModal-jQuery的一个遮罩层插件</a></li><li><a href="http://slj.me/2010/03/building-iphone-apps-with-html-css-and-javascript/" title="【好书PDF】：Building iPhone Apps with HTML, CSS, and JavaScript">【好书PDF】：Building iPhone Apps with HTML, CSS, and JavaScript</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/03/45-fresh-useful-javascript-and-jquery-techniques-and-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>“点亮网页”：一个实用的Firefox和IE插件</title>
		<link>http://slj.me/2010/03/light-web-useful-firefox-ie-plugin/</link>
		<comments>http://slj.me/2010/03/light-web-useful-firefox-ie-plugin/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 07:30:17 +0000</pubDate>
		<dc:creator>SLJ</dc:creator>
				<category><![CDATA[HTML/CSS]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[light web]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://slj.me/?p=1608</guid>
		<description><![CDATA[支付宝UED的鸽子同学制作了一个Firefox插件，它可以用来快速实时编辑网页代码，快速基于Firefox制作Demo页面，方便的编辑修改CSS  Sprite，以及配合Fiddler调试页面，是一个很不错的前端开发助手。
Firefox版本
该插件基于Firebug，所以安装前请确保已经安装Firebug。

一些主要特性；

即时编辑——即改即现，把Firefox打造成超强网页编辑器；
与Fiddler一起使用，快速调试线上网页，HTML代码快速生成；
刷新CSS，DOM不刷新；
禁用单个CSS样式；
CSS Sprites位置快速设定；
保持Session不过期；
导出任意节点为PNG图片；

现在就安装（从火狐官方下载1.6版）
下载1.7版本低安装 via ued.alipay.com
推荐查看作者的博客，里面有几篇介绍该插件的文章。你也可以查看Alipay的UED的介绍。
IE版
非常不错的是，该插件同时也提供了一个IE版本，安装很方便就是下载文件：http://nihaoku.cn/Linr/LinrIEGallery.reg 下载下来后运行reg文件，右键菜单就会出现“点亮网页”选项，重启IE内核的浏览器，然后右键选择“点亮网页”即可使用。

推荐查看IE版本的官方介绍。
另外作者在博客中透露Chrome版本也在开发中，很快就会面世，让我们一起期待吧。
查看点亮网页+Fiddler的视频演示
查看LinrLightWeb(Firefox Add-on)功能浏览
下载观看点亮网页操作CSS Sprite的动画
Related Posts / 相关文章CSS半透明度设置归纳总结[Firefox,IE,Chrome,Safari]关于一些浏览器的的Hack几款IE的调试工具为网页开发者准备的13个Google Chrome浏览器扩展20个Web设计师必要的Firefox插件]]></description>
			<content:encoded><![CDATA[<p>支付宝UED的<a href="http://hi.baidu.com/vickeychen" target="_blank">鸽子同学</a>制作了一个Firefox插件，它可以用来快速实时编辑网页代码，快速基于Firefox制作Demo页面，方便的编辑修改CSS  Sprite，以及配合Fiddler调试页面，是一个很不错的前端开发助手。</p>
<h3>Firefox版本</h3>
<p>该插件基于Firebug，所以安装前请确保已经安装Firebug。</p>
<p><img title="linrlightweb" src="http://slj.me/wp-content/uploads/2010/03/linrlightweb-e1262185707887.png" alt="" width="500" height="200" /></p>
<p>一些主要特性；</p>
<ul>
<li>即时编辑——即改即现，把Firefox打造成超强网页编辑器；</li>
<li>与Fiddler一起使用，快速调试线上网页，HTML代码快速生成；</li>
<li>刷新CSS，DOM不刷新；</li>
<li>禁用单个CSS样式；</li>
<li>CSS Sprites位置快速设定；</li>
<li>保持Session不过期；</li>
<li>导出任意节点为PNG图片；</li>
</ul>
<p><span id="more-1608"></span><a href="https://addons.mozilla.org/zh-CN/firefox/addon/14068" target="_blank">现在就安装（从火狐官方下载1.6版）</a></p>
<p><a href="http://ued.alipay.com/wp-content/uploads/LinrLightWeb.xpi" target="_blank">下载1.7版本低安装 via ued.alipay.com</a></p>
<p>推荐查看<a href="http://hi.baidu.com/vickeychen" target="_blank">作者的博客</a>，里面有几篇介绍该插件的文章。你也可以查看<a href="http://ued.alipay.com/2009/12/linrlightweb-firefox-addon/" target="_blank">Alipay的UED的介绍</a>。</p>
<h3>IE版</h3>
<p>非常不错的是，该插件同时也提供了一个IE版本，安装很方便就是下载文件：<a href="http://nihaoku.cn/Linr/LinrIEGallery.reg">http://nihaoku.cn/Linr/LinrIEGallery.reg</a> 下载下来后运行reg文件，右键菜单就会出现“点亮网页”选项，重启IE内核的浏览器，然后右键选择“点亮网页”即可使用。</p>
<p><img title="linrlightwebie" src="http://slj.me/wp-content/uploads/2010/03/linrlightwebie-e1262186235883.png" alt="" width="500" height="400" /></p>
<p>推荐查看<a href="http://hi.baidu.com/vickeychen/blog/item/41cb3e12a143a25af919b844.html" target="_blank">IE版本的官方介绍</a>。</p>
<p>另外作者在博客中透露<strong>Chrome版本也在开发中</strong>，很快就会面世，让我们一起期待吧。</p>
<p>查看<a href="http://msbluelight-0.agappdom.net/e1/d/20709/586316/63397900800/0.0_6SXczxkjhJBWkJIUDJOfnggIc/zziframehtml1zz.html#%2fStartWithParent%2fappId%2f%2f%2f%2f%2f%2f%2f%2ftrue%2f1.0%2f5%2fMicrosoftAjax.js%2fBasePlayer.js%2fPlayerStrings.js%2fplayer.js%2fStartPlayer.js%2fvideo%253dhttp%253a%252f%252fmsbluelight-0.agappdom.net%252fe1%252fd%252f110178%252f23726156%252f63397900800%252f0.37F6b89teu_fHF2Zo9vYZa7UxkE%252fvideo.wmv" target="_blank">点亮网页+Fiddler的视频演示</a><br />
查看<a href="http://outgoing.mozilla.org/v1/f6fcf3e34392d70242d4b68876fa82d2247cac5d/http%3A//silverlight.services.live.com/invoke/110178/LinrLightWeb%28Firefox%2520Add-on%29%25E5%258A%259F%25E8%2583%25BD%25E6%258A%25BD%25E6%25A0%25B7%25E6%25BC%2594%25E7%25A4%25BA/iframe.html" target="_blank">LinrLightWeb(Firefox Add-on)功能浏览<br />
</a>下载观看<a href="http://cid-c0bacd534ec9e6a7.skydrive.live.com/self.aspx/%E7%82%B9%E4%BA%AE%E7%BD%91%E9%A1%B5IE%E7%89%88%E6%BC%94%E7%A4%BA%E8%A7%86%E9%A2%91/CSS%20Sprites%E5%BF%AB%E9%80%9F%E8%AE%BE%E7%BD%AE.swf" target="_blank">点亮网页操作CSS Sprite的动画</a></p>
<h2  class="related_post_title">Related Posts / 相关文章</h2><ul class="related_post"><li><a href="http://slj.me/2009/04/css-alpha-opacity-setting-for-firefox-ie-chrome-safari/" title="CSS半透明度设置归纳总结[Firefox,IE,Chrome,Safari]">CSS半透明度设置归纳总结[Firefox,IE,Chrome,Safari]</a></li><li><a href="http://slj.me/2009/03/browser_css_hack_ie_ff/" title="关于一些浏览器的的Hack">关于一些浏览器的的Hack</a></li><li><a href="http://slj.me/2010/03/ie-debug-tool/" title="几款IE的调试工具">几款IE的调试工具</a></li><li><a href="http://slj.me/2010/03/13-google-chrome-plugin/" title="为网页开发者准备的13个Google Chrome浏览器扩展">为网页开发者准备的13个Google Chrome浏览器扩展</a></li><li><a href="http://slj.me/2009/11/top-20-essential-firefox-add-ons-for-web-designers/" title="20个Web设计师必要的Firefox插件">20个Web设计师必要的Firefox插件</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://slj.me/2010/03/light-web-useful-firefox-ie-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
