<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[Sfan@Live]]></title> 
<description><![CDATA[这也会过去,包括我自己]]></description>
<link>http://www.sfan20.cn/</link>
<language>zh-cn</language>
<generator>www.emlog.net</generator>
<item>
	<title>Nginx rewrite 学习笔记</title>
	<link>http://www.sfan20.cn/ops/114.html</link>
	<description><![CDATA[<ol><li>Nginx Rewrite 指令</li>
<ul><li style="border:0px;font-size:13px;vertical-align:baseline;margin:0px;padding:0px;line-height:16px;">set&nbsp;</li>
<li style="border:0px;font-size:13px;vertical-align:baseline;margin:0px;padding:0px;line-height:16px;">if</li>
<li>break&nbsp;</li>
<li style="border:0px;font-size:13px;vertical-align:baseline;margin:0px;padding:0px;line-height:16px;">return</li>
<li style="border:0px;font-size:13px;vertical-align:baseline;margin:0px;padding:0px;line-height:16px;">rewrite</li>
</ul>
<li><span style="font-size:13px;line-height:16px;">Nginx rewrite 执行顺序</span></li>
<li><span style="font-size:13px;line-height:16px;">Nginx rewrite 示例解析</span></li>
</ol>
<p></p>
<p></p>
<hr />
<p>&nbsp;</p>
<p>Nginx Rewrite 指令&nbsp;</p>
<p>&nbsp;</p>
<p>set指令&nbsp;</p>
<p>语法：set variable value;&nbsp;</p>
<p>默认值：none&nbsp;</p>
<p>作用域：server,location,if&nbsp;</p>
<p>定义一个变量并赋值，值可以是文本，变量或者文本变量混合体。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>if指令</p>
<p>语法：if(condition){...}</p>
<p>默认值：无</p>
<p>作用域：server,location</p>
<p>对给定的条件condition进行判断。如果为真，大括号内的rewrite指令将被执行。</p>
<p>if条件(conditon)可以是如下任何内容:</p>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px;"><p></p>
<ul><li><span style="line-height:1.5;">一个变量名；false如果这个变量是空字符串或者以0开始的字符串；</span></li>
<li><span style="line-height:1.5;">使用= ,!= 比较的一个变量和字符串</span></li>
<li><span style="line-height:1.5;">是用~, ~*与正则表达式匹配的变量，如果这个正则表达式中包含}，;则整个表达式需要用" 或' 包围</span></li>
<li><span style="line-height:1.5;">使用-f ,!-f 检查一个文件是否存在</span></li>
<li><span style="line-height:1.5;">使用-d, !-d 检查一个目录是否存在</span></li>
<li><span style="line-height:1.5;">使用-e,!-e 检查一个文件、目录、符号链接是否存在</span></li>
<li><span style="line-height:1.5;">使用-x,!-x 检查一个文件是否可执行</span></li>
</ul>
<p></p>
</blockquote>
<p>break指令</p>
<p>语法：break;</p>
<p>默认值：无</p>
<p>作用域：server,location,if</p>
<p>停止执行当前虚拟主机的后续rewrite指令集</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>return指令</p>
<p>语法：return code;</p>
<p>return code URL;</p>
<p>return URL;</p>
<p>默认值：无</p>
<p>作用域：server,location,if</p>
<p>停止处理并返回指定状态码(code)给客户端。</p>
<p>非标准状态码444表示关闭连接且不给客户端发响应头。</p>
<p>从0.8.42版本起，return 支持响应URL重定向(对于301，302，303，307），或者文本响应(对于其他状态码).</p>
<p>对于文本或者URL重定向可以包含变量</p>
<p>&nbsp;</p>
<p>rewrite指令</p>
<p>语法：rewrite regex replacement [flag];</p>
<p>默认值：无</p>
<p>作用域：server,location,if</p>
<p>如果一个URI匹配指定的正则表达式regex，URI就按照replacement重写。</p>
<p>rewrite按配置文件中出现的顺序执行。flags标志可以停止继续处理。</p>
<p>如果replacement以"http://"或"https://"开始，将不再继续处理，这个重定向将返回给客户端。</p>
<p>flag可以是如下参数</p>
<p>last 停止处理后续rewrite指令集，然后对当前重写的新URI在rewrite指令集上重新查找。</p>
<p>break 停止处理后续rewrite指令集，并不在重新查找,但是当前location内剩余非rewrite语句和location外的的非rewrite语句可以执行。</p>
<p>redirect 如果replacement不是以http:// 或https://开始，返回302临时重定向</p>
<p>permanent<span style="color:#555555;font-family:Tahoma, Arial, Helvetica, sans-serif;font-size:13px;line-height:20.7999992370605px;background-color:#eeeeee;">&nbsp;</span><span style="line-height:1.5;">返回301永久重定向</span></p>
<p>&nbsp;</p>
<p>Nginx rewrite 执行顺序</p>
<p>1.执行server块的rewrite指令(这里的块指的是server关键字后{}包围的区域，其它xx块类似)</p>
<p>2.执行location匹配</p>
<p>3.执行选定的location中的rewrite指令</p>
<p>如果其中某步URI被重写，则重新循环执行1-3，直到找到真实存在的文件</p>
<p>&nbsp;</p>
<p>如果循环超过10次，则返回500 Internal Server Error错误</p>]]></description>
	<pubDate>Fri, 16 Jan 2015 15:18:15 +0000</pubDate>
	<author>阿圣(Sfan)</author>
	<guid>http://www.sfan20.cn/ops/114.html</guid>

