<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
	<channel>
		<title>RSS Feed</title>
		<link>http://www.kbasm.com/feed.rss.html</link>
		<description></description>
		<generator>Ditto 1.0.2 powered by MODx CMS</generator>
		<language>en</language>
		<copyright>Coding and thinking on C++ and other programming technology 2006</copyright>
		<ttl>120</ttl>
		<item>
			<title>cpgf reflection -- an open source library to add reflection to C++</title>
			<link>http://www.kbasm.com/cpgf-reflection.html</link>
			<description><![CDATA[ 



<a name="top"></a>






<h1>cpgf reflection -- an open source library to add reflection to C++</h1>

cpgf reflection library adds powerful reflection feature to C++.<br />
The reflection is quite equivalent to Java reflection.<br />
We even support annotation.<br />
<br />
The only feature t ]]></description>
			<pubDate>Sun, 06 Nov 2011 01:15:54 -0400</pubDate>
			<guid>http://www.kbasm.com/cpgf-reflection.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>cpgf script binding -- an open source library to bind Lua and Google V8 Javascript to C++</title>
			<link>http://www.kbasm.com/cpgf-script-binding.html</link>
			<description><![CDATA[ 



<a name="top"></a>






<h1>cpgf script binding -- an open source library to bind Lua and Google V8 Javascript to C++ </h1>

cpgf script binding library is very easy script binding engine to bind Lua and Google V8 Javascript to C++.<br />
The library uses reflection meta data ext ]]></description>
			<pubDate>Sun, 06 Nov 2011 01:14:50 -0400</pubDate>
			<guid>http://www.kbasm.com/cpgf-script-binding.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>CPU cache -- old optimization skills won&#039;t work any more</title>
			<link>http://www.kbasm.com/cpu-cache-old-optimization-skill-not-work.html</link>
			<description><![CDATA[ <h3>
	CPU cache -- old optimization skills won&#39;t work any more</h3>
<p>
	This article is not explaining what CPU cache is, how CPU cache works. It&#39;s only to show you why some old optimization tricks won&#39;t work well.<br />
	<br />
	The discussion here is focusing on native programming languages, such as C, C++. For non-native languages such as Java, .Net, the discussion may be not true.<br />
	<br />
	Why are the dated optimization skills still in my (and maybe yours) mind?</p> ]]></description>
			<pubDate>Thu, 26 May 2011 00:55:28 -0400</pubDate>
			<guid>http://www.kbasm.com/cpu-cache-old-optimization-skill-not-work.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>Random thoughts on random permutation generation algorithm</title>
			<link>http://www.kbasm.com/random-thoughts-on-random-permutation-generation-algorithm.html</link>
			<description><![CDATA[ <p>
	This blog is mainly a fun read. If you are seeking for an ideal random permutation generation algorithm for serious, read method 3 directly.<br />
	Also note that the algorithm discussed here is NOT new.<br />
	<br />
	<strong>What&#39;s random permutation?</strong><br />
	<br />
	A random permutation is a set of objects in random order.<br />
	Given a set of objects, 1, 2, 3 ... n, a random permutation may look like,<br />
	p1, p2, p3 ... pn<br />
	In which px is a random value from the original set.<br />
	<br />
	Random permutation is useful to shuffle poker cards, randomize a puzzle game, generate random sequence, or generate a random sub collection of a give set (get random k objects out of n objects).<br />
	<br />
	<strong>The random permutation generation algorithms, from naive to mature, in my past real experience</strong><br />
	<br />
	To explain the algorithms, I would use an auxiliary function to generate random number.<br />
	int random(int min, int max);<br />
	The result is a random number which is greater or eqaul with min and less than max.<br />
	That&#39;s to say, the result is in left-close-right-open range of [min, max).<br />
	<br />
	<strong>Method 1, naive way.</strong></p> ]]></description>
			<pubDate>Thu, 19 May 2011 00:32:16 -0400</pubDate>
			<guid>http://www.kbasm.com/random-thoughts-on-random-permutation-generation-algorithm.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>Reasons that I choose wxWidgets instead of Qt as GUI framework for my hobby projects</title>
			<link>http://www.kbasm.com/cpp-wxwidgets-why-choose-wxwidgets-instead-qt-gui-framework.html</link>
			<description><![CDATA[ This blog shows my requirements on choosing a GUI framework and explains why I choose wxWidgets instead of Qt. ]]></description>
			<pubDate>Wed, 04 May 2011 00:37:31 -0400</pubDate>
			<guid>http://www.kbasm.com/cpp-wxwidgets-why-choose-wxwidgets-instead-qt-gui-framework.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>How to install and compile your first wxWidgets application in Visual C++ 2008 Express</title>
			<link>http://www.kbasm.com/cpp-wxwidgets-install-compile-vc-2008-express.html</link>
			<description><![CDATA[ <h1>
	How to install and compile your first wxWidgets application in Visual C++ 2008 Express</h1>
<p>
	I just managed to use Visual C++ 2008 Express to compile my first very simple hello world wxWidgets application.<br />
	I spent only about one hour on it, include download, setup, etc.<br />
	One hour is quite short time. I&#39;ve spent a lot of hours on Qt and still have no idea how to compile it in VC 2008 Express. That&#39;s another story I will blog later.<br />
	To help you start your development on wxWidgets, here is a very simple tutorial.</p> ]]></description>
			<pubDate>Mon, 25 Apr 2011 09:58:32 -0400</pubDate>
			<guid>http://www.kbasm.com/cpp-wxwidgets-install-compile-vc-2008-express.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>Random thought on OOP -- Prefer composition over inheritance</title>
			<link>http://www.kbasm.com/oop-prefer-composition-over-inheritance.html</link>
			<description><![CDATA[ <h1>
	Random thought on OOP -- Prefer composition over inheritance</h1>
<p>
	Let&#39;s see what&#39;s inheritance and composition. Just show by example, not accurate definition.<br />
	Assume there are 3 features (modules), ModuleA, ModuleB, ModuleC. Two classes ClassA and ClassB want to use them. ClassA will use ModuleA and ModuleB, ClassB will use all three features. And we also assume for current moment all A, B and C modules will be only used by class ClassA and ClassB.<br />
	<br />
	Inheritance:</p> ]]></description>
			<pubDate>Fri, 22 Apr 2011 00:49:55 -0400</pubDate>
			<guid>http://www.kbasm.com/oop-prefer-composition-over-inheritance.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>Far file manager is free and open source now</title>
			<link>http://www.kbasm.com/far-file-manager-is-free-and-open-source.html</link>
			<description><![CDATA[ <h1>
	Far file manager is free and open source now</h1>
<p>
	The very powerful, console and text based, Linux Midnight Commander (MC) and Norton Commander (NC) like, orthodox file manager, Windows oriented, <a href="http://www.farmanager.com/" target="_blank">Far file manager</a>, now is free and open source, with Unicode support. Previously it was shareware with $25 register fee.</p> ]]></description>
			<pubDate>Wed, 13 Apr 2011 03:26:22 -0400</pubDate>
			<guid>http://www.kbasm.com/far-file-manager-is-free-and-open-source.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>C++: Use arbitrary member function or functor object as C style plain callback and function pointer</title>
			<link>http://www.kbasm.com/cpp-use-member-function-as-c-callback.html</link>
			<description><![CDATA[ Enable passing C++ member functions and functor objects to C functions and Windows APIs as plain callback function pointer. ]]></description>
			<pubDate>Sat, 09 Apr 2011 02:41:16 -0400</pubDate>
			<guid>http://www.kbasm.com/cpp-use-member-function-as-c-callback.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>A benchmark of three C++ open source callback/signal/slot libraries -- CppCallback, libsigc++, and boost signal</title>
			<link>http://www.kbasm.com/cpp-callback-benchmark.html</link>
			<description><![CDATA[ A comparison of the the speed performance among three signal/slot/callback libraries. ]]></description>
			<pubDate>Mon, 04 Apr 2011 00:22:12 -0400</pubDate>
			<guid>http://www.kbasm.com/cpp-callback-benchmark.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>VC 2008 and 2005 user, be careful with the slow containers with &quot;Checked Iterators&quot; enabled in STL</title>
			<link>http://www.kbasm.com/cpp-vc-disable-checked-iterators-release-mode.html</link>
			<description><![CDATA[ <h1>VC 2008 and 2005 user, be careful with the slow containers with "Checked Iterators" enabled in STL </h1>

<p>
	Microsoft introduced a very good feature, <a href="http://msdn.microsoft.com/en-us/library/aa985965%28VS.80%29.aspx" target="_blank">Checked Iterators</a> that helps to detect a few mistakes, especially out of bounds error, on unsafe iterators use, since VC 2005 (or even earlier?).</p> ]]></description>
			<pubDate>Sat, 02 Apr 2011 00:33:28 -0400</pubDate>
			<guid>http://www.kbasm.com/cpp-vc-disable-checked-iterators-release-mode.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>CppCallback -- an open source library for C++ callback, signal, slot, delegate, observer patten, event system</title>
			<link>http://www.kbasm.com/cpp-callback-library.html</link>
			<description><![CDATA[ A pure template and macro based signal/slot and callback library for C++. ]]></description>
			<pubDate>Fri, 18 Feb 2011 23:01:28 -0500</pubDate>
			<guid>http://www.kbasm.com/cpp-callback-library.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>C++:  in loop erase  safe containers, iterators, skip list, and quad linked node</title>
			<link>http://www.kbasm.com/in-loop-erase-safe-container.html</link>
			<description><![CDATA[ Several containers -- list, skip list, map, quad node -- that supports safe erase during a loop. ]]></description>
			<pubDate>Sun, 12 Dec 2010 02:37:51 -0500</pubDate>
			<guid>http://www.kbasm.com/in-loop-erase-safe-container.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>Ancient tech: register a name, then get an integer to get better performance</title>
			<link>http://www.kbasm.com/register-name-get-integer-better-performance.html</link>
			<description><![CDATA[ <h1>Ancient tech: register a name, then get an integer to get better performance</h1>
<p>
	Sometimes we want to use string name to represent object, and then we can access (get or set object via a name).<br />
	The biggest benefit is that string name is the most intuitive, easy to recognize, and easy to remember.<br />
	But the biggest disadvantage is that the performance is not comparable to integer.<br />
	<br />
	There are some widely used methods to overcome the performance issue.</p> ]]></description>
			<pubDate>Thu, 09 Dec 2010 09:00:52 -0500</pubDate>
			<guid>http://www.kbasm.com/register-name-get-integer-better-performance.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>C++: Choose appropriate pointer, choose appropriate memory management model</title>
			<link>http://www.kbasm.com/cpp-smart-pointer-memory-management.html</link>
			<description><![CDATA[ An article on memory management and smart pointer in C++. ]]></description>
			<pubDate>Sat, 13 Nov 2010 05:05:36 -0500</pubDate>
			<guid>http://www.kbasm.com/cpp-smart-pointer-memory-management.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>Denomo for C++: an open source comprehensive memory and resource leak detection tool for BCB and VC</title>
			<link>http://www.kbasm.com/denomo-for-cpp.html</link>
			<description><![CDATA[ <h1>Denomo for C++: an open source comprehensive memory and resource leak detection tool for BCB and VC</h1>

It supports many useful features to help you to detect and locate the leak quickly. <br />
<br />

Version: 2.1.0 <br />
<br />
<div class="button">
<ul>
<li><a href="/download.html#denomocpp">download</a></li>
</ul>
</div>
<br /> <br />

<div class="plist">
<h3>Quick start</h3>

<h5>1, Modify you project's code. </h5> 
Include the unit "Denomo.h" in your project's source file. <br />

<h5>2, To run your project with Denomo, you must put DenomoCPP.dll to the exe directory. </h5> 

<h5>3, Compile and run your project. </h5> 

<h5>4, Run bin\LeakInspector to start monitoring. </h5> 

<h5>5, Click button "Inc Session Leak Begin". </h5> 

<h5>6, Do something you suspect has memory leak. </h5> 

<h5>7, Click button "Inc Session Leak End", then check the output text.</h5> 
</div> ]]></description>
			<pubDate>Mon, 09 Jun 2008 01:43:34 -0400</pubDate>
			<guid>http://www.kbasm.com/denomo-for-cpp.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>Use per-class allocator in Delphi program</title>
			<link>http://www.kbasm.com/delphi-per-class-allocator.html</link>
			<description><![CDATA[ <h1>Use per-class allocator in Delphi program</h1>

<b><a href="/download/perclassallocator.zip">Download source code</a></b> <br />
<br />

<b>Introduction:</b> <br />
<br />

If you ever know a little C++ knowledge, you may already know C++ allows to override the operators 'new' and 'delete' for any specified class to manage the memory in a different way than C ]]></description>
			<pubDate>Fri, 07 Mar 2008 08:01:22 -0500</pubDate>
			<guid>http://www.kbasm.com/delphi-per-class-allocator.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>Win32 CodeHook - an open source library for binary code hook and redirect for Win32 Delphi and C++</title>
			<link>http://www.kbasm.com/codehook.html</link>
			<description><![CDATA[ <h1>Win32 CodeHook - an open source library for binary code hook and redirect for Win32 Delphi and C++. </h1>

It supports some useful features to make code hooking a piece of cake. <br />
It's free and open source. The license is MPL. <br />
<br />

Current version is 1.0.0. <br />
<br />
A sl ]]></description>
			<pubDate>Sat, 02 Feb 2008 08:01:41 -0500</pubDate>
			<guid>http://www.kbasm.com/codehook.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>Allocate objects on stack, at specified memory address, or through any memory manager</title>
			<link>http://www.kbasm.com/delphi-stack-local-object.html</link>
			<description><![CDATA[ <h1>Allocate objects on stack, at specified memory address, or through any memory manager</h1>

<a href="/download/localobject.zip">download the code and sample project. 7K zip file.</a> <br />
<br />

<b>Isn't it very cool to create objects on the stack, or in a specified memory buffer, or at a fixed memory location, or even through a highly optimized memory manager?</b> ]]></description>
			<pubDate>Fri, 01 Feb 2008 09:00:19 -0500</pubDate>
			<guid>http://www.kbasm.com/delphi-stack-local-object.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
		<item>
			<title>A funny yet crazy extreme test on Delphi 7 compiler</title>
			<link>http://www.kbasm.com/delphi-compiler-extreme-test.html</link>
			<description><![CDATA[ <h1>See how Delphi compiles very huge source file!</h1>

<b>The test environment: </b><br />
Hardware: really poor. Pentium 4, maybe 2.4G HZ? Don't know. It's at least 3 or 4 years old! The RAM is 1G. <br />
Software: Delphi 7, I use the command line tool dcc32 to do the compile. OS is Wi ]]></description>
			<pubDate>Fri, 25 Jan 2008 03:02:56 -0500</pubDate>
			<guid>http://www.kbasm.com/delphi-compiler-extreme-test.html</guid>
			<author>Wang Qi &lt;kbasm.com@gmail.com&gt;</author>
			</item>
	</channel>
</rss>
