<?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>Harde之家</title>
	<atom:link href="http://www.harde.org/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.harde.org/blog</link>
	<description>记录Harde学习成长生活的点点滴滴.</description>
	<lastBuildDate>Sun, 05 Feb 2012 08:33:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>解决[event.layerX and event.layerY are broken and deprecated in WebKit]</title>
		<link>http://www.harde.org/blog/2012/02/%e8%a7%a3%e5%86%b3event-layerx-and-event-layery-are-broken-and-deprecated-in-webkit.html</link>
		<comments>http://www.harde.org/blog/2012/02/%e8%a7%a3%e5%86%b3event-layerx-and-event-layery-are-broken-and-deprecated-in-webkit.html#comments</comments>
		<pubDate>Sun, 05 Feb 2012 08:33:03 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[WEB前端]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1844</guid>
		<description><![CDATA[今天拿出以前做的一套UI做点小东西，运行没啥异常，但是JS控制台一直提示[event.layerX and event.layerY are broken and deprecated in WebKit]，Google了一下，说是Jquery的BUG，看了下，项目中用的是1.5的，升级... ]]></description>
			<content:encoded><![CDATA[<p>今天拿出以前做的一套UI做点小东西，运行没啥异常，但是JS控制台一直提示[event.layerX and event.layerY are broken and deprecated in WebKit]，Google了一下，说是Jquery的BUG，看了下，项目中用的是1.5的，升级到1.7后问题解决。<br />
时间紧迫，留此文以后再看这个问题。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2012/02/%e8%a7%a3%e5%86%b3event-layerx-and-event-layery-are-broken-and-deprecated-in-webkit.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VS10sp1-KB983509“过不去”的解决</title>
		<link>http://www.harde.org/blog/2012/02/vs10sp1-kb983509%e8%bf%87%e4%b8%8d%e5%8e%bb%e7%9a%84%e8%a7%a3%e5%86%b3.html</link>
		<comments>http://www.harde.org/blog/2012/02/vs10sp1-kb983509%e8%bf%87%e4%b8%8d%e5%8e%bb%e7%9a%84%e8%a7%a3%e5%86%b3.html#comments</comments>
		<pubDate>Thu, 02 Feb 2012 03:55:04 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[DotNet]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1841</guid>
		<description><![CDATA[哦，其实如果是懒人应该不会看到这篇文章的&#8230;&#8230; 安装VS2010的Sp1补丁时，貌似很多人说卡在这里，呃其实它真没事，等会就好了，也许半小时也许1个小时反正等着就对了~~~ 鄙人是白羊座... ]]></description>
			<content:encoded><![CDATA[<p>哦，其实如果是懒人应该不会看到这篇文章的&#8230;&#8230;<br />
安装VS2010的Sp1补丁时，貌似很多人说卡在这里，呃其实它真没事，等会就好了，也许半小时也许1个小时反正等着就对了~~~</p>
<p>鄙人是白羊座的，性子急。。。以为过不去，手动取消过2次&#8230;汗。<br />
写这个博文的原因是提醒跟我同样性急的朋友，要有耐心&#8230;&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2012/02/vs10sp1-kb983509%e8%bf%87%e4%b8%8d%e5%8e%bb%e7%9a%84%e8%a7%a3%e5%86%b3.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>未能加载文件或程序集，HRESULT:0&#215;80131047 的解决办法</title>
		<link>http://www.harde.org/blog/2012/01/could-not-load-file-or-assembly-hresult-0x80131047.html</link>
		<comments>http://www.harde.org/blog/2012/01/could-not-load-file-or-assembly-hresult-0x80131047.html#comments</comments>
		<pubDate>Mon, 16 Jan 2012 04:31:11 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[DotNet]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1838</guid>
		<description><![CDATA[今天遇到了这个问题，看字面意思也比较明了，就是没法加载文件了。 因为我是添加EntityFramework引用，从Web获取的数据，所以文件不存在的可能性排除 检查了下 文件属性，也没有什么异常。 ... ]]></description>
			<content:encoded><![CDATA[<p>今天遇到了这个问题，看字面意思也比较明了，就是没法加载文件了。<br />
因为我是添加EntityFramework引用，从Web获取的数据，所以文件不存在的可能性排除<br />
检查了下 文件属性，也没有什么异常。<br />
直接访问路径，也可以访问。</p>
<p>因为完整路径中带有一个半角逗号”,”怀疑是路径不被VS所识别，<br />
剔除”,”问题解决。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2012/01/could-not-load-file-or-assembly-hresult-0x80131047.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>安装EntityFramework提示未声明SchemaVersion的解决办法</title>
		<link>http://www.harde.org/blog/2012/01/install-entityframework-error-schemaversion.html</link>
		<comments>http://www.harde.org/blog/2012/01/install-entityframework-error-schemaversion.html#comments</comments>
		<pubDate>Sat, 14 Jan 2012 09:09:29 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[DotNet]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1835</guid>
		<description><![CDATA[不知道为什么，在公司的VS好好的，今天在家用就出了这个问题（本本上的MVC3比公司电脑安装得早） 随便乱点时，发现“扩展管理器”里的“NuGet”需要更新，感觉是这个问题 更新完毕，重启V... ]]></description>
			<content:encoded><![CDATA[<p>不知道为什么，在公司的VS好好的，今天在家用就出了这个问题（本本上的MVC3比公司电脑安装得早）<br />
随便乱点时，发现“扩展管理器”里的“NuGet”需要更新，感觉是这个问题<br />
更新完毕，重启VS，OK，问题解决</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2012/01/install-entityframework-error-schemaversion.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>命令行下使用 TrueCrypt暨 快速加载指定文件至指定盘符</title>
		<link>http://www.harde.org/blog/2012/01/use-truecrypt-under-cmd-and-quickly-mount-file.html</link>
		<comments>http://www.harde.org/blog/2012/01/use-truecrypt-under-cmd-and-quickly-mount-file.html#comments</comments>
		<pubDate>Tue, 10 Jan 2012 05:12:39 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[计算机]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1832</guid>
		<description><![CDATA[能进来看此篇文章的朋友，相信也不会对TrueCrypt陌生，所以TrueCrypt是个什么东西，相信我就不用介绍了~ 今天说下他的命令行使用。 个人比较喜欢使用LastPass保存密码，以及各种同步功能，但是... ]]></description>
			<content:encoded><![CDATA[<p>能进来看此篇文章的朋友，相信也不会对TrueCrypt陌生，所以TrueCrypt是个什么东西，相信我就不用介绍了~<br />
今天说下他的命令行使用。<br />
个人比较喜欢使用LastPass保存密码，以及各种同步功能，但是呢，在公司电脑又不能直接使用，毕竟不是私人电脑，所以TrueCrypt对我来说，是个很好的解决方案。<br />
但是呢，每次输入密码、KEY文件又太过于麻烦，所以呢我就直接使用命令行命令，一部到位了~~</p>
<p>先看下 TrueCrypt 的命令</p>
<table>
<tr>
<td>/a</td>
<td>/auto</td>
<td>If no parameter is specified, automatically mount the volume. If devices is specified as the parameter (e.g., /a devices), auto-mount all currently accessible device/partition-hosted TrueCrypt volumes. If favorites is specified as the parameter, auto-mount favorite volumes. Note that /auto is implicit if /quit and /volume are specified.</td>
</tr>
<tr>
<td>/b</td>
<td>/beep</td>
<td>Beep after a volume has been successfully mounted or dismounted.</td>
</tr>
<tr>
<td>/cache</td>
<td>/c</td>
<td>y or no parameter: enable password cache; n: disable password cache (e.g., /c n). Note that turning the password cache off will not clear it (use /w to clear the password cache).</td>
</tr>
<tr>
<td>/dismount</td>
<td>/d</td>
<td>Dismount volume specified by drive letter (e.g., /d x). When no drive letter is specified, dismounts all currently mounted TrueCrypt volumes.</td>
</tr>
<tr>
<td>/explore</td>
<td>/e</td>
<td>Open an Explorer window after a volume has been mounted.</td>
</tr>
<tr>
<td>/force</td>
<td>/f</td>
<td>Forces dismount (if the volume to be dismounted contains files being used by the system or an application) and forces mounting in shared mode (i.e., without exclusive access).</td>
</tr>
<tr>
<td>/help</td>
<td>/?</td>
<td>Display command line help.</td>
</tr>
<tr>
<td>/history</td>
<td>/h</td>
<td>y or no parameter: enables saving history of mounted volumes; n: disables saving history of mounted volumes (e.g., /h n).</td>
</tr>
<tr>
<td>/keyfile</td>
<td>/k</td>
<td>Specifies a keyfile or a keyfile search path. For multiple keyfiles, specify e.g.:<br />
/k c:\keyfile1.dat /k d:\KeyfileFolder /k c:\kf2</td>
</tr>
<tr>
<td>/letter</td>
<td>/l</td>
<td>Driver letter to mount the volume as. When /l is omitted and when /a is used, the first free drive letter is used.</td>
</tr>
<tr>
<td>/mountoption</td>
<td>/m</td>
<td>ro or readonly: Mount volume as read-only. </td>
</tr>
<tr>
<td>/password</td>
<td>/p</td>
<td>The volume password. If the password contains spaces, it must be enclosed in quotation marks (e.g., /p “My Password”). Use /p “” to specify an empty password. Warning: This method of entering a volume password may be insecure, for example, when an unencrypted command prompt history log is being saved to unencrypted disk.</td>
</tr>
<tr>
<td>/quit</td>
<td>/q</td>
<td>Automatically perform requested actions and exit (main TrueCrypt window will not be displayed). If preferences is specified as the parameter (e.g.,<br />
/q preferences), then program settings are loaded/saved and they override settings specified on the command line.<br />
 /q background launches the TrueCrypt Background Task (tray icon). Note that /q has no effect if the container is accessible only in local user name space (TrueCrypt will exit only after the volume is dismounted), e.g., a network volume.</td>
</tr>
<tr>
<td>/silent</td>
<td>/s</td>
<td>If /q is specified, suppresses interaction with the user (prompts, error messages, warnings, etc.). If /q is not specified, this option has no effect.</td>
</tr>
<tr>
<td>/volume</td>
<td>/v</td>
<td>File and path name of a TrueCrypt volume to mount (do not use when dismounting). To mount a hard disk partition, use, for example, /v \Device\Harddisk1\Partition3 (to determine the path to a partition, run TrueCrypt and click Select Device). Note that device paths are case-sensitive.</td>
</tr>
<tr>
<td>/wipecache</td>
<td>/w</td>
<td>Wipes any passwords cached in the driver memory.</td>
</tr>
<tr>
<td>rm</td>
<td>removable</td>
<td>Mount volume as removable medium.</td>
</tr>
<tr>
<td>ts</td>
<td>timestamp</td>
<td>Do not preserve container timestamps</td>
</tr>
<tr>
<td>sm</td>
<td>system</td>
<td>Without pre-boot authentication, mount a partition that is within the key scope of system encryption (for example, a partition located on the encrypted system drive of another operating system that is not running). Useful e.g. for backup or repair operations.<br />
 Note: If you supply a password as a parameter of /p, make sure that the password has been typed using the standard US keyboard layout (in contrast, the GUI ensures this automatically).</td>
</tr>
<tr>
<td>bk</td>
<td>headerbak</td>
<td>Mount volume using embedded backup header.<br />
 Note: All volumes created by TrueCrypt 6.0 or later contain an embedded backup header (located at the end of the volume).</td>
</tr>
</table>
<p>OK，动手试试<br />
truecrypt e:\doc.tc /a /l z /e /q<br />
执行后，e盘下的doc.tc文件会被加载为z盘，并自动打开资源管理器，Truecrypt不会显示。<br />
复杂点，加上密码与key<br />
truecrypt e:\doc.tc /a /p “123&#8243; /k c:\key /l z /e /q</p>
<p>ok~ 写个bat，放U盘里，或者放在网盘里~ 搞定。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2012/01/use-truecrypt-under-cmd-and-quickly-mount-file.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决label标签在IOS设备上无效的问题</title>
		<link>http://www.harde.org/blog/2011/12/%e8%a7%a3%e5%86%b3label%e6%a0%87%e7%ad%be%e5%9c%a8ios%e8%ae%be%e5%a4%87%e4%b8%8a%e6%97%a0%e6%95%88%e7%9a%84%e9%97%ae%e9%a2%98.html</link>
		<comments>http://www.harde.org/blog/2011/12/%e8%a7%a3%e5%86%b3label%e6%a0%87%e7%ad%be%e5%9c%a8ios%e8%ae%be%e5%a4%87%e4%b8%8a%e6%97%a0%e6%95%88%e7%9a%84%e9%97%ae%e9%a2%98.html#comments</comments>
		<pubDate>Thu, 22 Dec 2011 04:58:56 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[HTML&CSS]]></category>
		<category><![CDATA[WEB前端]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1827</guid>
		<description><![CDATA[最近一直在做Iphone、Android的Web项目，发现个很让人恼火的问题 本身因为硬件原因，手机的屏幕都比较小，也就导致了radio、checkbox的默认大小，难点的令人发指 那么，label的作用这时就应该体... ]]></description>
			<content:encoded><![CDATA[<p>最近一直在做Iphone、Android的Web项目，发现个很让人恼火的问题<br />
本身因为硬件原因，手机的屏幕都比较小，也就导致了radio、checkbox的默认大小，难点的令人发指<br />
那么，label的作用这时就应该体现出来了。当令我意想不到的问题是，在包括Iphone、Ipad、IPod Touch上，label标签竟然无效！！</p>
<p>查了一堆文档，都没有说名这个问题，后来作罢，把checkbox大小做的大一点，修改下外观，并跟客户说明了下情况。这才作罢。<br />
今天偶然在网上看到一篇文章，说label在IOS上是有bug的，只要添加个onclick=”"就恢复正常了。果断试了下，竟然真的好了~~<br />
完整代码;</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1827code2'); return false;">View Code</a> HTML4STRICT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p18272"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p1827code2"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/label.html"><span style="color: #000000; font-weight: bold;">label</span></a> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ckb_user&quot;</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span>&gt;</span>我是演示<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/label.html"><span style="color: #000000; font-weight: bold;">label</span></a>&gt;</span>
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;ckb_user&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;checkbox&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span></pre></td></tr></table></div>

<p>参考文章:《使iPhone Safari的label元素生效》<br />
<a href="http://www.keakon.net/2011/01/20/%E4%BD%BFiPhoneSafari%E7%9A%84label%E5%85%83%E7%B4%A0%E7%94%9F%E6%95%88" title="使iPhone Safari的label元素生效" target="_blank">http://www.keakon.net/2011/01/20/%E4%BD%BFiPhoneSafari%E7%9A%84label%E5%85%83%E7%B4%A0%E7%94%9F%E6%95%88</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2011/12/%e8%a7%a3%e5%86%b3label%e6%a0%87%e7%ad%be%e5%9c%a8ios%e8%ae%be%e5%a4%87%e4%b8%8a%e6%97%a0%e6%95%88%e7%9a%84%e9%97%ae%e9%a2%98.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>@Override must override a superclass method 问题解决</title>
		<link>http://www.harde.org/blog/2011/12/override-must-override-a-superclass-method-%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3.html</link>
		<comments>http://www.harde.org/blog/2011/12/override-must-override-a-superclass-method-%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3.html#comments</comments>
		<pubDate>Tue, 20 Dec 2011 05:39:03 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1824</guid>
		<description><![CDATA[好久没做JAVA的东西，这几天做一个手机版的MAIL项目，其他的没啥的，就是测试时在发件箱遇到这么个问题~、 以前也碰到过，具体解决忘了&#8230;&#8230;（扔了真的太久了&#8230;..），Google一下~ 原... ]]></description>
			<content:encoded><![CDATA[<p>好久没做JAVA的东西，这几天做一个手机版的MAIL项目，其他的没啥的，就是测试时在发件箱遇到这么个问题~、<br />
以前也碰到过，具体解决忘了&#8230;&#8230;（扔了真的太久了&#8230;..），Google一下~<br />
原来是编译器（Compiler）的问题<br />
因为在早起版本的JDK（1.6以前）不支持@Override批注，所以编译时就会出现这个问题，只要把编译器版本改为1.6就可以了<br />
(以MyEclipse为例Window->Preferences->Java->Compiler中的Compiler compliance level修改为1.6</p>
<p>Tip:<br />
Compiler<br />
[英] [kəmˈpailə]<br />
[美] [kəmˈpaɪlɚ]<br />
n. 汇编者; 编辑者, 编纂者;(电脑的)编译程序</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2011/12/override-must-override-a-superclass-method-%e9%97%ae%e9%a2%98%e8%a7%a3%e5%86%b3.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Objective-C 中如何正确的比较字符串的值</title>
		<link>http://www.harde.org/blog/2011/11/objective-c-%e4%b8%ad%e5%a6%82%e4%bd%95%e6%ad%a3%e7%a1%ae%e7%9a%84%e6%af%94%e8%be%83%e5%ad%97%e7%ac%a6%e4%b8%b2%e7%9a%84%e5%80%bc.html</link>
		<comments>http://www.harde.org/blog/2011/11/objective-c-%e4%b8%ad%e5%a6%82%e4%bd%95%e6%ad%a3%e7%a1%ae%e7%9a%84%e6%af%94%e8%be%83%e5%ad%97%e7%ac%a6%e4%b8%b2%e7%9a%84%e5%80%bc.html#comments</comments>
		<pubDate>Thu, 24 Nov 2011 09:06:39 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[Android & Iphone]]></category>
		<category><![CDATA[isEqualToString]]></category>
		<category><![CDATA[NSString]]></category>
		<category><![CDATA[比较字符串]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1817</guid>
		<description><![CDATA[一个纯.NET程序员出来看其他语言是很悲剧的～ 尤其是像Objectie-C这种类C语言~~ 最近做个小东西，第一屏是登录视图，需要与服务器通讯，为了测试方便 就随手写了句 ?View Code OBJC1 2 3 4 if &#40;txtC... ]]></description>
			<content:encoded><![CDATA[<p>一个纯.NET程序员出来看其他语言是很悲剧的～<br />
尤其是像Objectie-C这种类C语言~~</p>
<p>最近做个小东西，第一屏是登录视图，需要与服务器通讯，为了测试方便<br />
就随手写了句</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1817code5'); return false;">View Code</a> OBJC</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p18175"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p1817code5"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>txtCO_NO.text  <span style="color: #002200;">==</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;1&quot;</span> <span style="color: #002200;">&amp;&amp;</span> txtUSER_CD.text <span style="color: #002200;">==</span> <span style="color: #bf1d1a;">&quot;1&quot;</span> <span style="color: #002200;">&amp;&amp;</span> txtPASSWD.text <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">&quot;1&quot;</span><span style="color: #002200;">&#41;</span> 
    <span style="color: #002200;">&#123;</span>
        <span style="color: #11740a; font-style: italic;">//跳过服务器验证</span>
    <span style="color: #002200;">&#125;</span></pre></td></tr></table></div>

<p>然后悲剧得发现，每次都没有进去&#8230;..<br />
断点监视，发现值还都没问题，于是翻了翻手册，发现个问题<br />
双等号==运算符只能判断两个NSString的指针数值，而不是他们所指的对象。<br />
txtCO_NO.text得到的1与后面的@”1&#8243;，内存指向不同，所以不相等，也就不能进入if语句中了～<br />
这一点和.NET有很大的差异。<br />
虽然.NET中的String是引用类型（有值类型特点的特殊引用类型），但是运算时仍然可以当成值类型来处理。<br />
正确的写法是使用isEqualToString:(NSString *)</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1817code6'); return false;">View Code</a> OBJC</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p18176"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p1817code6"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>txtCO_NO.text isEqualToString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;1&quot;</span><span style="color: #002200;">&#93;</span> <span style="color: #002200;">&amp;&amp;</span> <span style="color: #002200;">&#91;</span>txtUSER_CD.text isEqualToString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;1&quot;</span><span style="color: #002200;">&#93;</span> <span style="color: #002200;">&amp;&amp;</span> <span style="color: #002200;">&#91;</span>txtPASSWD.text isEqualToString<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;1&quot;</span><span style="color: #002200;">&#93;</span> <span style="color: #002200;">&#41;</span> 
    <span style="color: #002200;">&#123;</span>
        <span style="color: #11740a; font-style: italic;">//跳过服务器验证</span>
    <span style="color: #002200;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2011/11/objective-c-%e4%b8%ad%e5%a6%82%e4%bd%95%e6%ad%a3%e7%a1%ae%e7%9a%84%e6%af%94%e8%be%83%e5%ad%97%e7%ac%a6%e4%b8%b2%e7%9a%84%e5%80%bc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>配置系统未能初始化 错误的解决方案</title>
		<link>http://www.harde.org/blog/2011/10/%e9%85%8d%e7%bd%ae%e7%b3%bb%e7%bb%9f%e6%9c%aa%e8%83%bd%e5%88%9d%e5%a7%8b%e5%8c%96-%e9%94%99%e8%af%af%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88.html</link>
		<comments>http://www.harde.org/blog/2011/10/%e9%85%8d%e7%bd%ae%e7%b3%bb%e7%bb%9f%e6%9c%aa%e8%83%bd%e5%88%9d%e5%a7%8b%e5%8c%96-%e9%94%99%e8%af%af%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88.html#comments</comments>
		<pubDate>Sun, 30 Oct 2011 16:24:41 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[DotNet]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1813</guid>
		<description><![CDATA[给项目添加log4net时，配置完毕，竟然出了”配置系统未能初始化”的错误。 才发现不小心把configSections节点粘贴时弄到下面去了。 放到第一的位置，问题解决。 MSDN： 如果配置文件中包含 confi... ]]></description>
			<content:encoded><![CDATA[<p>给项目添加log4net时，配置完毕，竟然出了”配置系统未能初始化”的错误。<br />
才发现不小心把configSections节点粘贴时弄到下面去了。<br />
放到第一的位置，问题解决。</p>
<p>MSDN：<br />
如果配置文件中包含 configSections 元素，则 configSections 元素必须是 configuration 元素的第一个子元素。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2011/10/%e9%85%8d%e7%bd%ae%e7%b3%bb%e7%bb%9f%e6%9c%aa%e8%83%bd%e5%88%9d%e5%a7%8b%e5%8c%96-%e9%94%99%e8%af%af%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>注意DateTime的IFormatProvider</title>
		<link>http://www.harde.org/blog/2011/10/%e6%b3%a8%e6%84%8fdatetime%e7%9a%84iformatprovider.html</link>
		<comments>http://www.harde.org/blog/2011/10/%e6%b3%a8%e6%84%8fdatetime%e7%9a%84iformatprovider.html#comments</comments>
		<pubDate>Sun, 09 Oct 2011 03:38:37 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[DotNet]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1810</guid>
		<description><![CDATA[DateTime.ToString()是大家常用的方法 正常情况下，.net会自动获取系统的语言来输出日期，但是有时这个不适用，有时服务器是日文的，我们却想输出中文日期，这时就需要使用IFormatProvider了 东西... ]]></description>
			<content:encoded><![CDATA[<p>DateTime.ToString()是大家常用的方法<br />
正常情况下，.net会自动获取系统的语言来输出日期，但是有时这个不适用，有时服务器是日文的，我们却想输出中文日期，这时就需要使用IFormatProvider了<br />
东西比较简单，看一下就明白了</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1810code10'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p181010"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p1810code10"><pre class="csharp" style="font-family:monospace;">DateTime tDate <span style="color: #008000;">=</span> DateTime<span style="color: #008000;">.</span><span style="color: #0000FF;">Now</span><span style="color: #008000;">;</span>
<span style="color: #000000;">System.<span style="color: #0000FF;">Globalization</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">CultureInfo</span> culture <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #000000;">System.<span style="color: #0000FF;">Globalization</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">CultureInfo</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;ja-JP&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #6666cc; font-weight: bold;">string</span> strDate <span style="color: #008000;">=</span> tDate<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;yyyy/MM/dd (dddd)&quot;</span>, culture<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></td></tr></table></div>

<p>来看个微软的DEMO(有修改)</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1810code11'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p181011"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code" id="p1810code11"><pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">// Specify the date to be formatted using various cultures.</span>
DateTime tDate <span style="color: #008000;">=</span> DateTime<span style="color: #008000;">.</span><span style="color: #0000FF;">Now</span><span style="color: #008000;">;</span>
<span style="color: #008080; font-style: italic;">// Specify the cultures.</span>
<span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> cultureNames <span style="color: #008000;">=</span> <span style="color: #008000;">&#123;</span> <span style="color: #666666;">&quot;en-US&quot;</span>, <span style="color: #666666;">&quot;es-AR&quot;</span>, <span style="color: #666666;">&quot;fr-FR&quot;</span>,<span style="color: #666666;">&quot;ja-JP&quot;</span>, <span style="color: #666666;">&quot;nl-NL&quot;</span>, <span style="color: #666666;">&quot;ru-RU&quot;</span>,<span style="color: #666666;">&quot;zh-TW&quot;</span>,<span style="color: #666666;">&quot;zh-CN&quot;</span><span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span>
Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Converting the date {0}: &quot;</span>,Convert<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span>tDate,<span style="color: #000000;">System.<span style="color: #0000FF;">Globalization</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">CultureInfo</span><span style="color: #008000;">.</span><span style="color: #0000FF;">InvariantCulture</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">foreach</span> <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span> cultureName <span style="color: #0600FF; font-weight: bold;">in</span> cultureNames<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #000000;">System.<span style="color: #0000FF;">Globalization</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">CultureInfo</span> culture <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #000000;">System.<span style="color: #0000FF;">Globalization</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">CultureInfo</span><span style="color: #008000;">&#40;</span>cultureName<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #6666cc; font-weight: bold;">string</span> dateString <span style="color: #008000;">=</span> tDate<span style="color: #008000;">.</span><span style="color: #0000FF;">ToString</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;yyyy/MM/dd(dddd) hh:mm:ss tt zzz&quot;</span>, culture<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;   {0}:  {1}&quot;</span>,culture<span style="color: #008000;">.</span><span style="color: #0000FF;">Name</span>, dateString<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>输出结果</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1810code12'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p181012"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code" id="p1810code12"><pre class="csharp" style="font-family:monospace;">Converting the date <span style="color: #FF0000;">10</span><span style="color: #008000;">/</span>09<span style="color: #008000;">/</span><span style="color: #FF0000;">2011</span> <span style="color: #FF0000;">11</span><span style="color: #008000;">:</span><span style="color: #FF0000;">35</span><span style="color: #008000;">:</span><span style="color: #FF0000;">57</span><span style="color: #008000;">:</span>
   en<span style="color: #008000;">-</span>US<span style="color: #008000;">:</span>  <span style="color: #FF0000;">2011</span><span style="color: #008000;">/</span><span style="color: #FF0000;">10</span><span style="color: #008000;">/</span>09<span style="color: #008000;">&#40;</span>Sunday<span style="color: #008000;">&#41;</span> <span style="color: #FF0000;">11</span><span style="color: #008000;">:</span><span style="color: #FF0000;">35</span><span style="color: #008000;">:</span><span style="color: #FF0000;">57</span> AM <span style="color: #008000;">+</span>08<span style="color: #008000;">:</span>00
   es<span style="color: #008000;">-</span>AR<span style="color: #008000;">:</span>  <span style="color: #FF0000;">2011</span><span style="color: #008000;">/</span><span style="color: #FF0000;">10</span><span style="color: #008000;">/</span>09<span style="color: #008000;">&#40;</span>domingo<span style="color: #008000;">&#41;</span> <span style="color: #FF0000;">11</span><span style="color: #008000;">:</span><span style="color: #FF0000;">35</span><span style="color: #008000;">:</span><span style="color: #FF0000;">57</span> a<span style="color: #008000;">.</span><span style="color: #0000FF;">m</span><span style="color: #008000;">.</span> <span style="color: #008000;">+</span>08<span style="color: #008000;">:</span>00
   fr<span style="color: #008000;">-</span>FR<span style="color: #008000;">:</span>  <span style="color: #FF0000;">2011</span><span style="color: #008000;">/</span><span style="color: #FF0000;">10</span><span style="color: #008000;">/</span>09<span style="color: #008000;">&#40;</span>dimanche<span style="color: #008000;">&#41;</span> <span style="color: #FF0000;">11</span><span style="color: #008000;">:</span><span style="color: #FF0000;">35</span><span style="color: #008000;">:</span><span style="color: #FF0000;">57</span>  <span style="color: #008000;">+</span>08<span style="color: #008000;">:</span>00
   ja<span style="color: #008000;">-</span>JP<span style="color: #008000;">:</span>  <span style="color: #FF0000;">2011</span><span style="color: #008000;">/</span><span style="color: #FF0000;">10</span><span style="color: #008000;">/</span>09<span style="color: #008000;">&#40;</span>日曜日<span style="color: #008000;">&#41;</span> <span style="color: #FF0000;">11</span><span style="color: #008000;">:</span><span style="color: #FF0000;">35</span><span style="color: #008000;">:</span><span style="color: #FF0000;">57</span> 午前 <span style="color: #008000;">+</span>08<span style="color: #008000;">:</span>00
   nl<span style="color: #008000;">-</span>NL<span style="color: #008000;">:</span>  <span style="color: #FF0000;">2011</span><span style="color: #008000;">-</span><span style="color: #FF0000;">10</span><span style="color: #008000;">-</span>09<span style="color: #008000;">&#40;</span>zondag<span style="color: #008000;">&#41;</span> <span style="color: #FF0000;">11</span><span style="color: #008000;">:</span><span style="color: #FF0000;">35</span><span style="color: #008000;">:</span><span style="color: #FF0000;">57</span>  <span style="color: #008000;">+</span>08<span style="color: #008000;">:</span>00
   ru<span style="color: #008000;">-</span>RU<span style="color: #008000;">:</span>  2011<span style="color: #008000;">.</span>10<span style="color: #008000;">.</span>09<span style="color: #008000;">&#40;</span>воскресенье<span style="color: #008000;">&#41;</span> <span style="color: #FF0000;">11</span><span style="color: #008000;">:</span><span style="color: #FF0000;">35</span><span style="color: #008000;">:</span><span style="color: #FF0000;">57</span>  <span style="color: #008000;">+</span>08<span style="color: #008000;">:</span>00
   zh<span style="color: #008000;">-</span>TW<span style="color: #008000;">:</span>  <span style="color: #FF0000;">2011</span><span style="color: #008000;">/</span><span style="color: #FF0000;">10</span><span style="color: #008000;">/</span>09<span style="color: #008000;">&#40;</span>星期日<span style="color: #008000;">&#41;</span> <span style="color: #FF0000;">11</span><span style="color: #008000;">:</span><span style="color: #FF0000;">35</span><span style="color: #008000;">:</span><span style="color: #FF0000;">57</span> 上午 <span style="color: #008000;">+</span>08<span style="color: #008000;">:</span>00
   zh<span style="color: #008000;">-</span>CN<span style="color: #008000;">:</span>  <span style="color: #FF0000;">2011</span><span style="color: #008000;">/</span><span style="color: #FF0000;">10</span><span style="color: #008000;">/</span>09<span style="color: #008000;">&#40;</span>星期日<span style="color: #008000;">&#41;</span> <span style="color: #FF0000;">11</span><span style="color: #008000;">:</span><span style="color: #FF0000;">35</span><span style="color: #008000;">:</span><span style="color: #FF0000;">57</span> 上午 <span style="color: #008000;">+</span>08<span style="color: #008000;">:</span>00
続行するには何かキーを押してください <span style="color: #008000;">.</span> <span style="color: #008000;">.</span> <span style="color: #008000;">.</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2011/10/%e6%b3%a8%e6%84%8fdatetime%e7%9a%84iformatprovider.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 nth-child 伪类用法</title>
		<link>http://www.harde.org/blog/2011/09/css3-nth-child-%e4%bc%aa%e7%b1%bb%e7%94%a8%e6%b3%95.html</link>
		<comments>http://www.harde.org/blog/2011/09/css3-nth-child-%e4%bc%aa%e7%b1%bb%e7%94%a8%e6%b3%95.html#comments</comments>
		<pubDate>Tue, 27 Sep 2011 02:26:41 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[HTML&CSS]]></category>
		<category><![CDATA[WEB前端]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1800</guid>
		<description><![CDATA[做爱疯和安卓的项目，觉得JqueryMobile太过于臃肿，于是废弃，不过JqueryMobile的UI还是比较耐看的，于是提取了不少样式来用。 其中用的最多的就是ul、li列表，不过JQM的样式写的太过于臃肿，而... ]]></description>
			<content:encoded><![CDATA[<p>做爱疯和安卓的项目，觉得JqueryMobile太过于臃肿，于是废弃，不过JqueryMobile的UI还是比较耐看的，于是提取了不少样式来用。<br />
其中用的最多的就是ul、li列表，不过JQM的样式写的太过于臃肿，而且还要嵌套一堆div，于是又弃用了JQM的样式&#8230;&#8230;.</p>
<p>废话不多说，正式开始~~</p>
<p>隔行效果一直是比较难受的东西，不是说有多复杂，而是总是配合着JS或者后台代码太过于恶心&#8230;<br />
CSS3 中提供了强大的伪类（pseudo-class）选择器，使开发者能选择某一对象中符合特定条件的元素进行渲染。</p>
<p>今天我们来说说nth-child<br />
nth-child伪类在W3C里定义是选择选择父元素里的第n个子元素，可以使用an+b的形式选择子元素，举例用法如下：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1800code15'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p180015"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p1800code15"><pre class="css" style="font-family:monospace;">ul<span style="color: #6666ff;">.demo1</span> li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">green</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">black</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>效果</p>
<blockquote>
<style type="text/css">
ul.demo1 li:nth-child(3){
	color: green;
	background-color:black;
}
</style>
<ul class="demo1">
<li>测试1</li>
<li>测试2</li>
<li>测试3</li>
<li>测试4</li>
</ul>
</blockquote>
<p>在nth-child的括号中，可以填写：<br />
odd代表单数,even代表双数行<br />
也可以在里面书写包含字母n的方程式<br />
比如<br />
tr:nth-child(2n+1) 效果同 tr:nth-child(odd) 表示单数行<br />
tr:nth-child(2n)   效果同 tr:nth-child(even) 表示双数行<br />
有一点要注意(-n)比较特殊，无论n为多少(-n+x)的值必须为正数才有效，例如<br />
tr:nth-child(-n+3)，那么实际效果就是前3行被选中。<br />
由此，咱么可以实现点特殊的效果</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1800code16'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p180016"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code" id="p1800code16"><pre class="css" style="font-family:monospace;">ul<span style="color: #6666ff;">.demo2</span> li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>odd<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#aaa</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#444</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
ul<span style="color: #6666ff;">.demo2</span> li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>even<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#222</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
ul<span style="color: #6666ff;">.demo2</span> li<span style="color: #3333ff;">:nth-</span>child<span style="color: #00AA00;">&#40;</span>-n<span style="color: #00AA00;">+</span><span style="color: #cc66cc;">3</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<blockquote>
<style type="text/css">
ul.demo2 li:nth-child(odd){
	color: #aaa;
	background-color:#444;
}
ul.demo2 li:nth-child(even){
	color: #222;
	background-color:#ccc;
}
ul.demo2 li:nth-child(-n+3){
	color: #fff;
	background-color:#000;
}
</style>
<ul class="demo2">
<li>测试1</li>
<li>测试2</li>
<li>测试3</li>
<li>测试4</li>
<li>测试5</li>
<li>测试6</li>
<li>测试7</li>
<li>测试8</li>
</ul>
</blockquote>
<p>nth-child伪类的衍生<br />
除了nth-child以外，W3C还为我们提供了几个基于nth-child定义的衍生伪类，这里简单地说说他们的用途。</p>
<p>E:nth-last-child(n): 选择某个子元素，从最后一个数起<br />
E:nth-of-type(n): 选择某个某种类型的子元素<br />
E:nth-last-of-type(n): 选择某个某种类型的子元素，从最后一个符合条件的元素数起<br />
E:first-child: 选择第一个子元素（这个伪类在CSS2里就有）<br />
E:last-child: 选择最后一个子元素</p>
<p>好了，相信大家都是很聪明的，我就不多说了，最后提醒一下，大家不要被文章的例子限制死了，要灵活运用。我送给大家一个Table~</p>
<style type="text/css">
table.demo3 tr:nth-child(odd) {
	color: #fff;
	background-color:#444;
}</p>
<p>table.demo3 tr:nth-child(even){
	color: #222;
	background-color:#ccc;
}
table.demo3 tr:nth-child(odd) td:nth-child(odd){
	color: #fff;
	background-color:green;
}
table.demo3 tr:nth-child(even) td:nth-child(even){
	color: #222;
	background-color:#ccc;
}</p>
</style>
<blockquote>
<table class="demo3">
<tr>
<td>01</td>
<td>02</td>
<td>03</td>
<td>04</td>
<td>05</td>
</tr>
<tr>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
</tr>
<tr>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
</tr>
<tr>
<td>31</td>
<td>32</td>
<td>33</td>
<td>34</td>
<td>35</td>
</tr>
<tr>
<td>41</td>
<td>42</td>
<td>43</td>
<td>44</td>
<td>45</td>
</tr>
<tr>
<td>51</td>
<td>52</td>
<td>53</td>
<td>54</td>
<td>55</td>
</tr>
</table>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2011/09/css3-nth-child-%e4%bc%aa%e7%b1%bb%e7%94%a8%e6%b3%95.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Popup窗口在Android与Iphone上是的实现</title>
		<link>http://www.harde.org/blog/2011/09/popup%e7%aa%97%e5%8f%a3%e5%9c%a8android%e4%b8%8eiphone%e4%b8%8a%e6%98%af%e7%9a%84%e5%ae%9e%e7%8e%b0.html</link>
		<comments>http://www.harde.org/blog/2011/09/popup%e7%aa%97%e5%8f%a3%e5%9c%a8android%e4%b8%8eiphone%e4%b8%8a%e6%98%af%e7%9a%84%e5%ae%9e%e7%8e%b0.html#comments</comments>
		<pubDate>Mon, 19 Sep 2011 08:59:14 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[Android & Iphone]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1794</guid>
		<description><![CDATA[首先说明，笔者并不擅长前端的东东，最近项目需求，被逼无奈作出下面的东西。 很多地方写的不理想，但是时间紧迫，将就着先用，以后有空再改。留此文备忘。~ 注意： 因为力求精简，没... ]]></description>
			<content:encoded><![CDATA[<p>首先说明，笔者并不擅长前端的东东，最近项目需求，被逼无奈作出下面的东西。<br />
很多地方写的不理想，但是时间紧迫，将就着先用，以后有空再改。留此文备忘。~</p>
<blockquote><p>
注意：<br />
因为力求精简，没有添加Jquery库，”$M”只是对Javascript的一些常用方法进行封装，想要滑入，滑出等效果的，请自行添加。<br />
因为本身是为Android和Iphone做开发，所以应用了一些CSS3的效果,在Chrome、FF、Safari下效果也都是正常的，<strong>没有考虑也没测试过任意版本的IE</strong>
</p></blockquote>
<p>首先看下效果:<br />
<img src="http://www.harde.org/blog/wp-content/uploads/2011/09/Popup.png" alt="" title="Popup" width="350" height="343" class="alignnone size-full wp-image-1796" /><br />
实现起来不算麻烦<br />
首先弄个两个层，一个用来遮罩页面，一个用来显示消息。</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1794code20'); return false;">View Code</a> HTML4STRICT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p179420"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code" id="p1794code20"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msgPopupLayoutBg&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msgPopupLayout&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msgPopupLayoutInner&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msgPopupLayoutTitle&quot;</span>&gt;</span>我是标题<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>
        <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msgPopupLayoutContent&quot;</span>&gt;</span>
            <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msgPopupLayoutContent&quot;</span>&gt;</span>Message Content<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span> 
            <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;msgPopupLayoutClose&quot;</span>&gt;</span>
                <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">input</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;button&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;確定&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;base_font_size2&quot;</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;mbCommon.hideMsgPopupLayout();&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></pre></td></tr></table></div>

<p>CSS样式</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1794code21'); return false;">View Code</a> CSS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p179421"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
</pre></td><td class="code" id="p1794code21"><pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Msg Popup Layout Start*/</span>
<span style="color: #cc00cc;">#msgPopupLayoutBg</span>
<span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#333</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
    filter<span style="color: #00AA00;">:</span>Alpha<span style="color: #00AA00;">&#40;</span>Opacity<span style="color: #00AA00;">=</span><span style="color: #cc66cc;">30</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
    -moz-opacity<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0.5</span><span style="color: #00AA00;">;</span>
    opacity<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0.5</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">100</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #cc00cc;">#msgPopupLayout</span> 
<span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #933;">30%</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #933;">10%</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">80%</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">8px</span><span style="color: #00AA00;">;</span>
    filter<span style="color: #3333ff;">:progid</span><span style="color: #3333ff;">:DXImageTransform</span><span style="color: #6666ff;">.Microsoft</span>.gradient<span style="color: #00AA00;">&#40;</span>enabled<span style="color: #00AA00;">=</span><span style="color: #ff0000;">'true'</span><span style="color: #00AA00;">,</span>startColorstr<span style="color: #00AA00;">=</span><span style="color: #ff0000;">'#7F777777'</span><span style="color: #00AA00;">,</span> endColorstr<span style="color: #00AA00;">=</span><span style="color: #ff0000;">'#7F777777'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span>rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">85</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">85</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">85</span><span style="color: #00AA00;">,</span><span style="color: #cc66cc;">0.5</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> 
    -webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> 
    -moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> 
    border-radius<span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
    -moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> 
    -webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> 
    box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1000</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
.msgPopupLayoutTitle 
<span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">28px</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">20px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#3A6EA5</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">14px</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">line-height</span><span style="color: #00AA00;">:</span><span style="color: #933;">28px</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">border-style</span><span style="color: #00AA00;">:</span><span style="color: #993333;">solid</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">border-width</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">border-color</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#4E84C0</span> <span style="color: #cc00cc;">#4780BE</span> <span style="color: #cc00cc;">#0D1D3C</span> <span style="color: #cc00cc;">#4780BE</span><span style="color: #00AA00;">;</span> 
    -moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> 
    -webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">text-shadow</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc00cc;">#000</span><span style="color: #00AA00;">;</span> 
    box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
.msgPopupLayoutContent 
<span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span> 
    <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
    -webkit-border-radius<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
    -moz-border-radius<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
    border-radius<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
    -moz-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">1px</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> 
    -webkit-box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> 
    <span style="color: #808080; font-style: italic;">/*text-shadow:0 1px 0 #000; */</span>
    box-shadow<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span> rgba<span style="color: #00AA00;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">,</span> <span style="color: #cc66cc;">0.7</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>	
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.msgPopupLayoutClose</span><span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span>
<span style="color: #808080; font-style: italic;">/* Msg Popup Layout End*/</span></pre></td></tr></table></div>

<p>Javascript部分</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1794code22'); return false;">View Code</a> JAVASCRIPT</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p179422"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
</pre></td><td class="code" id="p1794code22"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> showMsgPopupLayout<span style="color: #009900;">&#40;</span>popupContent<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        $M<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#msgPopupLayoutContent'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>popupContent<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;msgPopupLayout&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">top</span> <span style="color: #339933;">=</span> mbCommon.<span style="color: #660066;">scrollY</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>mbCommon.<span style="color: #660066;">windowHeight</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #CC0000;">2</span><span style="color: #339933;">-</span>document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;msgPopupLayout&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">clientHeight</span><span style="color: #339933;">/</span><span style="color: #CC0000;">2</span><span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;px&quot;</span><span style="color: #339933;">;</span>
        document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;msgPopupLayoutBg&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">top</span> <span style="color: #339933;">=</span> mbCommon.<span style="color: #660066;">scrollY</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> _scrollWidth <span style="color: #339933;">=</span> document.<span style="color: #660066;">body</span>.<span style="color: #660066;">scrollWidth</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> _scrollHeight <span style="color: #339933;">=</span> document.<span style="color: #660066;">body</span>.<span style="color: #660066;">scrollHeight</span><span style="color: #339933;">;</span>
        document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;msgPopupLayoutBg&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">width</span> <span style="color: #339933;">=</span> _scrollWidth <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;px&quot;</span><span style="color: #339933;">;</span>
        document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;msgPopupLayoutBg&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">style</span>.<span style="color: #660066;">height</span> <span style="color: #339933;">=</span> _scrollHeight <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;px&quot;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
        $M<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#msgPopupLayout'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $M<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#msgPopupLayoutBg&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> hideMsgPopupLayout<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        $M<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#msgPopupLayout'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        $M<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#msgPopupLayoutBg&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">function</span> pageY<span style="color: #009900;">&#40;</span>elem<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
      <span style="color: #000066; font-weight: bold;">return</span> elem.<span style="color: #660066;">offsetParent</span><span style="color: #339933;">?</span> elem.<span style="color: #660066;">offsetTop</span><span style="color: #339933;">+</span>pageY<span style="color: #009900;">&#40;</span>elem.<span style="color: #660066;">offsetParent</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> elem.<span style="color: #660066;">offsetTop</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">function</span> scrollY<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>  
        <span style="color: #003366; font-weight: bold;">var</span> de<span style="color: #339933;">=</span>document.<span style="color: #660066;">documentElement</span><span style="color: #339933;">;</span>  
        <span style="color: #000066; font-weight: bold;">return</span> self.<span style="color: #660066;">pageYOffset</span><span style="color: #339933;">||</span><span style="color: #009900;">&#40;</span>de<span style="color: #339933;">&amp;&amp;</span>de.<span style="color: #660066;">scrollTop</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">||</span>document.<span style="color: #660066;">body</span>.<span style="color: #660066;">scrollTop</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">function</span> windowHeight<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
        <span style="color: #003366; font-weight: bold;">var</span> de <span style="color: #339933;">=</span> document.<span style="color: #660066;">documentElement</span><span style="color: #339933;">;</span>  
        <span style="color: #000066; font-weight: bold;">return</span> self.<span style="color: #660066;">innerHeight</span><span style="color: #339933;">||</span><span style="color: #009900;">&#40;</span>de <span style="color: #339933;">&amp;&amp;</span> de.<span style="color: #660066;">offsetHeight</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">||</span>document.<span style="color: #660066;">body</span>.<span style="color: #660066;">offsetHeight</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2011/09/popup%e7%aa%97%e5%8f%a3%e5%9c%a8android%e4%b8%8eiphone%e4%b8%8a%e6%98%af%e7%9a%84%e5%ae%9e%e7%8e%b0.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switch(Select Case)在C#与VB.NET中的使用区别</title>
		<link>http://www.harde.org/blog/2011/09/switchselect-case%e5%9c%a8c%e4%b8%8evb-net%e4%b8%ad%e7%9a%84%e4%bd%bf%e7%94%a8%e5%8c%ba%e5%88%ab.html</link>
		<comments>http://www.harde.org/blog/2011/09/switchselect-case%e5%9c%a8c%e4%b8%8evb-net%e4%b8%ad%e7%9a%84%e4%bd%bf%e7%94%a8%e5%8c%ba%e5%88%ab.html#comments</comments>
		<pubDate>Wed, 14 Sep 2011 06:05:43 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[DotNet]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1789</guid>
		<description><![CDATA[Switch语句是很常用的一个控制语句。不过在使用中，C#和VB.NET有一点点小区别需要注意一下 ?View Code CSHARP1 2 3 4 5 6 7 8 9 10 int num = 1; switch &#40;num&#41; &#123; case 1: break; case 2: break; default: break; &#125; ... ]]></description>
			<content:encoded><![CDATA[<p>Switch语句是很常用的一个控制语句。不过在使用中，C#和VB.NET有一点点小区别需要注意一下</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1789code25'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p178925"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code" id="p1789code25"><pre class="csharp" style="font-family:monospace;"><span style="color: #6666cc; font-weight: bold;">int</span> num <span style="color: #008000;">=</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">switch</span> <span style="color: #008000;">&#40;</span>num<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">case</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">:</span> 
        <span style="color: #0600FF; font-weight: bold;">break</span><span style="color: #008000;">;</span>
    <span style="color: #0600FF; font-weight: bold;">case</span> <span style="color: #FF0000;">2</span><span style="color: #008000;">:</span>
        <span style="color: #0600FF; font-weight: bold;">break</span><span style="color: #008000;">;</span>
    <span style="color: #0600FF; font-weight: bold;">default</span><span style="color: #008000;">:</span>
        <span style="color: #0600FF; font-weight: bold;">break</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>更详细的内容，可以参考<br />
<a href="http://msdn.microsoft.com/zh-cn/library/06tc147t(v=vs.90).aspx" title="switch（C# 参考）" target="_blank">switch（C# 参考）：http://msdn.microsoft.com/zh-cn/library/06tc147t(v=vs.90).aspx</a></p>
<p>在VB.NET中其实是由Select Case实现的Switch(或者说C#中是由Switch实现的Select Case功能，不过笔者最先学习的C#，就先入为主的以C#为参考了~）</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1789code26'); return false;">View Code</a> VBNET</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p178926"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p1789code26"><pre class="vbnet" style="font-family:monospace;"><span style="color: #0600FF;">Dim</span> num <span style="color: #FF8000;">As</span> <span style="color: #FF0000;">Integer</span>
<span style="color: #0600FF;">Select</span> <span style="color: #0600FF;">Case</span> num
    <span style="color: #0600FF;">Case</span> <span style="color: #FF0000;">1</span>
    <span style="color: #0600FF;">Case</span> <span style="color: #FF0000;">2</span>
    <span style="color: #0600FF;">Case</span> <span style="color: #FF0000;">3</span>
<span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Select</span></pre></td></tr></table></div>

<p>更详细的内容，可以参考<br />
<a href="http://msdn.microsoft.com/zh-cn/library/cy37t14y(v=VS.90).aspx" title="Select...Case 语句 (Visual Basic)" target="_blank">Select&#8230;Case 语句 (Visual Basic)：http://msdn.microsoft.com/zh-cn/library/cy37t14y(v=VS.90).aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2011/09/switchselect-case%e5%9c%a8c%e4%b8%8evb-net%e4%b8%ad%e7%9a%84%e4%bd%bf%e7%94%a8%e5%8c%ba%e5%88%ab.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>default、mms、supl、dun、hipri接入点类型的区别</title>
		<link>http://www.harde.org/blog/2011/09/default%e3%80%81mms%e3%80%81supl%e3%80%81dun%e3%80%81hipri%e6%8e%a5%e5%85%a5%e7%82%b9%e7%b1%bb%e5%9e%8b%e7%9a%84%e5%8c%ba%e5%88%ab.html</link>
		<comments>http://www.harde.org/blog/2011/09/default%e3%80%81mms%e3%80%81supl%e3%80%81dun%e3%80%81hipri%e6%8e%a5%e5%85%a5%e7%82%b9%e7%b1%bb%e5%9e%8b%e7%9a%84%e5%8c%ba%e5%88%ab.html#comments</comments>
		<pubDate>Tue, 06 Sep 2011 06:09:51 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[Android & Iphone]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1787</guid>
		<description><![CDATA[设置APN上网时，大家可能经常遇到这个问题： 为什么有时要填写default有时要填写supl，而彩信又偏偏要mms？ 这个问题留到最后，让我们看看每个接入点类型的含义： 英文原文来自于Google Android ... ]]></description>
			<content:encoded><![CDATA[<p>设置APN上网时，大家可能经常遇到这个问题：<br />
为什么有时要填写default有时要填写supl，而彩信又偏偏要mms？<br />
这个问题留到最后，让我们看看每个接入点类型的含义：<br />
英文原文来自于Google Android Developers<br />
原文连接:<a href="http://developer.android.com/reference/android/net/ConnectivityManager.html" title="ConnectivityManager" target="_blank">http://developer.android.com/reference/android/net/ConnectivityManager.html</a><br />
我尽量用通俗易懂的语言来解释每个类型的含义，若您是开发者，请尽量阅读英文原文。</p>
<p>1、default<br />
‍默认网络连接，当激活时所有数据传输都使用该连接，不能与其他网络连接同时使用</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1787code32'); return false;">View Code</a> JAVA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p178732"><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code" id="p1787code32"><pre class="java" style="font-family:monospace;"><span style="color: #008000; font-style: italic; font-weight: bold;">/**
  * The Default Mobile data connection. When active, all data traffic
  * will use this connection by default. Should not coexist with other
  * default connections.
  */</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> TYPE_MOBILE <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>适用场合：绝大部分正常上网时可以使用<br />
2、mms<br />
彩信专用连接，此连接与default类似，用于与载体的多媒体信息服务器对话的应用程序，此连接能与default连接同时使用</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1787code33'); return false;">View Code</a> JAVA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p178733"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p1787code33"><pre class="java" style="font-family:monospace;"><span style="color: #008000; font-style: italic; font-weight: bold;">/**
  * An MMS-specific Mobile data connection. This connection may be the
  * same as TYPE_MOBILE but it may be different. This is used
  * by applications needing to talk to the carrier's Multimedia Messaging
  * Service servers. It may coexist with default data connections.
  */</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> TYPE_MOBILE_MMS <span style="color: #339933;">=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>适用场合：使用彩信服务时，必须有mms类型的接入点，不必选中，应用程序会自动使用此接入点<br />
3、supl<br />
是Secure User Plane Location“安全用户面定位”的简写，此连接与default类似，用于帮助定位设备与载体的安全用户面定位服务器对话的应用程序，此连接能与default连接同时使用</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1787code34'); return false;">View Code</a> JAVA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p178734"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p1787code34"><pre class="java" style="font-family:monospace;"><span style="color: #008000; font-style: italic; font-weight: bold;">/**
  * A SUPL-specific Mobile data connection. This connection may be the
  * same as {@link #TYPEMOBILE} but it may be different. This is used
  * by applications needing to talk to the carrier's Secure User Plane
  * Location servers for help locating the device. It may coexist with
  * default data connections.
  * {@hide}
  */</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> TYPE_MOBILE_SUPL <span style="color: #339933;">=</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>适用场合:需要自动切换wap与net接入点的、需要把手机当临时AP的<br />
对SUPL技术感兴趣的朋友，不妨看下以下文章<br />
<a href="http://blog.sina.com.cn/s/blog_537f4a11010008tw.html" title="SUPL技术(一)" target="_blank" rel="nofollow">SUPL技术(一)http://blog.sina.com.cn/s/blog_537f4a11010008tw.html</a><br />
<a href="http://blog.sina.com.cn/s/blog_537f4a11010008uf.html" title="SUPL技术(二)" target="_blank" rel="nofollow">SUPL技术(二)http://blog.sina.com.cn/s/blog_537f4a11010008uf.html</a><br />
<a href="http://blog.sina.com.cn/s/blog_537f4a11010008ws.html" title="SUPL技术(三)" target="_blank" rel="nofollow">SUPL技术(三)http://blog.sina.com.cn/s/blog_537f4a11010008ws.html</a><br />
<a href="http://blog.sina.com.cn/s/blog_537f4a11010008yf.html" title="SUPL技术(四)" target="_blank" rel="nofollow">SUPL技术(四)http://blog.sina.com.cn/s/blog_537f4a11010008yf.html</a><br />
4、dun<br />
Dial Up Networking拨号网络的简称，此连接与default连接类似，用于执行一个拨号网络网桥，使载体能知道拨号网络流量的应用程序，此连接能与default连接同时使用</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1787code35'); return false;">View Code</a> JAVA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p178735"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p1787code35"><pre class="java" style="font-family:monospace;"><span style="color: #008000; font-style: italic; font-weight: bold;">/**
  * A DUN-specific Mobile data connection. This connection may be the
  * same as {@link #TYPEMOBILE} but it may be different. This is used
  * by applicaitons performing a Dial Up Networking bridge so that
  * the carrier is aware of DUN traffic. It may coexist with default data
  * connections.
  */</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> TYPE_MOBILE_DUN <span style="color: #339933;">=</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>适用场合：需要使用运营商无线热点的，CMCC、ChinaNet等<br />
5、hipri<br />
高优先级网络，与default类似，但路由设置不同。<br />
只有当进程访问移动DNS服务器，并明确要求使用requestRouteToHost(int, int)才会使用此连接<br />
（这个我也不太懂，翻译的应该很有问题&#8230;.）</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p1787code36'); return false;">View Code</a> JAVA</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p178736"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code" id="p1787code36"><pre class="java" style="font-family:monospace;"><span style="color: #008000; font-style: italic; font-weight: bold;">/**
  * A High Priority Mobile data connection. This connection is typically
  * the same as {@link #TYPEMOBILE} but the routing setup is different.
  * Only requesting processes will have access to the Mobile DNS servers
  * and only IP's explicitly requested via {@link #requestRouteToHost}
  * will route over this interface.
  *{@hide}
  */</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #000066; font-weight: bold;">int</span> TYPE_MOBILE_HIPRI <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>适用场合：我也不知道&#8230;&#8230;</p>
<p>好了，最后教给大家一个一劳永逸的APN设置大法：2个接入点搞定一切<br />
以下内容分运营商的地方我会标注出来，默认以中国联通3G为例<br />
1、NET接入点<br />
接入点名称任意<br />
APN：3gnet(移动2g:cmnet 联通2g:uninet)<br />
接入点类型:default,supl,dun<br />
其他都为空<br />
2、WAP接入点<br />
APN:3gwap(移动2g:cmwap 联通2g:uniwap)<br />
代理:10.0.0.172<br />
端口:80<br />
mmsc:http://mmsc.myuni.com.cn(此项不区分2G3G，移动:http://mmsc.monternet.com)<br />
彩信代理:10.0.0.172<br />
彩信端口:80<br />
APN类型:default,mms<br />
好了，搞定~<br />
现在我想文章开头处的问题就不需要再解答了吧？</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2011/09/default%e3%80%81mms%e3%80%81supl%e3%80%81dun%e3%80%81hipri%e6%8e%a5%e5%85%a5%e7%82%b9%e7%b1%bb%e5%9e%8b%e7%9a%84%e5%8c%ba%e5%88%ab.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>校准你的手机电池，让电池恢复活力</title>
		<link>http://www.harde.org/blog/2011/09/%e6%a0%a1%e5%87%86%e4%bd%a0%e7%9a%84%e6%89%8b%e6%9c%ba%e7%94%b5%e6%b1%a0%ef%bc%8c%e8%ae%a9%e7%94%b5%e6%b1%a0%e6%81%a2%e5%a4%8d%e6%b4%bb%e5%8a%9b.html</link>
		<comments>http://www.harde.org/blog/2011/09/%e6%a0%a1%e5%87%86%e4%bd%a0%e7%9a%84%e6%89%8b%e6%9c%ba%e7%94%b5%e6%b1%a0%ef%bc%8c%e8%ae%a9%e7%94%b5%e6%b1%a0%e6%81%a2%e5%a4%8d%e6%b4%bb%e5%8a%9b.html#comments</comments>
		<pubDate>Thu, 01 Sep 2011 08:14:30 +0000</pubDate>
		<dc:creator>harde</dc:creator>
				<category><![CDATA[Android & Iphone]]></category>

		<guid isPermaLink="false">http://www.harde.org/blog/?p=1784</guid>
		<description><![CDATA[刷过机的都知道在Recovery里有个wipe battery stats，很多教程里说刷ROM时能wipe几个就wipe几个 其实这完全是在误导机油~ wipe battery stats 从字面来看“擦除电池统计”事实上也确实就是这个意思 手机... ]]></description>
			<content:encoded><![CDATA[<p>刷过机的都知道在Recovery里有个wipe battery stats，很多教程里说刷ROM时能wipe几个就wipe几个<br />
其实这完全是在误导机油~</p>
<p>wipe battery stats<br />
从字面来看“擦除电池统计”事实上也确实就是这个意思</p>
<blockquote><p>
手机充电时为防止过充会有每次的冲电统计，记录在系统里面，衰减记录可以保护电池过充但会使电池充满电的记录不断变小，从而使下次电池充电时充电不足，储备电量变小。这样做是为了更新记录，使电池的充电电量每次尽可能的最大。<br />
引用自：XDA，源头无法追溯
</p></blockquote>
<p>那么问题来了，当你在非满电状态下执行了此项，很显然电池就被你错误的校对了~<br />
运气好的，当时电量在70、80或者满电的，可能感觉不出来，最多感觉新刷的ROM“比较耗电”<br />
运气不好的，当时电量在20、30的，那么你可能会悲剧的发现电池貌似“坏了”，用一会就没电了~~</p>
<p>好了，知道了原因就好了，按照正规的流程，重新校对下电池就好了<br />
因为本人使用HTC Desire（下文简称G7），以下以G7为例</p>
<blockquote><p>
1、首先在开机状态下连接充电器充电，充到满电。(G7的LED会变成绿色）<br />
2、把手机从充电器拔下。<br />
3、关机并再连接充电器充电，如果你发现手机竟然又继续充电了(LED变成橘黄色），恭喜，您的电池已经处于需要校准状态，等待充满。(等待LED再次变绿）<br />
（注意：如果你插上充电器，没过几秒就变绿了，也恭喜你，因为您的电池已经处在健康状态，不需要校准了）<br />
4、拔下手机充电器。<br />
5、手机开机，等到手机开机并完全进入系统后，迅速关机。<br />
6、再次连接充电器到，等待充满（LED变绿）<br />
7、启动手机进入recovery模式(返回+电源键同时按下)，然后选择wipe battery stats即可。
</p></blockquote>
<p>注意，如果没有必要不要经常wipe battery stats</p>
<p>在书写本文时，本人在开机充满的状态下，关机又快充了半小时&#8230;..现在还没充满~~我可怜的电池&#8230;&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.harde.org/blog/2011/09/%e6%a0%a1%e5%87%86%e4%bd%a0%e7%9a%84%e6%89%8b%e6%9c%ba%e7%94%b5%e6%b1%a0%ef%bc%8c%e8%ae%a9%e7%94%b5%e6%b1%a0%e6%81%a2%e5%a4%8d%e6%b4%bb%e5%8a%9b.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