</item>
<item>
	<title>/usr/lib64/python2.6/site-packages/_sqlitecache.so: undefined symbol: g_assertion_message_expr</title>
	<link>http://www.sfan20.cn/ErrorLog/113.html</link>
	<description><![CDATA[<p><span style="line-height:1.5;font-size:16px;"><b>问题:</b></span></p>
<p>&nbsp;</p>
<p>在CentOS release 6.5 下执行使用yum 命令时报错</p>
<p></p>
<pre class="brush: bash;auto-links: false;">[root@localhost ~]# yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   /usr/lib64/python2.6/site-packages/_sqlitecache.so: undefined symbol: g_assertion_message_expr

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Nov 22 2013, 12:16:22) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq
  </pre><br />
<b><span style="font-size:18px;">原因:</span></b><p></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;glib2 库版本与当前的yum 和 pyton 版本不兼容</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp; &nbsp; 问题细节:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<pre class="brush: bash;auto-links: false;">[root@localhost ~]# ldd /usr/lib64/python2.6/site-packages/_sqlitecache.so
	linux-vdso.so.1 =&gt;  (0x00007fffd17f4000)
	libglib-2.0.so.0 =&gt; /usr/local/lib/libglib-2.0.so.0 (0x00007fdad6512000)
	libxml2.so.2 =&gt; /usr/lib64/libxml2.so.2 (0x00007fdad61b1000)
	libsqlite3.so.0 =&gt; /usr/lib64/libsqlite3.so.0 (0x00007fdad5f22000)
	libpython2.6.so.1.0 =&gt; /usr/lib64/libpython2.6.so.1.0 (0x00007fdad5b7c000)
	libpthread.so.0 =&gt; /lib64/libpthread.so.0 (0x00007fdad595e000)
	libc.so.6 =&gt; /lib64/libc.so.6 (0x00007fdad55ca000)
	libdl.so.2 =&gt; /lib64/libdl.so.2 (0x00007fdad53c6000)
	libz.so.1 =&gt; /usr/local/lib/libz.so.1 (0x00007fdad51af000)
	libm.so.6 =&gt; /lib64/libm.so.6 (0x00007fdad4f2b000)
	libutil.so.1 =&gt; /lib64/libutil.so.1 (0x00007fdad4d28000)
	/lib64/ld-linux-x86-64.so.2 (0x000000350a600000)</pre><p>&nbsp;</p>
<p>正常情况下默认加载的库为 /lib64/ 目录的库.</p>
libglib-2.0.so.0 =&gt; /lib64/libglib-2.0.so.0 (0x00007fa3e838d000)<p></p>
<p>查看&nbsp;<span style="line-height:1.5;">LD_LIBRARY_PATH 有加载</span><span style="line-height:1.5;">用户lib目录下的一lib库,用户的glib2库版本过低.调整后问题解决.</span></p>
<p></p>
<pre class="brush: bash;auto-links: false;">[root@localhost ~]# env | grep LD_LIBRARY_PATH
LD_LIBRARY_PATH=:/usr/local/lib/:/usr/local/samba/lib/</pre><p></p>
<p><span style="color:#333333;font-family:arial;font-size:14px;line-height:22px;"><b><span style="font-size:18px;">解决方案:</span></b></span></p>
<p>升级或重新安装 glib2 库,使glib2 库与yum 和 python 兼容</p>
<p>&nbsp;</p>]]></description>
	<pubDate>Wed, 07 Jan 2015 06:01:52 +0000</pubDate>
	<author>阿圣(Sfan)</author>
	<guid>http://www.sfan20.cn/ErrorLog/113.html</guid>

</item>
<item>
	<title>KVM虚拟机中部署LVS DR模式集群</title>
	<link>http://www.sfan20.cn/计算机/112.html</link>
	<description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;具体部署的步骤就不列出来了..说说我遇到的问题吧..</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;结构:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Director:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;单网卡VIP配置在eth0:1,DIP 配置在 eth0上面</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VIP: eth0:1&nbsp; 172.16.1.36/24&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DIP: eth0&nbsp;&nbsp;&nbsp;&nbsp; 172.16.1.112/24&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RealServerA:eth0 172.16.1.37/24&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lo:172.16.1.36/32</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RealServerB:eth0 172.16.1.38/24&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lo:172.16.1.36/32</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;以上三台机器是KVM 虚拟机,系统是&nbsp;redhat5.8 ,虚拟机都是使用 virt-manager 图形管理工具默认参数创建的.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Client:IP 172.16.1.254&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;宿主机 redhat 6.4 x86_64</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;相关配置:&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Director: </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ipvsadm -A -t 172.16.1.36:80 -s rr</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ipvsadm&nbsp;-a -t 172.16.1.36:80 -r 172.16.1.37:80 -g</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ipvsadm -a -t 172.16.1.36:80 -r 172.16.1.38:80 -g</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;realServer 调整内核参数:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo 1 &gt;/proc/sys/net/ipv4/conf/eth0/arp_ignore</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo 2 &gt;/proc/sys/net/ipv4/conf/eth0/arp_announce</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;realserver 上启动 apache</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;出现的情况:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client上访问VIP 提示超时.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a id="ematt:164" href="http://www.sfan20.cn/content/uploadfile/201307/80231374993380.jpg" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201307/thum-80231374993380.jpg" /></a></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Client 获取到VIP的MAC 正常为 Director 的Mac</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;client:可以正常访问到 realserver&nbsp;&nbsp;上的WEB</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Director :可以常访问到 realserver 上的WEB</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在其中一台&nbsp;realserver上&nbsp;抓包:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a id="ematt:165" href="http://www.sfan20.cn/content/uploadfile/201307/25eb1374993610.jpg" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201307/thum-25eb1374993610.jpg" /></a></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;看到已经完成了握手...似乎realsever 没给 client http的请求回复..</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;各种折腾...重新新建虚拟机,把虚拟机网卡桥到物理网卡上,重新配置N遍...没找到原因..网上也没有发现有相关现象出现的..</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;这个架构和环境之前一起学Linux 的童鞋已经在 redhat5.8 xen 虚拟机中部署过很多次了..都很顺利.看来问题出在KVM的网络配置上..</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;到第二天,把虚拟机的网卡配置由Device model: virtio改为Device model:默认管理理程序</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Client上测试,一切正常....<img border="0" alt="" src="http://www.sfan20.cn/admin/editor/plugins/emoticons/0.gif" /></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a id="ematt:166" href="http://www.sfan20.cn/content/uploadfile/201307/df071374994261.png" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201307/thum-df071374994261.png" /></a></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></description>
	<pubDate>Sun, 28 Jul 2013 05:15:34 +0000</pubDate>
	<author>阿圣(Sfan)</author>
	<guid>http://www.sfan20.cn/计算机/112.html</guid>

