﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Rixu Blog (日需博客)-随笔分类-技术文章</title><link>http://www.cppblog.com/gezidan/category/17474.html</link><description>日需博客，每日必需来踩踩哦..</description><language>zh-cn</language><lastBuildDate>Thu, 17 Mar 2016 07:23:01 GMT</lastBuildDate><pubDate>Thu, 17 Mar 2016 07:23:01 GMT</pubDate><ttl>60</ttl><item><title>C++11中的Move语义和右值引用</title><link>http://www.cppblog.com/gezidan/archive/2016/03/15/213026.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Tue, 15 Mar 2016 07:49:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2016/03/15/213026.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/213026.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2016/03/15/213026.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/213026.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/213026.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: <p style="margin-top: 10px; margin-bottom: 10px; padding: 0px; list-style-type: none; list-style-image: none; color: #444444; font-family: Tahoma, Arial, Helvetica, sans-serif; line-height: 25.2px; background-color: #ffffff;">C++一直致力于生成快速的程序。不幸的是，直到C++11之前，这里一直有一个降低C++程序速度的顽症：临时变量的创建。有时这些临时变量可以被编译器优化（例如返回值优化），但是这并不总是可行的，通常这会导致高昂的对象复制成本。我说的是怎么回事呢？</p><br><script language="javascript"type="text/javascript">window.location.replace("http://blog.libgod.com");</script>&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2016/03/15/213026.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/213026.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2016-03-15 15:49 <a href="http://www.cppblog.com/gezidan/archive/2016/03/15/213026.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>艺术签名制作工具v1.0</title><link>http://www.cppblog.com/gezidan/archive/2015/02/12/209803.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Thu, 12 Feb 2015 03:57:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2015/02/12/209803.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/209803.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2015/02/12/209803.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/209803.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/209803.html</trackback:ping><description><![CDATA[<p>可在线制作艺术签名。目前托管在新浪云上，地址：http://godsignature.sinaapp.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<iframe allowtransparency="true" src="http://godsignature.sinaapp.com" width="350" height="245" style="display: block;"></iframe>
<p>示例：</p>
<img src="http://www.cppblog.com/images/cppblog_com/gezidan/yishuqianming.png" width="576" height="83" alt="" />
<img src ="http://www.cppblog.com/gezidan/aggbug/209803.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2015-02-12 11:57 <a href="http://www.cppblog.com/gezidan/archive/2015/02/12/209803.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>封装的用于WinForm的Html编辑器</title><link>http://www.cppblog.com/gezidan/archive/2011/10/10/157949.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Mon, 10 Oct 2011 04:06:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/10/10/157949.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157949.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/10/10/157949.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157949.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157949.html</trackback:ping><description><![CDATA[<div>一直没找到好用的用于WinForm的Html编辑器，于是自己封装了个，还没完工，先上个预览图。<br />
<div><img src="http://www.cppblog.com/images/cppblog_com/gezidan/17469/r_editor.PNG" width="659" height="534" alt="" /></div>
等完成了上代码。
</div>
<br />
﻿
<div class="MySignatureBoard" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 14px; line-height: 24px; min-height: 31px; overflow-x: hidden; overflow-y: hidden; word-wrap: break-word; word-break: break-all; "> <img alt="Logo" src="http://www.cppblog.com/images/cppblog_com/gezidan/17469/r_Rixu_net(245_100).png" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px;border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; margin-left: 10px; margin-right: 10px; margin-top: 10px; margin-bottom: 10px; float: left; width: 245px; height: 100px; " />
<div id="MySignature" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 255px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-color: #4371a6; background-image: url(http://www.xxx.com/bk.png); background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; background-position: 15px 50%; background-repeat: no-repeat no-repeat; "> <span style="color: #333333; line-height: 21px; ">作者：<a href="http://www.rixu.net" style="text-decoration: none; color: #000000; line-height: 24px; cursor: pointer; outline-style: none; outline-width: initial; outline-color: initial; 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-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #333333; " target="_blank">Gezidan</a></span>
<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 25px; "> <span style="color: #333333; line-height: 21px; ">出处：<a href="http://www.rixu.net" style="text-decoration: none; color: #000000; line-height: 24px; cursor: pointer; outline-style: none; outline-width: initial; outline-color: initial; 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-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #333333; " target="_blank">http://www.rixu.net</a>　　　　</span></div>
<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 25px; "> <span style="color: #333333; line-height: 21px; ">本文版权归作者和博客园共有，欢迎转载，但未经作者同意必须保留此段声明，且在文章页面明显位置给出原文连接，否则保留追究法律责任的权利。</span></div>
</div>
</div><img src ="http://www.cppblog.com/gezidan/aggbug/157949.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-10-10 12:06 <a href="http://www.cppblog.com/gezidan/archive/2011/10/10/157949.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用memc-nginx和srcache-nginx模块构建高效透明的缓存机制</title><link>http://www.cppblog.com/gezidan/archive/2011/10/09/157841.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Sun, 09 Oct 2011 01:42:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/10/09/157841.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157841.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/10/09/157841.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157841.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157841.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 为了提高性能，几乎所有互联网应用都有缓存机制，其中Memcache是使用非常广泛的一个分布式缓存系统。众所周知，LAMP是非常经典的Web架构方式，但是随着Nginx的成熟，越来越多的系统开始转型为LNMP（Linux+Nginx+MySQL+PHP with fpm），这是因为Nginx采用基于事件机制的I/O多路复用思想设计，在高并发情况下其性能远远优于默认采用prefork模式的Apache，另外，相对于Apache，Nginx更轻量，同时拥有大量优秀的扩展模块，使得在Nginx上可以实现一些美妙的功能。&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/10/09/157841.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157841.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-10-09 09:42 <a href="http://www.cppblog.com/gezidan/archive/2011/10/09/157841.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>在centos上搭建Git分布式管理控制系统</title><link>http://www.cppblog.com/gezidan/archive/2011/10/09/157838.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Sun, 09 Oct 2011 01:24:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/10/09/157838.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157838.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/10/09/157838.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157838.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157838.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="color: #333333; font-family: Georgia, 'Times New Roman', Times, san-serif; line-height: 25px; background-color: #ffffff; ">
<h1 style="font-family: 微软雅黑, sans-serif; font-size: 26px; background-color: #999999; color: #ffffff; padding-top: 8px; padding-right: 10px; padding-bottom: 8px; padding-left: 10px; ">简介：</h1>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; ">Git是一个开源的分布式版本控制系统，用以有效、高速的处理从很小到非常大的项目版本管理。</p>
<h1 style="font-family: 微软雅黑, sans-serif; font-size: 26px; background-color: #999999; color: #ffffff; padding-top: 8px; padding-right: 10px; padding-bottom: 8px; padding-left: 10px; ">安装步骤：</h1>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; "><strong>操作系统：centos 5.5</strong></p>
<ul style="list-style-type: none; list-style-position: initial; list-style-image: initial; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 45px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
     <ul style="list-style-type: none; list-style-position: initial; list-style-image: initial; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 45px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
         <li style="background-image: url(http://www.cnblogs.com/Skins/Minyx2_Lite/images/icon_miniarrow.gif); padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; list-style-type: disc; background-position: 0px 9px; background-repeat: no-repeat no-repeat; ">
         <h2 style="font-family: 微软雅黑, sans-serif; font-size: 22px; letter-spacing: -1px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 6px; padding-right: 0px; padding-bottom: 6px; padding-left: 0px; line-height: 26px; color: #336699; background-position: 0% 100%; background-repeat: repeat no-repeat; ">安装GIT依赖的包</h2>
         </li>
     </ul>
