<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title>贵贵的博客</title>
		<link>http://blog.linuxphp.org/</link>
		<description>勤学似春起之苗，不见其增，日有所长； 辍学如磨刀之石，不见其损，日有所亏。</description>
		<copyright>Powered by SaBlog-X. Copyright (C) 2003-2010.</copyright>
		<generator>SaBlog-X Version 2.0 Build 20100301</generator>
		<lastBuildDate>Sun, 20 May 2012 22:35:53 +0000</lastBuildDate>
		<ttl>30</ttl>
		<item>
			<link>http://blog.linuxphp.org/reg_exp_syntax/</link>
			<guid>http://blog.linuxphp.org/reg_exp_syntax/</guid>
			<title>正则表达式语法</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	&nbsp;</p>
<p style="font-family: 宋体; color: rgb(0, 0, 0); line-height: normal; ">
	一个正则表达式就是由普通字符（例如字符 a 到 z）以及特殊字符（称为<i>元字符</i>）组成的文字模式。该模式描述在查找文字主体时待匹配的一个或多个字符串。正则表达式作为一个模板，将某个字符模式与所搜索的字符串进行匹配。</p>
<p style="font-family: 宋体; color: rgb(0, 0, 0); line-height: normal; ">
	这里有一些可能会遇到的正则表达式示例：</p>
<table border="1" cellspacing="0" cols="3" frame="box" rules="all" style="font-family: '宋体 黑体'; ">
	<tbody>
		<tr valign="top">
			<th style="font-size: 9pt; " width="30%">
				Visual Basic Scripting Edition</th>
			<th style="font-size: 9pt; " width="30%">
				VBScript</th>
			<th style="font-size: 9pt; " width="40%">
				匹配</th>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="30%">
				/^\[ \t]*$/</td>
			<td style="font-size: 9pt; " width="30%">
				&quot;^\[ \t]*$&quot;</td>
			<td style="font-size: 9pt; " width="40%">
				匹配一个空白行。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="30%">
				/\d{2}-\d{5}/</td>
			<td style="font-size: 9pt; " width="30%">
				&quot;\d{2}-\d{5}&quot;</td>
			<td style="font-size: 9pt; " width="40%">
				验证一个ID 号码是否由一个2位数字，一个连字符以及一个5位数字组成。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="30%">
				/&lt;(.*)&gt;.*&lt;\/\1&gt;/</td>
			<td style="font-size: 9pt; " width="30%">
				&quot;&lt;(.*)&gt;.*&lt;\/\1&gt;&quot;</td>
			<td style="font-size: 9pt; " width="40%">
				匹配一个 HTML 标记。</td>
		</tr>
	</tbody>
</table>
<br style="color: rgb(0, 0, 0); font-family: '宋体 黑体'; " />
<p style="font-family: 宋体; color: rgb(0, 0, 0); line-height: normal; ">
	下表是元字符及其在正则表达式上下文中的行为的一个完整列表：</p>