</item>
<item>
	<title>Arduino 温度,湿度,PM检测</title>
	<link>http://www.sfan20.cn/计算机/111.html</link>
	<description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;去年就在x宝上买了一套Arduino&nbsp; 的学习套件.一直没做什么东西.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;北京的各种"霾",有了要做一个PM2.5检测小装置的想法.收集各种资料之后.X宝买各种工具和粉尘颗粒传感器.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;基本结构: Arduino +&nbsp; enc28j60 + Dht11 + GP2Y1010AU0F + nokia 5110 lcd;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;材料: 1.Arduino pro mini &nbsp;2.ENC28j60以太网模块 3. sharp GP2Y1010AU0F&nbsp;粉尘传感器 4.DHT11数字温/湿度传感器(这个便宜货精度太差) 5.Nokia 5110 液晶屏模块 6.过线塑料盒 7.各种工具杜帮线.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;功能如下:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.读取当前温度,湿度,可入肺颗粒数.并显示出来.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.插上网线的话.根据网络环境自动获取IP或设置预设固定IP.并把读取的当前环境数据上传到 yeelink 平台</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.显示当前时间,日期(时间从网络UTC时间服务器读取)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.可以自己定制相关功能.自己烧写程序</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp; 上几张图.</p>
<p align="center"><a id="ematt:155" href="http://www.sfan20.cn/content/uploadfile/201304/d09c1366957166.jpg" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201304/thum-d09c1366957166.jpg" /></a></p>
<p align="center">启动状态.右上角一个小图标是网络状态的.</p>
<p align="center"><a id="ematt:159" href="http://www.sfan20.cn/content/uploadfile/201304/e0a91366957180.jpg" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201304/thum-e0a91366957180.jpg" /></a></p>
<p align="center">温/湿度显示.</p>
<p align="center"><a id="ematt:160" href="http://www.sfan20.cn/content/uploadfile/201304/549b1366957183.jpg" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201304/thum-549b1366957183.jpg" /></a></p>
<p align="center">PM2.5 显示</p>
<p align="center">&nbsp;<a id="ematt:163" href="http://www.sfan20.cn/content/uploadfile/201304/cbba1366958507.jpg" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201304/thum-cbba1366958507.jpg" /></a></p>
<p align="center">上传到yeelink平台数据显示</p>
<p align="center"><a id="ematt:152" href="http://www.sfan20.cn/content/uploadfile/201304/1fba1366957155.jpg" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201304/thum-1fba1366957155.jpg" /></a></p>
<p align="center">Enc28j60 ,Arduino pro min ,nokia 5110</p>
<p align="center"><a id="ematt:154" href="http://www.sfan20.cn/content/uploadfile/201304/45c11366957162.jpg" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201304/thum-45c11366957162.jpg" /></a></p>
<p align="center">夏普 GP2Y1010AU0F </p>
<p align="center"><a id="ematt:153" href="http://www.sfan20.cn/content/uploadfile/201304/a6071366957158.jpg" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201304/thum-a6071366957158.jpg" /></a></p>
<p align="center"><a id="ematt:156" href="http://www.sfan20.cn/content/uploadfile/201304/e8ff1366957170.jpg" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201304/thum-e8ff1366957170.jpg" /></a></p>
<p align="center">网络接口 和 电源的接口 电源 5V</p>
<p align="center"><a id="ematt:157" href="http://www.sfan20.cn/content/uploadfile/201304/16e41366957173.jpg" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201304/thum-16e41366957173.jpg" /></a></p>
<p align="center">粉尘传感器 [GP2Y1010AU0F]&nbsp;外置 用热熔胶粘在后盖上,可当做整个盒子的支架</p>
<p align="center"><a id="ematt:158" href="http://www.sfan20.cn/content/uploadfile/201304/49621366957176.jpg" target="_blank"><img border="0" alt="点击查看原图" src="http://www.sfan20.cn/content/uploadfile/201304/thum-49621366957176.jpg" /></a></p>
<p align="center">DHT11 温/湿度传感器&nbsp;内嵌在盒子一侧 盒子顶端预留下载接口 (亲,别吐槽焊工 - -" ,电铬铁神马的都是刚买的有木有)</p>
<p align="center">&nbsp;</p>
<p align="left">相关代码,库,文档:&nbsp;写的有点乱</p>
<p align="left"></p>
<p align="left"></p>
<pre class="brush: cpp;auto-links: false;">#include &lt;EtherCard.h&gt;
#include &lt;dht11.h&gt;
#include &lt;Time.h&gt;
#include &lt;LCD5110_Graph.h&gt;

#define IN 
#define OUT

char VERSION[] ="v1.8";

//enc28j60
int dcPin=10;
static byte mymac[]={0x74,0x69,0x2D,0x30,0x31};
static byte myip[]={192,168,80,160};
static byte mymask[]={255,255,255,0};
static byte gwip[]={192,168,80,1};
static byte dnsip[]={8,8,8,8};
byte Ethernet::buffer[270];
boolean getDHCP=true;
boolean dnslookup=true;
//enc28j60
Stash stash;

//dht11
dht11 DHT11;
int dht11ReadPin=4;
//dht11

//GP2Y1010AU0F
int dustPin=0;
int ledPower=2;
int delayTime=280;
int delayTime2=40;
float offTime=9680;

int dustVal=0;
int pm_i=0;
float ppm=0;
//char s[32];
float voltage = 0;
static float dustdensity = 0;
float ppmpercf = 0;
int pm2_5=0;
//GP2Y1010AU0F


//yeelink
#define N 3
char website[] PROGMEM="api.yeelink.net";
char APIKey[] PROGMEM = "441033961344aab**************"; //API KEY
char DeviceID[] PROGMEM = "2463";
const uint16_t SensorID[N] = {3277,3278,3279};
char sensorData[N][30];
uint8_t dataLength[N];
//yeelink
uint32_t lastConnectionTime = 0;
const uint16_t PostingInterval = 5000;


//轮流向服务器发送相应传感器变量 0 &lt;= i &lt;N,
uint8_t i=0;//
 
//time
boolean timeNeedSet = true;
uint16_t timeSetTimer = 0;
#define TIME_SET_TIMER 4000 //about TIME_SET_TIMER*5s

//nokia 5110
LCD5110 myGLCD(5,6,7,8,9);
extern uint8_t SmallFont[];
//extern uint8_t TinyFont[];
extern uint8_t BigNumbers[];
//extern uint8_t arduino_logo[];
uint8_t temperature_ico[] PROGMEM={0x02,0x05,0x7A,0x84,0x84,0x48};//
uint8_t net_ico_S[] PROGMEM={0x00,0x03,0x05,0x7D,0x7D,0x05,0x03,0xB8,0xA8,0xE8,0x00,0x00,0x00};
uint8_t net_ico_D[] PROGMEM={0x00,0x03,0x05,0x7D,0x7D,0x05,0x03,0xF8,0x88,0x88,0x70,0x00,0x00};
uint8_t net_ico_err[] PROGMEM={0x00,0xFF,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0xFF,0x00,0x00};
uint8_t net_ico_cls[] PROGMEM={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
uint8_t cls[] PROGMEM={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
uint8_t pm2_5_ico[] PROGMEM={0x00,0x00,0x00,0xF0,0xF8,0x8C,0x8C,0x8C,0x88,0xF0,0x70,0x00,0x00,0xD0,0x50,0x70,
0x00,0x00,0x00,0x70,0x50,0xD0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x3F,0x3F,0x01,0x01,0x39,0x3D,0x08,0x3C,0x08,0x3C,0x39,0x01,0x01,0x00,0x01,
0x00,0x01,0x01,0x01,0x40,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,
0x1C,0x10,0x1C,0x00,0x5C,0x54,0x7C,0x00,0x40,0x20,0x1C,0x02,0x39,0x04,0x38,0x04,
0x38,0x04,0x05,0x07,0x00,0x00,0x00,0x00,0x00,0x00};
uint8_t sysinit[] PROGMEM={0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x8F,0x8F,0x1F,0x1F,0x3D,0xF9,0xF9,0xF3,
0xF7,0x1C,0xFC,0xFC,0xF8,0xC0,0xF0,0xFC,0xFC,0x1C,0x3C,0x7C,0x7C,0x7C,0xEC,0xEC,
0xCC,0x80,0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0x01,0xF8,0xFC,0xFC,0xFC,0x1C,0x0C,
0xFC,0xFC,0xFC,0x00,0xFC,0xFC,0xFC,0x04,0x0C,0xFF,0xFF,0xFF,0xFF,0x0C,0x8C,0x80,
0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x80,
0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,
0x03,0x03,0x03,0x01,0x01,0x30,0x30,0x3F,0x3F,0x1F,0x0F,0x03,0x00,0x00,0x03,0x03,
0x03,0x03,0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,
0x03,0x03,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x02,0x00,0x01,0x03,0x03,
0x03,0x03,0x03,0x03,0x03,0x01,0x03,0x03,0x03,0x03,0x00,0x03,0x03,0x03,0x00,0x03,
0x03,0x03,0x00,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00};
//nokia 5110

void setup()
{
  myGLCD.InitLCD();
  myGLCD.setFont(SmallFont);
  Serial.begin(115200);
  //myGLCD.drawBitmap(0, 0, arduino_logo, 84, 48);
 myGLCD.drawLine(0,10,83,10);
 myGLCD.drawLine(70,0,70,10);
 myGLCD.print("--:-- --/--",2,2);
 myGLCD.drawBitmap(0,15, sysinit, 84, 24);
 myGLCD.print(VERSION,55,15);
 myGLCD.drawBitmap(71,1, net_ico_err, 13, 8);
 myGLCD.print("------ By:SFan",0,40);
 myGLCD.update(); 
  pinMode(ledPower,OUTPUT);//ledPower  GP2Y1010AU0F
  Serial.print("Version:");
  Serial.println(VERSION);
  Serial.println("Ethernet init...");
  if(ether.begin(sizeof Ethernet::buffer,mymac,dcPin)==0){
    Serial.println("Failed to access Ethernet controller");  
  }
   else{
     Serial.println("DHCP");
     myGLCD.drawBitmap(71,1, net_ico_D, 13, 8);
     myGLCD.update();
     if(!ether.dhcpSetup()){
     myGLCD.drawBitmap(71,1, net_ico_S, 13, 8);
     myGLCD.update();
     getDHCP=false;
     Serial.println("DHCP failed");
     ether.staticSetup(myip,gwip);
     ether.copyIp(ether.dnsip,dnsip);
     ether.copyIp(ether.mymask,mymask);
     }
     ether.printIp("My IP:",ether.myip);
    // ether.printIp("Netmask:",ether.mymask);
     ether.printIp("GW IP:",ether.gwip); 
     ether.printIp("Dns:",ether.dnsip);  
     if(!ether.dnsLookup(website)){
     myGLCD.drawBitmap(71,1, net_ico_err, 13, 8);
     myGLCD.update();
     dnslookup=false;
     }
     ether.printIp("website:",ether.hisip);
   }

}

void loop()
{
  
  ether.packetLoop(ether.packetReceive());
 // pmLoop();
  if( millis() &lt; lastConnectionTime || millis() - lastConnectionTime &gt; PostingInterval){
    Serial.println(i);
    get_Send_String(i);
    if(dnslookup){
    send_Data(i);
    }else{
    lastConnectionTime=millis();
    }
    i++;
    if (i == N) i=0;  
  }
  
}

static void dht11Read(){
 // Serial.println("\n");
  int chk = DHT11.read(dht11ReadPin);
  Serial.print("Read sensor: ");
  switch (chk)
  {
  case DHTLIB_OK: 
    Serial.println("OK"); 
    break;
  case DHTLIB_ERROR_CHECKSUM: 
    Serial.println("Checksum error"); 
    break;
  case DHTLIB_ERROR_TIMEOUT: 
    Serial.println("Time out error"); 
    break;
  default: 
    Serial.println("Unknown error"); 
    break;
  }
  Serial.print("Humidity (%): ");
  Serial.println((float)DHT11.humidity, 2);
  Serial.print("Temperature (oC): ");
  Serial.println((float)DHT11.temperature-2, 2);
  myGLCD.drawBitmap(0,15, cls, 84, 25);
  myGLCD.update();
  myGLCD.drawBitmap(35, 30, temperature_ico, 6, 8);
  myGLCD.setFont(SmallFont);
  myGLCD.print("%",73,32);
  myGLCD.setFont(BigNumbers);
  myGLCD.printNumI(DHT11.temperature-2,5,15);
  myGLCD.printNumI(DHT11.humidity,45,15);
  myGLCD.update();
}

static void pmData(){
  pmLoop();
  Serial.println(dustVal);  
  voltage = ppm/pm_i*0.0049;
  dustdensity = 0.17*voltage-0.1;
  ppmpercf = (voltage-0.0256)*120000;
  if (ppmpercf &lt; 0)
    ppmpercf = 0;
  if (dustdensity &lt; 0 )
    dustdensity = 0;
  if (dustdensity &gt; 0.5)
    dustdensity = 0.5;  
  pm_i=0;
  ppm=0;  
  pm2_5=dustdensity*1000;
  Serial.print("voltage :");
  Serial.println(voltage);
  Serial.print("dustdensity :");
  Serial.println(dustdensity);
  Serial.print("ppmpercf :");
  Serial.println(ppmpercf);
  myGLCD.drawBitmap(0,15, cls, 84, 25);
  myGLCD.update();
  myGLCD.drawBitmap(8,15, pm2_5_ico, 30, 24);
  myGLCD.setFont(BigNumbers);
  myGLCD.printNumI(pm2_5,40,15);
  myGLCD.update();
}

void pmLoop(){
  pm_i=pm_i+1;
  digitalWrite(ledPower,LOW); // power on the LED
  delayMicroseconds(delayTime);
  dustVal=analogRead(dustPin); // read the dust value
  ppm = ppm+dustVal;
  delayMicroseconds(delayTime2);
  digitalWrite(ledPower,HIGH); // turn the LED off
  delayMicroseconds(offTime);  
}

void get_Send_String(uint8_t k){ 
 switch(k){
 case 0:{
  dht11Read();
 dataLength[k]=sprintf(sensorData[k],"{\"value\":%d}",DHT11.temperature-2);
 break;} 
 case 1:{
   dht11Read();
  dataLength[k]=sprintf(sensorData[k],"{\"value\":%d}",DHT11.humidity);
  break;}
  case 2:{
    pmData();
   // Serial.println(dustdensity*1000);
    dataLength[k]=sprintf(sensorData[k],"{\"value\":%d}",pm2_5);
  }
 
 }
}

void send_Data(uint8_t j) {
  // Create a Post for yeelink server,
  // and send request saving sessionID
  Serial.println(sensorData[j]);
  Serial.println(SensorID[j]);
  Serial.println();
  Stash::prepare(PSTR("POST /v1.0/device/$F/sensor/$D/datapoints HTTP/1.1" "\r\n" 
    "Host: api.yeelink.net" "\r\n" 
    "U-ApiKey: $F" "\r\n" 
    "Content-Length: $D" "\r\n"
    "Content-Type: application/x-www-form-urlencoded" "\r\n" "\r\n"                       
    "$S" "\r\n"),
  DeviceID,SensorID[i],APIKey,dataLength[i],sensorData[i]);
 
// ether.tcpSend();
  if(timeNeedSet){
    setupTime();      
  }
  else{
    ether.tcpSend();
    displayClock();
  }
  lastConnectionTime = millis();  
}

#define REQEST_TIMEOUT 10000
void setupTime(){
  uint8_t session_id;
  session_id = ether.tcpSend();
  uint32_t requestTimer = millis() + REQEST_TIMEOUT;
  while(millis() &lt; requestTimer){
    ether.packetLoop(ether.packetReceive());
    char bufx[21];
    const char* reply = ether.tcpReply(session_id);
    if(reply !=0){
      for(uint8_t I=0;I&lt;21;I++){
        bufx[I]=reply[50+I];       
      }
      tmElements_t time1;
      timeconvert(bufx,&amp;time1);
      time_t second = makeTime(time1);        
      setTime(second);
      adjustTime(8*60*60);
      timeNeedSet=false;
      break;
    }
  }
}

void displayClock(){
  // digital clock display of the time
  timeSetTimer++;
  if (timeSetTimer&gt;TIME_SET_TIMER) {
    timeSetTimer=0;
    timeNeedSet=true;
  }
    myGLCD.setFont(SmallFont);
    int h=hour();
    int m=minute();
    int mo=month();
    int d=day();
    int x=2;
    if(h&lt;10){
    myGLCD.print("0",x,2);
    x+=6;
    myGLCD.printNumI(h,x,2);
    x+=6;
    }else{
    myGLCD.printNumI(h,x,2);
    x+=12;
    }
    
    myGLCD.print(":",x,2);
    x+=6;
    
    if(m&lt;10){
    myGLCD.print("0",x,2);
    x+=6;
    myGLCD.printNumI(m,x,2);
    x+=6;
    }else{
    myGLCD.printNumI(m,x,2);
    x+=12;
    }
    
    myGLCD.print(" ",x,2);
    x+=6;
    
    if(mo&lt;10){
    myGLCD.print("0",x,2);
    x+=6;
    myGLCD.printNumI(mo,x,2);
    x+=6;
    }else{
    myGLCD.printNumI(mo,x,2);
    x+=12;
    }
    
    myGLCD.print("/",x,2);
    x+=6;
    
    if(d&lt;10){
    myGLCD.print("0",x,2);
    x+=6;
    myGLCD.printNumI(d,x,2);
    x+=6;
    }else{
    myGLCD.printNumI(d,x,2);
    x+=12;
    }
    myGLCD.update();
  Serial.print(year());
  Serial.print("-");
  Serial.print(month());
  Serial.print("-");
  Serial.print(day());
  Serial.print(" ");
  Serial.print(hour());
  Serial.print(":");
  Serial.print(minute());

}
//比较周数，成功返回0-6的数，错误返回7
//p代表周数，取周数前3个字母，如Mon代表周1，以此类推
//改动周几不影响返回的时间值，可以通过改动日期的日数来达到修改时间
 
//比较月份，成功返回0-11的数，错误返回12
//P 为月份的前三个字母，如Feb代表二月，以此类推
int monthcmp( IN char *p)
{
  char *month[]={
    "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"            };
 
  int i;
  for(i=0;i&lt;12;i++){
    if(strcmp(p,month[i])==0)
      break;
  }
  if(i==12)
  {
    return i;
  }
  return i;
}
//将字串格式的时间转换为结构体,返回距离1970年1月1日0：0：0的秒数，当字符串格式错误或超值时返回0
//BUF 为类似Tue May 15 14:46:02 2007格式的，p为时间结构体
void timeconvert(IN char *buf,OUT tmElements_t *p)
{
  char cmonth[4];
  int16_t td,th,tm,ts,ty;
  sscanf(buf,"%d %s %d %d:%d:%d",&amp;td,cmonth,&amp;ty,&amp;th,&amp;tm,&amp;ts);
  //sscanf("2012 Aug " ,"%4d %s",&amp;ty,cmonth);
  p-&gt;Year = ty - 1970;
  p-&gt;Month = monthcmp(cmonth) + 1;
  p-&gt;Day = td;
  p-&gt;Hour = th;
  p-&gt;Minute = tm;
  p-&gt;Second = ts;
}</pre><br />
<p></p>
<p align="left"></p>
<p align="left"></p>
<p align="center"></p>
<p align="center"></p>
<p><a href="http://www.sfan20.cn/content/uploadfile/201304/4a521366958101.rar" target="_blank" style="font-family:'sans serif', tahoma, verdana, helvetica;line-height:1.5;">libraries.rar</a><span style="font-family:'sans serif', tahoma, verdana, helvetica;line-height:1.5;">&nbsp;(DHT11,ethercard,LCD5110_Graph 相关库)</span></p>
 <p align="left"><span class="attachment"><a href="http://www.sfan20.cn/content/uploadfile/201304/ed591366958118.rar" target="_blank">gp2y1010au_e.rar</a>&nbsp;(Sharp GP2Y1010AU0F Spec sheet)</span></p>
<p align="left"><span class="attachment"><a href="http://sensorapp.net/?p=479">Sharp Dust Sensor and Arduino</a>&nbsp;</span></p>
<p align="center">&nbsp;</p>]]></description>
	<pubDate>Fri, 26 Apr 2013 05:20:24 +0000</pubDate>
	<author>阿圣(Sfan)</author>
	<guid>http://www.sfan20.cn/计算机/111.html</guid>

</item>
<item>
	<title>SQL2005安装报错&quot;指定的功能对于此SQL Server版本无效&quot;</title>
	<link>http://www.sfan20.cn/计算机/110.html</link>
	<description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;安装SQL时出现 "指定的功能对于此SQL Server版本无效"的错误.</p>
<p style="text-align:center;"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201110/6fcfbd3a0f14ffb48d9a258734c3c44920111021204838.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201110/thum-6fcfbd3a0f14ffb48d9a258734c3c44920111021204838.jpg" /></a></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;安装程序前面的检测都是通过的.点安装后.就弹出:"指定的功能对于此SQL Server版本无效"的错误.折腾了很久.没有解决.百度的结果众说纷纭.有说要先装Tools之类的.有说与之前装的版本不符的.再折腾还是没有结果.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;后来重新从FTP文件服务器下载了安装包.再安装.很顺利就安装上了</p>
<p style="text-align:center;"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201110/4a7a9004c068615d2de5c30d0da635b520111021204901.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201110/thum-4a7a9004c068615d2de5c30d0da635b520111021204901.jpg" /></a></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;检查了一下原来的安装包.解压的时候有报错.</p>
<p style="text-align:center;"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201110/c62bf1f1883c3f43ede2fd6b26ae834320111021204901.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201110/thum-c62bf1f1883c3f43ede2fd6b26ae834320111021204901.jpg" /></a></p>
<p style="text-align:left;">&nbsp;&nbsp;&nbsp;&nbsp;安装SQL2005时出现"指定的功能对于此SQL Server版本无效"错误.应该先检查下安装包是否完整 .</p>
<p>&nbsp;</p>]]></description>
	<pubDate>Fri, 21 Oct 2011 12:45:26 +0000</pubDate>
	<author>阿圣(Sfan)</author>
	<guid>http://www.sfan20.cn/计算机/110.html</guid>