</ul>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; ">yum install zlib-devel&nbsp;<br />
yum install openssl-devel&nbsp;<br />
yum install perl&nbsp;<br />
yum install cpio&nbsp;<br />
yum install expat-devel&nbsp;<br />
yum install gettext-devel</p>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; ">yum install autoconf</p>
<ul style="list-style-type: none; list-style-position: initial; list-style-image: initial; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 45px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
     <ul style="list-style-type: none; list-style-position: initial; list-style-image: initial; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 45px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
         <li style="background-image: url(http://www.cnblogs.com/Skins/Minyx2_Lite/images/icon_miniarrow.gif); padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; list-style-type: disc; background-position: 0px 9px; background-repeat: no-repeat no-repeat; ">
         <h2 style="font-family: 微软雅黑, sans-serif; font-size: 22px; letter-spacing: -1px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 6px; padding-right: 0px; padding-bottom: 6px; padding-left: 0px; line-height: 26px; color: #336699; background-position: 0% 100%; background-repeat: repeat no-repeat; ">安装curl</h2>
         </li>
     </ul>
</ul>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; ">安装cURL&nbsp;</p>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; "># wget http://curl.haxx.se/download/curl-7.17.1.tar.gz&nbsp;<br />
# tar zxvf curl-7.17.1.tar.gz&nbsp; //解压</p>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; ">#cd curl-7.17.1&nbsp;<br />
# ./configure --prefix=/usr/local/curl&nbsp;<br />
# make&nbsp;<br />
# make install</p>
<ul style="list-style-type: none; list-style-position: initial; list-style-image: initial; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 45px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
     <li style="background-image: url(http://www.cnblogs.com/Skins/Minyx2_Lite/images/icon_miniarrow.gif); padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; list-style-type: disc; background-position: 0px 9px; background-repeat: no-repeat no-repeat; ">
     <h2 style="font-family: 微软雅黑, sans-serif; font-size: 22px; letter-spacing: -1px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 6px; padding-right: 0px; padding-bottom: 6px; padding-left: 0px; line-height: 26px; color: #336699; background-position: 0% 100%; background-repeat: repeat no-repeat; ">修改ld.so.conf 添加/usr/local/lib</h2>
     </li>
</ul>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; ">vi /etc/ld.so.conf 添加/usr/local/lib</p>
<ul style="list-style-type: none; list-style-position: initial; list-style-image: initial; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 45px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
     <li style="background-image: url(http://www.cnblogs.com/Skins/Minyx2_Lite/images/icon_miniarrow.gif); padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; list-style-type: disc; background-position: 0px 9px; background-repeat: no-repeat no-repeat; ">
     <h2 style="font-family: 微软雅黑, sans-serif; font-size: 22px; letter-spacing: -1px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 6px; padding-right: 0px; padding-bottom: 6px; padding-left: 0px; line-height: 26px; color: #336699; background-position: 0% 100%; background-repeat: repeat no-repeat; ">运行idconfig</h2>
     </li>
</ul>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; ">/sbin/ldconfig</p>
<ul style="list-style-type: none; list-style-position: initial; list-style-image: initial; margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 45px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">
     <li style="background-image: url(http://www.cnblogs.com/Skins/Minyx2_Lite/images/icon_miniarrow.gif); padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 15px; list-style-type: disc; background-position: 0px 9px; background-repeat: no-repeat no-repeat; ">
     <h2 style="font-family: 微软雅黑, sans-serif; font-size: 22px; letter-spacing: -1px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 6px; padding-right: 0px; padding-bottom: 6px; padding-left: 0px; line-height: 26px; color: #336699; background-position: 0% 100%; background-repeat: repeat no-repeat; ">安装Git</h2>
     </li>
