<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>结网 &#187; 开源</title>
	<atom:link href="http://blog.liuhongwei.cn/category/my-opensource/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.liuhongwei.cn</link>
	<description>Agile, Startup, 产品管理, Google开发, iPhone开发</description>
	<lastBuildDate>Tue, 17 Jan 2012 14:30:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>没有VPN，用SSH也能翻墙</title>
		<link>http://blog.liuhongwei.cn/my-opensource/ssh-socks5/</link>
		<comments>http://blog.liuhongwei.cn/my-opensource/ssh-socks5/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 04:30:13 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[开源]]></category>
		<category><![CDATA[工具]]></category>
		<category><![CDATA[教学]]></category>

		<guid isPermaLink="false">http://blog.liuhongwei.cn/?p=327</guid>
		<description><![CDATA[用VPN的越来越多，访问youTube速度太慢，自己有主机并具有SSH权限的帐号的话，直接用SSH socks5也可以翻墙浏览。 下载plink.exe 在主机上申请或直接添加一个具有SSH权限的用户帐号； 运行plink -N sshaccount@yourhosting.com -pw sshaccountpassword -D 127.0.0.1:1915 不要关闭运行后的命令行窗口； 在firefox中设置socks5代理； 在Firefox中设置允许使用远程DNS； 1. 在Firefox的地址栏输入 about:config 2. Firefox 会有安全警告提示，不管它，点按钮继续 3. 找到“network.proxy.socks_remote_dns”这一项，设为True（默认是False），搞定！ enjoy! 参考： http://youv.info/2010/04/20/%E5%88%A9%E7%94%A8dreamhost%E7%9A%84ssh%E8%B4%A6%E5%8F%B7%E7%BF%BB%E5%A2%99/ http://soido.org/blog/840 &#160;]]></description>
			<content:encoded><![CDATA[<p>用VPN的越来越多，访问youTube速度太慢，自己有主机并具有SSH权限的帐号的话，直接用SSH socks5也可以翻墙浏览。</p>
<p>下载plink.exe</p>
<p>在主机上申请或直接添加一个具有SSH权限的用户帐号；</p>
<p>运行plink -N sshaccount@yourhosting.com -pw sshaccountpassword -D 127.0.0.1:1915 不要关闭运行后的命令行窗口；</p>
<p>在firefox中设置socks5代理；</p>
<p>在Firefox中设置允许使用远程DNS；</p>
<blockquote><p>1. 在<strong>Firefox</strong>的地址栏输入 about:config<br />
2. Firefox 会有安全警告提示，不管它，点按钮继续<br />
3. 找到“network.proxy.socks_remote_dns”这一项，设为True（默认是False），搞定！</p></blockquote>
<p>enjoy!</p>
<p>参考：</p>
<ul>
<li><a href="http://youv.info/2010/04/20/%E5%88%A9%E7%94%A8dreamhost%E7%9A%84ssh%E8%B4%A6%E5%8F%B7%E7%BF%BB%E5%A2%99/">http://youv.info/2010/04/20/%E5%88%A9%E7%94%A8dreamhost%E7%9A%84ssh%E8%B4%A6%E5%8F%B7%E7%BF%BB%E5%A2%99/</a></li>
<li><a href="http://soido.org/blog/840">http://soido.org/blog/840</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liuhongwei.cn/my-opensource/ssh-socks5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VMWare Fusion 3 严重变慢</title>
		<link>http://blog.liuhongwei.cn/my-opensource/vmware-fusion-3-slow/</link>
		<comments>http://blog.liuhongwei.cn/my-opensource/vmware-fusion-3-slow/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 04:51:27 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[开源]]></category>
		<category><![CDATA[工具]]></category>

		<guid isPermaLink="false">http://blog.liuhongwei.cn/?p=325</guid>
		<description><![CDATA[从VMWare Fusion 2升级到3，Mac反而变的极慢，硬盘也一直在狂转。查了一下，原来，Fusion3启动后，OS X Snow Leopard后台会自动启用Spotlight来读取和索引新启动的虚拟机的硬盘内容，如果虚拟机硬盘10G，那么要索引很久。而且，最变态的是，索引之后并没有保存，下次启动还会再次索引，整个系统又会变慢很久。 查了一下，似乎是个普遍问题，解决办法更简单，直接disable Spotlight对Fusion的索引即可。在控制台的命令行执行下列命令： defaults write com.vmware.fusion PLLibrarySpotlightSearchDone -bool YES]]></description>
			<content:encoded><![CDATA[<p>从VMWare Fusion 2升级到3，Mac反而变的极慢，硬盘也一直在狂转。查了一下，原来，Fusion3启动后，OS X Snow Leopard后台会自动启用Spotlight来读取和索引新启动的虚拟机的硬盘内容，如果虚拟机硬盘10G，那么要索引很久。而且，最变态的是，索引之后并没有保存，下次启动还会再次索引，整个系统又会变慢很久。</p>
<p>查了一下，似乎是个普遍问题，解决办法更简单，直接disable Spotlight对Fusion的索引即可。在控制台的命令行执行下列命令：</p>
<blockquote><p><strong>defaults write com.vmware.fusion PLLibrarySpotlightSearchDone -bool YES</strong></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.liuhongwei.cn/my-opensource/vmware-fusion-3-slow/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>开心大盗，开源免费的开心网外挂服务</title>
		<link>http://blog.liuhongwei.cn/my-opensource/kaixin001-dadao-free/</link>
		<comments>http://blog.liuhongwei.cn/my-opensource/kaixin001-dadao-free/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 07:54:48 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[开源]]></category>
		<category><![CDATA[工具]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[GWT]]></category>

		<guid isPermaLink="false">http://blog.liuhongwei.cn/?p=125</guid>
		<description><![CDATA[自从分析了开心网成功的秘诀——越堕落越快乐之后，开心网上的好友越来越多，当然可偷的东西也更多了，真是偷菜偷到手软。每天偷菜、偷动物花费了大量的时间，用了几个外挂，一是不知道实现方式，担心帐号被封；二是本地网速的原因，速度仍然不尽如人意。于是利用闲暇时间，自己动手写了一个开心网外挂的在线服务，开心大盗，随时随地，轻轻一点，手到擒来。外挂运行于服务器上，速度比本地运行更快。 开心大盗采用Java版Google App Engine开发，整合了Google的GWT。开源，免费，放心使用！ 开心大盗：http://tou001.appspot.com/ 源代码：http://code.google.com/p/kaixindadao/ 作者博客：http://blog.liuhongwei.cn/ 如果您好东西太多，想分享给作者，并有重度受虐倾向的话，请点击这里添加作者为您的开心网好友 开心大盗功能： 收获自己的菜地 偷好友的菜地 收获牧场 TODO 偷牧场 TODO 停车 TODO 种菜 TODO 买动物 TODO 做最赚钱的工作 访问朋友买卖，每天获取100块 马甲买卖炒作 TODO]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-126" title="kaixin_dadao" src="http://blog.liuhongwei.cn/wp-content/uploads/2009/09/kaixin_dadao.png" alt="kaixin_dadao" width="148" height="67" />自从分析了<a href="http://blog.liuhongwei.cn/web2/kaixin001-evil/">开心网成功的秘诀——越堕落越快乐</a>之后，开心网上的好友越来越多，当然可偷的东西也更多了，真是偷菜偷到手软。每天偷菜、偷动物花费了大量的时间，用了几个外挂，一是不知道实现方式，担心帐号被封；二是本地网速的原因，速度仍然不尽如人意。于是利用闲暇时间，自己动手写了一个开心网外挂的在线服务，<a href="http://tou001.appspot.com/">开心大盗</a>，随时随地，轻轻一点，手到擒来。外挂运行于服务器上，速度比本地运行更快。</p>
<p>开心大盗采用Java版<a href="http://blog.liuhongwei.cn/tag/google-app-engine/">Google App Engine</a>开发，整合了Google的<a href="http://blog.liuhongwei.cn/tag/GWT/">GWT</a>。<strong>开源</strong>，<strong>免费，放心使用</strong>！</p>
<ul>
<li><strong><span style="color: #0000ff;">开心大盗：</span></strong><strong><span style="color: #0000ff;"><a href="http://tou001.appspot.com/">http://tou001.appspot.com/</a></span></strong></li>
<li>源代码：<a href="http://code.google.com/p/kaixindadao/">http://code.google.com/p/kaixindadao/</a></li>
<li>作者博客：<a href="http://blog.liuhongwei.cn/">http://blog.liuhongwei.cn/</a></li>
<li>如果您好东西太多，想分享给作者，并有重度受虐倾向的话，<a href="http://www.kaixin001.com/reg/?uid=39063077&amp;usercode=920880c26c8ddaf2a42101b182b3fb41_39063077">请点击这里添加作者为您的开心网好友</a></li>
</ul>
<p><strong><img class="alignleft size-full wp-image-127" title="kaixin_dadao_home_dogs" src="http://blog.liuhongwei.cn/wp-content/uploads/2009/09/home_dogs.png" alt="kaixin_dadao_home_dogs" width="488" height="216" />开心大盗功能：</strong></p>
<ul>
<li>收获自己的菜地</li>
<li>偷好友的菜地</li>
<li>收获牧场 TODO</li>
<li>偷牧场 TODO</li>
<li>停车 TODO</li>
<li>种菜 TODO</li>
<li>买动物 TODO</li>
<li>做最赚钱的工作</li>
<li>访问朋友买卖，每天获取100块</li>
<li>马甲买卖炒作 TODO</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.liuhongwei.cn/my-opensource/kaixin001-dadao-free/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>TopCoder竞赛：C++, STL 用法快速入门</title>
		<link>http://blog.liuhongwei.cn/my-opensource/topcoder-cpp-stl/</link>
		<comments>http://blog.liuhongwei.cn/my-opensource/topcoder-cpp-stl/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 04:49:42 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[开源]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[STL]]></category>
		<category><![CDATA[TopCoder]]></category>

		<guid isPermaLink="false">http://blog.liuhongwei.cn/?p=66</guid>
		<description><![CDATA[2002年就开始参加TopCoder的算法竞赛。当时一周举行两次，每个房间12个人参加比赛，前三名都有现金奖励。有空参加一下，练练算法，给头脑保鲜。 下面总结了一些题目中常用的STL库的用法。 &#160; #include &#60;algorithm&#62; #include &#60;string&#62; #include &#60;vector&#62; #include &#60;map&#62; #include &#60;iostream&#62; &#160; using namespace std; &#160; //递归 int GetN&#40;int n&#41; &#123; if &#40;n==1&#41; return 1; else return GetN&#40;n-1&#41;;...]]></description>
			<content:encoded><![CDATA[<p>2002年就开始参加<a href="http://www.topcoder.com/">TopCoder</a>的算法竞赛。当时一周举行两次，每个房间12个人参加比赛，前三名都有现金奖励。有空参加一下，练练算法，给头脑保鲜。</p>
<p>下面总结了一些题目中常用的STL库的用法。</p>
<p>
<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">&nbsp;
<span style="color: #339900;">#include &lt;algorithm&gt;</span>
<span style="color: #339900;">#include &lt;string&gt;</span>
<span style="color: #339900;">#include &lt;vector&gt;</span>
<span style="color: #339900;">#include &lt;map&gt;</span>
<span style="color: #339900;">#include &lt;iostream&gt;</span>
&nbsp;
<span style="color: #0000ff;">using</span> <span style="color: #0000ff;">namespace</span> std<span style="color: #008080;">;</span>
&nbsp;
<span style="color: #666666;">//递归</span>
<span style="color: #0000ff;">int</span> GetN<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> n<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>n<span style="color: #000080;">==</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span> <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">1</span><span style="color: #008080;">;</span>
	<span style="color: #0000ff;">else</span> <span style="color: #0000ff;">return</span> GetN<span style="color: #008000;">&#40;</span>n<span style="color: #000040;">-</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">void</span> TestSTL_main<span style="color: #008000;">&#40;</span> <span style="color: #0000ff;">int</span> argc, <span style="color: #0000ff;">char</span><span style="color: #000040;">*</span> argv<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> <span style="color: #008000;">&#41;</span>
<span style="color: #666666;">//void main( int argc, char* argv[] )</span>
<span style="color: #008000;">&#123;</span>
	<span style="color: #ff0000; font-style: italic;">/******** STL **********/</span>
&nbsp;
	<span style="color: #666666;">//string的用法</span>
	<span style="color: #008000;">&#123;</span>
		string s <span style="color: #000080;">=</span> <span style="color: #FF0000;">&quot;mmmmm&quot;</span><span style="color: #008080;">;</span>
		string s2<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;ss22&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
		s2.<span style="color: #007788;">insert</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">2</span>,<span style="color: #FF0000;">&quot;kkkkk&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//把&quot;kkkkk&quot;插到s2的第2个位置之前（位置从0开始）</span>
		s2<span style="color: #000040;">+</span><span style="color: #000080;">=</span>s<span style="color: #000040;">+</span><span style="color: #FF0000;">&quot;44444&quot;</span><span style="color: #000040;">+</span><span style="color: #FF0000;">'c'</span><span style="color: #008080;">;</span>
		<span style="color: #0000ff;">const</span> <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>pc <span style="color: #000080;">=</span> s.<span style="color: #007788;">c_str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span><span style="color: #666666;">//把string转成C-style的string,以\0终了</span>
		<span style="color: #0000ff;">const</span> <span style="color: #0000ff;">char</span> <span style="color: #000040;">*</span>ptr1 <span style="color: #000080;">=</span> s.<span style="color: #007788;">data</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;;</span><span style="color: #666666;">//把string转成字符串</span>
		<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>s2<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span> <span style="color: #000080;">==</span> <span style="color: #FF0000;">'k'</span><span style="color: #008000;">&#41;</span> s2<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span><span style="color: #FF0000;">'C'</span><span style="color: #008080;">;</span>
		s<span style="color: #000040;">+</span><span style="color: #000080;">=</span><span style="color: #FF0000;">&quot;jkl&quot;</span><span style="color: #008080;">;</span>
		s<span style="color: #000040;">+</span><span style="color: #000080;">=</span><span style="color: #FF0000;">'m'</span><span style="color: #008080;">;</span>
		s.<span style="color: #007788;">push_back</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//把'\n'（换行符）放在s的最后一个位置</span>
		reverse<span style="color: #008000;">&#40;</span>s.<span style="color: #007788;">begin</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>, s.<span style="color: #007788;">end</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//反转</span>
		basic_string <span style="color: #000080;">&lt;</span><span style="color: #0000ff;">char</span><span style="color: #000080;">&gt;</span><span style="color: #008080;">::</span><span style="color: #007788;">iterator</span> str_Iter<span style="color: #008080;">;</span> <span style="color: #666666;">//遍历</span>
		str_Iter <span style="color: #000080;">=</span> s.<span style="color: #007788;">begin</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
&nbsp;
	<span style="color: #666666;">//vector的用法</span>
	<span style="color: #008000;">&#123;</span>
		vector<span style="color: #000080;">&lt;</span><span style="color: #0000ff;">int</span><span style="color: #000080;">&gt;</span> v<span style="color: #008080;">;</span>
		v.<span style="color: #007788;">push_back</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">8</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//向v中插入元素，元素的值是8</span>
		<span style="color: #0000ff;">int</span> iLen <span style="color: #000080;">=</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span><span style="color: #008000;">&#41;</span>v.<span style="color: #007788;">size</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
		<span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> i<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;</span>iLen<span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
		<span style="color: #008000;">&#123;</span>
			<span style="color: #0000ff;">int</span> k <span style="color: #000080;">=</span> v<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//k==8</span>
		<span style="color: #008000;">&#125;</span>
	<span style="color: #008000;">&#125;</span>
&nbsp;
	<span style="color: #666666;">//map的用法</span>
	<span style="color: #008000;">&#123;</span>
		map<span style="color: #000080;">&lt;</span><span style="color: #0000ff;">int</span>, <span style="color: #0000ff;">int</span><span style="color: #000080;">&gt;</span> mp<span style="color: #008080;">;</span>
		<span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> i<span style="color: #000080;">=</span><span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>i<span style="color: #000080;">&lt;</span><span style="color: #0000dd;">3</span><span style="color: #008080;">;</span>i<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span>
		<span style="color: #008000;">&#123;</span>
			mp<span style="color: #008000;">&#91;</span>i<span style="color: #008000;">&#93;</span><span style="color: #000080;">=</span>i<span style="color: #000040;">*</span><span style="color: #0000dd;">2</span><span style="color: #008080;">;</span> <span style="color: #666666;">//通过[第一个元素]来访问第二个元素</span>
		<span style="color: #008000;">&#125;</span>
&nbsp;
		<span style="color: #0000ff;">int</span> total <span style="color: #000080;">=</span> <span style="color: #0000dd;">100</span><span style="color: #008080;">;</span>
		map<span style="color: #000080;">&lt;</span><span style="color: #0000ff;">int</span>, <span style="color: #0000ff;">int</span><span style="color: #000080;">&gt;</span><span style="color: #008080;">::</span><span style="color: #007788;">iterator</span> it <span style="color: #000080;">=</span> mp.<span style="color: #007788;">begin</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
		<span style="color: #0000ff;">for</span><span style="color: #008000;">&#40;</span><span style="color: #008080;">;</span>it<span style="color: #000040;">!</span><span style="color: #000080;">=</span>mp.<span style="color: #007788;">end</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>it<span style="color: #000040;">++</span><span style="color: #008000;">&#41;</span> <span style="color: #666666;">//遍历mp</span>
		<span style="color: #008000;">&#123;</span>
			total<span style="color: #000040;">+</span><span style="color: #000080;">=</span>it<span style="color: #000040;">-</span><span style="color: #000080;">&gt;</span>second<span style="color: #008080;">;</span> <span style="color: #666666;">//通过iterator it来访问第二个元素</span>
		<span style="color: #008000;">&#125;</span>
		<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;total=&quot;</span><span style="color: #000080;">&lt;&lt;</span>total<span style="color: #000080;">&lt;&lt;</span>endl<span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
&nbsp;
	<span style="color: #666666;">//算法</span>
	<span style="color: #0000ff;">int</span> n <span style="color: #000080;">=</span> GetN<span style="color: #008000;">&#40;</span><span style="color: #0000dd;">5</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//递归n!=n*(n-1)*(n-2)*…*1</span>
	<span style="color: #0000ff;">int</span> aa<span style="color: #000080;">=</span><span style="color: #0000dd;">10</span>,bb<span style="color: #000080;">=</span><span style="color: #0000dd;">15</span><span style="color: #008080;">;</span>
	<span style="color: #0000ff;">int</span> maxi <span style="color: #000080;">=</span> max<span style="color: #008000;">&#40;</span>aa,bb<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//最大值</span>
	<span style="color: #0000ff;">int</span> mini <span style="color: #000080;">=</span> min<span style="color: #008000;">&#40;</span>aa,bb<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//最小值</span>
	<span style="color: #0000ff;">int</span> absi <span style="color: #000080;">=</span> <span style="color: #0000dd;">abs</span><span style="color: #008000;">&#40;</span><span style="color: #000040;">-</span><span style="color: #0000dd;">12</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//绝对值</span>
	vector<span style="color: #000080;">&lt;</span>string<span style="color: #000080;">&gt;</span> v<span style="color: #008080;">;</span>
	v.<span style="color: #007788;">push_back</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;hello&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	v.<span style="color: #007788;">push_back</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;123&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	v.<span style="color: #007788;">push_back</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;no&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	sort<span style="color: #008000;">&#40;</span>v.<span style="color: #007788;">begin</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>,v.<span style="color: #007788;">end</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//按照字母顺序，把v里面的元素排序</span>
	<span style="color: #0000ff;">int</span> savei<span style="color: #008080;">;</span>
	<span style="color: #0000dd;">sscanf</span><span style="color: #008000;">&#40;</span>v<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #008000;">&#93;</span>.<span style="color: #007788;">c_str</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>, <span style="color: #FF0000;">&quot;%d&quot;</span>, <span style="color: #000040;">&amp;</span>savei<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//把字符串“123”转换成数字123</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;savei=&quot;</span><span style="color: #000080;">&lt;&lt;</span>savei<span style="color: #000080;">&lt;&lt;</span>endl<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">char</span> buf<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">100</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	<span style="color: #0000dd;">sprintf</span><span style="color: #008000;">&#40;</span>buf,<span style="color: #FF0000;">&quot;v[1]=%d&quot;</span>,savei<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//把内容打印进字符串</span>
	<span style="color: #0000dd;">cout</span><span style="color: #000080;">&lt;&lt;</span><span style="color: #FF0000;">&quot;buf=&quot;</span><span style="color: #000080;">&lt;&lt;</span>buf<span style="color: #000080;">&lt;&lt;</span>endl<span style="color: #008080;">;</span>
&nbsp;
<span style="color: #008000;">&#125;</span></pre></div></div>
</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liuhongwei.cn/my-opensource/topcoder-cpp-stl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>发布免费开源HTTPS代理：G-Proxy</title>
		<link>http://blog.liuhongwei.cn/my-opensource/g-proxy-free-https/</link>
		<comments>http://blog.liuhongwei.cn/my-opensource/g-proxy-free-https/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 14:49:36 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[开源]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[my]]></category>

		<guid isPermaLink="false">http://blog.liuhongwei.cn/?p=59</guid>
		<description><![CDATA[做了G-Proxy，一个开源免费的HTTPS代理服务器，使用的正是新鲜出炉的Java版Google App Engine。从97年开始使用Java到现在也有12年了，从未感觉Java如此强大。Google的这一步很英明，Sun倒下了，Google接过了接力棒，云端Java会让Java从企业级真正走向web2.0级。任何一个熟悉企业级Java开发的人都可以在1天之内开始云计算的开发，Google一统江湖的日子不远了。 安装好的服务器，可以直接使用：https://g-proxy.appspot.com/ 源代码放在Google Code：http://code.google.com/p/g-proxy/ 发布说明：http://blog.liuhongwei.cn/my-opensource/g-proxy-free-https/ G-Proxy具有的功能： 完整的代理服务器功能； 自动把获取的HTML文件中的图片和链接，加上代理服务器的网址； HTTPS功能，这样可以保护您的数据不被任何人看到； 代理服务器不保存任何访问记录，充分保护您的隐私； 暂时不支持中文编码；]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-63" title="Google App Engine Java" src="http://blog.liuhongwei.cn/wp-content/uploads/2009/06/appengine-java.png" alt="Google App Engine Java" width="320" height="247" />做了<a href="http://code.google.com/p/g-proxy/">G-Proxy，一个开源免费的HTTPS代理服务器</a>，使用的正是新鲜出炉的Java版Google App Engine。从97年开始使用Java到现在也有12年了，从未感觉Java如此强大。Google的这一步很英明，Sun倒下了，Google接过了接力棒，<a href="http://code.google.com/appengine/docs/java/">云端Java</a>会让Java从企业级真正走向web2.0级。任何一个熟悉企业级Java开发的人都可以在1天之内开始云计算的开发，Google一统江湖的日子不远了。</p>
<ul>
<li>安装好的服务器，可以直接使用：<a href="https://g-proxy.appspot.com/">https://g-proxy.appspot.com/</a></li>
<li>源代码放在Google Code：<a href="http://code.google.com/p/g-proxy/">http://code.google.com/p/g-proxy/</a></li>
<li>发布说明：<span id="sample-permalink"><a href="http://blog.liuhongwei.cn/my-opensource/g-proxy-free-https/">http://blog.liuhongwei.cn/my-opensource/<span id="editable-post-name" title="点击编辑这部分固定链接">g-proxy-free-https</span>/</a></span></li>
</ul>
<p>G-Proxy具有的功能：</p>
<ul>
<li>完整的代理服务器功能；</li>
<li>自动把获取的HTML文件中的图片和链接，加上代理服务器的网址；</li>
<li>HTTPS功能，这样可以保护您的数据不被任何人看到；</li>
<li>代理服务器不保存任何访问记录，充分保护您的隐私；</li>
<li>暂时不支持中文编码；</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.liuhongwei.cn/my-opensource/g-proxy-free-https/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>《Google API大全》，近7日销售排名第17</title>
		<link>http://blog.liuhongwei.cn/my-opensource/google-api-bible-ranking-17/</link>
		<comments>http://blog.liuhongwei.cn/my-opensource/google-api-bible-ranking-17/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 03:13:36 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[开源]]></category>
		<category><![CDATA[云计算]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[推荐]]></category>

		<guid isPermaLink="false">http://blog.liuhongwei.cn/?p=42</guid>
		<description><![CDATA[上网第一周，《Google API大全》已经名列中国互动出版网计算机类的近7日销售排行榜第17位。  Shameless self-promotion 中国互动出版网（China-pub）成立于2000年，是中国最早的一批网络书店，最早主营计算机图书，我买计算机方面图书的首选网络书店。现已扩展到通信、经济管理、数理化、各类专业技术、教育等领域。]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-43" title="google api bible ranking No.17 at china-pub" src="http://blog.liuhongwei.cn/wp-content/uploads/2009/06/google-api-bible-ranking17-china-pub.jpg" alt="google api bible ranking No.17 at china-pub" width="310" height="428" />上网第一周，《<a href="http://blog.liuhongwei.cn/my-opensource/google-api-bible-release/">Google API大全</a>》已经名列<a href="http://www.china-pub.com/rank/?type=59&amp;act=day&amp;v=7">中国互动出版网计算机类的近7日销售排行榜</a>第17位。</p>
<p style="text-align: center;"><img class="alignnone size-full wp-image-44" title="you rule" src="http://blog.liuhongwei.cn/wp-content/uploads/2009/06/you-rule.gif" alt="you rule" width="50" height="50" /><br />
 <span style="color: #c0c0c0;">Shameless self-promotion</span></p>
<p>中国互动出版网（China-pub）成立于2000年，是中国最早的一批网络书店，最早主营计算机图书，我买计算机方面图书的首选网络书店。现已扩展到通信、经济管理、数理化、各类专业技术、教育等领域。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liuhongwei.cn/my-opensource/google-api-bible-ranking-17/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>《Google API大全：编程·开发·实例》6月5日面市</title>
		<link>http://blog.liuhongwei.cn/my-opensource/google-api-bible-release/</link>
		<comments>http://blog.liuhongwei.cn/my-opensource/google-api-bible-release/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 14:36:55 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[开源]]></category>
		<category><![CDATA[云计算]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google App Engine]]></category>

		<guid isPermaLink="false">http://blog.liuhongwei.cn/?p=30</guid>
		<description><![CDATA[算起来，用Google API来开发web系统已经有1年多了。一年前，参加Google开发者大会时的情景还历历在目。各大公司的会议将和讲座参加了很多，但是很少有像参加完Google大会之后这么激动。或许是被Google的创新精神所折服，或许是被Google API的强大威力所感召，不久之后，结合了Google App Engine，Google Ajax Search和Google Gadget的RankRadar Tracking 便诞生了。半年多来，RankRadar系统在Google云计算平台上，顺畅地奔跑着，每天都为用户抓取、保存、展示着数据，轻松应对大数据量的访问。Google平台的强悍可见一斑。 使用了Google API这么久，现在终于有机会把自己的经验分享出来，真是一件很荣幸的事情。我与数位Google公司的一线工程师，还有几位活跃在技术社区的开发者一起合著了《Google API大全：编程·开发·实例》这本书。6月5日，Google 2009 年开发者日大会上，将会正式发布。 我写作的章节如下： 第11章 小工具开发——Google Gadgets API 第26章 网络广告整合——Google AdSense API 第35章 让应用支持桌面搜索——Google Desktop Search APIs 本书书如其名，确实很全，囊括了绝大多数的Google API，既提供了对Google...]]></description>
			<content:encoded><![CDATA[<p>算起来，用Google API来开发web系统已经有1年多了。一年前，参加Google开发者大会时的情景还历历在目。各大公司的会议将和讲座参加了很多，但是很少有像参加完Google大会之后这么激动。或许是被Google的创新精神所折服，或许是被Google API的强大威力所感召，不久之后，结合了Google App Engine，Google Ajax Search和Google Gadget的<a href="http://www.rankradar.com/">RankRadar Tracking</a> 便诞生了。半年多来，RankRadar系统在Google云计算平台上，顺畅地奔跑着，每天都为用户抓取、保存、展示着数据，轻松应对大数据量的访问。Google平台的强悍可见一斑。</p>
<p><img class="alignleft size-medium wp-image-32" title="google-api-bible-face" src="http://blog.liuhongwei.cn/wp-content/uploads/2009/06/google-api-bible-face-232x300.jpg" alt="google-api-bible-face" width="232" height="300" />使用了Google API这么久，现在终于有机会把自己的经验分享出来，真是一件很荣幸的事情。我与数位Google公司的一线工程师，还有几位活跃在技术社区的开发者一起合著了<a href="http://www.douban.com/subject/3764948/">《Google API大全：编程·开发·实例》</a>这本书。6月5日，<a href="http://code.google.com/intl/zh-CN/events/developerday/2009/home.html">Google 2009 年开发者日</a>大会上，将会正式发布。</p>
<p>我写作的章节如下：</p>
<ul>
<li>第11章 小工具开发——Google Gadgets API</li>
<li>第26章 网络广告整合——Google AdSense API</li>
<li>第35章 让应用支持桌面搜索——Google Desktop Search APIs</li>
</ul>
<p>本书书如其名，确实很全，囊括了绝大多数的Google API，既提供了对Google API的全面认识，也让读者很容易的结合示例开发出自己的应用。“学习Google API，与Google一起编织互联网！”站在业界领导者的肩膀上，才能更好的专注于自己的核心业务，把网结好，从而为用户创造更多的价值。好的产品，自己会销售！祝愿读者朋友们使用了Google API，都能开辟出自己的一片天地！</p>
<p>本书相关的链接：</p>
<div><span class="Apple-style-span" style="word-spacing: 0px; font: 16px 'Times New Roman'; text-transform: none; color: #000000; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span class="Apple-style-span" style="font-size: 12px; font-family: arial;">互动出版网<span class="Apple-converted-space"> ，有免费</span><br />
<a style="color: #0000cc;" rel="nofollow" href="http://www.china-pub.com/195616" target="_blank">http://www.china-pub.com/195616</a><span class="Apple-converted-space"> </span></span></span></div>
<p><span class="Apple-style-span" style="word-spacing: 0px; font: 16px 'Times New Roman'; text-transform: none; color: #000000; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span class="Apple-style-span" style="font-size: 12px; font-family: arial;">豆瓣<span class="Apple-converted-space"> </span><br />
<a style="color: #551a8b;" rel="nofollow" href="http://www.douban.com/subject/3764948/" target="_blank">http://www.douban.com/subject/3764948/</a><span class="Apple-converted-space"> </span></p>
<p>配套源代码和相关的说明<br />
<a style="color: #551a8b;" rel="nofollow" href="http://code.google.com/p/google-api-broadview/" target="_blank">http://code.google.com/p/google-api-broadview/</a><span class="Apple-converted-space"> </span></p>
<p>推荐序<span class="Apple-converted-space"> </span><br />
<a style="color: #551a8b;" rel="nofollow" href="http://blog.csdn.net/bvbook/archive/2009/05/31/4227452.aspx" target="_blank">http://blog.csdn.net/bvbook/archive/2009/05/31/4227452.aspx</a><span class="Apple-converted-space"> </span><br />
<a style="color: #551a8b;" rel="nofollow" href="http://bvbook.javaeye.com/blog/398813" target="_blank">http://bvbook.javaeye.com/blog/398813</a><span class="Apple-converted-space"> </span></p>
<p><span class="Apple-converted-space">作者们的博客<br />
</span><span class="Apple-converted-space"><span class="Apple-style-span" style="word-spacing: 0px; font: 16px 'Times New Roman'; text-transform: none; color: #000000; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span class="Apple-style-span" style="font-size: 12px; font-family: arial;"><a style="color: #551a8b;" rel="nofollow" href="http://www.gaoang.com/archives/125" target="_blank">http://www.gaoang.com/archives/125</a><span class="Apple-converted-space"> <br />
</span></span></span></span><span class="Apple-converted-space"><span class="Apple-style-span" style="word-spacing: 0px; font: 16px 'Times New Roman'; text-transform: none; color: #000000; text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span class="Apple-style-span" style="font-size: 12px; font-family: arial;"><span class="Apple-converted-space"><a href="http://www.cnblogs.com/guanhe/archive/2009/06/01/1493789.html">http://www.cnblogs.com/guanhe/archive/2009/06/01/1493789.html</a><br />
<a href="http://diuera.blogbus.com/logs/40249425.html">http://diuera.blogbus.com/logs/40249425.html</a></span></span></span></span></p>
<p></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liuhongwei.cn/my-opensource/google-api-bible-release/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>欢迎来访！</title>
		<link>http://blog.liuhongwei.cn/my-opensource/hello-world/</link>
		<comments>http://blog.liuhongwei.cn/my-opensource/hello-world/#comments</comments>
		<pubDate>Sun, 10 May 2009 12:28:28 +0000</pubDate>
		<dc:creator>Harry</dc:creator>
				<category><![CDATA[开源]]></category>

		<guid isPermaLink="false">http://blog.liuhongwei.cn/?p=1</guid>
		<description><![CDATA[视野决定高度，格局决定结局。临渊羡鱼，不如退而结网。好的产品需要不断调整的战略、精美的设计和持之以恒的专注！]]></description>
			<content:encoded><![CDATA[<p>视野决定高度，格局决定结局。临渊羡鱼，不如退而结网。好的产品需要不断调整的战略、精美的设计和持之以恒的专注！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.liuhongwei.cn/my-opensource/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