<table border="1" cellspacing="0" cols="2" frame="box" rules="all" style="font-family: '宋体 黑体'; ">
	<tbody>
		<tr valign="top">
			<th style="font-size: 9pt; " width="16%">
				字符</th>
			<th style="font-size: 9pt; " width="84%">
				描述</th>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\</td>
			<td style="font-size: 9pt; " width="84%">
				将下一个字符标记为一个特殊字符、或一个原义字符、或一个 后向引用、或一个八进制转义符。例如，&#39;n&#39; 匹配字符 &quot;n&quot;。&#39;\n&#39; 匹配一个换行符。序列 &#39;\\&#39; 匹配 &quot;\&quot; 而 &quot;\(&quot; 则匹配 &quot;(&quot;。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				^</td>
			<td style="font-size: 9pt; " width="84%">
				匹配输入字符串的开始位置。如果设置了&nbsp;<b>RegExp</b>&nbsp;对象的&nbsp;<b>Multiline</b>&nbsp;属性，^ 也匹配 &#39;\n&#39; 或 &#39;\r&#39; 之后的位置。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				$</td>
			<td style="font-size: 9pt; " width="84%">
				匹配输入字符串的结束位置。如果设置了<b>RegExp</b>&nbsp;对象的&nbsp;<b>Multiline</b>&nbsp;属性，$ 也匹配 &#39;\n&#39; 或 &#39;\r&#39; 之前的位置。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				*</td>
			<td style="font-size: 9pt; " width="84%">
				匹配前面的子表达式零次或多次。例如，zo* 能匹配 &quot;z&quot; 以及 &quot;zoo&quot;。 * 等价于{0,}。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				+</td>
			<td style="font-size: 9pt; " width="84%">
				匹配前面的子表达式一次或多次。例如，&#39;zo+&#39; 能匹配 &quot;zo&quot; 以及 &quot;zoo&quot;，但不能匹配 &quot;z&quot;。+ 等价于 {1,}。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				?</td>
			<td style="font-size: 9pt; " width="84%">
				匹配前面的子表达式零次或一次。例如，&quot;do(es)?&quot; 可以匹配 &quot;do&quot; 或 &quot;does&quot; 中的&quot;do&quot; 。? 等价于 {0,1}。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				{<i>n</i>}</td>
			<td style="font-size: 9pt; " width="84%">
				<i>n</i>&nbsp;是一个非负整数。匹配确定的&nbsp;<i>n</i>&nbsp;次。例如，&#39;o{2}&#39; 不能匹配 &quot;Bob&quot; 中的 &#39;o&#39;，但是能匹配 &quot;food&quot; 中的两个 o。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				{<i>n</i>,}</td>
			<td style="font-size: 9pt; " width="84%">
				<i>n</i>&nbsp;是一个非负整数。至少匹配<i>n</i>&nbsp;次。例如，&#39;o{2,}&#39; 不能匹配 &quot;Bob&quot; 中的 &#39;o&#39;，但能匹配 &quot;foooood&quot; 中的所有 o。&#39;o{1,}&#39; 等价于 &#39;o+&#39;。&#39;o{0,}&#39; 则等价于 &#39;o*&#39;。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				{<i>n</i>,<i>m</i>}</td>
			<td style="font-size: 9pt; " width="84%">
				<i>m</i>&nbsp;和&nbsp;<i>n</i>&nbsp;均为非负整数，其中<i>n</i>&nbsp;&lt;=&nbsp;<i>m</i>。最少匹配&nbsp;<i>n</i>&nbsp;次且最多匹配&nbsp;<i>m</i>&nbsp;次。刘， &quot;o{1,3}&quot; 将匹配 &quot;fooooood&quot; 中的前三个 o。&#39;o{0,1}&#39; 等价于 &#39;o?&#39;。请注意在逗号和两个数之间不能有空格。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				?</td>
			<td style="font-size: 9pt; " width="84%">
				当该字符紧跟在任何一个其他限制符 (*, +, ?, {<i>n</i>}, {<i>n</i>,}, {<i>n</i>,<i>m</i>}) 后面时，匹配模式是非贪婪的。非贪婪模式尽可能少的匹配所搜索的字符串，而默认的贪婪模式则尽可能多的匹配所搜索的字符串。例如，对于字符串 &quot;oooo&quot;，&#39;o+?&#39; 将匹配单个 &quot;o&quot;，而 &#39;o+&#39; 将匹配所有 &#39;o&#39;。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				.</td>
			<td style="font-size: 9pt; " width="84%">
				匹配除 &quot;\n&quot; 之外的任何单个字符。要匹配包括 &#39;\n&#39; 在内的任何字符，请使用象 &#39;[.\n]&#39; 的模式。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				(<i>pattern</i>)</td>
			<td style="font-size: 9pt; " width="84%">
				匹配<i>pattern</i>&nbsp;并获取这一匹配。所获取的匹配可以从产生的 Matches 集合得到，在VBScript 中使用&nbsp;<b>SubMatches</b>&nbsp;集合，在Visual Basic Scripting Edition 中则使用&nbsp;<b>$0</b>&hellip;<b>$9</b>&nbsp;属性。要匹配圆括号字符，请使用 &#39;\(&#39; 或 &#39;\)&#39;。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				(?:<i>pattern</i>)</td>
			<td style="font-size: 9pt; " width="84%">
				匹配&nbsp;<i>pattern</i>&nbsp;但不获取匹配结果，也就是说这是一个非获取匹配，不进行存储供以后使用。这在使用 &quot;或&quot; 字符 (|) 来组合一个模式的各个部分是很有用。例如， &#39;industr(?:y|ies) 就是一个比 &#39;industry|industries&#39; 更简略的表达式。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				(?=<i>pattern</i>)</td>
			<td style="font-size: 9pt; " width="84%">
				正向预查，在任何匹配&nbsp;<i>pattern</i>&nbsp;的字符串开始处匹配查找字符串。这是一个非获取匹配，也就是说，该匹配不需要获取供以后使用。例如， &#39;Windows (?=95|98|NT|2000)&#39; 能匹配 &quot;Windows 2000&quot; 中的 &quot;Windows&quot; ，但不能匹配 &quot;Windows 3.1&quot; 中的 &quot;Windows&quot;。预查不消耗字符，也就是说，在一个匹配发生后，在最后一次匹配之后立即开始下一次匹配的搜索，而不是从包含预查的字符之后开始。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				(?!<i>pattern</i>)</td>
			<td style="font-size: 9pt; " width="84%">
				负向预查，在任何不匹配Negative lookahead matches the search string at any point where a string not matching&nbsp;<i>pattern</i>&nbsp;的字符串开始处匹配查找字符串。这是一个非获取匹配，也就是说，该匹配不需要获取供以后使用。例如&#39;Windows (?!95|98|NT|2000)&#39; 能匹配 &quot;Windows 3.1&quot; 中的 &quot;Windows&quot;，但不能匹配 &quot;Windows 2000&quot; 中的 &quot;Windows&quot;。预查不消耗字符，也就是说，在一个匹配发生后，在最后一次匹配之后立即开始下一次匹配的搜索，而不是从包含预查的字符之后开始</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				<i>x</i>|<i>y</i></td>
			<td style="font-size: 9pt; " width="84%">
				匹配&nbsp;<i>x</i>&nbsp;或&nbsp;<i>y</i>。例如，&#39;z|food&#39; 能匹配 &quot;z&quot; 或 &quot;food&quot;。&#39;(z|f)ood&#39; 则匹配 &quot;zood&quot; 或 &quot;food&quot;。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				[<i>xyz</i>]</td>
			<td style="font-size: 9pt; " width="84%">
				字符集合。匹配所包含的任意一个字符。例如， &#39;[abc]&#39; 可以匹配 &quot;plain&quot; 中的 &#39;a&#39;。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				[^<i>xyz</i>]</td>
			<td style="font-size: 9pt; " width="84%">
				负值字符集合。匹配未包含的任意字符。例如， &#39;[^abc]&#39; 可以匹配 &quot;plain&quot; 中的&#39;p&#39;。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				[<i>a-z</i>]</td>
			<td style="font-size: 9pt; " width="84%">
				字符范围。匹配指定范围内的任意字符。例如，&#39;[a-z]&#39; 可以匹配 &#39;a&#39; 到 &#39;z&#39; 范围内的任意小写字母字符。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				[^<i>a-z</i>]</td>
			<td style="font-size: 9pt; " width="84%">
				负值字符范围。匹配任何不在指定范围内的任意字符。例如，&#39;[^a-z]&#39; 可以匹配任何不在 &#39;a&#39; 到 &#39;z&#39; 范围内的任意字符。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\b</td>
			<td style="font-size: 9pt; " width="84%">
				匹配一个单词边界，也就是指单词和空格间的位置。例如， &#39;er\b&#39; 可以匹配&quot;never&quot; 中的 &#39;er&#39;，但不能匹配 &quot;verb&quot; 中的 &#39;er&#39;。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\B</td>
			<td style="font-size: 9pt; " width="84%">
				匹配非单词边界。&#39;er\B&#39; 能匹配 &quot;verb&quot; 中的 &#39;er&#39;，但不能匹配 &quot;never&quot; 中的 &#39;er&#39;。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\c<i>x</i></td>
			<td style="font-size: 9pt; " width="84%">
				匹配由<i>x</i>指明的控制字符。例如， \cM 匹配一个 Control-M 或回车符。&nbsp;<i>x</i>&nbsp;的值必须为 A-Z 或 a-z 之一。否则，将 c 视为一个原义的 &#39;c&#39; 字符。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\d</td>
			<td style="font-size: 9pt; " width="84%">
				匹配一个数字字符。等价于 [0-9]。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\D</td>
			<td style="font-size: 9pt; " width="84%">
				匹配一个非数字字符。等价于 [^0-9]。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\f</td>
			<td style="font-size: 9pt; " width="84%">
				匹配一个换页符。等价于 \x0c 和 \cL。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\n</td>
			<td style="font-size: 9pt; " width="84%">
				匹配一个换行符。等价于 \x0a 和 \cJ。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\r</td>
			<td style="font-size: 9pt; " width="84%">
				匹配一个回车符。等价于 \x0d 和 \cM。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\s</td>
			<td style="font-size: 9pt; " width="84%">
				匹配任何空白字符，包括空格、制表符、换页符等等。等价于 [&nbsp;\f\n\r\t\v]。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\S</td>
			<td style="font-size: 9pt; " width="84%">
				匹配任何非空白字符。等价于 [^&nbsp;\f\n\r\t\v]。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\t</td>
			<td style="font-size: 9pt; " width="84%">
				匹配一个制表符。等价于 \x09 和 \cI。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\v</td>
			<td style="font-size: 9pt; " width="84%">
				匹配一个垂直制表符。等价于 \x0b 和 \cK。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\w</td>
			<td style="font-size: 9pt; " width="84%">
				匹配包括下划线的任何单词字符。等价于&#39;[A-Za-z0-9_]&#39;。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\W</td>
			<td style="font-size: 9pt; " width="84%">
				匹配任何非单词字符。等价于 &#39;[^A-Za-z0-9_]&#39;。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\x<i>n</i></td>
			<td style="font-size: 9pt; " width="84%">
				匹配&nbsp;<i>n</i>，其中&nbsp;<i>n</i>&nbsp;为十六进制转义值。十六进制转义值必须为确定的两个数字长。例如， &#39;\x41&#39; 匹配 &quot;A&quot;。&#39;\x041&#39; 则等价于 &#39;\x04&#39; &amp; &quot;1&quot;。正则表达式中可以使用 ASCII 编码。.</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\<i>num</i></td>
			<td style="font-size: 9pt; " width="84%">
				匹配&nbsp;<i>num</i>，其中&nbsp;<i>num</i>&nbsp;是一个正整数。对所获取的匹配的引用。例如，&#39;(.)\1&#39; 匹配两个连续的相同字符。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\<i>n</i></td>
			<td style="font-size: 9pt; " width="84%">
				标识一个八进制转义值或一个后向引用。如果 \<i>n</i>&nbsp;之前至少&nbsp;<i>n</i>&nbsp;个获取的子表达式，则&nbsp;<i>n</i>&nbsp;为后向引用。否则，如果&nbsp;<i>n</i>&nbsp;为八进制数字 (0-7)，则&nbsp;<i>n</i>&nbsp;为一个八进制转义值。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\<i>nm</i></td>
			<td style="font-size: 9pt; " width="84%">
				标识一个八进制转义值或一个后向引用。如果 \<i>nm</i>&nbsp;之前至少有is preceded by at least&nbsp;<i>nm</i>&nbsp;个获取得子表达式，则&nbsp;<i>nm</i>&nbsp;为后向引用。如果 \<i>nm</i>&nbsp;之前至少有<i>n</i>&nbsp;个获取，则&nbsp;<i>n</i>&nbsp;为一个后跟文字&nbsp;<i>m&nbsp;</i>的后向引用。如果前面的条件都不满足，若&nbsp;&nbsp;<i>n</i>&nbsp;和&nbsp;<i>m</i>&nbsp;均为八进制数字 (0-7)，则 \<i>nm</i>&nbsp;将匹配八进制转义值&nbsp;<i>nm</i>。</td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\<i>nml</i></td>
			<td style="font-size: 9pt; " width="84%">
				如果&nbsp;<i>n</i>&nbsp;为八进制数字 (0-3)，且&nbsp;<i>m</i>&nbsp;和&nbsp;<i>l</i>&nbsp;均为八进制数字 (0-7)，则匹配八进制转义值&nbsp;<i>nml。</i></td>
		</tr>
		<tr valign="top">
			<td style="font-size: 9pt; " width="16%">
				\u<i>n</i></td>
			<td style="font-size: 9pt; " width="84%">
				匹配&nbsp;<i>n</i>，其中&nbsp;<i>n</i>&nbsp;是一个用四个十六进制数字表示的 Unicode 字符。例如， \u00A9 匹配版权符号 (?)。</td>
		</tr>
	</tbody>
</table>
<br style="color: rgb(0, 0, 0); font-family: '宋体 黑体'; " />
<div class="footer" style="font-family: 'Courier New'; color: rgb(0, 0, 0); ">
	&nbsp;</div>
]]></description>
			<link>http://blog.linuxphp.org/reg_exp_syntax/</link>
			<category domain="http://blog.linuxphp.org/develop/">开发技术</category>
			<category domain="http://blog.linuxphp.org/tag/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F/">正则表达式</category>
			<pubDate>Sun, 20 May 2012 18:28:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1538/</link>
			<guid>http://blog.linuxphp.org/archives/1538/</guid>
			<title>MX原生andriod4.0.3屏幕截图</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	使用原生系统有一些时间了，一直没有找到怎么截图，有人说取消了，在没有升级前是关机键+HOME键的。没有办法，只好退而示其次，使用碗豆夹进行截图，顺便说下碗豆夹截图前需要点下截图后面的播放按钮，屏幕就和手机同步了。</p>
<p>
	&nbsp;</p>
<p>
	今天看小米论坛，主要是想下载小米系统的，听说已经可以安装在MX手机上了，逛完后发现下载地址没有公开，是内部测试，不过有个&ldquo;MX原生安卓4.0说明书&rdquo;的文章给了我一些帮助：</p>