</item>
<item>
	<title>HP DL380 G7 SAS/STAT 控制器驱动 For Win2003 X86</title>
	<link>http://www.sfan20.cn/计算机/109.html</link>
	<description><![CDATA[<p>共享个阵列卡驱动,HP DL380 G7的.在官方翻了好久才下载下来哈.</p>
<p><a href="http://115.com/file/e6vjzpie">HP DL380 G7 SAS/STAT 控制器驱动 For Win2003 X86 </a></p>]]></description>
	<pubDate>Sun, 16 Oct 2011 14:24:07 +0000</pubDate>
	<author>阿圣(Sfan)</author>
	<guid>http://www.sfan20.cn/计算机/109.html</guid>

</item>
<item>
	<title>C# 不存在类型或命名空间名称“Management&quot;</title>
	<link>http://www.sfan20.cn/计算机/108.html</link>
	<description><![CDATA[<p>最近在折腾C# winForm方面的程序.在网上找了一小段获取系统相关硬件信息的代码.发现报错:命名空间“System”中不存在类型或命名空间名称“Management”。是否缺少程序集引用;一直都是找网上的源码改改.拖拖控件神马的.对C#不太了解.后来才发现.需要在"解决方案-&gt;引用" 中添加引用&nbsp;"System.Management";</p>
<p>&nbsp;</p>
<p>---------------------------------------------------</p>
<p>N久没写日志了..从现在开始..记录一些东东..</p>]]></description>
	<pubDate>Sat, 15 Oct 2011 10:31:41 +0000</pubDate>
	<author>阿圣(Sfan)</author>
	<guid>http://www.sfan20.cn/计算机/108.html</guid>

