<?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>一亩三分地 &#187; 技术相关</title>
	<atom:link href="http://blog.25q.net/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.25q.net</link>
	<description>种瓜得瓜，种豆得豆；一份耕耘，一份收获</description>
	<lastBuildDate>Mon, 12 Jul 2010 20:23:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>解决xml乱码问题</title>
		<link>http://blog.25q.net/2010/07/13/%e8%a7%a3%e5%86%b3xml%e4%b9%b1%e7%a0%81%e9%97%ae%e9%a2%98/</link>
		<comments>http://blog.25q.net/2010/07/13/%e8%a7%a3%e5%86%b3xml%e4%b9%b1%e7%a0%81%e9%97%ae%e9%a2%98/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 20:23:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技术相关]]></category>

		<guid isPermaLink="false">http://blog.25q.net/?p=224</guid>
		<description><![CDATA[将xml定义中的不合法字符替换即可.
$txt = preg_replace(&#8220;/[^(\x20-\xD7FF)&#124;(\xE000-\xFFFD)&#124;(\x10000\-\x10FFFF)&#124;\x9&#124;\xA&#124;\xD]/&#8221;,&#8221;",$txt);
]]></description>
		<wfw:commentRss>http://blog.25q.net/2010/07/13/%e8%a7%a3%e5%86%b3xml%e4%b9%b1%e7%a0%81%e9%97%ae%e9%a2%98/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mac 10.6.4的alc888和hd4850驱动</title>
		<link>http://blog.25q.net/2010/07/09/mac-10-6-4%e7%9a%84alc888%e5%92%8chd4850%e9%a9%b1%e5%8a%a8/</link>
		<comments>http://blog.25q.net/2010/07/09/mac-10-6-4%e7%9a%84alc888%e5%92%8chd4850%e9%a9%b1%e5%8a%a8/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 10:09:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技术相关]]></category>
		<category><![CDATA[生活工作]]></category>

		<guid isPermaLink="false">http://blog.25q.net/?p=219</guid>
		<description><![CDATA[本人机器是dell 530s.显卡是4850,id是 0&#215;94421002的声卡是alc888,id是0&#215;10ec0888
ALC888 驱动
x64_audio_for_ALC888
4850显卡
4800
]]></description>
		<wfw:commentRss>http://blog.25q.net/2010/07/09/mac-10-6-4%e7%9a%84alc888%e5%92%8chd4850%e9%a9%b1%e5%8a%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vsftpd 530 login error</title>
		<link>http://blog.25q.net/2010/07/08/vsftpd-530-login-error/</link>
		<comments>http://blog.25q.net/2010/07/08/vsftpd-530-login-error/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 14:41:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技术相关]]></category>

		<guid isPermaLink="false">http://blog.25q.net/?p=217</guid>
		<description><![CDATA[/etc/shells权限为644，对于/etc/ftpusers同样限制权限为644，设置为 777 就会导致 ftp失败
]]></description>
		<wfw:commentRss>http://blog.25q.net/2010/07/08/vsftpd-530-login-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP多进程 win不可用</title>
		<link>http://blog.25q.net/2010/06/30/php%e5%a4%9a%e8%bf%9b%e7%a8%8b-win%e4%b8%8d%e5%8f%af%e7%94%a8/</link>
		<comments>http://blog.25q.net/2010/06/30/php%e5%a4%9a%e8%bf%9b%e7%a8%8b-win%e4%b8%8d%e5%8f%af%e7%94%a8/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 06:33:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技术相关]]></category>

		<guid isPermaLink="false">http://my.25q.net/?p=215</guid>
		<description><![CDATA[#! /usr/bin/php
&#60;?php
$array = array(5,6,7,8,9,11,12,13,14,15);
foreach($array as $rpid){
        $pid[$i] = pcntl_fork();//这个值在父进程中大于0,在子进程中为0,返回-1代表fork失败
        if($pid[$i])
        {
                #pcntl_wait($status);  
                $id = getmypid();
                echo &#8220;parent process,pid {$id}, child pid {$pid[$i]}\n&#8221;;
        }
        else
        {
                echo &#8217;start parse &#8216;.$rpid.&#8221;\n&#8221;;
                include(&#8220;test3.php&#8221;);
                //sleep(1);
                echo &#8216;end parse &#8216;.$rpid.&#8221;\n&#8221;;
                exit();//由于是复制了一份父进程的代码.所以需要使用pid值来判断将哪些代码在子进程中运行,记得这个exit,否则可能永远fork下去.
        }
}
?&#62;
]]></description>
		<wfw:commentRss>http://blog.25q.net/2010/06/30/php%e5%a4%9a%e8%bf%9b%e7%a8%8b-win%e4%b8%8d%e5%8f%af%e7%94%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php 编译oci的时候出现LD_LIBRARY_PATH错误</title>
		<link>http://blog.25q.net/2010/06/11/php-%e7%bc%96%e8%af%91oci%e7%9a%84%e6%97%b6%e5%80%99%e5%87%ba%e7%8e%b0ld_library_path%e9%94%99%e8%af%af/</link>
		<comments>http://blog.25q.net/2010/06/11/php-%e7%bc%96%e8%af%91oci%e7%9a%84%e6%97%b6%e5%80%99%e5%87%ba%e7%8e%b0ld_library_path%e9%94%99%e8%af%af/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 07:44:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技术相关]]></category>

		<guid isPermaLink="false">http://my.25q.net/?p=205</guid>
		<description><![CDATA[错误信息:
please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries
解决办法:如果配置过程没有问题,LD_LIBRARY_PATH在/etc/profile中也有正确的路径则检查SELINUX是否开启,如果开启,则操作:SELINUX=disabled,重启
即可解决问题
如不想重启,想立即看到结果则运行setenforce 0
]]></description>
		<wfw:commentRss>http://blog.25q.net/2010/06/11/php-%e7%bc%96%e8%af%91oci%e7%9a%84%e6%97%b6%e5%80%99%e5%87%ba%e7%8e%b0ld_library_path%e9%94%99%e8%af%af/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP使用CURL上传文件的函数</title>
		<link>http://blog.25q.net/2010/06/06/php%e4%bd%bf%e7%94%a8curl%e4%b8%8a%e4%bc%a0%e6%96%87%e4%bb%b6%e7%9a%84%e5%87%bd%e6%95%b0/</link>
		<comments>http://blog.25q.net/2010/06/06/php%e4%bd%bf%e7%94%a8curl%e4%b8%8a%e4%bc%a0%e6%96%87%e4%bb%b6%e7%9a%84%e5%87%bd%e6%95%b0/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 09:13:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技术相关]]></category>

		<guid isPermaLink="false">http://my.25q.net/?p=202</guid>
		<description><![CDATA[一般的文件上传是通过html表单进行的，通过CURL可以不经过浏览器，直接在服务器端模拟进行表单提交，完成POST数据、文件上传等功能。需要被上传的文件需要在文件名前加上“@”以示区分，并且，文件名需要是完整路径。
以下php函数来模拟html表单的提交数据：
function uploadByCURL($post_data,$post_url){
	$curl = curl_init();
	curl_setopt($curl, CURLOPT_URL, $post_url);
	curl_setopt($curl, CURLOPT_POST, 1 );
	curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
	curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($curl,CURLOPT_USERAGENT,"Mozilla/4.0");
	$result = curl_exec($curl);
	$error = curl_error($curl);
	return $error ? $error : $result;
}
函数的使用：
$url = "http://127.0.0.1/app.php";
$data = array(
	"username" =&#62; $username,
	"password"  =&#62; $password,
	"file1"  =&#62; "@".realpath("photo1.jpg"),
	"file2"  =&#62; "@".realpath("file2.xml")
);
print_r(uploadByCURL($data,$url));
http://flashphp.org/blog/
]]></description>
		<wfw:commentRss>http://blog.25q.net/2010/06/06/php%e4%bd%bf%e7%94%a8curl%e4%b8%8a%e4%bc%a0%e6%96%87%e4%bb%b6%e7%9a%84%e5%87%bd%e6%95%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL索引分析和优化（转）</title>
		<link>http://blog.25q.net/2010/06/04/mysql%e7%b4%a2%e5%bc%95%e5%88%86%e6%9e%90%e5%92%8c%e4%bc%98%e5%8c%96%ef%bc%88%e8%bd%ac%ef%bc%89/</link>
		<comments>http://blog.25q.net/2010/06/04/mysql%e7%b4%a2%e5%bc%95%e5%88%86%e6%9e%90%e5%92%8c%e4%bc%98%e5%8c%96%ef%bc%88%e8%bd%ac%ef%bc%89/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 09:26:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技术相关]]></category>

		<guid isPermaLink="false">http://my.25q.net/?p=199</guid>
		<description><![CDATA[MySQL索引分析和优化（转）
索引用来快速地寻找那些具有特定值的记录，所有MySQL索引都以B-树的形式保存。如果没有索引，执行查询时MySQL必须从第一个记录开始扫描整个表的所有记 录，直至找到符合要求的记录。表里面的记录数量越多，这个操作的代价就越高。如 果作为搜索条件的列上已经创建了索引，MySQL无需扫描任何记录即可迅速得到目标记录所在的位置。如果表有1000个记录，通过索引查找 记录至少要比顺序扫描记录快100倍,个人感觉快100倍有点夸张。
假设我们创建了一 个名为people的表
CREATE TABLE people (
peopleid  SMALLINT NOT NULL,
name CHAR(50) NOT NULL
);
创建完后，我 们随机把1000个不同name值插入到people表。
可以看到，在数据文件中name列没有任何明确的次序。如果我们创建了name列的索 引，MySQL将在索引中排序name列。
对于索引中的每一 项，MySQL在内部为它保存一个数据文件中实际记录所在位置的“指针”。因此，如果我们要查找name等于“Mike”记录的  peopleid（SQL命令为“SELECT peopleid  FROM people WHERE name=&#8217;Mike&#8217;;”），MySQL能够在name的索引中查找“Mike”值，然后直接转到 数据文件中相应的行，准确地返回该行的  peopleid（999）。在这个过程中，MySQL只需处理一个行就可以返回结果。如果没有“name”列的索引，　MySQL要扫描数据文件中的所 有记录，即1000个记录！显然，需要MySQL处理的记录数量越少，则它完成任务的速度就越快。

索引的类型
普通索引 
这是最基本的索引类型，而且它没 有唯一性之类的限制。普通索引可以通过以下几种方式创建

创建索引，例如CREATE  INDEX &#60;索引的名字&#62;; ON tablename (列的列表);
修改表，例如ALTER TABLE tablename  ADD INDEX [索引的名字] (列的列表);
创建表的时候指定索引，例如CREATE TABLE tablename (  [...], INDEX [索引的名字] (列的列表) );
唯一性索引 
这 [...]]]></description>
		<wfw:commentRss>http://blog.25q.net/2010/06/04/mysql%e7%b4%a2%e5%bc%95%e5%88%86%e6%9e%90%e5%92%8c%e4%bc%98%e5%8c%96%ef%bc%88%e8%bd%ac%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>正则表达式收集</title>
		<link>http://blog.25q.net/2010/06/04/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e6%94%b6%e9%9b%86/</link>
		<comments>http://blog.25q.net/2010/06/04/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e6%94%b6%e9%9b%86/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 09:24:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技术相关]]></category>

		<guid isPermaLink="false">http://my.25q.net/?p=196</guid>
		<description><![CDATA[字符描述：  \：将下一个字符标记为特殊字符或字面值。例如&#8221;n&#8221;与字符&#8221;n&#8221;匹配。&#8221;\n&#8221;与换行符匹配。序列&#8221;\\&#8221;与&#8221;\&#8221;匹配，&#8221;\(&#8220;与&#8221;(&#8220;匹配。
^  ：匹配输入的开始位置。
$ ：匹配输入的结尾。
* ：匹配前一个字符零次或几次。例如，&#8221;zo*&#8221;可以匹配&#8221;z&#8221;、&#8221;zoo&#8221;。
+  ：匹配前一个字符一次或多次。例如，&#8221;zo+&#8221;可以匹配&#8221;zoo&#8221;,但不匹配&#8221;z&#8221;。
?  ：匹配前一个字符零次或一次。例如，&#8221;a?ve?&#8221;可以匹配&#8221;never&#8221;中的&#8221;ve&#8221;。
.： 匹配换行符以外的任何字符。
(pattern) 与模式匹配并记住匹配。匹配的子字符串可以从作为结果的 Matches 集合中使用  Item [0]&#8230;[n]取得。如果要匹配括号字符(和 )，可使用&#8221;\(&#8221; 或 &#8220;\)&#8221;。
x&#124;y：匹配 x 或 y。例如  &#8220;z&#124;food&#8221; 可匹配 &#8220;z&#8221; 或 &#8220;food&#8221;。&#8221;(z&#124;f)ood&#8221; 匹配 &#8220;zoo&#8221; 或 &#8220;food&#8221;。
{n}：n  为非负的整数。匹配恰好n次。例如，&#8221;o{2}&#8221; 不能与 &#8220;Bob 中的 &#8220;o&#8221; 匹配，但是可以与&#8221;foooood&#8221;中的前两个o匹配。
{n,}  ：n  为非负的整数。匹配至少n次。例如，&#8221;o{2,}&#8221;不匹配&#8221;Bob&#8221;中的&#8221;o&#8221;，但是匹配&#8221;foooood&#8221;中所有的o。&#8221;o{1,}&#8221;等价 于&#8221;o+&#8221;。&#8221;o{0,}&#8221;等价于&#8221;o*&#8221;。
{n,m} ：m 和 n 为非负的整数。匹配至少 n 次，至多 m  次。例如，&#8221;o{1,3}&#8221; [...]]]></description>
		<wfw:commentRss>http://blog.25q.net/2010/06/04/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e6%94%b6%e9%9b%86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>utf-8转gb2312函数作用于 javascript(有vb函数,不通用)</title>
		<link>http://blog.25q.net/2010/06/04/utf-8%e8%bd%acgb2312%e5%87%bd%e6%95%b0%e4%bd%9c%e7%94%a8%e4%ba%8e-javascript%e6%9c%89vb%e5%87%bd%e6%95%b0%e4%b8%8d%e9%80%9a%e7%94%a8/</link>
		<comments>http://blog.25q.net/2010/06/04/utf-8%e8%bd%acgb2312%e5%87%bd%e6%95%b0%e4%bd%9c%e7%94%a8%e4%ba%8e-javascript%e6%9c%89vb%e5%87%bd%e6%95%b0%e4%b8%8d%e9%80%9a%e7%94%a8/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 09:22:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技术相关]]></category>

		<guid isPermaLink="false">http://my.25q.net/?p=193</guid>
		<description><![CDATA[function gb2312(key)
{
var r =  &#8220;&#8221;;
for(var i=0;i&#60;key.length;i++)
{
var  t = key.charCodeAt(i);
if(t&#62;=0&#215;4e00  &#124;&#124; t==0&#215;300A &#124;&#124; t==0&#215;300B)
{
try
{
execScript(&#8220;ascCode=hex(asc(\&#8221;"+key.charAt(i)+&#8221;\&#8221;))&#8221;,  &#8220;vbscript&#8221;); r += ascCode.replace(/(.{2})/g, &#8220;%$1&#8243;); }
catch(e)
{}
}
else{r  += escape(key.charAt(i))}
}
return  r;
}
]]></description>
		<wfw:commentRss>http://blog.25q.net/2010/06/04/utf-8%e8%bd%acgb2312%e5%87%bd%e6%95%b0%e4%bd%9c%e7%94%a8%e4%ba%8e-javascript%e6%9c%89vb%e5%87%bd%e6%95%b0%e4%b8%8d%e9%80%9a%e7%94%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>正则表达式模式修正符(/ies)</title>
		<link>http://blog.25q.net/2010/06/04/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e6%a8%a1%e5%bc%8f%e4%bf%ae%e6%ad%a3%e7%ac%a6ies/</link>
		<comments>http://blog.25q.net/2010/06/04/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e6%a8%a1%e5%bc%8f%e4%bf%ae%e6%ad%a3%e7%ac%a6ies/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 09:19:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[技术相关]]></category>

		<guid isPermaLink="false">http://my.25q.net/?p=190</guid>
		<description><![CDATA[模式修正符
模式修正符 &#8212; 解说正则表达式模式中使用的修正符
说明
下面列出了当前在 PCRE  中可能使用的修正符。括号中是这些修正符的内部 PCRE 名。修正符中的空格和换行被忽略，其它字符会导致错误。
i  (PCRE_CASELESS)
如果设定此修正符，模式中的字符将同时匹配大小写字母。
m（PCRE_MULTILINE）
默 认情况下，PCRE  将目标字符串作为单一的一“行”字符所组成的（甚至其中包含有换行符也是如此）。“行起始”元字符（^）仅仅匹配字符串的起始，“行结束”元字符（$）仅 仅匹配字符串的结束，或者最后一个字符是换行符时其前面（除非设定了 D 修正符）。这和 Perl 是一样的。
当设定了此修正符，“行 起始”和“行结束”除了匹配整个字符串开头和结束外，还分别匹配其中的换行符的之后和之前。这和 Perl 的 /m  修正符是等效的。如果目标字符串中没有“\n”字符或者模式中没有 ^ 或 $，则设定此修正符没有任何效果。
s（PCRE_DOTALL）
如 果设定了此修正符，模式中的圆点元字符（.）匹配所有的字符，包括换行符。没有此设定的话，则不包括换行符。这和 Perl 的 /s  修正符是等效的。排除字符类例如 [^a] 总是匹配换行符的，无论是否设定了此修正符。
x（PCRE_EXTENDED）
如果 设定了此修正符，模式中的空白字符除了被转义的或在字符类中的以外完全被忽略，在未转义的字符类之外的 #  以及下一个换行符之间的所有字符，包括两头，也都被忽略。这和 Perl 的 /x  修正符是等效的，使得可以在复杂的模式中加入注释。然而注意，这仅适用于数据字符。空白字符可能永远不会出现于模式中的特殊字符序列，例如引入条件子模式 的序列 (?( 中间。
e
如果设定了此修正符，preg_replace() 在替换字符串中对逆向引用作正常的替换，将其作为  PHP 代码求值，并用其结果来替换所搜索的字符串。
只有 preg_replace() 使用此修正符，其它 PCRE  [...]]]></description>
		<wfw:commentRss>http://blog.25q.net/2010/06/04/%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e6%a8%a1%e5%bc%8f%e4%bf%ae%e6%ad%a3%e7%ac%a6ies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