<p>
	&ldquo;<span style="color: rgb(68, 68, 68); font-family: Tahoma, Helvetica, sans-serif, Hei; font-size: 14px; ">屏幕截图方法：电源键+音量下键 同时按住2秒。截图保存在SD\Pictures\Screenshots</span>&rdquo;</p>
<p>
	&nbsp;</p>
<p>
	测试了下，果然好使，电源键和音量下键一定要同时按下。</p>
<p>
	&nbsp;</p>
<p>
	不敢独享，原文：<a href="http://www.miui.com/thread-571289-1-1.html">http://www.miui.com/thread-571289-1-1.html</a></p>
]]></description>
			<link>http://blog.linuxphp.org/archives/1538/</link>
			<category domain="http://blog.linuxphp.org/zatan/">随笔杂谈</category>
			<category domain="http://blog.linuxphp.org/tag/mx/">mx</category>
			<pubDate>Thu, 17 May 2012 20:48:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1537/</link>
			<guid>http://blog.linuxphp.org/archives/1537/</guid>
			<title>数据连接已断,因为您已离开本地网络并已关闭数据漫游</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	我手机一般是不启用GPRS的，使用WIFI进行上网，数据漫游就更不会使用了。</p>
<p>
	&nbsp;</p>
<p>
	早上看手机出现&ldquo;&nbsp;数据连接已断,因为您已离开本地网络并已关闭数据漫游&rdquo;，这已经是第N次看到这个提示了，还关不掉。以前都是通过重启机器解决。刚百度了下，同样的问题的人还不少，也没有看到彻底的解决方法。</p>
<p>
	&nbsp;</p>
<p>
	测试在移动网络设置里点选数据漫游后提示&ldquo;是否允许数据漫游？这可能产生大量漫游费！&rdquo;点确定后也就没有那个三角提示了。但这会不会有漫游费呢，算了还是老办法通过重启手机解决吧。</p>
]]></description>
			<link>http://blog.linuxphp.org/archives/1537/</link>
			<category domain="http://blog.linuxphp.org/zatan/">随笔杂谈</category>
			<pubDate>Thu, 17 May 2012 09:42:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1536/</link>
			<guid>http://blog.linuxphp.org/archives/1536/</guid>
			<title>那年我曾来过这里-烟台</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	2010-10-25日我和老婆来到烟台，主要是在搜房网上报名看一下房子。</p>
<p>
	&nbsp;</p>
<p>
	火车站</p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=471" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_08a46657b67ff4743f2e8ba535cf4b9c.jpg" border="0" alt="dscn6153.jpg&#13;&#13;大小: 133.84 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="375" /></a></div></p>
<p>
	慢城宁海楼房</p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=472" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_18c36f00a9e2ae1209ebca09ca9af6c6.jpg" border="0" alt="dscn6180.jpg&#13;&#13;大小: 94.84 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="375" /></a></div></p>
<p>
	在烟台牟平的另外一个新建小区</p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=473" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_0c4083f3f67f871599b1faec07a05f6b.jpg" border="0" alt="dscn6175.jpg&#13;&#13;大小: 119.74 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="375" /></a></div></p>
<p>
	&nbsp;</p>
<p>
	由于价格和周边发展等多重原因，最后没有在此购买楼房。不过烟台人好，靠海，发展快，还是很让人向往的。</p>
]]></description>
			<link>http://blog.linuxphp.org/archives/1536/</link>
			<category domain="http://blog.linuxphp.org/zatan/">随笔杂谈</category>
			<category domain="http://blog.linuxphp.org/tag/%E7%83%9F%E5%8F%B0/">烟台</category>
			<pubDate>Tue, 15 May 2012 21:07:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/hunshazhao/</link>
			<guid>http://blog.linuxphp.org/hunshazhao/</guid>
			<title>青岛拍婚纱照</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	今天翻出了两年前去青岛拍的婚纱照，于是把细节整理了一下，发上来。</p>
<p>
	&nbsp;</p>
<p>
	决定去青岛拍婚纱照很突然，本来只是准备去游玩下而已。</p>
<p>
	&nbsp;</p>
<p>
	下面说说套餐明细：</p>
<p>
	&nbsp;</p>
<div>
	[圣瓦伦丁精品婚纱超级特惠套] &nbsp; 4499元</div>
<div>
	&nbsp;</div>
<div>
	18寸爱的唯一数码一体成型热裱相册 &nbsp; 10p (约25-30张)</div>
<div>
	12寸爱的唯一数码一体成型热裱相册 20张</div>
<div>
	5寸爱的唯一掌中宝入册16张&nbsp;</div>
<div>
	爱的唯一纯手工制作精致皮箱&nbsp;</div>
<div>
	赠送已选照片底片60款刻光盘（另加相册50元一张）</div>
<div>
	&nbsp;</div>
<div>
	40寸x40寸数码法国兰麦 （或框） x 1&nbsp;</div>
<div>
	&nbsp;</div>
<div>
	30寸精致韩国圣凡塞 x 1</div>
<div>
	&nbsp;</div>
<div>
	10寸x10寸数码宽屏法国兰麦相框3个 &nbsp;</div>
<div>
	&nbsp;</div>
<div>
	7套衣服(尊爵馆) ,尊爵馆是不用加钱的，还有两个馆，一个馆要加500，有一个馆要加1000</div>
<div>
	&nbsp;</div>
<div>
	加送</div>
<div>
	60寸挂轴</div>
<div>
	10寸水晶 X 2</div>
<div>
	4X16 纯恋 X 1</div>
<div>
	8寸圣凡塞 X 1</div>
<div>
	钱包照 X 4</div>
<div>
	匙扣 X 2</div>
<div>
	华纳DVD电子相册</div>
<div>
	提供凤凰住宿一晚，如需多日住宿，每晚190元</div>
<div>
	&nbsp;</div>
<div>
	主题升级</div>
<div>
	三亚风情，英伦风尚，泳池，白色恋曲，沙滩海</div>
<div>
	&nbsp;</div>
<div>
	后期消费</div>
<div>
	没有强制性消费，后期可能产生消费地方就是：</div>
<div>
	1 &nbsp;后期多买底片</div>
<div>
	2 &nbsp;安平 您可自带也可以不用 使用本店安平 是120元/支</div>
<div>
	3 &nbsp;跨区/多选拍摄服装</div>
<div>
	拍照当天的配饰，假睫毛，绢花，手捧花，毛绒玩具等都是免费提供的&nbsp;</div>
<div>
	<div>
		&nbsp;</div>
	<div>
		行程安排</div>
	<div>
		第一天下午可以选服装</div>
	<div>
		第二天一天拍照</div>
	<div>
		第三天加急选片（有收100元的加急费用），可不选则选片要等2-5天</div>
	<div>
		需准备:男士的黑皮鞋 黑色和白色袜子 女生的无肩带内衣&nbsp;</div>
	<div>
		&nbsp;</div>
	<div>
		备注</div>
	<div>
		影楼定期清洗衣服</div>
	<div>
		7套衣服差不多能拍12个场景呢 内景3套外景4套（一套外景的衣服能拍2个场景）</div>
	<div>
		中午这边提供甜点心（寿司）一对新人一份和紫菜汤一人一杯</div>
</div>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=469" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_976951d9a7e5ba6677b7a04e2bfaa394.jpg" border="0" alt="圣瓦伦丁预约单.jpg&#13;&#13;大小: 159.18 K&#13;尺寸:  x &#13;浏览: 1 次&#13;点击打开新窗口浏览全图" width="343" height="500" /></a></div></p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=470" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_9db803b67679491b3b7a757a34c26f2a.jpg" border="0" alt="12寸爱的唯一封面.jpg&#13;&#13;大小: 131.33 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="449" height="500" /></a></div></p>
<p>
	&nbsp;</p>
]]></description>
			<link>http://blog.linuxphp.org/hunshazhao/</link>
			<category domain="http://blog.linuxphp.org/zatan/">随笔杂谈</category>
			<category domain="http://blog.linuxphp.org/tag/%E5%A9%9A%E7%BA%B1%E7%85%A7/">婚纱照</category>
			<category domain="http://blog.linuxphp.org/tag/%E9%9D%92%E5%B2%9B/">青岛</category>
			<pubDate>Tue, 15 May 2012 20:45:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1534/</link>
			<guid>http://blog.linuxphp.org/archives/1534/</guid>
			<title>网站数据部分丢失，从备份中恢复</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	&nbsp;</p>
<div>
	昨天发现网站部分数据被误删除了，通过binlog查找那些被删除的id,再通过数据库备份找回来了。</div>
<div>
	&nbsp;</div>
<div>
	费了一些周折，记录一下解决方案。主要就是把需要恢复的那些数据从备份中导出，再在线上导入。</div>
<div>
	&nbsp;</div>
<div>
	方法一、</div>
<div>
	<pre>
#通过mysql命令行执行
#导出
select * from cms_archives where id in(620,621) into outfile &quot;a.sql&quot; ;
#导入
LOAD DATA INFILE &#39;a.sql&#39; INTO TABLE cms_archives CHARACTER SET utf8 ; </pre>
</div>
<div>
	方法二、</div>