</item>
<item>
	<title>这东西是神马...</title>
	<link>http://www.sfan20.cn/点点滴滴/107.html</link>
	<description><![CDATA[<p>&nbsp; 1/9去骑行去东莞的路上..拍到的.当时我正以30KM/H+的速度前行...它从路边的绿化树上窜到了路面上..我急刹车.停了下来..它并没有匆忙离开..留下了几张它的照片..也不知道是神马东西来着.?</p>
<p style="text-align:center;">&nbsp;<a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201101/63692d26768360a5468f26c3b49bab6620110111094249.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201101/thum-63692d26768360a5468f26c3b49bab6620110111094249.jpg" /></a></p>
<p style="text-align:center;">它一直趴在那,无视我们的围观..尽情的享受着它的日光浴..</p>
<p style="text-align:center;"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201101/5310d539a4c13ed05a9d4cd51d86c19a20110111094320.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201101/thum-5310d539a4c13ed05a9d4cd51d86c19a20110111094320.jpg" /></a></p>
<p style="text-align:center;"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201101/e49c74d8f0b3663a95f6a2bb46b2cd5920110111094339.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201101/thum-e49c74d8f0b3663a95f6a2bb46b2cd5920110111094339.jpg" /></a></p>
<p style="text-align:center;">近照...</p>
<p style="text-align:center;">&nbsp;</p>]]></description>
	<pubDate>Tue, 11 Jan 2011 01:41:55 +0000</pubDate>
	<author>阿圣(Sfan)</author>
	<guid>http://www.sfan20.cn/点点滴滴/107.html</guid>