</ul>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; "><code>wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz<br />
tar xzvf git-latest.tar.gz&nbsp;<br />
cd git-2011-10-08</code></p>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; "><code></code><code>autoconf</code></p>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; "><code>./configure --with-curl=/usr/local/curl&nbsp;<br />
make&nbsp;<br />
make install</code></p>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; "><code>*************************************安装ok</code></p>
<h2 style="font-family: 微软雅黑, sans-serif; font-size: 22px; letter-spacing: -1px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 6px; padding-right: 0px; padding-bottom: 6px; padding-left: 0px; line-height: 26px; color: #336699; background-position: 0% 100%; background-repeat: repeat no-repeat; ">测试<code>：</code></h2>
<h2 style="font-family: 微软雅黑, sans-serif; font-size: 22px; letter-spacing: -1px; background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 6px; padding-right: 0px; padding-bottom: 6px; padding-left: 0px; line-height: 26px; color: #336699; background-position: 0% 100%; background-repeat: repeat no-repeat; "><code>终端输入#git</code></h2>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; "><a href="http://images.cnblogs.com/cnblogs_com/phphuaibei/201110/201110081814067963.png" style="outline-style: none; outline-width: initial; outline-color: initial; text-decoration: none; color: #3d81ee; border-bottom-width: 1px; border-bottom-style: dashed; "><img title="wps_clip_image-15949" border="0" alt="wps_clip_image-15949" src="http://images.cnblogs.com/cnblogs_com/phphuaibei/201110/201110081814097949.png" width="627" height="346" style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; background-color: #ffffff; display: inline; border-style: initial; border-color: initial; " /></a></p>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; "><code>相关参数和说明还是很全的</code></p>
<h1 style="font-family: 微软雅黑, sans-serif; font-size: 26px; background-color: #999999; color: #ffffff; padding-top: 8px; padding-right: 10px; padding-bottom: 8px; padding-left: 10px; "><code>使用和搭建版本控制：</code></h1>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; "><code>可以参考：</code></p>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; "><code><a href="http://blog.haohtml.com/wp-content/uploads/2011/04/git-tut.pdf" style="outline-style: none; outline-width: initial; outline-color: initial; text-decoration: none; color: #3d81ee; border-bottom-width: 1px; border-bottom-style: dashed; ">http://blog.haohtml.com/wp-content/uploads/2011/04/git-tut.pdf</a></code></p>
<p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; "><a href="http://www.linuxsir.org/main/doc/git/gittutorcn.htm" style="outline-style: none; outline-width: initial; outline-color: initial; text-decoration: none; color: #3d81ee; border-bottom-width: 1px; border-bottom-style: dashed; ">http://www.linuxsir.org/main/doc/git/gittutorcn.htm</a></p>
</span>﻿<span class="Apple-style-span" style="color: #333333; font-family: Georgia, 'Times New Roman', Times, san-serif; line-height: 25px; background-color: #ffffff; "><p style="line-height: 25px; margin-top: 12px; margin-bottom: 12px; "><code>或者下载《<a href="http://files.cnblogs.com/phphuaibei/git%E6%90%AD%E5%BB%BA.pdf" target="_blank" style="outline-style: none; outline-width: initial; outline-color: initial; text-decoration: none; color: #3d81ee; border-bottom-width: 1px; border-bottom-style: dashed; ">git搭建</a>》文档</code></p></span><div class="MySignatureBoard" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 14px; line-height: 24px; min-height: 31px; overflow-x: hidden; overflow-y: hidden; word-wrap: break-word; word-break: break-all; "> <img alt="Logo" src="http://www.cppblog.com/images/cppblog_com/gezidan/17469/r_Rixu_net(245_100).png" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px;border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; margin-left: 10px; margin-right: 10px; margin-top: 10px; margin-bottom: 10px; float: left; width: 245px; height: 100px; " /> <div id="MySignature" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 255px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-color: #4371a6; background-image: url(http://www.xxx.com/bk.png); background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; background-position: 15px 50%; background-repeat: no-repeat no-repeat; "> <span style="color: #333333; line-height: 21px; ">作者：<a href="http://www.rixu.net" style="text-decoration: none; color: #000000; line-height: 24px; cursor: pointer; outline-style: none; outline-width: initial; outline-color: initial; 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-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #333333; " target="_blank">Gezidan</a></span> <div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 25px; "> <span style="color: #333333; line-height: 21px; ">出处：<a href="http://www.rixu.net" style="text-decoration: none; color: #000000; line-height: 24px; cursor: pointer; outline-style: none; outline-width: initial; outline-color: initial; 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-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #333333; " target="_blank">http://www.rixu.net</a>　　　　</span></div> <div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 25px; "> <span style="color: #333333; line-height: 21px; ">本文版权归作者和博客园共有，欢迎转载，但未经作者同意必须保留此段声明，且在文章页面明显位置给出原文连接，否则保留追究法律责任的权利。</span></div> </div>
</div>
<br />
<br /><br />
<br />
本文转载自&nbsp;http://www.cnblogs.com/phphuaibei/archive/2011/10/08/2202382.html<img src ="http://www.cppblog.com/gezidan/aggbug/157838.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-10-09 09:24 <a href="http://www.cppblog.com/gezidan/archive/2011/10/09/157838.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>VNC远程管理Linux服务器安全指导</title><link>http://www.cppblog.com/gezidan/archive/2011/10/08/157750.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Sat, 08 Oct 2011 01:11:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/10/08/157750.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157750.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/10/08/157750.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157750.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157750.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 在开源领域，远程遥控技术的代表就是VNC了。VNC（Virtual Network Computer，虚拟网络计算机）是一套由AT&T实验室开发的可操控远程计算机的软件。根据主控端与被控端的不同，VNC软件可以分为两个部分，分别为VNC Server与VNC viewer。前者是安装在被控制端上，而后者被安装在主控端上。VNC软件不仅是开源的，而且是跨平台的。有不少系统管理员喜欢在Windows平台上使用这个VNC来作为远程管理Linux服务器或者客户端的工具。&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/10/08/157750.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157750.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-10-08 09:11 <a href="http://www.cppblog.com/gezidan/archive/2011/10/08/157750.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>我们的网站压力究竟在哪里</title><link>http://www.cppblog.com/gezidan/archive/2011/10/08/157749.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Sat, 08 Oct 2011 01:08:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/10/08/157749.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157749.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/10/08/157749.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157749.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157749.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要:     目前网站架构一般分成负载均衡层、WEB层和数据库层，我其实一般还会多加一层，即文件服务器层，这样我们在后面的讨论过程中，我们可以依次对这四层进行讨论；这里为了更具有说服力，我将用三个并发较大的生产环境来说明下，一个是我现在维护的电子商务网站（并发最大值2000，日PV500万左右，此并发并不是总这么高的，只是最高峰是有2900，下面的网站类似）、我的一拍网网站（并发最大值500，日PV50万左右）、以前维护的大型CDN广告网站（并发最大值5000，日PV5000万左右）。&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/10/08/157749.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157749.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-10-08 09:08 <a href="http://www.cppblog.com/gezidan/archive/2011/10/08/157749.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>使用iptables实现NAT转发功能</title><link>http://www.cppblog.com/gezidan/archive/2011/10/08/157748.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Sat, 08 Oct 2011 01:02:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/10/08/157748.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157748.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/10/08/157748.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157748.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157748.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本文案例中，我们假设有一家ISP提供园区Internet接入服务，为了方便管理，该ISP分配给园区用户的IP地址都是私网IP，通过该私网IP用户无法向外发布信息。但是，部分用户要求建立自己的WWW服务器对外发布信息。<br>我们可以在防火墙的外部网卡上绑定多个合法IP地址，然后通过ip映射使发给其中某一个IP地址的包转发至内部某一用户的WWW服务器上，然后再将该内部WWW服务器响应包伪装成该合法IP发出的包。&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/10/08/157748.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157748.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-10-08 09:02 <a href="http://www.cppblog.com/gezidan/archive/2011/10/08/157748.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>细数那些运行在微软平台上的NoSQL数据库</title><link>http://www.cppblog.com/gezidan/archive/2011/09/30/157200.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Fri, 30 Sep 2011 01:42:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/30/157200.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157200.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/30/157200.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157200.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157200.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 从可查询的分布式解决方案，如MongoDB，到简单的分布式Key/Value存储解决方案，如Cassandra。此外，还有Riak，Tokyo Cabinet，Voldemort，CouchDB和Redis。但目前仅有少量的NoSQL项目支持在Windows平台上运行，如果要说到生产应用那就更少了。&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/30/157200.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157200.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-30 09:42 <a href="http://www.cppblog.com/gezidan/archive/2011/09/30/157200.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>谈谈对于企业级系统架构的理解</title><link>http://www.cppblog.com/gezidan/archive/2011/09/30/157195.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Fri, 30 Sep 2011 01:26:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/30/157195.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157195.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/30/157195.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157195.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157195.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要:         在我们刚开始学习架构的时候，首先会想到分层的概念，分层架构比较经典的是三层架构，那么，什么是三层架构呢？它包括表现层，业务层，数据访问层；而对于一个新手来说，从抽象意义上的三层架构，逻辑上就划分为三个层。&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/30/157195.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157195.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-30 09:26 <a href="http://www.cppblog.com/gezidan/archive/2011/09/30/157195.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C# HttpWebRequest 通用类(二)</title><link>http://www.cppblog.com/gezidan/archive/2011/09/28/157079.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Wed, 28 Sep 2011 05:52:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/28/157079.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157079.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/28/157079.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157079.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157079.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: using System;<br>using System.Collections.Generic;<br>using System.IO;<br>using System.Net;<br>using System.Text;<br><br>namespace HttpWeb<br>{<br>    /// <summary> <br>    ///  Http操作类 <br>    /// </summary> &nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/28/157079.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157079.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-28 13:52 <a href="http://www.cppblog.com/gezidan/archive/2011/09/28/157079.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C# HttpWebRequest 通用类(一)</title><link>http://www.cppblog.com/gezidan/archive/2011/09/28/157078.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Wed, 28 Sep 2011 05:51:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/28/157078.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157078.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/28/157078.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157078.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157078.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: /*<br><br>使用方法：<br>MyHttp loHttp = new MyHttp();<br>string lcHtml = "";<br><br>loHttp.HandleCookies = true;//操作Cookies<br>loHttp.Method = "GET";<br>lcHtml = loHttp.GetUrl("http://signin.ebay.com.cn/ws2/eBayISAPI.dll?SignIn&ssPageName=h:h:sout:CN");<br><br>loHttp.AddPostKey("Key", "Value");<br>loHttp.Referer = "http://signin.ebay.com.cn/ws2/eBayISAPI.dll?SignIn&ssPageName=h:h:sout:CN";<br><br>loHttp.Method = "POST";<br>lcHtml = loHttp.GetUrl("http://signin.ebay.com.cn/ws2/eBayISAPI.&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/28/157078.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157078.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-28 13:51 <a href="http://www.cppblog.com/gezidan/archive/2011/09/28/157078.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C#三种模拟自动登录和提交POST信息的实现方法</title><link>http://www.cppblog.com/gezidan/archive/2011/09/28/157077.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Wed, 28 Sep 2011 05:40:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/28/157077.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157077.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/28/157077.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157077.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157077.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要:        网页自动登录（提交Post内容）的用途很多，如验证身份、程序升级、网络投票等，以下是用C#实现的方法。<br>       网页自动登录和提交POST信息的核心就是分析网页的源代码（HTML），在C#中，可以用来提取网页HTML的组件比较多，常用的用WebBrowser、WebClient、HttpWebRequest这三个。以下就分别用这三种方法来实现：&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/28/157077.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157077.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-28 13:40 <a href="http://www.cppblog.com/gezidan/archive/2011/09/28/157077.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ASP.NET 也可以做得很好 2.XSLT初识 在ASP.NET中使用XSLT</title><link>http://www.cppblog.com/gezidan/archive/2011/09/28/157055.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Wed, 28 Sep 2011 02:33:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/28/157055.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157055.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/28/157055.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157055.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157055.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 大家说我说的跟.net一点关系都没有,可是第一篇我也说了啊，仅仅是一个HELLO的例子啊。现在哪个人不忙啊。只能一点一点的写了。。<br>好了，废话少说，我们先看看实际的情况，然后根据情况来写一个小小的例子吧，这次有Demo下载喽。。。<br>现实项目中的情况：&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/28/157055.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157055.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-28 10:33 <a href="http://www.cppblog.com/gezidan/archive/2011/09/28/157055.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>SLT 入门－－实际应用</title><link>http://www.cppblog.com/gezidan/archive/2011/09/28/157053.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Wed, 28 Sep 2011 02:27:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/28/157053.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157053.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/28/157053.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157053.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157053.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: <add key="Spider" value="Googlebot|Baiduspider|Yahoo! Slurp|YodaoBot|msnbot"/><br>把上面的代码加入web.config文件的appSettings节点中，别问为什么...<br>为Request写个扩展:&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/28/157053.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157053.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-28 10:27 <a href="http://www.cppblog.com/gezidan/archive/2011/09/28/157053.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ASP.NET 也可以做得很好 1.XSLT初识 一个HELLO例子</title><link>http://www.cppblog.com/gezidan/archive/2011/09/28/157052.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Wed, 28 Sep 2011 02:24:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/28/157052.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157052.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/28/157052.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157052.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157052.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: XSL 指扩展样式表语言（EXtensible Stylesheet Language）<br>万维网联盟开始发展 XSL 的起因是由于对基于 XML 的样式表语言的需求。<br>XSLT 指 XSL 转换。XSLT 将 XML 文档转换为其他文档，比如 XHTML<br>概念不多讲,这里附上W3C的网址 ，希望您一定要去看看！<br>老规矩，先写出个能运行的程序再说。<br>既然XSLT是将XML文档转换为其它文档，那么我们就先建立一个XML文档吧。（名为：HelloHtml.xml）&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/28/157052.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157052.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-28 10:24 <a href="http://www.cppblog.com/gezidan/archive/2011/09/28/157052.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ASP.NET性能优化之构建自定义文件缓存</title><link>http://www.cppblog.com/gezidan/archive/2011/09/28/157045.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Wed, 28 Sep 2011 01:43:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/28/157045.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/157045.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/28/157045.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/157045.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/157045.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: ASP.NET的输出缓存（即静态HTML）在.NET4.0前一直是基于内存的。这意味着如果我们的站点含有大量的缓存，则很容易消耗掉本机内存。现在，借助于.NET4.0中的OutputCacheProvider，我们可以有多种选择创建自己的缓存。如，我们可以把HTML输出缓存存储到memcached分布式集群服务器，或者MongoDB中（一种常用的面向文档数据库，不妨阅读本篇http://msdn.microsoft.com/zh-cn/magazine/gg650661.aspx）。当然，我们也可以把缓存作为文件存储到硬盘上，考虑到可扩展性，这是一种最廉价的做法，本文就是介绍如果构建自定义文件缓存。&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/28/157045.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/157045.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-28 09:43 <a href="http://www.cppblog.com/gezidan/archive/2011/09/28/157045.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>C#winform程序如何与js交互</title><link>http://www.cppblog.com/gezidan/archive/2011/09/27/156975.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Tue, 27 Sep 2011 08:43:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/27/156975.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156975.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/27/156975.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156975.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156975.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="font-family: 'ms shell dlg'; line-height: 28px; background-color: #ffffff; ">
<p style="word-wrap: break-word; ">第一：</p>
<p style="word-wrap: break-word; ">JS代码</p>
<p style="word-wrap: break-word; "><code>&lt;script language=&#8221;javascript&#8221;&gt;<br style="clear: both; " />
function ShopXG(infor)<br style="clear: both; " />
{<br style="clear: both; " />
alert(&#8216;我要开网店、携购独立网店系统，模板最全，最专业的系统！&#8217;);<br style="clear: both; " />
return;<br style="clear: both; " />
}<br style="clear: both; " />
&lt;/script&gt;</code></p>
C#代码调用如下：
<p style="word-wrap: break-word; ">　　using System.Security.Permissions;</p>
<p style="word-wrap: break-word; ">　　注意： 类定义前需要加上下面两行，否则调用失败！</p>
<p style="word-wrap: break-word; ">　　[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]</p>
<p style="word-wrap: break-word; ">　　[System.Runtime.InteropServices.ComVisibleAttribute(true)]</p>
<p style="word-wrap: break-word; ">　　调用的函数：</p>
<p style="word-wrap: break-word; ">　　webBrowser1.Document.InvokeScript("ShopXG ", new string[] {&#8216;ssss&#8217;});</p>
<p style="word-wrap: break-word; ">第二：</p>
<p style="word-wrap: break-word; ">JS中调用c#函数示例</p>
C#函数如下：
<p style="word-wrap: break-word; "><code>public void ShowMessage(string message)<br style="clear: both; " />
{<br style="clear: both; " />
MessageBox.Show(&#8220;免费开网店，携购独立网店系统诚邀您的加盟！&#8221;);<br style="clear: both; " />
}</code></p>
JS里的调用方法：
<p style="word-wrap: break-word; "><code>&lt;script language=&#8221;javascript&#8221;&gt;<br style="clear: both; " />
function InvokeFunc()<br style="clear: both; " />
{<br style="clear: both; " />
window.external.ShowMessage(&#8216;呵呵&#8217;);<br style="clear: both; " />
}<br style="clear: both; " />
&lt;/script&gt;</code></p>
</span><br />
<br />
<div class="MySignatureBoard" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 14px; line-height: 24px; min-height: 31px; overflow-x: hidden; overflow-y: hidden; word-wrap: break-word; word-break: break-all; "> <img alt="Logo" src="http://www.cppblog.com/images/cppblog_com/gezidan/17469/r_Rixu_net(245_100).png" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px;border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; margin-left: 10px; margin-right: 10px; margin-top: 10px; margin-bottom: 10px; float: left; width: 245px; height: 100px; " />
<div id="MySignature" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 255px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-color: #4371a6; background-image: url(http://www.xxx.com/bk.png); background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; background-position: 15px 50%; background-repeat: no-repeat no-repeat; "> <span style="color: #333333; line-height: 21px; ">作者：<a href="http://www.rixu.net" style="text-decoration: none; color: #000000; line-height: 24px; cursor: pointer; outline-style: none; outline-width: initial; outline-color: initial; 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-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #333333; " target="_blank">Gezidan</a></span>
<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 25px; "> <span style="color: #333333; line-height: 21px; ">出处：<a href="http://www.rixu.net" style="text-decoration: none; color: #000000; line-height: 24px; cursor: pointer; outline-style: none; outline-width: initial; outline-color: initial; 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-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #333333; " target="_blank">http://www.rixu.net</a>　　　　</span></div>
<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 25px; "> <span style="color: #333333; line-height: 21px; ">本文版权归作者和博客园共有，欢迎转载，但未经作者同意必须保留此段声明，且在文章页面明显位置给出原文连接，否则保留追究法律责任的权利。</span></div>
</div>
</div>
本文转载自&nbsp;http://www.cnblogs.com/wuhuisheng/archive/2011/04/18/2020013.html
<img src ="http://www.cppblog.com/gezidan/aggbug/156975.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-27 16:43 <a href="http://www.cppblog.com/gezidan/archive/2011/09/27/156975.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>c#和javascript交互</title><link>http://www.cppblog.com/gezidan/archive/2011/09/27/156974.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Tue, 27 Sep 2011 08:41:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/27/156974.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156974.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/27/156974.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156974.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156974.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="color: #333333; font-family: verdana, ����, Arial; background-color: #ffffff; ">在asp.net开发中，经常会用到后台和前台的交互，就此总结了一点c#和javascript相互操作的方法&nbsp;<br 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; " />
<span 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; line-height: 1.5; color: #ff0000; "><span 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; line-height: 1.5; font-size: 14pt; "><span 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; line-height: 1.5; color: #000000; font-size: 14pt; ">
<h3 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 5px; font-weight: bold; color: #ffffff; background-color: #668b8b; font-size: large; "><span 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; line-height: 1.5; color: #000000; font-size: 14pt; ">1.在后台c#代码中调用jacascript的方法</span></h3>
<br 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; " />
</span></span></span>javascript代码：&nbsp;<br 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; " />
<div class="wp_codebox" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeefe6; border-left-style: solid; border-left-width: 3px; border-left-color: #4da9c2; border-top-style: dashed; border-top-width: 1px; border-top-color: #bbbbbb; border-right-style: dashed; border-right-width: 1px; border-right-color: #bbbbbb; border-bottom-style: dashed; border-bottom-width: 1px; border-bottom-color: #bbbbbb; font-family: Verdana, Helvetica, 微软雅黑, Arial, 宋体, sans-serif; background-position: initial initial; background-repeat: initial initial; ">
<pre 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; "><span 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; line-height: 1.5; color: blue; ">&lt;</span><span 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; line-height: 1.5; color: #a31515; ">script </span><span 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; line-height: 1.5; color: red; ">type</span><span 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; line-height: 1.5; color: blue; ">="text/javascript" </span><span 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; line-height: 1.5; color: red; ">language</span><span 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; line-height: 1.5; color: blue; ">="javascript"&gt;
function </span>test()
{
alert(<span 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; line-height: 1.5; color: #a31515; ">"oec2003"</span>);
<span 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; line-height: 1.5; color: blue; ">return false</span>;
}
<span 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; line-height: 1.5; color: blue; ">&lt;/</span><span 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; line-height: 1.5; color: #a31515; ">script</span><span 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; line-height: 1.5; color: blue; ">&gt;</span></pre>
</div>
<br 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; " />
c#代码：&nbsp;<br 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; " />
<div class="wp_codebox" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeefe6; border-left-style: solid; border-left-width: 3px; border-left-color: #4da9c2; border-top-style: dashed; border-top-width: 1px; border-top-color: #bbbbbb; border-right-style: dashed; border-right-width: 1px; border-right-color: #bbbbbb; border-bottom-style: dashed; border-bottom-width: 1px; border-bottom-color: #bbbbbb; font-family: Verdana, Helvetica, 微软雅黑, Arial, 宋体, sans-serif; background-position: initial initial; background-repeat: initial initial; ">
<pre 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; "><span 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; line-height: 1.5; color: blue; ">protected void </span>Button1_Click(<span 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; line-height: 1.5; color: blue; ">object </span>sender, <span 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; line-height: 1.5; color: #2b91af; ">EventArgs </span>e)
{
ClientScript.RegisterStartupScript(<span 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; line-height: 1.5; color: blue; ">this</span>.GetType(), <span 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; line-height: 1.5; color: #a31515; ">"clear"</span>, <span 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; line-height: 1.5; color: #a31515; ">"&lt;script&gt;test()&lt;/script&gt;"</span>);
}</pre>
</div>
<br 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; " />
<span 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; line-height: 1.5; font-size: 12pt; "><span 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; line-height: 1.5; font-size: 14pt; ">
<h3 style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 5px; font-weight: bold; color: #ffffff; background-color: #668b8b; font-size: large; "><span 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; line-height: 1.5; font-size: 14pt; ">2.javascript中调用c#方法</span></h3>
<br 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; " />
</span><span 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; line-height: 1.5; font-size: 10pt; ">如果c#中的方法有返回值，可以用下面方法&nbsp;<br 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; " />
c#代码&nbsp;<br 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; " />
</span>
<div class="wp_codebox" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeefe6; border-left-style: solid; border-left-width: 3px; border-left-color: #4da9c2; border-top-style: dashed; border-top-width: 1px; border-top-color: #bbbbbb; border-right-style: dashed; border-right-width: 1px; border-right-color: #bbbbbb; border-bottom-style: dashed; border-bottom-width: 1px; border-bottom-color: #bbbbbb; font-family: Verdana, Helvetica, 微软雅黑, Arial, 宋体, sans-serif; background-position: initial initial; background-repeat: initial initial; ">
<pre 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; "><span 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; line-height: 1.5; color: blue; ">public string </span>GetAuthStatus()
{
ViewState[<span 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; line-height: 1.5; color: #a31515; ">"Auth"</span>] = <span 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; line-height: 1.5; color: #a31515; ">"Red"</span>;
<span 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; line-height: 1.5; color: blue; ">return </span>ViewState[<span 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; line-height: 1.5; color: #a31515; ">"Auth"</span>].ToString();
}</pre>
</div>
<br 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; " />
<span 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; line-height: 1.5; font-size: 10pt; ">javascript代码&nbsp;<br 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; " />
<div class="wp_codebox" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeefe6; border-left-style: solid; border-left-width: 3px; border-left-color: #4da9c2; border-top-style: dashed; border-top-width: 1px; border-top-color: #bbbbbb; border-right-style: dashed; border-right-width: 1px; border-right-color: #bbbbbb; border-bottom-style: dashed; border-bottom-width: 1px; border-bottom-color: #bbbbbb; font-family: Verdana, Helvetica, 微软雅黑, Arial, 宋体, sans-serif; background-position: initial initial; background-repeat: initial initial; ">
<pre 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; "><span 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; line-height: 1.5; color: blue; ">&lt;</span><span 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; line-height: 1.5; color: #a31515; ">script </span><span 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; line-height: 1.5; color: red; ">type</span><span 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; line-height: 1.5; color: blue; ">="text/javascript" </span><span 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; line-height: 1.5; color: red; ">language</span><span 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; line-height: 1.5; color: blue; ">="javascript"&gt;
function </span>getAuth()
{
<span 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; line-height: 1.5; color: blue; ">var </span>authStatus = <span 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; line-height: 1.5; color: #a31515; ">"&lt;%=GetAuthStatus()%&gt;"</span>;
<span 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; line-height: 1.5; color: blue; ">return </span>authStatus;
}
<span 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; line-height: 1.5; color: blue; ">&lt;/</span><span 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; line-height: 1.5; color: #a31515; ">script</span><span 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; line-height: 1.5; color: blue; ">&gt;</span></pre>
</div>
<br 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; " />
如果在javascript调用的c#方法没有返回值，可以在一面中放一个button，然后在button的单击事件中去写想做的事情，在客户端的脚本中写下如下代码就可以了&nbsp;<br 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; " />
<div class="wp_codebox" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #eeefe6; border-left-style: solid; border-left-width: 3px; border-left-color: #4da9c2; border-top-style: dashed; border-top-width: 1px; border-top-color: #bbbbbb; border-right-style: dashed; border-right-width: 1px; border-right-color: #bbbbbb; border-bottom-style: dashed; border-bottom-width: 1px; border-bottom-color: #bbbbbb; font-family: Verdana, Helvetica, 微软雅黑, Arial, 宋体, sans-serif; background-position: initial initial; background-repeat: initial initial; ">
<pre 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; ">document.all(<span 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; line-height: 1.5; color: #a31515; ">"button1"</span>).click();</pre>
</div>
</span></span></span><br />
<div class="MySignatureBoard" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 14px; line-height: 24px; min-height: 31px; overflow-x: hidden; overflow-y: hidden; word-wrap: break-word; word-break: break-all; "> <img alt="Logo" src="http://www.cppblog.com/images/cppblog_com/gezidan/17469/r_Rixu_net(245_100).png" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px;border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; margin-left: 10px; margin-right: 10px; margin-top: 10px; margin-bottom: 10px; float: left; width: 245px; height: 100px; " />
<div id="MySignature" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 255px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-color: #4371a6; background-image: url(http://www.xxx.com/bk.png); background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; background-position: 15px 50%; background-repeat: no-repeat no-repeat; "> <span style="color: #333333; line-height: 21px; ">作者：<a href="http://www.rixu.net" style="text-decoration: none; color: #000000; line-height: 24px; cursor: pointer; outline-style: none; outline-width: initial; outline-color: initial; 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-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #333333; " target="_blank">Gezidan</a></span>
<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 25px; "> <span style="color: #333333; line-height: 21px; ">出处：<a href="http://www.rixu.net" style="text-decoration: none; color: #000000; line-height: 24px; cursor: pointer; outline-style: none; outline-width: initial; outline-color: initial; 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-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #333333; " target="_blank">http://www.rixu.net</a>　　　　</span></div>
<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 25px; "> <span style="color: #333333; line-height: 21px; ">本文版权归作者和博客园共有，欢迎转载，但未经作者同意必须保留此段声明，且在文章页面明显位置给出原文连接，否则保留追究法律责任的权利。</span></div>
</div>
</div>
<br />
本文转载自&nbsp;http://www.cnblogs.com/oec2003/archive/2007/11/23/969638.html
<img src ="http://www.cppblog.com/gezidan/aggbug/156974.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-27 16:41 <a href="http://www.cppblog.com/gezidan/archive/2011/09/27/156974.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>单点登录在项目中的实现</title><link>http://www.cppblog.com/gezidan/archive/2011/09/27/156938.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Tue, 27 Sep 2011 02:54:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/27/156938.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156938.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/27/156938.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156938.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156938.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 最近在做一个登录功能，纠结了好几天，一直在找一个能优雅的实现单点登录的功能。博客园有看到某人写了又臭又长的八股文式的文章，没看到有价值的东西。<br>其实单点登录最终要解决的是多个不同域名间共享cookie的问题。但是要在不同域名间共享cookie是一件很困难的事情，要在某个域名下面种cookie就必须访问该<br>域名。网上有很多方法，看到的有动态创建iframe实现，在iframe里面访问某个域名的页面种下cookie，该方法需要写一些js代码，写起来有点累，所以我最终<br>选择了用页面跳转来实现，想不到效果比我预期的好很多，浏览器几乎看不出来有跳转的痕迹。&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/27/156938.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/156938.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-27 10:54 <a href="http://www.cppblog.com/gezidan/archive/2011/09/27/156938.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>教你如何在博客里加入分享功能——分享插件（HRshare）</title><link>http://www.cppblog.com/gezidan/archive/2011/09/26/156815.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Mon, 26 Sep 2011 02:14:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/26/156815.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156815.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/26/156815.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156815.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156815.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 　　下面我要用到的插件是我自己写的，关于插件地址是：jquery.HooRay——自己做的一个jquery常用工具插件。关于分享插件的制作流程我也写了篇文章，有兴趣的可以看下：自己写的一个分享按钮的插件（可扩展，内附开发制作流程）<br>　　闲话不多说，进入正题吧，大家可以看下文章最后是不是有一排分享的按钮，那个就是最终的效果了，当然不止那一种效果，一共有以下几种效果，分别是：&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/26/156815.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/156815.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-26 10:14 <a href="http://www.cppblog.com/gezidan/archive/2011/09/26/156815.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>.NET中的加密算法总结(自定义加密Helper类)</title><link>http://www.cppblog.com/gezidan/archive/2011/09/26/156806.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Mon, 26 Sep 2011 01:48:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/26/156806.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156806.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/26/156806.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156806.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156806.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要:         相信许多人都使用过.NET提供的加密算法，而且在使用的过程我们必须了解每种加密算法的特点（对称或非对称，密钥长度和初始化向量等等）。我也看到过很多人写过.NET中加密算法总结，但我发现个别存在一些问题，很多人喜欢罗列每种加密算法的具体实现，假设我们要求实现AES和Triple DES加密算法，的确可以很多地分别给出它们的具体实现。<br>       那我们真的有必要给出每个加密算法的具体实现吗？而且这样的设计不符合OOP设计思想，最重要的是我们要维护多个加密算法啊！OK接下来让我们实行一个可扩展和好维护的加密算法Helper。&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/26/156806.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/156806.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-26 09:48 <a href="http://www.cppblog.com/gezidan/archive/2011/09/26/156806.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>CentOS 6下搭建Apache+MySQL+PHP+SSL</title><link>http://www.cppblog.com/gezidan/archive/2011/09/26/156805.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Mon, 26 Sep 2011 01:39:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/26/156805.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156805.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/26/156805.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156805.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156805.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要:         网上的一些文章都已经比较老了，现在版本高了之后，其实配置是很省力的（不考虑什么负载的话）<br>分享全过程，出了文中提到的安装epel rpmfushion 源指令不同外，其他的过程也适用与Centos 5<br>1.安装CentOS 6 ,可以选择最小安装，也可以安装桌面<br>2.升级系统<br>yum update<br>&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/26/156805.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/156805.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-26 09:39 <a href="http://www.cppblog.com/gezidan/archive/2011/09/26/156805.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>破解邮箱密码实例</title><link>http://www.cppblog.com/gezidan/archive/2011/09/26/156803.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Mon, 26 Sep 2011 01:20:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/26/156803.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156803.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/26/156803.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156803.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156803.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要:       本文介绍了如何破解E-mail邮箱以及利用获取的一个配置文件来实施滲透。在无法直接进行攻击时，邮件木马攻击以及邮箱账号破解攻击无疑是一种最佳选择。邮件木马攻击成功有两个必要条件：一是木马不被查杀，二是用户打开邮件并执行了隐藏在邮件中的木马程序。邮件木马攻击随着网民对网络安全意识的提高，其攻击成功率将会大大降低，而邮箱账号破解在破解成功后，可以很方便地了解用户的行为、获取邮件中的资料以及获取邮箱主人的个人信息等。邮箱账号破解一般有三种情况：一是用户自己忘记了邮箱密码，通过邮件服务器的“忘记密码”模块无法重新设置或者获取原密码；二是出于商业竞争或者好奇，想知道对方邮件中内容，因此对邮箱账号进行破解；三是专业性攻击，攻击邮箱获取资料、掌握个人动态以及获取个人信息等。&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/26/156803.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/156803.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-26 09:20 <a href="http://www.cppblog.com/gezidan/archive/2011/09/26/156803.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Fedora 15上做主从、双主模型的集群</title><link>http://www.cppblog.com/gezidan/archive/2011/09/23/156592.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Fri, 23 Sep 2011 01:59:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/23/156592.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156592.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/23/156592.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156592.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156592.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Fedora 15上做双主模型的集群<br>拓扑如下所示：<br> <br>-----------     ----------<br>|   HA1    |____|  HA2   |<br>|__________|    |________|<br>HA1:<br>IP:192.168.1.78/24<br>HA2:<br>IP:192.168.1.151/24<br>VIP:192.168.1.110&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/23/156592.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/156592.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-23 09:59 <a href="http://www.cppblog.com/gezidan/archive/2011/09/23/156592.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>八种主流NoSQL数据库系统对比</title><link>http://www.cppblog.com/gezidan/archive/2011/09/22/156535.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Thu, 22 Sep 2011 06:02:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/22/156535.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156535.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/22/156535.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156535.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156535.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 虽然SQL数据库是非常有用的工具，但经历了15年的一支独秀之后垄断即将被打破。这只是时间问题：被迫使用关系数据库，但最终发现不能适应需求的情况不胜枚举。<br><br>但是NoSQL数据库之间的不同，远超过两 SQL数据库之间的差别。这意味着软件架构师更应该在项目开始时就选择好一个适合的 NoSQL数据库。针对这种情况，这里对 Cassandra、 Mongodb、CouchDB、Redis、 Riak、 Membase、Neo4j和HBase进行了比较：<br><br>(编注1：NoSQL：是一项全新的数据库革命性运动，NoSQL的拥护者们提倡运用非关系型的数据存储。现今的计算机体系结构在数据存储方面要求具 备庞大的水平扩 展性，而NoSQL致力于改变这一现状。目前Google的 BigTable 和Amazon 的Dynamo使用的就是NoSQL型数据库。 参见NoSQL词条。)&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/22/156535.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/156535.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-22 14:02 <a href="http://www.cppblog.com/gezidan/archive/2011/09/22/156535.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>SQLite3 C/C++ 开发接口简介</title><link>http://www.cppblog.com/gezidan/archive/2011/09/21/156422.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Wed, 21 Sep 2011 07:12:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/21/156422.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156422.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/21/156422.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156422.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156422.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 1.0 总览<br><br>SQLite3是SQLite一个全新的版本,它虽然是在SQLite 2.8.13的代码基础之上开发的,但是使用了和之前的版本不兼容的数据库格式和API. SQLite3是为了满足以下的需求而开发的:<br><br> <br><br>l        支持UTF-16编码.<br><br>l        用户自定义的文本排序方法.<br><br>l        可以对BLOBs字段建立索引.<br><br>因此为了支持这些特性我改变了数据库的格式,建立了一个与之前版本不兼容的3.0版. 至于其他的兼容性的改变,例如全新的API等等,都将在理论介绍之后向你说明,这样可以使你最快的一次性摆脱兼容性问题.&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/21/156422.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/156422.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-21 15:12 <a href="http://www.cppblog.com/gezidan/archive/2011/09/21/156422.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>用SELinux保护你的Apache</title><link>http://www.cppblog.com/gezidan/archive/2011/09/20/156310.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Tue, 20 Sep 2011 06:18:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/20/156310.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156310.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/20/156310.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156310.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156310.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 你的Web服务器确实有可能遭受攻击，但是SELinux可以用来确保你的网站不用承受真正的伤害。<br><br>你可以运用SELinux类型来创建一个确切定义：一个服务可以做什么和它在哪里完成要做的事情。默认情况下，httpd_sys_content类型被设为/var/www，它规定httpd进程可以在该目录中工作。如果攻击者破坏了Apache Web服务器并尝试在别处写入，就像红帽和Fedora以及CentOS等相似Linux版本的默认/tmp，你需要知道你正在处理什么。如果你配置Apache来为/data目录中的内容服务，SELinux也会默认地防止这种情况。<br><br>由于这些默认设置可能造成复杂的情况，很多Linux管理员关闭SELinux。虽然关闭SELinux的确让你的服务器提供服务时更容易，但是它还是增加了安全风险。&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/20/156310.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/156310.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-20 14:18 <a href="http://www.cppblog.com/gezidan/archive/2011/09/20/156310.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>iptables实战：通过NAT转发实现私网对外发布信息</title><link>http://www.cppblog.com/gezidan/archive/2011/09/20/156309.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Tue, 20 Sep 2011 06:15:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/20/156309.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156309.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/20/156309.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156309.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156309.html</trackback:ping><description><![CDATA[<span class="Apple-style-span" style="color: #333333; font-family: 宋体; line-height: 28px; background-color: #f8f8f8; ">
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">本文假设读者已经对NAT的原理和基本用法有所了解。如不确定，可参考以下文章：</p>
<ol style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 55px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; list-style-type: none; list-style-position: outside; list-style-image: none; word-wrap: break-word; word-break: normal; ">
     <li 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: #333333; list-style-type: decimal; list-style-position: outside; list-style-image: none; word-wrap: break-word; word-break: normal; "><a target="_blank" href="http://os.51cto.com/art/200709/56169.htm" style="color: #004276; text-decoration: underline; ">如何用iptables实现Linux下强大的NAT功能</a></li>
     <li 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: #333333; list-style-type: decimal; list-style-position: outside; list-style-image: none; word-wrap: break-word; word-break: normal; "><a target="_blank" href="http://os.51cto.com/art/201103/249054.htm" style="color: #004276; text-decoration: underline; ">如何用iptables实现NAT</a></li>
     <li 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: #333333; list-style-type: decimal; list-style-position: outside; list-style-image: none; word-wrap: break-word; word-break: normal; "><a target="_blank" href="http://os.51cto.com/art/201103/249323.htm" style="color: #004276; text-decoration: underline; ">iptables nat表基本语法</a></li>
</ol>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">本文案例中，我们假设有一家ISP提供园区Internet接入服务，为了方便管理，该ISP分配给园区用户的IP地址都是私网IP，通过该私网IP用户无法向外发布信息。但是，部分用户要求建立自己的WWW服务器对外发布信息。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">我们可以在防火墙的外部网卡上绑定多个合法IP地址，然后通过ip映射使发给其中某一个IP地址的包转发至内部某一用户的WWW服务器上，然后再将该内部WWW服务器响应包伪装成该合法IP发出的包。</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">具体的IP分配如下：&nbsp;</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">（1）该ISP分配给A单位www服务器的IP为:</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">私网ip:172.168.92.100</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">公网ip:210.95.33.100</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">（2）该ISP分配给B单位www服务器的IP为:</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">私网ip:172.168.92.200</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">公网ip:210.95.33.200</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">（3）Linux防火墙的IP地址分别为:</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">内网接口eth1:172.168.92.10</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">外网接口eth0:210.95.33.1</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">然后，我们需要进行如下步骤地操作：</p>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">（1）将分配给A、B单位的真实ip绑定到防火墙的外网接口，以root权限执行以下命令：</p>
<pre 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; color: #333333; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #e6e6e6; background-position: initial initial; background-repeat: initial initial; ">#ifconfig eth0 add 210.95.33.100 netmask 255.255.255.0
#ifconfig eth0 add 210.95.33.200 netmask 255.255.255.0</pre>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">（2）成功升级内核后安装iptables，然后执行以下脚本载入相关模块：</p>
<pre 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; color: #333333; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #e6e6e6; background-position: initial initial; background-repeat: initial initial; ">modprobe ip_tables
modprobe ip_nat_ftp</pre>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">（3）对防火墙接收到的目的ip为210.95.33.100和210.95.33.200的所有数据包进行目的NAT(DNAT)：</p>
<pre 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; color: #333333; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #e6e6e6; background-position: initial initial; background-repeat: initial initial; ">#iptables -A PREROUTING -i eth0 -d 210.95.33.100 -j DNAT --to 172.168.92.100
#iptables -A PREROUTING -i eth0 -d 210.95.33.200 -j DNAT --to 172.168.92.200</pre>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">（4）对防火墙接收到的源ip地址为172.168.92.100和172.168.92.200的数据包进行源NAT(SNAT):</p>
<pre 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; color: #333333; font-family: 'Courier New', monospace; font-size: 12px; width: 591px; overflow-x: auto; overflow-y: auto; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #e6e6e6; background-position: initial initial; background-repeat: initial initial; ">#iptables -A POSTROUTING -o eth0 -s 172.168.92.100 -j SNAT --to 210.95.33.100
#iptables -A POSTROUTING -o eth0 -s 172.168.92.200 -j SNAT --to 210.95.33.200</pre>
<p style="margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: #333333; background-color: transparent; text-indent: 28px; ">这样，所有目的ip为210.95.33.100和210.95.33.200的数据包都将分别被转发给172.168.92.100和172.168.92.200；而所有来自172.168.92.100和172.168.92.200的数据包都将分别被伪装成由210.95.33.100和210.95.33.200，从而也就实现了ip映射。</p>
</span><div class="MySignatureBoard" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 14px; line-height: 24px; min-height: 31px; overflow-x: hidden; overflow-y: hidden; word-wrap: break-word; word-break: break-all; "> <img alt="Logo" src="http://www.cppblog.com/images/cppblog_com/gezidan/17469/r_Rixu_net(245_100).png" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px;border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; margin-left: 10px; margin-right: 10px; margin-top: 10px; margin-bottom: 10px; float: left; width: 245px; height: 100px; " />
<div id="MySignature" style="padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 255px; margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-width: 2px; border-right-width: 2px; border-bottom-width: 2px; border-left-width: 2px; border-color: #4371a6; background-image: url(http://www.xxx.com/bk.png); background-attachment: scroll; background-origin: initial; background-clip: initial; background-color: transparent; background-position: 15px 50%; background-repeat: no-repeat no-repeat; "> <span style="color: #333333; line-height: 21px; ">作者：<a href="http://www.rixu.net" style="text-decoration: none; color: #000000; line-height: 24px; cursor: pointer; outline-style: none; outline-width: initial; outline-color: initial; 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-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #333333; " target="_blank">Gezidan</a></span>
<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 25px; "> <span style="color: #333333; line-height: 21px; ">出处：<a href="http://www.rixu.net" style="text-decoration: none; color: #000000; line-height: 24px; cursor: pointer; outline-style: none; outline-width: initial; outline-color: initial; 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-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: #333333; " target="_blank">http://www.rixu.net</a>　　　　</span></div>
<div style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 25px; "> <span style="color: #333333; line-height: 21px; ">本文版权归作者和博客园共有，欢迎转载，但未经作者同意必须保留此段声明，且在文章页面明显位置给出原文连接，否则保留追究法律责任的权利。</span></div>
</div>
</div><img src ="http://www.cppblog.com/gezidan/aggbug/156309.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-20 14:15 <a href="http://www.cppblog.com/gezidan/archive/2011/09/20/156309.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>如何用iptables实现Linux下强大的NAT功能</title><link>http://www.cppblog.com/gezidan/archive/2011/09/20/156308.html</link><dc:creator>日需博客</dc:creator><author>日需博客</author><pubDate>Tue, 20 Sep 2011 06:11:00 GMT</pubDate><guid>http://www.cppblog.com/gezidan/archive/2011/09/20/156308.html</guid><wfw:comment>http://www.cppblog.com/gezidan/comments/156308.html</wfw:comment><comments>http://www.cppblog.com/gezidan/archive/2011/09/20/156308.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/gezidan/comments/commentRss/156308.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/gezidan/services/trackbacks/156308.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 本文主要介绍如何使用iptbales实现linux2.4下的强大的NAT功能。关于iptables的详细语法请参考“用iptales实现包过虑型防火墙”一文。需要申明的是，本文绝对不是 NAT-HOWTO的简单重复或是中文版，在整个的叙述过程中，作者都在试图用自己的语言来表达自己的理解，自己的思想。&nbsp;&nbsp;<a href='http://www.cppblog.com/gezidan/archive/2011/09/20/156308.html'>阅读全文</a><img src ="http://www.cppblog.com/gezidan/aggbug/156308.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/gezidan/" target="_blank">日需博客</a> 2011-09-20 14:11 <a href="http://www.cppblog.com/gezidan/archive/2011/09/20/156308.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>