<div>
	<pre>
#通过系统命令行执行
#导出
mysqldump -uroot -p201server cms cms_archives -t -w &quot;id in(620,621)&quot;  &gt; a.sql
#导入
mysql -uroot cms &lt; a.sql</pre>
</div>
<p>
	&nbsp;</p>
<p>
	两种方案都不会影响到新生的数据，不需要停止网站。</p>
]]></description>
			<link>http://blog.linuxphp.org/archives/1534/</link>
			<category domain="http://blog.linuxphp.org/develop/">开发技术</category>
			<category domain="http://blog.linuxphp.org/tag/%E6%95%B0%E6%8D%AE%E6%81%A2%E5%A4%8D/">数据恢复</category>
			<pubDate>Tue, 15 May 2012 19:12:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/addlinks/</link>
			<guid>http://blog.linuxphp.org/addlinks/</guid>
			<title>友情链接申请专用帖</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	链接名称：贵贵的博客</p>
<div>
	链接地址：<a href="http://blog.linuxphp.org/">http://blog.linuxphp.org/</a></div>
<div>
	链接描述：贵贵的网站开发与系统架构</div>
<div>
	&nbsp;</div>
<div>
	若您需要交换友情链接，请先将小站加入贵站，并在本文评论里留下相关信息，如需要首页显示请注明。</div>
<div>
	设置首页显示要求</div>
<div>
	1.PR&gt;=5</div>
<div>
	2.日IP&gt;=1000</div>
<div>
	3.互加首页友链</div>
<div>
	&nbsp;</div>
<div>
	若符合要求我会为您的网站加上链接并邮件提醒。</div>
]]></description>
			<link>http://blog.linuxphp.org/addlinks/</link>
			<category domain="http://blog.linuxphp.org/zatan/">随笔杂谈</category>
			<category domain="http://blog.linuxphp.org/tag/%E5%8F%8B%E6%83%85%E9%93%BE%E6%8E%A5/">友情链接</category>
			<pubDate>Sat, 12 May 2012 10:37:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1532/</link>
			<guid>http://blog.linuxphp.org/archives/1532/</guid>
			<title>IP从30到300 网站流量提升十倍</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	去年同期博客IP还是在30左右蹦，今年已经在300了，算下来增加了十倍呢，期待下次的3000IP，有图有真相</p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=468" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_884fcd36a6251eb257a59643be6e6be3.jpg" border="0" alt="20120512.jpg&#13;&#13;大小: 40.88 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="194" /></a></div></p>
<p>
	&nbsp;</p>
<p>
	下面简单说下我是如何优化网站的</p>
<p>
	1.宁做一个好站，不做十个垃圾站：以前对于博客不够重视，同域名下有多个系统写日志，内容分散了就更新力度不够，就权重上不去。只能让自己不专一，用户来了看一眼就走，PV也不会高。</p>
<p>
	&nbsp;</p>
<p>
	2.网站空间：去年用国外的虚拟主机，由于IP常被封，速度也不快，自然流量上不去。今年换了<a href="http://my.rashost.com/aff.php?aff=1315" target="_blank">瑞豪开源 美国VPS主机</a>&nbsp;速度提高了很多，由于是独立IP，也不会被无故封锁。</p>
<p>
	&nbsp;</p>
<p>
	3.网站优化：这分几个方面，一是程序增加一些功能让网站使用起来更方便，如QQ微博登录,sphinx搜索，邮件提醒。二是页面改进可以以用户方便查看和访问速度为先。三是去掉不必要的广告，本身流量小广告太多了更让人反感。</p>
<p>
	&nbsp;</p>
<p>
	4.NGINX设置：将已收录的内容做好301跳转，如301没有被百度识别可参考我的文章&ldquo;<a href="http://blog.linuxphp.org/archives/1531/" target="_blank">百度收录301重定向如何才能生效</a>&rdquo;修改</p>
<p>
	&nbsp;</p>
<p>
	5.内容更新：你更新的越频繁，百度收录的越频繁。当然要以原创为主，为了内容而做内容，全是转载的，只会给自己降权，百度是不喜欢的。</p>
<p>
	&nbsp;</p>
<p>
	6.网站的链接的优化：包括目录及URL的写法，分类导航链接，内部相关文章链接</p>
<p>
	&nbsp;</p>
]]></description>
			<link>http://blog.linuxphp.org/archives/1532/</link>
			<category domain="http://blog.linuxphp.org/zatan/">随笔杂谈</category>
			<pubDate>Sat, 12 May 2012 09:42:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1531/</link>
			<guid>http://blog.linuxphp.org/archives/1531/</guid>
			<title>百度收录301重定向如何才能生效</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	几年前博客地址是以网名keminar开头的二级域名，后来发现对用来记忆不方便，就改为了更通用的blog.linuxphp.org ,转眼一年过去了，google早就更新了最新的域名，在百度里博客首页还是用的旧域名，新域名只有内页根本不收录首页。</p>
<p>
	&nbsp;</p>
<p>
	旧nginx设置</p>
<p>
	&nbsp;</p>
<pre>
server {
        listen   80;
        server_name  keminar.linuxphp.org;
        rewrite ^/.*$ http://blog.linuxphp.org/ permanent;
}</pre>
<p>
	前段时间把nginx的301去掉了，改成了meta跳转，歪打正着百度将新域名收录了，并将旧域名的权重加到了新域名 上，happy</p>
<p>
	&nbsp;</p>
<p>
	新的nginx设置一个虚拟主机</p>
<p>
	&nbsp;</p>
<pre>
server {
        listen   80;
        server_name  keminar.linuxphp.org;
        root /var/www/linuxphp.org/keminar;
        location / {
              index index.htm;
        }
}</pre>
<p>
	在虚拟主机要目录创建index.htm文件</p>
<p>
	&nbsp;</p>
<pre>
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;

&lt;head&gt;

&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;


&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;URL=http://blog.linuxphp.org&quot;&gt;

&lt;title&gt;访问错误--页面跳转中...&lt;/title&gt;</pre>
<p>
	&nbsp;</p>
<p>
	更改后没过几天就有效果了，有图有真相：</p>
<p>
	<a href="http://blog.linuxphp.org/archives/1526/">http://blog.linuxphp.org/archives/1526/</a></p>
]]></description>
			<link>http://blog.linuxphp.org/archives/1531/</link>
			<category domain="http://blog.linuxphp.org/zatan/">随笔杂谈</category>
			<category domain="http://blog.linuxphp.org/tag/rewrite/">rewrite</category>
			<category domain="http://blog.linuxphp.org/tag/301%E9%87%8D%E5%AE%9A%E5%90%91/">301重定向</category>
			<pubDate>Tue, 08 May 2012 20:13:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1530/</link>
			<guid>http://blog.linuxphp.org/archives/1530/</guid>
			<title>jira自定义工作流解决方案</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <h3>
	1.自带了五种状态不太够用，再增加一些状态</h3>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=454" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_2d7f02a703017f2a4cc216417c8acb8f.png" border="0" alt="1.png&#13;&#13;大小: 63.16 K&#13;尺寸:  x &#13;浏览: 1 次&#13;点击打开新窗口浏览全图" width="500" height="305" /></a></div></p>
<h3>
	2.汉化处理问题界面配置名</h3>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=460" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_e8dfe0eb1bcd887bb06555052cd882c6.png" border="0" alt="40-1.png&#13;&#13;大小: 34.1 K&#13;尺寸:  x &#13;浏览: 1 次&#13;点击打开新窗口浏览全图" width="500" height="362" /></a></div></p>
<h3>
	3.增加工作流</h3>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=455" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_cae93ee7d64782d8ec9922f64aaac9bf.png" border="0" alt="2.png&#13;&#13;大小: 42.13 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="141" /></a></div></p>
<h3>
	4.点击在工作流后面的steps添加状态，并增加转换状态路径</h3>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=461" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_31c18266963cd33ffcb167da6aed1ad1.png" border="0" alt="40-2.png&#13;&#13;大小: 7.97 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="86" /></a></div></p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=462" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_970905f1a38f05a1f84d5ebf44771257.png" border="0" alt="40-3.png&#13;&#13;大小: 10.95 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="272" /></a></div></p>
<p>
	其中注销和解决问题是用的&quot;解决问题页&quot;,重开和验证不通过用的&ldquo;分配问题页&rdquo;，其它使用第一个no view for transtion</p>
<p>
	这是加好的样子</p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=456" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_4ee8fc1cc4987fccb1be96d421a29a81.png" border="0" alt="3.png&#13;&#13;大小: 31.67 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="307" /></a></div></p>
<p>
	添加完成后，开始工作，重开，验证不通过三个状态需要增加后续处理，<span style="color:#ff0000;">主要是要注意&quot;The 解决 of the issue will be cleared&quot;一定要有，不然重开的问题还是已解决的状态。</span></p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=457" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_ca4309f36641b854774fa8dd0f1f291f.png" border="0" alt="4-0.png&#13;&#13;大小: 19.19 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="442" height="500" /></a></div></p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=458" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_513a4e91e91ac4898a0db079401827e5.png" border="0" alt="4-1.png&#13;&#13;大小: 21.8 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="393" /></a></div></p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=459" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_9137a1acd868312094a1fcdeb78beb08.png" border="0" alt="4-2.png&#13;&#13;大小: 21.51 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="462" /></a></div></p>