</item>
<item>
	<title>这段日子</title>
	<link>http://www.sfan20.cn/点点滴滴/106.html</link>
	<description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;上一次写日志还是四个月以前..<img alt="" src="http://www.sfan20.cn/admin/fckeditor/editor/images/smiley/2.gif" /></p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;换工作之后重复着上班..下班..回出租房..周末和朋友出去骑车FB..工资发下来刚好够开销....昨天发工资勒..才发现身上的钱还不够换工作之前的那个数...MD做无用功勒...自行车上的码表数变成4097勒..我已经回勒二趟家了???..公司的问题..局限在OUTLOOK ..和一些网络故障上面. 纠结的是还有很多Win me的系统..很久没有关注最新的相关技术领域的信息勒..而是时常百度搜索10年前发布的Me系统的相关资料...无语...</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;重新拾起PHP...2011年想回家乡寻找我的蓝天...</p>]]></description>
	<pubDate>Fri, 24 Dec 2010 14:58:32 +0000</pubDate>
	<author>阿圣(Sfan)</author>
	<guid>http://www.sfan20.cn/点点滴滴/106.html</guid>

</item>
<item>
	<title>东莞&lt;-&gt;佛山 骑行</title>
	<link>http://www.sfan20.cn/点点滴滴/104.html</link>
	<description><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;12日晚边的时候临时决定的.晚上8点的时候出发的.出发前有在电脑上查了一下GOOGLE地图中的大致路线.带上修车补胎工具,充汽筒,前灯.二块手机备用电池.相机在朋友那边.没有带.考虑到一人独自骑行,本来也没有打算带一些贵重物品...出发后..开启手机的步行导航,戴单只耳机,按语音提示前行.&nbsp;&nbsp;&nbsp;</p>
