<?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"
	>

<channel>
	<title>DEAN LEE:/DEV/BLOG &#187; project</title>
	<atom:link href="http://www.deanlee.cn/tag/project/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.deanlee.cn</link>
	<description>mount /dev/brain &#124;&#124; tail -f /var/log/thoughts &#62;&#62; /pub/www</description>
	<pubDate>Fri, 30 Dec 2011 13:27:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Google Code Prettify for wordpress</title>
		<link>http://www.deanlee.cn/wordpress/google-code-prettify-for-wordpress/</link>
		<comments>http://www.deanlee.cn/wordpress/google-code-prettify-for-wordpress/#comments</comments>
		<pubDate>Sat, 28 Apr 2007 15:03:21 +0000</pubDate>
		<dc:creator>Dean Lee</dc:creator>
		
		<category><![CDATA[wordpress]]></category>

		<category><![CDATA[code-snippets]]></category>

		<category><![CDATA[google]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[project]]></category>

		<category><![CDATA[source-code]]></category>

		<category><![CDATA[syntax-highlighting]]></category>

		<guid isPermaLink="false">http://www.deanlee.cn/technology/google-code-prettifer-for-wordpress/</guid>
		<description><![CDATA[This small wordpress plugin enable syntax highlighting of code snippets in your post using Google Code Prettify.
Notice: you will need to have JavaScript enabled in your browser for this to work.
I had developed another Source Code syntax highlighting plugin using Geshi before,but they are totally different things.with Geshi,code is parsed on the server side,no javascript [...]]]></description>
			<content:encoded><![CDATA[<p>This small wordpress plugin enable syntax highlighting of code snippets in your post using <a href="http://code.google.com/p/google-code-prettify/">Google Code Prettify</a>.</p>
<p><font color="#ff0000">Notice:</font> you will <strong>need</strong> to have <strong>JavaScript enabled</strong> in your browser for this to work.</p>
<p>I had developed another <a href="http://www.deanlee.cn/wordpress/code_highlighter_plugin_for_wordpress/">Source Code syntax highlighting plugin</a> using <a href="http://qbnz.com/highlighter/">Geshi</a> before,but they are totally different things.with Geshi,code is parsed on the server side,no javascript is needed.</p>
<p>It&#8217;s hard to say which is the better,choose one based on your own needs.</p>
<p class="download"><a title="Download" href="http://www.deanlee.cn/downloads/google_code_prettify_v1.1.zip">Download Google Code Prettify for wordpress v1.1</a></p>
<p><strong>Installation</strong></p>
<p>This plugin requires <a href="http://www.wordpress.org">WordPress</a> v.2.0 or later.</p>
<ol>
<li>unzip and upload the files to your wp-content/plugins/ directory.</li>
<li>Activate the plugin by logging into your WordPress administration panel, going to &lsquo;Plugins&rsquo;, then clicking the&nbsp; &#8216;Activate&#8217;&nbsp; button for&nbsp; &#8216;Google Code Prettify&#8217;.</li>
<li>Done,enjoy it.</li>
</ol>
<p><strong>Usage</strong></p>
<p>Put code snippets in &lt;pre class=&quot;prettyprint&quot;&gt;&#8230;&lt;/pre&gt; or &lt;code class=&quot;prettyprint&quot;&gt;&#8230;&lt;/code&gt; and it will automatically be pretty printed.</p>
<p><strong>Example</strong></p>
<p>Bash</p>
<pre class="prettyprint">
#!/bin/bash

# Fibonacci numbers
# Writes an infinite series to stdout, one entry per line
function fib() {
  local a=1
  local b=1
  while true ; do
    echo $a
    local tmp=$a
    a=$(( $a + $b ))
    b=$tmp
  done
}

# output the 10th element of the series and halt
fib | head -10 | tail -1</pre>
<p><a href="http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html">More examples</a></p>
<p><strong>FAQ</strong> (from <a title="http://code.google.com/p/google-code-prettify/" href="http://code.google.com/p/google-code-prettify/" target="_blank">http://code.google.com/p/google-code-prettify/</a>)</p>
<ol>
<li><strong>Which languages does it work for?<br />
    </strong>The comments in <tt>prettify.js</tt> are authoritative but the lexer should work on a number of languages including C and friends, Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk and a decent subset of Perl, but, because of commenting conventions, doesn&#8217;t work on Smalltalk, Lisp-like, or CAML-like languages.</li>
<li><strong>How do I specify which language my code is in?<br />
    </strong>There&#8217;s no way to tell it which language because would complicate the interface. If it doesn&#8217;t guess the language properly, that&#8217;s a bug.</li>
<li><strong>Which browsers does it work with?<br />
    </strong>It&#8217;s been tested with IE 6, Firefox 1.5 &amp; 2, and Safari 2.0.4. Look at <a href="http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html">the test page</a> to see if it works in your browser.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.deanlee.cn/wordpress/google-code-prettify-for-wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Permalinks Migration Plugin for wordpress</title>
		<link>http://www.deanlee.cn/wordpress/permalinks-migration-plugin/</link>
		<comments>http://www.deanlee.cn/wordpress/permalinks-migration-plugin/#comments</comments>
		<pubDate>Thu, 02 Nov 2006 18:51:03 +0000</pubDate>
		<dc:creator>Dean Lee</dc:creator>
		
		<category><![CDATA[wordpress]]></category>

		<category><![CDATA[change]]></category>

		<category><![CDATA[permalinks]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[project]]></category>

		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://www.deanlee.cn/wordpress/permalinks-migration-plugin/</guid>
		<description><![CDATA[With this plugin, you can safely change your permalink structure without breaking the old links to your website,and even doesn&#8217;t affect your search engine rankings.
introduction
Many people want to change their permalink structure,for example, from /%year%/%monthnum%/%day%/%postname%/ to /%category%/%postname%/
But doing so will make all pages indexed by search engines become invalid,moreover, losing visitors from other sites or [...]]]></description>
			<content:encoded><![CDATA[<p>With this plugin, you can safely change your permalink structure without breaking the old links to your website,and even doesn&#8217;t affect your search engine rankings.</p>
<h3>introduction</h3>
<p>Many people want to change their permalink structure,for example, from /%year%/%monthnum%/%day%/%postname%/ to /%category%/%postname%/</p>
<p>But doing so will make all pages indexed by search engines become invalid,moreover, losing visitors from other sites or bookmarks that links to you.</p>
<p>There is a way to tell the search engines (and browsers) that the page has permenantly moved, and that the old address should be replaced by the new one . It&rsquo;s called a &ldquo;301 Redirect&rdquo;, also known as a <strong>Permanent Redirect</strong>.When you do this, Search engines will update their indexes quickly and you won&rsquo;t lose your pagerank.you will continue to receive traffic as though nothing had changed. This works for search engines, bookmarks, and links from other sites.</p>
<p>By now, you know how can you change your permalinks without losing the traffic you&rsquo;re already getting. You can download this Permalink Migration Plugin to achieve this for you.</p>
<p>This plugin will generates a &ldquo;301 Redirect&rdquo; when user or spider visit your site through old permalinks,and redirect them to the new permalinks of the same post.</p>
<p>Do not fear to change your permalink structure now, you would never lose any visitors due to changed addresses.</p>
<p class="download"><a href="http://wordpress.org/extend/plugins/permalinks-migration-plugin-for-wordpress/">Download Dean&#8217;s Permalinks Migration Plugin Version 1.0</a></p>
<h3>Installation</h3>
<ol>
<li>unzip and upload the file into your wp-content/plugins/ directory.</li>
<li>Activate it on your Admin Panel-&gt;Plugin Management page.</li>
</ol>
<h3>Usage</h3>
<ol>
<li>goto admin panel-&gt;options-&gt;PermalinksMigration.set the old permanlink structure of your site.</li>
<li>goto admin panel-&gt;options-&gt;Permalinks.change the new permalink structure to what you want. (personally I recommend /%category%/%postname%/, you can read <a href="http://www.millionclues.com/blogosphere/wordpress-blogosphere/wordpress-optimization/optimize-wordpress-permalinks-seo-friendly" target="_blank">@ArunBasilLal&#8217;s tour</a>&nbsp; to learn more about how to Optimizing Permalinks for Better SEO)</li>
<li>Done,enjoy it.</li>
</ol>
<h3>Acknowledgements</h3>
<p>Many thanks to all of you, who have encouraged me to update my articles&nbsp; and code, and who sent in bug reports and fixes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deanlee.cn/wordpress/permalinks-migration-plugin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dean&#8217;s FCKEditor for WordPress plugin(V3.3)</title>
		<link>http://www.deanlee.cn/wordpress/fckeditor-for-wordpress-plugin/</link>
		<comments>http://www.deanlee.cn/wordpress/fckeditor-for-wordpress-plugin/#comments</comments>
		<pubDate>Sun, 22 Oct 2006 17:36:38 +0000</pubDate>
		<dc:creator>Dean Lee</dc:creator>
		
		<category><![CDATA[wordpress]]></category>

		<category><![CDATA[ckeditor]]></category>

		<category><![CDATA[editor]]></category>

		<category><![CDATA[fckeditor]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[project]]></category>

		<category><![CDATA[wysiwyg]]></category>

		<guid isPermaLink="false">http://www.deanlee.cn/2006/10/23/deans-fckeditor-for-wordpress-plugin/</guid>
		<description><![CDATA[This plugin Replaces the default Wordpress editor with CKeditor 3.0.1.

CKeditor is an open source WYSIWYG text editor ,brings to the web much of the power of desktop editors like MS Word.it&#8217;s lightweight and is compatible with most internet browsers which include: IE 5.5+ (Windows), Firefox 1.0+, Mozilla 1.3+ and Netscape 7+.
Features

Replace the default wordpress editor [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin Replaces the default Wordpress editor with <a href="http://ckeditor.com/">CKeditor</a> <font color="#ff0000">3.0.1</font>.</p>
<p><a href="http://www.deanlee.cn/wp-content/uploads/2009/10/image1.png" rel="lightbox"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.deanlee.cn/wp-content/uploads/2009/10/image_thumb1.png" width="240" height="175" /></a></p>
<p>CKeditor is an open source WYSIWYG text editor ,brings to the web much of the power of desktop editors like MS Word.it&#8217;s lightweight and is compatible with most internet browsers which include: IE 5.5+ (Windows), Firefox 1.0+, Mozilla 1.3+ and Netscape 7+.</p>
<p><strong>Features</strong></p>
<ul>
<li>Replace the default wordpress editor with CKEditor </li>
<li>Post comment with CKEditor to provide styled and colorful comments(Optional). </li>
<li>Build-in File manager and upload manager. </li>
<li>Build-in Wordpress &quot;read more&quot; Button. </li>
<li>Control output format. </li>
<li>Customizable toolbar buttons </li>
<li>Integrated with WordPress media buttons:
<p><a href="http://www.deanlee.cn/wp-content/uploads/2008/10/image7.png" rel="lightbox"><img style="display: inline" title="image" alt="image" src="http://www.deanlee.cn/wp-content/uploads/2008/10/image-thumb7.png" width="239" height="30" /></a></p>
</li>
<li>Manage and insert Smileys into your post. </li>
<li>Customize editor’s skin. </li>
<li>&#8230;and more. </li>
</ul>
<p class="download"><a title="Download" href="http://downloads.wordpress.org/plugin/fckeditor-for-wordpress-plugin.3.3.1.zip">Download FCKEditor for wordpress</a></p>
<p><strong>Installation</strong></p>
<p>This plugin requires <a href="http://www.wordpress.org">WordPress</a> v.2.0 or later ( Tested on&#160; 2.8.4 too).</p>
<ol>
<li>unzip and upload the files into your wp-content/plugins/ directory. </li>
<li>Activate the plugin on your Admin Panel-&gt;Plugin Management page. </li>
<li>Done,enjoy it. </li>
</ol>
<p><strong>Screenshots</strong></p>
<p>Add/Edit post:    <br /><a href="http://www.deanlee.cn/wp-content/uploads/2009/10/image5.png" rel="lightbox"><img style="display: inline" title="image" alt="image" src="http://www.deanlee.cn/wp-content/uploads/2009/10/image_thumb5.png" width="262" height="151" /></a></p>
<p>Leave a comment:    <br /><a href="http://www.deanlee.cn/wp-content/uploads/2009/10/image6.png" rel="lightbox"><img style="display: inline" title="image" alt="image" src="http://www.deanlee.cn/wp-content/uploads/2009/10/image_thumb6.png" width="240" height="154" /></a>&#160;</p>
<p>Styled and colorful comments:    <br /><a href="http://www.deanlee.cn/wp-content/uploads/2009/10/image7.png" rel="lightbox"><img style="display: inline" title="image" alt="image" src="http://www.deanlee.cn/wp-content/uploads/2009/10/image_thumb7.png" width="240" height="170" /></a> </p>
<p><strong>Revision History</strong></p>
<ul>
<li>version 3.3 （2009-10-29）
<ul>
<li>Customizable toolbar buttons. </li>
<li>Can using CKeditor as comment editor. </li>
<li>Configurable output formatting. </li>
</ul>
</li>
<li>version 3.2(2009-10-26)
<ul>
<li>add support for wordpress&#8217;s &#8216;read more&#8217; feature </li>
</ul>
</li>
<li>version 3.1(2009-10-17)
<ul>
<li>work with the lastest version of CKEditor version 3.0.1 </li>
</ul>
</li>
<li>version 2.5.0(2008-10-7)
<ul>
<li>Upgrade FCKEditor to the newest version 2.6.3 </li>
<li>Fixed the wpMore issue. </li>
<li>Integrated with WordPress media buttons </li>
</ul>
</li>
<li>version 2.4.1 (2008-04-24)
<ul>
<li>Upgrade FCKEditor to the newest version 2.6.0 </li>
<li>Fixed the wpMore issue. </li>
</ul>
</li>
<li>version 2.3 (2008-01-03)
<ul>
<li>Upgrade FCKEditor to the newest version 2.5.1. </li>
</ul>
</li>
<li>version 2.2 (2007-06-17)
<ul>
<li>upgrade <a href="http://www.fckeditor.net/" target="_blank">FCKEditor</a> to the newest version 2.4.3. </li>
<li>It is now possible to set the default target when creating links, with the new “<strong>Default Link Target</strong>” setting. </li>
<li>The new “<strong>Enable Firefox Spell Checker</strong>” setting is available, to enable/disable the Firefox built-in spellchecker while typing. Even if word suggestions will not appear in the FCKeditor context menu, this feature is useful to quickly identify misspelled words. </li>
<li>Remove the &quot;FCKEditor&quot; option tab from the write admin panel.this can prevent lower-level users to change the settings,thanks to Jeremiah Britt for the advice. </li>
<li>Fixed the problem that upload will be failed if there are no such path. </li>
</ul>
</li>
<li>version 2.1 (2007-05-16)
<ul>
<li>fixed the problem that FCKEditor doesn&#8217;t load sometimes in editing mode.this can be occured due to the javascript conflict with some other plugins. thanks to <a href="http://bonustage.es">Ataliano</a> and <a href="http://cyclingdiary.org">Milan Tucek</a> for the bug report. </li>
<li>a new option &quot;Enable Post Preview&quot; has been added to the option page.uncheck the checkbox to disable &quot;post preview&quot; feature provide by wordpress.this will make the write page rendering faster. </li>
</ul>
</li>
<li>version 2.0 (2007-05-12)
<ul>
<li>Totally rewritten </li>
<li>Create your own smiles </li>
<li>Skin selector </li>
<li>Toolbar selector&#160; </li>
</ul>
</li>
<li>version 1.5 (2007-05-07)
<ul>
<li>wordpress &quot;read more&quot; feature supported.there is a new button that allow you to insert a &quot;Read More…&quot; link to your full entry when the post is displayed in a post list. </li>
</ul>
</li>
<li>version 1.4
<ul>
<li>fix some jscript errors </li>
</ul>
</li>
<li>version 1.3
<ul>
<li>upgrade from FCKeditor 2.3.2 to the neweset version 2.4.you can still download the <a href="http://www.deanlee.cn/downloads/deans_fckeditor_v1.2.zip">older version 1.2 (with FCKeditor 2.3.2) here</a> </li>
</ul>
</li>
<li>version 1.2
<ul>
<li>fix upload problems reported by Andrew Crawford,many thanks for his great help. </li>
<li>fix jscript runtime error : &#8216;undefined&#8217; when uploading images. </li>
</ul>
</li>
<li>Version 1.1&#160;
<ul>
<li>Build-in file manager and upload manager.&#160; </li>
</ul>
</li>
<li>Version 1.0 Initial Version.
<div>&#160;</div>
</li>
</ul>
<p><strong>Acknowledgements</strong></p>
<p>Many thanks to all of you, who have encouraged me to update my articles&#160; and code, and who <a href="http://code.google.com/p/fckeditor-for-wordpress/issues/entry">sent in bug reports and fixes.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.deanlee.cn/wordpress/fckeditor-for-wordpress-plugin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Source Code syntax highlighting plugin for WordPress (V1.2)</title>
		<link>http://www.deanlee.cn/wordpress/code_highlighter_plugin_for_wordpress/</link>
		<comments>http://www.deanlee.cn/wordpress/code_highlighter_plugin_for_wordpress/#comments</comments>
		<pubDate>Sun, 22 Oct 2006 07:39:18 +0000</pubDate>
		<dc:creator>Dean Lee</dc:creator>
		
		<category><![CDATA[wordpress]]></category>

		<category><![CDATA[code-snippets]]></category>

		<category><![CDATA[geshi]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[project]]></category>

		<category><![CDATA[syntax-highlighting]]></category>

		<guid isPermaLink="false">http://www.deanlee.cn/2006/10/22/source-code-syntax-highlighting-plugin-for-wordpress/</guid>
		<description><![CDATA[Introduction
This WordPress plugin using Geshi to highlight source code in a wide range of popular languages.it aims to be a simple but powerful code highlighting plugin, with the following goals:

Easy to use.
Support for a wide range of popular languages.
Customizable output formats.

Installation
This plugin requires WordPress v.1.5 or later.

Download Dean&#8217;s Code Highlighter v1.2&#160; and unzip it.
Upload the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>This WordPress plugin using <a href="http://qbnz.com/highlighter/">Geshi</a> to highlight source code in a wide range of popular languages.it aims to be a simple but powerful code highlighting plugin, with the following goals:</p>
<ul>
<li>Easy to use.</li>
<li>Support for a wide range of popular languages.</li>
<li>Customizable output formats.</li>
</ul>
<p><strong>Installation</strong></p>
<p>This plugin requires <a href="http://www.wordpress.org">WordPress</a> v.1.5 or later.</p>
<ol>
<li>Download <a href="http://www.deanlee.cn/downloads/deans_code_highlighter_v1.2.zip">Dean&#8217;s Code Highlighter v1.2</a>&nbsp; and unzip it.</li>
<li>Upload the plugin to your plugin directory (wp-content/plugins).</li>
<li>Activate the plugin through the &#8216;Plugins&#8217; menu in WordPress.</li>
<li>Modify the stylesheet file geshi.css to get the coloring you prefer.</li>
</ol>
<p><strong>usage</strong></p>
<p>Use the &quot;pre&quot; tag and add the programming language you want to use as a parameter. Example:. &lt; pre lang=&quot;php&quot; &gt;your code here &#8230; &lt; /pre &gt;. for example: &lt;pre lang=&quot;php&quot;&gt; function hello_world(){ echo &quot;hello world&quot; }&lt;/pre&gt; after highlighting:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">function</span> hello_world<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;hello world&quot;</span>;<br />
<span class="br0">&#125;</span></div>
<p>You can <a href="http://www.deanlee.cn/2006/09/24/convert-unicode-to-utf8/">see a Living demo at here.</a></p>
<p><strong>Revision History</strong></p>
<ul>
<li>version 1.2 (2007-08-28)</li>
<li>version 1.1
<ul>
<li>Add the ability to strips unwanted tags in your code snippets added by WYSWYG editors.</li>
</ul>
</li>
<li>version 1.0 initial version</li>
</ul>
<p><strong>See also</strong></p>
<p>There is another plugin may interest you:<a href="http://www.deanlee.cn/wordpress/google-code-prettify-for-wordpress/">Google Code Prettify for wordpress</a>.it&#8217;s a javascript syntax highlighter based on Google Code Prettify.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deanlee.cn/wordpress/code_highlighter_plugin_for_wordpress/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Convert Ip Address To Geographic Location</title>
		<link>http://www.deanlee.cn/programming/convert-ip-address-to-geographic-location/</link>
		<comments>http://www.deanlee.cn/programming/convert-ip-address-to-geographic-location/#comments</comments>
		<pubDate>Wed, 11 Oct 2006 18:27:34 +0000</pubDate>
		<dc:creator>Dean Lee</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[convert]]></category>

		<category><![CDATA[ipaddress]]></category>

		<category><![CDATA[project]]></category>

		<category><![CDATA[qqwry]]></category>

		<guid isPermaLink="false">http://www.deanlee.cn/2006/10/13/convert-ip-address-to-geographic-location-2/</guid>
		<description><![CDATA[基于C++的CIPSeeker类，查找IP所在的地理位置,同时为了方便在其他脚本语言中提供IP地理位置查找功能（asp或者C#,vb等），另作一个COM控件来包装这个类。]]></description>
			<content:encoded><![CDATA[<p>网上有不少关于如何使用<a href="http://www.cz88.net/fox/" target="_blank">纯真IP数据库</a>(QQWRY.dat),来查找IP所在的地理位置的文档和源代码，但基本都是java实现，很少有C的，而且大部分都使用了打开文件句柄，通过文件指针的多次跳转来实现单次查找，运行效率很低，尤其是在短时间内需要执行大量IP-&gt;地理位置的转换的场合，这种方式的运行性能基本是难以接受的。</p>
<p><span id="more-82"></span></p>
<p>因此我写了一个c++的CIPSeeker类，该类在初始化时将qqwry.dat装载进内存，之后所有的查找都通过内存指针来进行。同时为了方便在其他脚本语言中提供IP地理位置查找功能（asp或者C#,vb等），另作了一个COM控件来包装这个类。</p>
<p>出于把问题简单化和性能上的考虑，该C++类不支持多线程并发。如果要在多线程环境下并发查找的话，为每个要使用IPSeeker功能的的线程创建一个单独的CIPSeeker的实例就可以了。封装的com控件使用apartment线程模式，所以不用担心多线程问题。</p>
<h3>使用方法</h3>
<p>先下载最新版本的<a href="http://www.cz88.net/fox/" target="_blank">纯真IP数据库</a>，解压缩之后将QQWRY.dat拷贝到应用程序同一目录下（如果是使用com控件，拷贝到com控件所在的目录。</p>
<div class="dean_ch" style="white-space: wrap;">CIPSeeker theSeeker;<br />
theSeeker.<span class="me1">Create</span><span class="br0">&#40;</span><span class="br0">&#40;</span>HINSTANCE<span class="br0">&#41;</span>GetModuleHandle<span class="br0">&#40;</span><span class="kw2">NULL</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
<span class="kw4">char</span> szLocation<span class="br0">&#91;</span><span class="nu0">256</span><span class="br0">&#93;</span>;<br />
theSeeker.<span class="me1">getIPLocation</span><span class="br0">&#40;</span><span class="st0">&quot;202.101.103.55&quot;</span>, szLocation, _countof<span class="br0">&#40;</span>szLocation<span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
<span class="kw3">printf</span><span class="br0">&#40;</span><span class="st0">&quot;the Location is:%s&quot;</span>, szLocation<span class="br0">&#41;</span>;</div>
<div class="dean_ch" style="white-space: wrap;"><span class="kw1">Set</span> obj = <span class="kw1">server</span>.<span class="kw3">CreateObject</span><span class="br0">&#40;</span><span class="st0">&quot;IPToLocation.Seeker&quot;</span><span class="br0">&#41;</span><br />
<span class="kw1">Response</span>.<span class="kw3">Write</span><span class="br0">&#40;</span> obj.<span class="me1">GetLocation</span><span class="br0">&#40;</span><span class="st0">&quot;202.101.103.55&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span></div>
<h3>Revision History</h3>
<ul>
<li>CIPSeeker 0.1: 初始化版本.</li>
</ul>
<h3>C++源代码</h3>
<ul>
<li><a href="http://www.deanlee.cn/wp-content/uploads/ipseeker.cpp" title="ipseeker.cpp">IPSeeker.cpp</a>  (源文件)</li>
<li><a href="http://www.deanlee.cn/wp-content/uploads/ipseeker.h" title="ipseeker.h">IPSeeker.h</a>   (头文件)</li>
</ul>
<h3>COM控件</h3>
<ul>
<li><a href="http://www.deanlee.cn/wp-content/uploads/iptolocation.zip">IPToLocation.dll</a> (COM 控件)</li>
<li><a href="http://www.deanlee.cn/wp-content/uploads/iptolocation_prj.zip">IPToLocation_Project</a>(COM控件的项目源代码)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.deanlee.cn/programming/convert-ip-address-to-geographic-location/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Download OpenSSL for windows</title>
		<link>http://www.deanlee.cn/programming/openssl-for-windows/</link>
		<comments>http://www.deanlee.cn/programming/openssl-for-windows/#comments</comments>
		<pubDate>Tue, 03 Oct 2006 08:25:04 +0000</pubDate>
		<dc:creator>Dean Lee</dc:creator>
		
		<category><![CDATA[Programming]]></category>

		<category><![CDATA[download]]></category>

		<category><![CDATA[openssl]]></category>

		<category><![CDATA[project]]></category>

		<category><![CDATA[win32]]></category>

		<category><![CDATA[win64]]></category>

		<category><![CDATA[Windows]]></category>

		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://deanlee.cn/2006/10/03/openssl-for-windows/</guid>
		<description><![CDATA[openssl-for-windows,host on google code,is an clean and lightweight OpenSSL library for windows(both 32bit and x64 version).
all versions are compiled in the assembly language routines with Microsoft Visual Studio 2005 and Microsoft MASM as “Multithreaded(/MT)”,you can using it with any version of MSVC.
Download openssl for windows
files included in this library are listed below:    [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.google.com/p/openssl-for-windows/" target="_blank">openssl-for-windows</a>,host on google code,is an clean and lightweight OpenSSL library for windows(both 32bit and x64 version).</p>
<p>all versions are compiled in the assembly language routines with Microsoft Visual Studio 2005 and Microsoft MASM as “Multithreaded(/MT)”,you can using it with any version of MSVC.</p>
<p class="download"><a href="http://code.google.com/p/openssl-for-windows/downloads/list" title="Download openssl for windows">Download openssl for windows</a></p>
<p>files included in this library are listed below:    <br /><img height="69" alt="" src="http://www.deanlee.cn/wp-content/uploads/2006/10/WindowsLiveWriter/OpenSSLforwindows_E6D7/ssldir3.gif" width="97" /></p>
<p><font color="#008000">|bin (libeay32.dll, ssleay32.dll,openssl.exe)      <br />|include       <br />|&#8211; &#8212; openssl&#160; (openssl head files)       <br />|lib (</font><font color="#008000">libeay32.lib,ssleay32.lib)</font></p>
<p>if you find it useful, a time saver,or even just mildly interesting,then my effort was worth it.    <br />if you have any suggestions on how to improve it, I&#8217;d love to hear it.</p>
<p>link to this page: <a title="http://www.deanlee.cn/programming/openssl-for-windows/" href="http://www.deanlee.cn/programming/openssl-for-windows/">http://www.deanlee.cn/programming/openssl-for-windows/</a></p>
<p>Enjoy:)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.deanlee.cn/programming/openssl-for-windows/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