<p>
	这里因为我截图的工作流已经应用于项目了，所以就不可以更改了，现在拿一个没有应用于项目的工作流截图看下是如果添回post functions的</p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=463" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/44c17eb5f4c6b2a20c0213c4c887ff8a.png" border="0" alt="4-3.png&#13;&#13;大小: 12.91 K&#13;尺寸: 402 x 291&#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="402" height="291" /></a></div></p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=464" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_793adc560450d2d792446b50efe7295d.png" border="0" alt="4-4.png&#13;&#13;大小: 9.95 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="217" /></a></div></p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=465" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_6e0a7bab78fda418d07840b7ac4a1240.png" border="0" alt="4-5.png&#13;&#13;大小: 10.61 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="237" /></a></div></p>
<h3>
	5.工作流建好后，建一个解决方案并使用刚才建的工作流</h3>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=466" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_7a114a3cec8a0ce154a3c0cf23897149.png" border="0" alt="5.png&#13;&#13;大小: 34.78 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="198" /></a></div></p>
<h3>
	6.将工作流解决方案应用于项目</h3>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=467" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_b48495ecb8db337a395edbb9dd77b788.png" border="0" alt="6.png&#13;&#13;大小: 29.21 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="181" /></a></div></p>
<p>
	&nbsp;</p>
<p>
	总结：</p>
<p>
	JIRA真的很强大，配置很灵活，不过带来的就是操作繁琐，很难一次性配置好，很多功能都在角落里藏着，每次改动都摸索很久。</p>
]]></description>
			<link>http://blog.linuxphp.org/archives/1530/</link>
			<category domain="http://blog.linuxphp.org/develop/">开发技术</category>
			<category domain="http://blog.linuxphp.org/tag/jira/">jira</category>
			<pubDate>Thu, 03 May 2012 22:22:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1529/</link>
			<guid>http://blog.linuxphp.org/archives/1529/</guid>
			<title>jira邮件提醒配置</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	先设置消息提醒方案，这里系统有默认的，稍加修改或用默认都可以</p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=449" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_46f687576bc0d6036837dcc63bc6d6ef.png" border="0" alt="1.png&#13;&#13;大小: 79.92 K&#13;尺寸:  x &#13;浏览: 2 次&#13;点击打开新窗口浏览全图" width="500" height="309" /></a></div></p>
<p>
	配置SMTP邮件服务器</p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=450" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_03dd01f45e9a79ff0ba578e7f6ad1164.png" border="0" alt="2.png&#13;&#13;大小: 33.19 K&#13;尺寸:  x &#13;浏览: 2 次&#13;点击打开新窗口浏览全图" width="500" height="216" /></a></div></p>
<p>
	设置项目的提示方式为设置好的提醒方案</p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=451" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_1234e7daeff7ef510622414cf8c1a2b2.png" border="0" alt="3.png&#13;&#13;大小: 30.72 K&#13;尺寸:  x &#13;浏览: 1 次&#13;点击打开新窗口浏览全图" width="500" height="167" /></a></div></p>
<p>
	设置为邮件发送为定时服务，每分钟检查一次</p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=452" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/1b357bc466c2a61cd095c32b2e953bd5.png" border="0" alt="4-0.png&#13;&#13;大小: 5.98 K&#13;尺寸: 176 x 237&#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="176" height="237" /></a></div><div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=453" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201205/thumb_27916449c2fd0a6e07b6467c01a720e4.png" border="0" alt="4-1.png&#13;&#13;大小: 14.73 K&#13;尺寸:  x &#13;浏览: 1 次&#13;点击打开新窗口浏览全图" width="500" height="154" /></a></div></p>
]]></description>
			<link>http://blog.linuxphp.org/archives/1529/</link>
			<category domain="http://blog.linuxphp.org/develop/">开发技术</category>
			<category domain="http://blog.linuxphp.org/tag/jira/">jira</category>
			<pubDate>Thu, 03 May 2012 22:15:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1528/</link>
			<guid>http://blog.linuxphp.org/archives/1528/</guid>
			<title>中国地震带分布图</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	&nbsp;</p>
<div>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=448" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201204/df3a2d6e38174dff3166fd1a8922ffec.gif" border="0" alt="dizhendaifenbu2.gif&#13;&#13;大小: 21.12 K&#13;尺寸: 450 x 375&#13;浏览: 3 次&#13;点击打开新窗口浏览全图" width="450" height="375" /></a></div></div>
<div>
	中国地震主要分布在五个区域：台湾地区、西南地区、西北地区、华北地区、东南沿海地区和23条地震带上。</div>
<div>
	&nbsp;</div>
]]></description>
			<link>http://blog.linuxphp.org/archives/1528/</link>
			<category domain="http://blog.linuxphp.org/zatan/">随笔杂谈</category>
			<category domain="http://blog.linuxphp.org/tag/%E5%9C%B0%E9%9C%87/">地震</category>
			<pubDate>Sat, 28 Apr 2012 21:43:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1527/</link>
			<guid>http://blog.linuxphp.org/archives/1527/</guid>
			<title>discuz X2增加成功样式的弹出层提示</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	系统默认是根据showmessage的第二个参数$url_forward来判断显示效果是跳转还是提示层的，如果为空则显示出错样式的提示层，如果不为空则是成功跳转页面在用于ajax提示时有问题。而我想要成功样式的弹出层的提示，所以做了一些修改。</p>
<p>
	&nbsp;</p>
<p>
	系统的js函数showDialog支持&#39;confirm&#39;, &#39;notice&#39;, &#39;info&#39;, &#39;right&#39;四种样式，所以只需要修改上一层调用的地方就可以。</p>
<p>
	&nbsp;</p>
<p>
	修改后的调用方法</p>
<p>
	&nbsp;</p>
<pre>
showmessage(&#39;操作成功&#39;, &#39;alert&#39;);</pre>
<p>
	修改static/js/common.js的showError函数为如下代码</p>
<p>
	&nbsp;</p>
<pre>
function showError(msg) {
	var p = /&lt;script[^\&gt;]*?&gt;([^\x00]*?)&lt;\/script&gt;/ig;
	msg = msg.replace(p, &#39;&#39;);
	if (msg.substring(0,5) == &#39;alert&#39;) {
		showDialog(msg.substring(5), &#39;right&#39;, &#39;成功信息&#39;, null, true, null, &#39;&#39;, &#39;&#39;, &#39;&#39;, 3);
	} else if(msg !== &#39;&#39;) {
		showDialog(msg, &#39;alert&#39;, &#39;错误信息&#39;, null, true, null, &#39;&#39;, &#39;&#39;, &#39;&#39;, 3);
	}
}</pre>
<p>
	下载附件替换source/function/function_message.php文件</p>
<p>
	<a href="http://blog.linuxphp.org/attachment.php?id=446" title="function_message.php&#13;&#13;大小:7.64 K, 下载次数:0" target="_blank">function_message.php</a></p>
]]></description>
			<link>http://blog.linuxphp.org/archives/1527/</link>
			<category domain="http://blog.linuxphp.org/develop/">开发技术</category>
			<category domain="http://blog.linuxphp.org/tag/discuz/">discuz</category>
			<pubDate>Wed, 25 Apr 2012 11:30:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1526/</link>
			<guid>http://blog.linuxphp.org/archives/1526/</guid>
			<title>百度增加新域名首页快照</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	换<a href="http://blog.linuxphp.org">blog.linuxphp.org</a>有些日子了，百度一直还索引的旧域名，今天发现首页地址终于换了</p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=444" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201204/thumb_e78e48f7a877b21852638adcfe43f576.jpg" border="0" alt="20120424140701.jpg&#13;&#13;大小: 44.66 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="169" /></a></div></p>
<p>
	&nbsp;</p>
<p>
	百度搜索 &quot;贵贵的博客&quot; 第一个就是啦</p>
<p>
	<div class="attach"><a href="http://blog.linuxphp.org/attachment.php?id=445" target="_blank"><img src="http://blog.linuxphp.org/attachments/date_201204/thumb_232910ca8d4014a5a2505d237ea1a0e1.jpg" border="0" alt="20120424140721.jpg&#13;&#13;大小: 36.55 K&#13;尺寸:  x &#13;浏览: 0 次&#13;点击打开新窗口浏览全图" width="500" height="147" /></a></div></p>
]]></description>
			<link>http://blog.linuxphp.org/archives/1526/</link>
			<category domain="http://blog.linuxphp.org/zatan/">随笔杂谈</category>
			<pubDate>Tue, 24 Apr 2012 14:24:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1525/</link>
			<guid>http://blog.linuxphp.org/archives/1525/</guid>
			<title>discuz X2更新CSS自动生成缓存</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	默认DISCUZ更新了CSS后要在后台更新模板缓存，费力不说，常常会带来页面样式丢失问题。今天花时间把生成改成自动的了。</p>