<p><span style="font-size: large">行程</span>:</p>
<ol>
    <li>&nbsp;2010/08/12 19:53 东莞.凤岗出发 23:44 到达东莞虎门渡口&nbsp;[ 距离:73.96KM 时间:3小时51分钟 平均时速:19.2KM/H 最高时速:49.3KM/H]</li>
    <li><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201008/a87061427c10be79a6acc61ea514542d20100820001737.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201008/thum-a87061427c10be79a6acc61ea514542d20100820001737.jpg" /></a>(<span style="color: #ff0000">点击查看大图</span>)</li>
    <li>&nbsp;2010/08/13 00:31 东莞虎门渡口乘坐渡船到达广州虎口渡口 电话联系 在那边接应的佛山两位骑友会合后休息调整车辆 00:31 准备向佛山顺德出发 [出发后,路上有点H,手机开了MP3,QQ,运动追踪软件几次崩溃.广州虎门渡口到佛山顺德这段路没有GPS记录]&nbsp; 大约 03:30 到达佛山顺德 这段路感觉走了很久很久..很多路段是黑漆漆的...我的前灯在凤岗到虎门渡口那段电已经耗尽.</li>
    <li>2010/08/13 04:30 休息 (入睡前,另两个骑友就囔着14号六点半起床去广州 大夫山森林公园&nbsp;= =&quot;) 早上 06:10 他们俩醒了..我自然也睡不成了....睡了不到二个小时..= =</li>
    <li>2010/08/13 07:19 早餐过后佛山顺德出发前往广州 大夫山森林公园 09:57 到达 (这段是在白天骑行的,我穿的是T恤= =&quot; 这一天下来手臂着上颜色了..)&nbsp;[ 距离:39.49KM 时间: 2小时38分钟 平均时速:15KM/H 最快速度 47.1KM/H] 烈日+缺乏睡眠+3小时前已骑行了.一百三十多千米了..一路上走走停停,遇到小店就停下来&quot;加水&quot;..速度相当的慢..&nbsp;</li>
    <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201008/2bd5541fa9d5849f8dd15dce8d4104f420100820001737.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201008/thum-2bd5541fa9d5849f8dd15dce8d4104f420100820001737.jpg" /></a> (<span style="color: #ff0000">点击查看大图</span>)</li>
    <li>2010/08/13 14:50 在大夫山公森林公园 门口合影 返回 (这一段返程也没能开启GPS的记录,估记那时候折腾的太累..给忘记了..这个时间还是查的相片拍摄时间,)路上到佛山顺德 德胜大桥那段时竟下雨了..雨不是很大.都没有停下来躲雨,雨水淋在晒了一天的地面上,骑行在这路上,真TMD像蒸桑那....</li>
    <li>2010/08/13 ????什么时候出发的也记不清了.从广州那边回来到骑友宿舍,把随身带的东西都放宿舍了,换上泳裤 前住中山的小榄镇 = =&quot; (据两位骑友说,他们上次去那边看到有很多人在那边游泳,就选去那边的.其实骑友所在的公司附近都很多河流...但从没看到有人游泳)那边水里上岸已经天黑了..返回 水里折腾一阵 骑上车才知道,体力全消耗了...返程..我一直垫后..应该是晚上8点多才到达骑友所在的公司..稍休息.外面小餐馆FB....晚上也不记得什么时候睡觉的勒..一直睡到了14日中午..</li>
    <li>2010/08/14 18:28 佛山顺德出发返回东莞风岗.一骑友送我到佛山顺德区的五沙大桥.之后我一人独行返回 15日: 01:01 到达租住的小区...[距离:115KM 时间:6小时32分钟 平均时速:17.7KM/H 最快时速:47.7KM/H]这一路虽然远但白天休息的不错晚上也少了烈日的烘烤...还算安逸...一路狂奔.路上除了停下来买水没有休息过.顺德到广州虎门渡口 南沙区 黄阁镇的那个不知道叫什么山的..很长坡度大..不过还是坚持骑过去了...到凤岗镇离住房4KM的一个沙县小吃店吃了一碗汤米粉,我去的时候小店已经准备打洋了..老板娘还是给我做了一碗没加青菜的米粉..感激..到住房楼下后..短信佛山的骑友:哥已安全到达 - -&nbsp;</li>
    <li><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201008/bba5fdaf8aad99cec41ca806a1a1d9e020100820001737.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201008/thum-bba5fdaf8aad99cec41ca806a1a1d9e020100820001737.jpg" /></a> (<span style="color: #ff0000">点击查看大图</span>)</li>
</ol>
<p>&nbsp;&nbsp;&nbsp;&nbsp;上一些骑友相机拍的PP..</p>
<p style="text-align: center"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201008/62a0d4dc3a83103a5cdc51180bd847af20100820000700.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201008/thum-62a0d4dc3a83103a5cdc51180bd847af20100820000700.jpg" /></a></p>
<p style="text-align: center">佛山-&gt;广州的路上..</p>
<p style="text-align: center">&nbsp;<a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201008/707b165207dc0230147588b9db537c3920100820000928.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201008/thum-707b165207dc0230147588b9db537c3920100820000928.jpg" /></a></p>
<p style="text-align: center">大夫山公园内...骑完山地车赛道后.在这边洗车..= =&quot;</p>
<p style="text-align: center"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201008/a597e709b35d1d260ac50a2a7b935f3620100820001226.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201008/thum-a597e709b35d1d260ac50a2a7b935f3620100820001226.jpg" /></a></p>
<p style="text-align: center"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201008/b2d8d6b996a6d125a601a383d445ccfa20100820001226.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201008/thum-b2d8d6b996a6d125a601a383d445ccfa20100820001226.jpg" /></a></p>
<p style="text-align: center"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201008/7b1d35d2bc85500909cd1718989cea1920100820001623.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201008/thum-7b1d35d2bc85500909cd1718989cea1920100820001623.jpg" /></a></p>
<p style="text-align: center">公园内见到的唯一一个清水湖.. = =&quot;</p>
<p style="text-align: center"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201008/0daaab693ac2ac3030f89ee599549a2720100820001623.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201008/thum-0daaab693ac2ac3030f89ee599549a2720100820001623.jpg" /></a></p>
<p style="text-align: center"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201008/a0f4d3d12f922b632840be5bfbdc83b120100820001623.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201008/thum-a0f4d3d12f922b632840be5bfbdc83b120100820001623.jpg" /></a></p>
<p style="text-align: center"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201008/683b750fa16ca74bc3ee512a02bcb0d320100820001624.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201008/thum-683b750fa16ca74bc3ee512a02bcb0d320100820001624.jpg" /></a></p>
<p style="text-align: center">公园门口,准备返回佛山...</p>
<p style="text-align: center"><a class="highslide" title="点击以特效浏览" onclick="return hs.expand(this, { captionId:'caption'})" href="http://www.sfan20.cn/content/uploadfile/201008/3b1f56bea62618864f3018e37a36f0d920100820001737.jpg"><img border="0" alt="" src="http://www.sfan20.cn/content/uploadfile/201008/thum-3b1f56bea62618864f3018e37a36f0d920100820001737.jpg" /></a></p>
<p style="text-align: center">广州-&gt;佛山 路上...</p>
<p style="text-align: center">&nbsp;</p>]]></description>
	<pubDate>Mon, 16 Aug 2010 03:48:20 +0000</pubDate>
	<author>阿圣(Sfan)</author>
	<guid>http://www.sfan20.cn/点点滴滴/104.html</guid>

</item></channel>
</rss>