<p>
	&nbsp;</p>
<p>
	生成CSS的函数是在source\function\cache\cache_styles.php文件的，调用是通过</p>
<p>
	&nbsp;</p>
<div>
	<pre>
require_once libfile(&#39;function/cache&#39;);
updatecache(&#39;styles&#39;);</pre>
</div>
<div>
	&nbsp;</div>
<div>
	另外增加了MD5校验，不是每次都要重新生成缓存滴，只有在有CSS文件被改后才....</div>
<div>
	&nbsp;</div>
<div>
	现在说下改动的地方</div>
<div>
	修改source\function\function_core.php文件</div>
<div>
	在template函数内部增加</div>
<div>
	<pre>
//检查样式改动
	if($checkfiles = @file(DISCUZ_ROOT.&#39;./data/cache/checkfiles.md5&#39;)) {
	   $checkfiles[0] = trim($checkfiles[0]);
	   $newmd5 = gettplmd5();
	   if ($newmd5!=$checkfiles[0]) {
	   		update_css($newmd5);
	   }
	} else {
		$newmd5 = gettplmd5();
		update_css($newmd5);
	}</pre>
</div>
<p>
	&nbsp;</p>
<p>
	在函数外面增加自定义的函数</p>
<p>
	&nbsp;</p>
<pre>
//文件夹的遍历和MD5
//@author liminggui
function checkfiles($currentdir, $ext = &#39;&#39;, $sub = 1, $skip = &#39;&#39;) {
	global $md5data;
	$dir = @opendir(DISCUZ_ROOT.&quot;./&quot;.$currentdir);
	$exts = &#39;/(&#39;.$ext.&#39;)$/i&#39;;
	$skips = explode(&#39;,&#39;, $skip);

	while($entry = @readdir($dir)) {
		$file = $currentdir.$entry;
		if($entry != &#39;.&#39; &amp;&amp; $entry != &#39;..&#39; &amp;&amp; (($ext &amp;&amp; preg_match($exts, $entry) || !$ext) || $sub &amp;&amp; is_dir(DISCUZ_ROOT.&quot;./&quot;.$file)) &amp;&amp; !in_array($entry, $skips)) {
			if($sub &amp;&amp; is_dir(DISCUZ_ROOT.&quot;./&quot;.$file)) {
				checkfiles($file.&#39;/&#39;, $ext, $sub, $skip);
			} else {
				if(is_dir(DISCUZ_ROOT.&quot;./&quot;.$file)) {
					$md5data[$file] = md5(DISCUZ_ROOT.&quot;./&quot;.$file);
				} else {
					$md5data[$file] = md5_file(DISCUZ_ROOT.&quot;./&quot;.$file);
				}
			}
		}
	}
}
//模板和样式的MD5
//@author liminggui
function gettplmd5() {
	global $md5data;
	
	$md5data = array();
	checkfiles(&#39;template/2020star/common/&#39;, &#39;\.css&#39;, 1,&#39;.svn&#39;);
	$newmd5 = md5(serialize($md5data));
	return $newmd5;
}
//更新CSS
function update_css($newmd5)
{
	require_once libfile(&#39;function/cache&#39;);
	updatecache(&#39;styles&#39;);
	file_put_contents(DISCUZ_ROOT.&#39;./data/cache/checkfiles.md5&#39;,$newmd5);
}</pre>
<p>
	&nbsp;</p>
]]></description>
			<link>http://blog.linuxphp.org/archives/1525/</link>
			<category domain="http://blog.linuxphp.org/develop/">开发技术</category>
			<category domain="http://blog.linuxphp.org/tag/css/">css</category>
			<category domain="http://blog.linuxphp.org/tag/discuz/">discuz</category>
			<pubDate>Mon, 23 Apr 2012 18:13:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1524/</link>
			<guid>http://blog.linuxphp.org/archives/1524/</guid>
			<title>Android开发打包apk程序</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	&nbsp;</p>
<div>
	1.鼠标右击需要打包的程序,选择&quot;Android Tools&quot;&rarr;选择&quot;Export Signed Application Package...&quot;</div>
<div>
	2.选择需要打包的程序(推荐默认),点击&quot;Next&quot;</div>
<div>
	3.新建证书库,选择&quot;Create new keystore&quot;,填入&quot;Location&quot;(证书库存放位置),&quot;Password&quot;(证书库密码),&quot;Confirm&quot;(确认密码),点击&quot;Next</div>
<div>
	4.填写证书信息,填入&quot;Alias&quot;(证书的名字),&quot;Password&quot;(证书的密码),&quot;Confirm&quot;(确认密码),&quot;Validity&quot;(证书的有效年份,在1-1000之间),填写完整信息后点击&rdquo;Next&rdquo;</div>
<div>
	5.单击&quot;Browse&hellip;&quot;按钮，选择文件保存的位置，单击&quot;Finish&quot;按钮，打包完成。</div>
<div>
	&nbsp;</div>
<p><strong><a title="打包apk程序.docx" href="http://blog.linuxphp.org/attachment.php?id=443" target="_blank">打包apk程序.docx</a></strong> (881.07 K, 下载次数:4, 上传时间:Sat, 21 Apr 2012 10:41:12 +0000)</p>]]></description>
			<link>http://blog.linuxphp.org/archives/1524/</link>
			<category domain="http://blog.linuxphp.org/develop/">开发技术</category>
			<category domain="http://blog.linuxphp.org/tag/android/">android</category>
			<comments>http://blog.linuxphp.org/archives/1524/#comments</comments>
			<pubDate>Sat, 21 Apr 2012 10:34:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1523/</link>
			<guid>http://blog.linuxphp.org/archives/1523/</guid>
			<title>Android开发入门hello world!</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	&nbsp;</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	一、安装JDK（Java Development Kit）</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	1、安装JDK版本1.5或者1.6均可</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	2、下载地址：</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	<a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(90, 90, 90); " target="_blank">http://www.oracle.com/technetwork/java/javase/downloads/index.html</a></p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	打开该页面后，关于Java软件版本较多，第一次接触Java先不用管那么多，直接找到中间的JDK，点击后进入下载页面，注意选择对应版本链接（本文选择Windows环境包，类似jdk-6u22-windows-i586.exe酱紫的）。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	或：<a href="http://blog.linuxphp.org/archives/1513/">http://blog.linuxphp.org/archives/1513/</a></p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	2、下载后，默认路径安装。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	3、设置好环境变量后,单击&ldquo;开始&rdquo;&mdash;&gt;&ldquo;运行&rdquo;&mdash;&gt;输入：cmd命令，在CMD窗口中输入：javac看是否有帮助信息输出。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	4、上一步如果该命令未执行成功，可能是PATCH路径问题，可在&ldquo;系统属性&rdquo;&mdash;&mdash;&ldquo;环境变量&rdquo;的PATH里增加，;C:\Program Files\Java\jdk1.6.0_22\bin后再次尝试。</p>
<h3 style="margin-top: 15px; margin-right: auto; margin-bottom: 2px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	二、安装Eclipse，目前最新版本为3.6</h3>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	1、下载地址：</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	<a href="http://www.eclipse.org/downloads/" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(90, 90, 90); " target="_blank">http://www.eclipse.org/downloads/</a></p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	2、这个页面打开也有点晕，太多下载选项了，正如上篇文章介绍的，Eclipse由于设计架构的开放性，丰富的插件支持，已经支持很多种语言开发，本文将要使用Java开发，所以选择Eclipse IDE for Java Developers、Pulsar for Mobile Developers或Eclipse IDE for Java EE Developers都可以，至于它们之间的功能区别，</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	3、下载完成后，直接解压到C盘根目录或Program Files目录下。</p>
<h3 style="margin-top: 15px; margin-right: auto; margin-bottom: 2px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	三、安装Android SDK</h3>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	1、下载android sdk，地址如下：</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	<a href="http://androidappdocs.appspot.com/sdk/index.html" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(90, 90, 90); " target="_blank">http://androidappdocs.appspot.com/sdk/index.html</a>（该地址已悲剧）</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	<a href="http://developer.android.com/sdk/index.html" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(90, 90, 90); " target="_blank">http://developer.android.com/sdk/index.html</a></p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	Windows平台选择for windows包，linux平台选择for linux包，版本为SDK 2.1，压缩包类似android-sdk_r06-windows.zip这样。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	2、下载后解压到C:\Program Files\android-sdk-windows。</p>
<h3 style="margin-top: 15px; margin-right: auto; margin-bottom: 2px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	四、配置环境</h3>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	配置涉及两个方面：</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 45px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; list-style: inherit; ">
		安装ADT</li>
	<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; list-style: inherit; ">
		配置SDK</li>
</ul>
<h4 style="margin-top: 15px; margin-right: auto; margin-bottom: 2px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 13px; color: rgb(51, 51, 51); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	4.1、安装ADT （Android Development Tools）</h4>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	1、启动Eclipse后，选择菜单Help-&gt;Install New Software</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	2、在弹出窗口中，点击Add按钮</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	Name随便填写（比如Android）</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	Location一栏填写（ADT plus-in网址）https://dl-ssl.google.com/android/eclipse/ 点击OK</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	3、等待在线更新可用列表，然后在下面的列表框中Developer Tools选择并安装Android DDMS（Android Dalvik Debug Moniter Server）和Android Development Tools（ADT）</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	4、选择Next后，接受安装协议，点击Finish，并等待安装完成。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	5、完成后会提示重启Eclipse(点击Restart Now)。</p>
<h4 style="margin-top: 15px; margin-right: auto; margin-bottom: 2px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 13px; color: rgb(51, 51, 51); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	4.2、配置SDK</h4>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	1、点击Eclipse菜单，Windows-&gt;Preferences，然后点击左侧的Android设置项。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	2、在右侧的SDK Location里填入我们上文解压的SDK目录C:\Program Files\android-sdk-windows，点击确定（或在SDK Location上单击&ldquo;Browse&hellip;&rdquo;，选择刚才解压完的Android SDK文件夹所在目录）。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	3、点击菜单Window-&gt;Android SDK and AVD Manager。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	4、在弹出窗口中，点击Update All按钮（或点击左侧的Available package），会弹出可选的程序包版本。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	5、安装以下几个即可：</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	Android SDK Tools, revision x</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	Android SDK Platform-tools, revision x</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	Documentation for Android SDK, API xx, revision x</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	SDK Platform Android x.x, API x, revision x</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	Samples for SDK API x, revision x</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	Android Compatibility package, revision x</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	(版本如何选择？请参照自己将要编译的平台版本（装错也没关系，回头写程序编译会自动提示API版本不匹配等错误，再次进来安装亦可），其它不需要的选择Reject,设置完成后，点击Install并等待安装完成，安装有点慢请耐心等待，安装完成选择Restart ADB，关闭安装窗口)</p>
<h4 style="margin-top: 15px; margin-right: auto; margin-bottom: 2px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 13px; color: rgb(51, 51, 51); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	4.3、配置虚拟机</h4>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	1、点击菜单Window-&gt;Android SDK and AVD Manager。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	2、点击左侧的Virtual Devices，新建AVD（Android Virtual Devices = AVD，Android虚拟设备）。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	3、点击&ldquo;New...&rdquo;按钮,弹出&ldquo;Create new Android Virtual Device(AVD)&rdquo;对话框。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	4、在Name中输入（只是个标识而已）：Android-AVD，Target中选择（这个API版本要选对，跟上文对应）：Android 2.2 - API Level 8。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	5、Skin里Build-in屏幕大小建议选的小一点，不要默认，比如WQVGA400，否则太大了，笔记本可能会满屏高度满屏导致不好操作。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	6、其它选项按照默认即可（后续仍可以随时修改，点击右侧的Edit按钮），点击&ldquo;Create AVD&ldquo;按钮即可。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	7、可以点击右侧的Start...进行测试，弹出窗口中点击Launch启动虚拟机（后续我们运行是使用eclipse里设置自动调用），AVD加载很慢，请耐心等待。</p>
<h3 style="margin-top: 15px; margin-right: auto; margin-bottom: 2px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	五、创建Android Project</h3>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	1、点击Eclipse菜单File-&gt;New-&gt;Other，如下图：</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; text-align: center; ">
	<img alt="" src="/attachments/date_201204/7d250288014c7b50.jpg" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; " title="" /></p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	选择Android Project，如下图：</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; text-align: center; ">
	<img alt="" src="/attachments/date_201204/7d250288014c7b51.jpg" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; " title="" /></p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	上图创建Android工程时，必须仔细填写，确保不要出错，关键点如下：</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 45px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; list-style: inherit; ">
		ProjectName :项目所在的文件夹名称</li>
	<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; list-style: inherit; ">
		Application Name： 应用程序名（如果是放在主菜单下，会显示在手机的主菜单列表中和选中时的标题上 ）</li>
	<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; list-style: inherit; ">
		Package Name要最好按照Android上程序目录结构样式进行起名，比如com.android.hello，实际创建效果如下图（注意图中的箭头所示）。</li>
	<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; list-style: inherit; ">
		Create Activity</li>
	<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; list-style: inherit; ">
		Min SDK Version最小的SDK版本，为整数。</li>
</ul>
<h3 style="margin-top: 15px; margin-right: auto; margin-bottom: 2px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	六、编写程序并编译</h3>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	实际上创建完成的工程，默认只是个空框架，可以直接编译执行，如下图：</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; text-align: center; ">
	<img alt="" src="/attachments/date_201204/7d250288014c7b52.jpg" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; width: 520px; cursor: pointer; " title="" /></p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	工程的视图显示，可点击Window-&gt;Show View，常用的两个：Navigator(如下图，参照目录结构显示)和Package Explorer（参照Package组织方式显示）。</p>
<h3 style="margin-top: 15px; margin-right: auto; margin-bottom: 2px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	七、AVD虚拟机测试</h3>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	&nbsp;1、点击工具栏中的Run As...运行箭头按钮，弹出对话框，如下图，如果您已经参照上文创建过一个AVD设备，那么这里直接双击Android Application运行，Eclipse会自动创建一个Andriod运行配置。</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; text-align: center; ">
	<img alt="" src="/attachments/date_201204/7d250288014c7b53.jpg" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; " title="" /></p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	当然按照标准操作步骤，建议你先点击Run As右侧的向下箭头，打开配置窗口，进行手动配置：</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; text-align: center; ">
	<img alt="" src="/attachments/date_201204/7d250288014c7b54.jpg" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; width: 520px; cursor: pointer; " title="" /></p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	&nbsp;</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; text-align: center; ">
	<img alt="" src="/attachments/date_201204/7d250288014c7b55.jpg" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; width: 520px; cursor: pointer; " title="" /></p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	&nbsp;如上图，第一次执行配置，可双击左侧Android Application项，会自动创建一个配置，然后进行手动配置，配置内容包括：</p>
<ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 45px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; word-break: break-all; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; list-style: inherit; ">
		Android选项卡里选择对应的工程</li>
	<li style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; list-style: inherit; ">
		Target选项卡里设置将要下载运行目标，默认就是使用上文创建的Android-AVD，如果需要下载到真机测试，请参天缘稍后文章。</li>
</ul>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	2、运行结果如下图：</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; text-align: center; ">
	<img alt="" src="/attachments/date_201204/7d250288014c7b56.jpg" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; width: 520px; cursor: pointer; " title="" /></p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	拉开左侧的解锁条，运行效果如下：</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; text-align: center; ">
	<img alt="" src="/attachments/date_201204/7d250288014c7b57.jpg" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; width: 520px; cursor: pointer; " title="" /></p>
<h3 style="margin-top: 15px; margin-right: auto; margin-bottom: 2px; margin-left: auto; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	八、配置完成</h3>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	限于篇幅，部分插图没有上传上来，否则载入速度太慢了，如果还有不清楚的，大家尽可留言</p>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	&nbsp;</p>
<div>
	&nbsp;</div>
<div>
	<strong>转自</strong></div>
<div>
	http://flysnow.iteye.com/blog/810785</div>
<div>
	http://www.cnblogs.com/DavidSmith/archive/2011/10/26/2225320.html</div>
<div>
	&nbsp;</div>
<p style="margin-top: 5px; margin-bottom: 5px; font-size: 14px; color: rgb(64, 50, 38); font-family: verdana, 'ms song', 宋体, Arial, 微软雅黑, Helvetica, sans-serif; line-height: 24px; ">
	&nbsp;</p>
<div>
	<strong>常见错误</strong></div>
<div>
	1.如果你下载了 64位的 Eclipse，但电脑上的 JDK 是 32 位的，那可能启动 Eclipse 就会报错：Failed to load the JNI shared library jvm.dll 错误。</div>
<div>
	&nbsp;</div>
<div>
	2.用Eclipse安装Android开发工具包ADT时报的错误 &#39;org.eclipse.ui 3.6.2&#39; but it could not be found</div>
<div>
	你的eclipse版本太低，要3.6.2以上。</div>
<div>
	&nbsp;</div>
<div>
	&nbsp;</div>
]]></description>
			<link>http://blog.linuxphp.org/archives/1523/</link>
			<category domain="http://blog.linuxphp.org/develop/">开发技术</category>
			<category domain="http://blog.linuxphp.org/tag/android/">android</category>
			<pubDate>Fri, 20 Apr 2012 18:28:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1522/</link>
			<guid>http://blog.linuxphp.org/archives/1522/</guid>
			<title>jq select input常见操作</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	1.下拉框</p>
<p>
	移除<span style="line-height: normal; ">option</span></p>
<div>
	<pre>
$(&quot;#ID option&quot;).each(function(){
 if($(this).val() == 111){
  $(this).remove();
 }
});</pre>
</div>
<p style="line-height: normal; ">
	添加option</p>
<div>
	<pre>
$(&quot;&lt;option value=&#39;111&#39;&gt;UPS Ground&lt;/option&gt;&quot;).appendTo($(&quot;#ID&quot;));</pre>
</div>
<p style="line-height: normal; ">
	取得下拉选单的选取值</p>
<div>
	<pre>
$(#testSelect option:selected&#39;).text();
$(&quot;#testSelect&quot;).find(&#39;option:selected&#39;).text();
$(&quot;#testSelect&quot;).val();</pre>
</div>
<p style="line-height: normal; ">
	根据option的值选中下拉框</p>
<div>
	<pre>
$(&#39;#testSelect&#39;).val(&#39;111&#39;);</pre>
</div>
<p style="line-height: normal; ">
	&nbsp;</p>
<p style="line-height: normal; ">
	&nbsp;</p>
<p style="line-height: normal; ">
	select下拉框的第二个元素为当前选中值</p>
<div>
	<pre>
$(&#39;#select_id&#39;)[0].selectedIndex = 1;</pre>
</div>
<p style="line-height: normal; ">
	2,单选框:</p>
<div>
	<pre>
$(&quot;input[@type=radio][@checked]&quot;).val(); //得到单选框的选中项的值(注意中间没有空格)
$(&quot;input[@type=radio][@value=2]&quot;).attr(&quot;checked&quot;,&#39;checked&#39;); //设置单选框value=2的为选中状态.(注意中间没有空格)</pre>
</div>
<p style="line-height: normal; ">
	&nbsp;</p>
<p style="line-height: normal; ">
	&nbsp;radio单选组的第二个元素为当前选中值</p>
<div>
	<pre>
$(&#39;input[@name=items]&#39;).get(1).checked = true;</pre>
</div>
<p style="line-height: normal; ">
	&nbsp;</p>
<p style="line-height: normal; ">
	3,复选框:</p>
<div>
	<pre>
$(&quot;input[@type=checkbox][@checked]&quot;).val(); //得到复选框的选中的第一项的值
$(&quot;input[@type=checkbox][@checked]&quot;).each(function() { //由于复选框一般选中的是多个,所以可以循环输出
alert($(this).val());
});
 
$(&quot;#chk1&quot;).attr(&quot;checked&quot;,&#39;&#39;);//不打勾
$(&quot;#chk2&quot;).attr(&quot;checked&quot;,true);// 打勾
if($(&quot;#chk1&quot;).attr(&#39;checked&#39;)==undefined){} //判断是否已经打勾</pre>
</div>
<p style="line-height: normal; ">
	&nbsp;</p>
<p style="line-height: normal; ">
	转：<a href="http://hi.baidu.com/chenxl_52/blog/item/2d25e6dd5b28bcff76c6383e.html">http://hi.baidu.com/chenxl_52/blog/item/2d25e6dd5b28bcff76c6383e.html</a></p>
]]></description>
			<link>http://blog.linuxphp.org/archives/1522/</link>
			<category domain="http://blog.linuxphp.org/develop/">开发技术</category>
			<pubDate>Thu, 19 Apr 2012 16:34:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1521/</link>
			<guid>http://blog.linuxphp.org/archives/1521/</guid>
			<title>malloc的内存用free释放后为何系统回收不了</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	要解释这个问题首先要了解Linux进程使用内存的基本流程，进程的堆并不是直接建立在Linux的内核的内存分配策略上的，而是建立在glibc的堆管理策略上的（也就是glibc的动态内存分配策略上），堆的管理是由glibc进行的。&nbsp;所以我们调用free对malloc得到的内存进行释放的时候，并不是直接释放给操作系统，而是还给了glibc的堆管理实体，而glibc会在把实际的物理内存归还给系统的策略上做一些优化，以便优化用户任务的动态内存分配过程。</p>
<p>
	&nbsp;</p>
<div>
	glibc维护了不止一个不定长的内存块链表，而是好几个，每一个这种链表负责一个大小范围，这种做法有效减少了分配大内存时的遍历开销，类似于哈希的方式，将很大的范围的数据散列到有限的几个小的范围内而不是所有数据都放在一起，虽然最终还是要在小的范围内查找，但是最起码省去了很多的开销，如果只有一个不定长链表那么就要全部遍历，如果分成3个，就省去了2/3的开销，总之这个策略十分类似于散列。glibc另外的策略就是不止维护一类空闲链表，而是另外再维护一个缓冲链表和一个高速缓冲链表，在分配的时候首先在高速缓存中查找，失败之后再在空闲链表查找，如果找到的内存块比较大，那么将切割之后的剩余内存块插入到缓存链表，如果空闲链表查找失败那么就往缓存链表中查找，这么查找有什么依据吗？实际上是有的，正是这个方式让glibc有了自己的策略。</div>
<div>
	&nbsp;</div>
<div>
	&nbsp;</div>
<div>
	<div>
		在free的时候如果能合并在堆顶，也就是能和堆顶的空闲元素合并，那么就合并，因为堆的缩减仅仅在堆顶的空闲元素达到一定量的时候才会进行，因此为了尽快将内存归还操作系统，尽量优先考虑堆顶的释放，但是如果不能合并，比如它和堆顶根本就没有相邻，那么如果该释放的块大小小于80字节，那么就直接将之挂在高速缓存中，为了防止别的块和它合并所以并不更改使用位，这里可以看到，glibc实际上为小于80字节的小内存块维护了一个高速的内存池，如果有小块内存需求，直接从此池中拿走一个即可，只需要从高速缓存摘除之并不需要修改使用位，因为高速缓存中的元素的使用位均为1，这个高速缓存在有大内存块分配需求并且几个分配策略都失败的时候会被回收，回收进空闲链表的过程涉及到相邻块的合并，合并之后就有可能满足稍微大一些的内存分配需求，这里为何将界限定位为80个字节呢？实际上是一个经验值，那么介于80字节和128k字节之间的内存块在释放的时候要将使用位设置为0，然后试图和相邻块合并，然后挂入缓存链表。</div>
	<div>
		&nbsp;</div>
</div>
<p>
	&nbsp;</p>
<div>
	还有一个策略就是堆顶的特殊处理，堆顶不放在任何一个链表中，对它进行照顾就是因为为了更有效的将内存退还操作系统，因为堆的压缩只能从堆顶开始，操作系统只知道给了一个进程虚拟内存连续的一大块叫做堆的内存，别的什么也不知道，应用程序归还的时候同样需要连续的从堆顶归还而不能仅仅归还系统，归根结底要对堆顶进行特殊的处理。</div>
<div>
	&nbsp;</div>
<div>
	原文：</div>
<div>
	<a href="http://hi.baidu.com/hiei1125/blog/item/56d6d5a29322c2a3caefd023.html">http://hi.baidu.com/hiei1125/blog/item/56d6d5a29322c2a3caefd023.html</a></div>
<div>
	<a href="http://blog.loudly.me/2010/02/glibc_malloc_memory_overhead/">http://blog.loudly.me/2010/02/glibc_malloc_memory_overhead/</a></div>
<div>
	<a href="http://www.sooset.com/q_90caa1d6daf6918c8017804fe5df0dc7.html">http://www.sooset.com/q_90caa1d6daf6918c8017804fe5df0dc7.html</a></div>
]]></description>
			<link>http://blog.linuxphp.org/archives/1521/</link>
			<category domain="http://blog.linuxphp.org/develop/">开发技术</category>
			<category domain="http://blog.linuxphp.org/tag/malloc/">malloc</category>
			<pubDate>Mon, 16 Apr 2012 22:48:00 +0000</pubDate>
		</item>
		<item>
			<link>http://blog.linuxphp.org/archives/1520/</link>
			<guid>http://blog.linuxphp.org/archives/1520/</guid>
			<title>Cannot assign requested address</title>
			<author>linuxphp@qq.com(keminar)</author>
			<description><![CDATA[贵贵的博客 ( http://blog.linuxphp.org/ ) : <p>
	对kesqs进行并发测试，出现错误Cannot assign requested address</p>
<p>
	原因：</p>
<p>
	&nbsp;</p>
<div>
	客户端频繁的连服务器，由于每次连接都在很短的时间内结束，导致很多的TIME_WAIT，以至于用光了可用的端 口号，所以新的连接没办法绑定端口，即&ldquo;Cannot assign requested address&rdquo;。是客户端的问题不是服务器端的问题。通过netstat，的确看到很多TIME_WAIT状态的连接。</div>
<div>
	解决办法：</div>
<div>
	执行命令修改如下2个内核参数 &nbsp;</div>
<div>
	sysctl -w net.ipv4.tcp_timestamps=1 &nbsp;开启对于TCP时间戳的支持,若该项设置为0，则下面一项设置不起作用</div>
<div>
	sysctl -w net.ipv4.tcp_tw_recycle=1 &nbsp;表示开启TCP连接中TIME-WAIT sockets的快速回收</div>
<div>
	&nbsp;</div>
<div>
	参考：<a href="http://blog.sina.com.cn/s/blog_65d069c60100zzxv.html">http://blog.sina.com.cn/s/blog_65d069c60100zzxv.html</a></div>
]]></description>
			<link>http://blog.linuxphp.org/archives/1520/</link>
			<category domain="http://blog.linuxphp.org/develop/">开发技术</category>
			<category domain="http://blog.linuxphp.org/tag/kesqs/">kesqs</category>
			<pubDate>Sun, 15 Apr 2012 20:39:00 +0000</pubDate>
		</item>
	</channel>
</rss>

