<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The website of Lei Chen</title>
	<atom:link href="http://hide1713.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hide1713.wordpress.com</link>
	<description>Sunshine and rain of a developer</description>
	<lastBuildDate>Fri, 20 Nov 2009 20:10:20 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='hide1713.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/066d3e9989c38b74d7e52346a3c6d8b6?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>The website of Lei Chen</title>
		<link>http://hide1713.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hide1713.wordpress.com/osd.xml" title="The website of Lei Chen" />
		<item>
		<title>Python Scope Horror</title>
		<link>http://hide1713.wordpress.com/2009/11/20/python-scope-horror/</link>
		<comments>http://hide1713.wordpress.com/2009/11/20/python-scope-horror/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 20:10:20 +0000</pubDate>
		<dc:creator>hide1713</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://hide1713.wordpress.com/?p=409</guid>
		<description><![CDATA[In [71]: m=10
In [72]: i=[3,4]

In [73]: j=[m for m in i]
In [74]: j
Out[74]: [3, 4]
In [75]: m
Out[75]: 4
Notice that the value of m changed from 10 to 4 and it&#8217;s not my intention.!!
﻿Next time when you write [x for x in y]. Make sure x is unused!!!
&#160;
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=409&subd=hide1713&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In [71]: m=10</p>
<p>In [72]: i=[3,4]<br />
<span style="color:#ff0000;"><br />
In [73]: j=[m for m in i]</span></p>
<p>In [74]: j<br />
Out[74]: [3, 4]</p>
<p>In [75]: m<br />
Out[75]: 4<br />
Notice that the value of m changed from 10 to 4 and it&#8217;s not my intention.!!</p>
<h1>﻿Next time when you write [x for x in y]. Make sure x is unused!!!</h1>
<p>&nbsp;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hide1713.wordpress.com/409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hide1713.wordpress.com/409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hide1713.wordpress.com/409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hide1713.wordpress.com/409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hide1713.wordpress.com/409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hide1713.wordpress.com/409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hide1713.wordpress.com/409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hide1713.wordpress.com/409/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hide1713.wordpress.com/409/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hide1713.wordpress.com/409/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=409&subd=hide1713&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hide1713.wordpress.com/2009/11/20/python-scope-horror/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60a05cdce2660296672b37ad2654e00f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hide1713</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 9.10 Dual Screen Resolution Problme[Solved]</title>
		<link>http://hide1713.wordpress.com/2009/11/08/ubuntu-9-10-dual-screen-resolution-problmesolved/</link>
		<comments>http://hide1713.wordpress.com/2009/11/08/ubuntu-9-10-dual-screen-resolution-problmesolved/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 16:53:18 +0000</pubDate>
		<dc:creator>hide1713</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://hide1713.wordpress.com/?p=360</guid>
		<description><![CDATA[I just installed Ubuntu 9.10 yesterday. The only problem is that 9.10 fail to detect my dual monitors; therefore, the resolution of my two monitors were set to 1024*768 by default. I spent one day to complete solve this problem. My graphic card is a ATI one. You may skip this page if your graphic [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=360&subd=hide1713&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I just installed Ubuntu 9.10 yesterday. The only problem is that 9.10 fail to detect my dual monitors; therefore, the resolution of my two monitors were set to 1024*768 by default. I spent one day to complete solve this problem.<span style="color:#ff0000;"> My graphic card is a ATI one. You may skip this page if your graphic card is not ATI.</span> Here&#8217;s how.</p>
<p>1. Download ATI driver from Ubuntu Hardware Driver setting. Run the following command.</p>
<p style="padding-left:30px;">sudo amdcccle</p>
<p>2. Set correct resolution for both screen. (1280*800 and 1600*1200 for me). It was weird at the beginning, because ATI control center only allowed me to set my second monitor to 1280*800. I solved this problem by unplugging the monitor and reboot my box(Maybe).</p>
<p>3. (Optional) Revert the screen location. My second monitor is on my right hand side. I tried to set the screen position in AIT control center. But the control center always crash after I apply the change. I have no option but changing xorg.conf manually.</p>
<p style="padding-left:30px;">Section &#8220;Monitor&#8221;<br />
Identifier   &#8220;0-LCD&#8221;<br />
Option      &#8220;VendorName&#8221; &#8220;ATI Proprietary Driver&#8221;<br />
Option      &#8220;ModelName&#8221; &#8220;Generic Autodetecting Monitor&#8221;<br />
Option      &#8220;DPMS&#8221; &#8220;true&#8221;<br />
Option      &#8220;PreferredMode&#8221; &#8220;1280&#215;800&#8243;<br />
Option      &#8220;TargetRefresh&#8221; &#8220;60&#8243;<br />
<span style="color:#ff0000;"><strong>Option      &#8220;Position&#8221; &#8220;0 0&#8243;</strong></span><br />
Option      &#8220;Rotate&#8221; &#8220;normal&#8221;<br />
Option      &#8220;Disable&#8221; &#8220;false&#8221;<br />
EndSection</p>
<p style="padding-left:30px;">Section &#8220;Monitor&#8221;<br />
Identifier   &#8220;0-CRT1&#8243;<br />
Option      &#8220;VendorName&#8221; &#8220;ATI Proprietary Driver&#8221;<br />
Option      &#8220;ModelName&#8221; &#8220;Generic Autodetecting Monitor&#8221;<br />
Option      &#8220;DPMS&#8221; &#8220;true&#8221;<br />
Option      &#8220;PreferredMode&#8221; &#8220;1600&#215;1200&#8243;<br />
Option      &#8220;TargetRefresh&#8221; &#8220;60&#8243;<br />
<span style="color:#ff0000;">Option      &#8220;Position&#8221; &#8220;1280 0&#8243;</span><br />
Option      &#8220;Rotate&#8221; &#8220;normal&#8221;<br />
Option      &#8220;Disable&#8221; &#8220;false&#8221;<br />
EndSection</p>
<p>The position option indicates the start point of a screen.</p>
<p>All Done!</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hide1713.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hide1713.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hide1713.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hide1713.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hide1713.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hide1713.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hide1713.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hide1713.wordpress.com/360/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hide1713.wordpress.com/360/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hide1713.wordpress.com/360/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=360&subd=hide1713&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hide1713.wordpress.com/2009/11/08/ubuntu-9-10-dual-screen-resolution-problmesolved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60a05cdce2660296672b37ad2654e00f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hide1713</media:title>
		</media:content>
	</item>
		<item>
		<title>Gamebryo Frame Rendering System Reading Notes</title>
		<link>http://hide1713.wordpress.com/2009/10/21/gamebryo-frame-rendering-system-reading-notes/</link>
		<comments>http://hide1713.wordpress.com/2009/10/21/gamebryo-frame-rendering-system-reading-notes/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 01:43:04 +0000</pubDate>
		<dc:creator>hide1713</dc:creator>
				<category><![CDATA[GameBryo]]></category>

		<guid isPermaLink="false">http://hide1713.wordpress.com/?p=350</guid>
		<description><![CDATA[Let&#8217;s look into Gamebryo frame rendering system. The documentation is located in:
Gamebryo Document-&#62;Programmer Level-&#62; Core Runtime -&#62; Frame Rendering System
The propose of the frame rendering system is to make rendering code portable.  Applications that use the frame rendering system do all their configuration work up front. The complex effects can be performed automatically at render [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=350&subd=hide1713&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Let&#8217;s look into Gamebryo frame rendering system. The documentation is located in:</p>
<p><strong>Gamebryo Document-&gt;Programmer Level-&gt; Core Runtime -&gt; Frame Rendering System</strong></p>
<p>The propose of the frame rendering system is to make <strong>rendering code portable</strong>.  Applications that use the frame rendering system do all their configuration work up front. The complex effects can be performed automatically at render time.</p>
<p><strong>Render Frame(NiRenderFrame) </strong>represents an entire rendering process. It must be set up during initialization and displayed each frame. It has many render steps and iterates through the <em>rend steps</em> telling them to hook callback function to a frame.</p>
<p><strong>Render Step(NiRenderStep)</strong> is a single rendering effect. It does the actual rendering work. It can be turned on/off to control the final effect. One Rend Step usually performs one or more rendering passes via <em>render click</em> objects.</p>
<p><strong>Render Click(NiClickRenderStep)</strong> is a complete rendering pass. It can be easily enabled or disabled by 1) application in every frame 2) a<strong> render click validator</strong> according to some criteria. 3) pre/post callback function.</p>
<p><strong>Render View(NiRenderView)</strong> objects provide a certain type of render click with an array   of geometry to render. They can do this by culling a scene graph against   a camera or by using some other algorithm to determine which geometry   objects need to be rendered.</p>
<p><strong>Render List Processor(NiRenderListProcessor) </strong>,During rendering, the processor is passed an array of   geometry objects that need to be rendered and passes back an array of   objects that still need to be rendered. By controlling that output array,   the render list processor can modify the geometry array, such as rendering   some geometry objects immediately and deferring rendering of a sorted   list for later.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hide1713.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hide1713.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hide1713.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hide1713.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hide1713.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hide1713.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hide1713.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hide1713.wordpress.com/350/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hide1713.wordpress.com/350/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hide1713.wordpress.com/350/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=350&subd=hide1713&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hide1713.wordpress.com/2009/10/21/gamebryo-frame-rendering-system-reading-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60a05cdce2660296672b37ad2654e00f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hide1713</media:title>
		</media:content>
	</item>
		<item>
		<title>GameBryo Asset Service and Actionmap</title>
		<link>http://hide1713.wordpress.com/2009/10/15/gamebryo-asset-service-and-key-actionmap/</link>
		<comments>http://hide1713.wordpress.com/2009/10/15/gamebryo-asset-service-and-key-actionmap/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 05:00:26 +0000</pubDate>
		<dc:creator>hide1713</dc:creator>
				<category><![CDATA[GameBryo]]></category>

		<guid isPermaLink="false">http://hide1713.wordpress.com/?p=335</guid>
		<description><![CDATA[GameBryo Asset Service provides an easy way to access game data. For all the assets( Entity models, logic scripts,images etc), the asset service assigns a unique name to each of them.  The unique id is called Uniform Resource Identifier (URI) that is prefixed by the string &#8220;urn:&#8221;, followed by one or     [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=335&subd=hide1713&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>GameBryo Asset Service provides an easy way to access game data. For all the assets( Entity models, logic scripts,images etc), the asset service assigns a unique name to each of them.  The unique id is called Uniform Resource Identifier (URI) that is prefixed by the string &#8220;urn:&#8221;, followed by one or     more specifiers.</p>
<p>Examples:</p>
<ul>
<li><em>urn:gamebryo-scenegraph:Precache</em>—All assets that are tagged with <em>both</em> &#8220;gamebryo-scenegraph&#8221; and &#8220;Precache&#8221;, which might be used to identify every asset that         should be pre-loaded during application startup.</li>
<li><em>urn:emergent-world:Level1</em>—An asset that is tagged with &#8220;emergent-world&#8221; and         has the name of &#8220;Level1&#8243;, which might be used to load all the entities needed in the         first level of a game.</li>
<li><em>urn:llid:0716a14d-81ca-46f2-9e7e-7dc30ff2c561:Wii</em>—A logical asset with the         indicated unique ID <em>and also tagged</em> &#8220;Wii&#8221;, which might be used to load the Wii         variation of an asset selected with an asset-picker in a tool.</li>
</ul>
<h2>Assets in Hello World Demo:</h2>
<p>In the hello world example, the HelloWorldService::SetupInputActions() function uses &#8220;urn:gamebryo-actionmap:HelloWorldActionMap&#8221; to load a key-action map. It maps the &#8220;m&#8221; key to HELLOWROLD_ACTION_DROP event and &#8220;n&#8221; key to HELLOWORLD_ACTION_PICKUP event. The  actionmap file is located in \Gamebryo\Media\Samples\GameFramework\HelloWorld\HelloWroldActionMap.actionmap.</p>
<p>Also, in ConfigCommon.ini file, the initial world is specified by</p>
<p style="padding-left:30px;">[Game]<br />
InitialWorld = urn:emergent-world:HelloWorld</p>
<p>The question is <strong>how does gamebryo map URN  to  file</strong>. This question is very important because you must understand the asset service in order to use assets.</p>
<p>Let&#8217;s take a close look on HelloWrold cpp project.</p>
<p>In Config.ini file, we have an attribute</p>
<p style="text-align:left;padding-left:30px;">[AssetWeb.Win32]<br />
Path=$(SourceBaseDir)/../../../Media</p>
<p style="text-align:left;">This attribute specifies the root directory for Asset directory. The config manager service will load this attribute in run time. On my computer, the AssetWeb root folder is F:\Gamebryo\Media. There are three files in <strong>Media/asset-web-config</strong> directory which define the asset web.</p>
<p style="text-align:left;">The<strong> LogicalIdTagger.ini</strong> defines some logical tags:</p>
<blockquote>
<p style="text-align:left;">; The Assets are a list of asset types (assigned by the MimeTagger) that should have logical<br />
; asset id&#8217;s assigned to them. If the asset does not possess one of these tags, then no logical<br />
; asset id is created for it.  Logical asset id&#8217;s are only needed for assets that will be referenced<br />
; by other asset files, like block or model files.<br />
[LogicalIdTagger.Assets]<br />
=gamebryo-scenegraph<br />
=gamebryo-animation<br />
=gamebryo-terrain<br />
=gamebryo-terrain-materialpkg<br />
=physx-terrain<br />
=gamebryo-actionmap<br />
=wwise-sound-bank<br />
=bmp-image</p>
</blockquote>
<p style="text-align:left;">In <strong>MimeTagger.ini,</strong> for each file extension, a pair of tags is created from the associated MIME  type.  For example, &#8220;py=script/python-behavior&#8221; will result in every file<br />
with the &#8220;.py&#8221; extension having two tag values &#8211; &#8220;script&#8221; and &#8220;python- behavior&#8221;.</p>
<blockquote>
<p style="text-align:left;">xblock=x-world/emergent-world</p>
<p style="text-align:left;">kf=application/gamebryo-sequence-file<br />
actionmap=application/gamebryo-actionmap<br />
bnk=audio/wwise-sound-bank</p>
</blockquote>
<p style="text-align:left;"><strong>Therefore,</strong> HelloWorldActionMap.actionmap file is named as &#8220;urn:gamebryo-actionmap:HelloWorldActionMap&#8221; and the HelloWrold.xblock is named as &#8220;urn:emergent-world:HelloWorld&#8221;. <strong> The path of those files are irrlevent to urn</strong>.  The asset service searches all the sub directories under AssetWeb root and classifies files accordingly.</p>
<h2 style="text-align:left;">Key Actionmap</h2>
<p>The Hello World example demonstrates two ways of handling key event.</p>
<p>1. Register a key handler function and switch the logic according to key code.</p>
<pre class="brush: cpp;">

EE_HANDLER(HelloWorldService, HandleKeyDownMessage, KeyDownMessage); // Register handler

void HelloWorldService::HandleKeyUpMessage(const KeyUpMessage *pMessage,
 efd::Category targetChannel)
{
 Entity* pAvatar = GetAvatar();
 if (pAvatar)
 {
 switch (pMessage-&gt;GetKey()) // Switch key code
 {
 case NiInputKeyboard::KEY_UP:
 pAvatar-&gt;SetPropertyValue(&quot;IsMoving&quot;, false);
 break;

 case NiInputKeyboard::KEY_LEFT:
 pAvatar-&gt;SetPropertyValue(&quot;IsTurningLeft&quot;, false);
 break;

...
</pre>
<p>2. Use a data-driven actionmap to bind keys to events. Currently, there&#8217;s no tool to help you generate actionmap  file; therefore, you need to edit the file by hand. Please read the<strong> The ecrInput Library </strong>documentation for detail.</p>
<pre class="brush: xml;">

HelloWorldActionMap.actionmap
...
 &lt;Event EventName=&quot;HELLOWORLD_ACTION_DROP&quot; EventCategory=&quot;0xC000000007765433&quot; EventFlags=&quot;RETURN_MAGNITUDE&quot;&gt;
 &lt;ActionsList&gt;
 &lt;!--Flags - InputService.h ActionFlags enum - use individual string values or combined bitmask as an int--&gt;
 &lt;!--DeviceID - a way to define action for specific controllers--&gt;
 &lt;!--Modifiers - NiInputKeyboard Modifiers enum--&gt;
 &lt;!--ActionClsID - (ACTION/DPAD/STICK)--&gt;
 &lt;!--Semantic - NiAction.h Semantic enum for gpad string values GP_BUTTON_LUP or NiInputKeyboard.h for key value strings KEY_M, etc--&gt;
 &lt;Action Flags=&quot;ON_ACTIVATE&quot; DeviceID=&quot;0&quot; Modifiers=&quot;0&quot; ActionClsID=&quot;ACTION&quot; Semantic=&quot;KEY_M&quot;MinRange=&quot;-1.000000&quot; MaxRange=&quot;1.000000&quot; /&gt;
 &lt;Action Flags=&quot;ON_ACTIVATE&quot; DeviceID=&quot;0&quot; Modifiers=&quot;0&quot; ActionClsID=&quot;ACTION&quot; Semantic=&quot;GP_BUTTON_RDOWN&quot; MinRange=&quot;-1.000000&quot; MaxRange=&quot;1.000000&quot; /&gt;
 &lt;/ActionsList&gt;
 &lt;/Event&gt;
 &lt;!--0xC000000007765432--&gt;
 &lt;!--13835058055407359026--&gt;
 &lt;Event EventName=&quot;HELLOWORLD_ACTION_PICKUP&quot; EventCategory=&quot;0xC000000007765432&quot; EventFlags=&quot;RETURN_MAGNITUDE&quot;&gt;
 &lt;ActionsList&gt;
 &lt;Action Flags=&quot;ON_ACTIVATE&quot; DeviceID=&quot;0&quot; Modifiers=&quot;0&quot; ActionClsID=&quot;ACTION&quot; Semantic=&quot;KEY_N&quot; MinRange=&quot;-1.000000&quot; MaxRange=&quot;1.000000&quot; /&gt;
 &lt;Action Flags=&quot;ON_ACTIVATE&quot; DeviceID=&quot;0&quot; Modifiers=&quot;0&quot; ActionClsID=&quot;ACTION&quot; Semantic=&quot;GP_BUTTON_RRIGHT&quot; MinRange=&quot;-1.000000&quot; MaxRange=&quot;1.000000&quot; /&gt;
</pre>
<p>After you create the actionmap, you can create an action message handler.</p>
<pre class="brush: cpp;">

// Define the message categories for the actions
static const efd::Category kCAT_STANDALONE_ACTION_PICKUP =
 Category( efd::UniversalID::ECU_Any, 0, 0x07765432 );

static const efd::Category kCAT_STANDALONE_ACTION_DROP =
 Category( efd::UniversalID::ECU_Any, 0, 0x07765433 );

...

void HelloWorldService::HandleActionMessage(const InputActionMessage* pMsg,
 efd::Category targetChannel)
{
 Entity* pAvatar = GetAvatar();

 switch(pMsg-&gt;GetClassID())
 {
 case efd::kMSGID_CoreInputAction:
 if (pAvatar)
 {
 if(targetChannel == kCAT_STANDALONE_ACTION_PICKUP)
 {
 pAvatar-&gt;SendEvent(pAvatar-&gt;GetEntityID(), &quot;Jack&quot;, &quot;PickupEntity&quot;);
 }
 else if(targetChannel == kCAT_STANDALONE_ACTION_DROP)
 {
 pAvatar-&gt;SendEvent(pAvatar-&gt;GetEntityID(), &quot;Jack&quot;, &quot;DropEntity&quot;);
 }
 }
 break;
 }

}
</pre>
<h2>Reference:</h2>
<p>Gamebryo Documentation: Programmer Level-&gt;Foundation-&gt;Asset Runtime Service</p>
<p>Gamebryo Documentation: The ecrInput Library</p>
<p>HelloWorld example project</p>
<p style="text-align:left;">
<p style="text-align:left;">
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hide1713.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hide1713.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hide1713.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hide1713.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hide1713.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hide1713.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hide1713.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hide1713.wordpress.com/335/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hide1713.wordpress.com/335/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hide1713.wordpress.com/335/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=335&subd=hide1713&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hide1713.wordpress.com/2009/10/15/gamebryo-asset-service-and-key-actionmap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60a05cdce2660296672b37ad2654e00f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hide1713</media:title>
		</media:content>
	</item>
		<item>
		<title>Gamebryo weekly notes</title>
		<link>http://hide1713.wordpress.com/2009/10/05/gamebryo-weekly-notes-2/</link>
		<comments>http://hide1713.wordpress.com/2009/10/05/gamebryo-weekly-notes-2/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 00:39:24 +0000</pubDate>
		<dc:creator>hide1713</dc:creator>
				<category><![CDATA[GameBryo]]></category>

		<guid isPermaLink="false">http://hide1713.wordpress.com/?p=330</guid>
		<description><![CDATA[Weekly Goals Sept 24 to Oct 1 .
1. Write a class to represent/display dynamic string in GameBryo.
Relevant class: Ni2DString, NiString, NiFont etc.
Nots: Ni2DString::Draw()  Draw the string. This call must appear   between a call to NiRenderer::BeginUsingRenderTargetGroup and a subsequent call to NiRenderer::EndUsingRenderTargetGroup.
Possible Solution: Edit InputDemo and replace the dynamic string funtions in InputDemo.
2. Add [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=330&subd=hide1713&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Weekly Goals Sept 24 to Oct 1 .</p>
<p style="padding-left:30px;">1. Write a class to represent/display dynamic string in GameBryo.</p>
<p style="padding-left:30px;">Relevant class: Ni2DString, NiString, NiFont etc.</p>
<p style="padding-left:30px;">Nots: Ni2DString::Draw()  Draw the string. This call must appear   between a call to <a href="/Gamebryo/Documentation/HTML/Reference/NiMain/NiRenderer.htm#Render_Target_Access_Management">NiRenderer::BeginUsingRenderTargetGroup</a> and a subsequent call to <a href="/Gamebryo/Documentation/HTML/Reference/NiMain/NiRenderer.htm#Render_Target_Access_Management">NiRenderer::EndUsingRenderTargetGroup</a>.</p>
<p style="padding-left:30px;">Possible Solution: Edit InputDemo and replace the dynamic string funtions in InputDemo.</p>
<p style="padding-left:30px;">2. Add game state in MOUT demo</p>
<p style="padding-left:30px;">Right now, the MOUT demo doesn&#8217;t support state change. After I finish the dynamic string. I need to add it to MOUT. When player hits ENTER, the game changes to INPUT_STATE and player could type. When the player hits ESC key, the game return to CONTROL_STATE and player could control the movment of soldier.</p>
<p style="padding-left:30px;">Questions</p>
<p style="padding-left:30px;">1. Gamebryo doesn&#8217;t not support UNICODE for the engine.</p>
<p style="padding-left:30px;"><em>Furthermore, builds of Gamebryo with UNICODE or _UNICODE   defined are not supported.</em></p>
<p style="padding-left:30px;">Check my VS2008 solution setting.</p>
<p>Weekly Goals Oct 4to Oct 11 .</p>
<p style="padding-left:30px;">1. Read the CEGUI intergration source code to find out how to create/add/remove UI item</p>
<p style="padding-left:30px;">2. Create my GUI according to the tutorial and load the gui into integration demo</p>
<p style="padding-left:30px;">3. Fix the bugs in message service.</p>
<p style="padding-left:30px;">4. Complete read the current Londontown source along with relative Gamebryo documentation. Especially for 3d engine part</p>
<p>Oct 11 &#8211; Oct 31</p>
<p style="padding-left:30px;">Solve the memory leak problem in CEGUI integration</p>
<p style="padding-left:30px;">Wrote a simple tic tac toe game in lightspeed</p>
<p style="padding-left:30px;">Wrote chatting system in integration project</p>
<p style="padding-left:30px;">Port the chatting system to London Town project</p>
<p>Weekly Achievements.</p>
<p>Nov 1-7</p>
<p>Finished the chatting system.</p>
<p style="padding-left:30px;">Resize the chat window</p>
<p style="padding-left:30px;">Add line warpping function</p>
<p style="padding-left:30px;">Leaned how to switch scheme</p>
<p>Nov 8-14</p>
<p style="padding-left:30px;">Read the NiPick document</p>
<p style="padding-left:30px;">Pick object from London town</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hide1713.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hide1713.wordpress.com/330/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hide1713.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hide1713.wordpress.com/330/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hide1713.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hide1713.wordpress.com/330/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hide1713.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hide1713.wordpress.com/330/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hide1713.wordpress.com/330/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hide1713.wordpress.com/330/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=330&subd=hide1713&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hide1713.wordpress.com/2009/10/05/gamebryo-weekly-notes-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60a05cdce2660296672b37ad2654e00f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hide1713</media:title>
		</media:content>
	</item>
		<item>
		<title>Lightspeed  Debuging 101</title>
		<link>http://hide1713.wordpress.com/2009/09/20/lightspeed-debuging-101/</link>
		<comments>http://hide1713.wordpress.com/2009/09/20/lightspeed-debuging-101/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 02:38:42 +0000</pubDate>
		<dc:creator>hide1713</dc:creator>
				<category><![CDATA[LightSpeed]]></category>

		<guid isPermaLink="false">http://hide1713.wordpress.com/?p=321</guid>
		<description><![CDATA[First of all, you need to read the Product Tour &#8211; Editing Behaviors tutorial. I followed the tutorial step by step. I set the break point and I started a new game. Unfortunately, the game didn&#8217;t stop in the breakpoint. After little bit research, I realize the tutorial jumped out the whole section for setting [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=321&subd=hide1713&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>First of all, you need to read the <strong>Product Tour &#8211; Editing Behaviors</strong> tutorial. I followed the tutorial step by step. I set the break point and I started a new game. Unfortunately, the game didn&#8217;t stop in the breakpoint. After little bit research, I realize <strong>the tutorial jumped out the whole section for setting up debugger.</strong> I went back and read the <strong>Establishing a             connection between Toolbench and your game </strong>in the chapter <strong>Script Debugger: Introduction.</strong></p>
<p>Basically, you need to establish a connection between the game and the Toolbench thought Asset Controller.</p>
<p>1. Add the following code  in your Gamebryo\Samples\GameDemos\MangledMetal\Win32\VC80\Release\Config.ini file. This this the configuration file for your game.</p>
<p style="text-align:left;padding-left:30px;">[ChannelManager]<br />
ListenPort=13215<br />
ListenIP=127.0.0.1</p>
<p style="text-align:left;">This code tells the game to connect to <strong>Asset Controller </strong>in your system tray though 127.0.0.1(loopback network) and 13215 prot.</p>
<p style="text-align:left;">2. <strong>After that( It&#8217;s very important to do this step after your game connets to Asset Controller), </strong>you want to toggle the debugger. Follow the instruction of  <strong>Product Tour &#8211; Editing Behaviors.</strong> Open the EseVictim.lua and set a breakpoint in it.  Press Debug-&gt;Toggle Scripting Debugging. You will see a new debugging panel. This time, the debugger will stop after enemy hits you. ( If  the game didn&#8217;t stop. toggle it off and on once more).</p>
<p style="text-align:left;"><a href="http://hide1713.files.wordpress.com/2009/09/debugger.jpg"><img class="aligncenter size-medium wp-image-322" title="debugger" src="http://hide1713.files.wordpress.com/2009/09/debugger.jpg?w=300&#038;h=180" alt="debugger" width="300" height="180" /></a></p>
<p style="text-align:left;">
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hide1713.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hide1713.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hide1713.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hide1713.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hide1713.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hide1713.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hide1713.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hide1713.wordpress.com/321/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hide1713.wordpress.com/321/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hide1713.wordpress.com/321/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=321&subd=hide1713&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hide1713.wordpress.com/2009/09/20/lightspeed-debuging-101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60a05cdce2660296672b37ad2654e00f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hide1713</media:title>
		</media:content>

		<media:content url="http://hide1713.files.wordpress.com/2009/09/debugger.jpg?w=300" medium="image">
			<media:title type="html">debugger</media:title>
		</media:content>
	</item>
		<item>
		<title>DirectX 10 DrawText Disable Depth Buffer. Here&#8217;s how to fix it.</title>
		<link>http://hide1713.wordpress.com/2009/07/06/directx-10-drawtext-disable-depth-buffer-heres-how-to-fix-it/</link>
		<comments>http://hide1713.wordpress.com/2009/07/06/directx-10-drawtext-disable-depth-buffer-heres-how-to-fix-it/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 03:33:39 +0000</pubDate>
		<dc:creator>hide1713</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hide1713.wordpress.com/?p=283</guid>
		<description><![CDATA[DrawText() is a bitch. It changes device state silently.  You have to use a spirit to save the states before you draw it and reset depth buffer after you draw the text.


void cGraphicsLayer::DrawTextString(int x, int y,
 D3DXCOLOR color, const TCHAR* strOutput)
{
 m_pFontSprite-&#62;Begin(D3DX10_SPRITE_SAVE_STATE);
 RECT rect = {x, y, m_rcScreenRect.right, m_rcScreenRect.bottom};

 m_pFont-&#62;DrawText(m_pFontSprite, strOutput, -1, &#38;rect, DT_LEFT&#124;DT_NOCLIP , [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=283&subd=hide1713&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>DrawText() is a bitch. It changes device state silently.  You have to use a spirit to save the states before you draw it and reset depth buffer after you draw the text.</p>
<pre class="brush: cpp;">

void cGraphicsLayer::DrawTextString(int x, int y,
 D3DXCOLOR color, const TCHAR* strOutput)
{
 m_pFontSprite-&gt;Begin(D3DX10_SPRITE_SAVE_STATE);
 RECT rect = {x, y, m_rcScreenRect.right, m_rcScreenRect.bottom};

 m_pFont-&gt;DrawText(m_pFontSprite, strOutput, -1, &amp;rect, DT_LEFT|DT_NOCLIP , color);
 m_pFontSprite-&gt;End();
}
</pre>
<p>Here&#8217;s how to recover the depth buffer. You need to keep your DepthStencilState and set it with OMSetDepthStencilState</p>
<pre class="brush: cpp;">

void cGraphicsLayer::ResetDepthBuffer()
{
 m_pDevice-&gt;OMSetDepthStencilState(m_pDepthStencilState, 1);
}
</pre>
<p>Good luck</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hide1713.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hide1713.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hide1713.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hide1713.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hide1713.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hide1713.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hide1713.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hide1713.wordpress.com/283/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hide1713.wordpress.com/283/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hide1713.wordpress.com/283/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=283&subd=hide1713&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hide1713.wordpress.com/2009/07/06/directx-10-drawtext-disable-depth-buffer-heres-how-to-fix-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60a05cdce2660296672b37ad2654e00f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hide1713</media:title>
		</media:content>
	</item>
		<item>
		<title>System 6 Forever</title>
		<link>http://hide1713.wordpress.com/2009/06/28/system-6-forever/</link>
		<comments>http://hide1713.wordpress.com/2009/06/28/system-6-forever/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 19:33:29 +0000</pubDate>
		<dc:creator>hide1713</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://hide1713.wordpress.com/?p=278</guid>
		<description><![CDATA[
System 6 (also referred to as System Software 6) is a graphical user interface-based operating system for Macintosh computers. It was released in 1988 by Apple Computer and was part of the Mac OS line of operating systems. System 6 was shipped with various Macintosh computers until it was succeeded by System 7 in 1991. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=278&subd=hide1713&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><blockquote><p><a href="http://hide1713.files.wordpress.com/2009/06/sys6_1.jpg"><img class="aligncenter size-medium wp-image-279" title="sys6_1" src="http://hide1713.files.wordpress.com/2009/06/sys6_1.jpg?w=300&#038;h=213" alt="sys6_1" width="300" height="213" /></a><a href="http://hide1713.files.wordpress.com/2009/06/sys6_2.jpg"><img class="aligncenter size-medium wp-image-280" title="sys6_2" src="http://hide1713.files.wordpress.com/2009/06/sys6_2.jpg?w=300&#038;h=213" alt="sys6_2" width="300" height="213" /></a></p></blockquote>
<p><strong>System 6</strong> (also referred to as <strong>System Software 6</strong>) is a <a title="Graphical user interface" href="http://en.wikipedia.org/wiki/Graphical_user_interface">graphical user interface</a>-based <a title="Operating system" href="http://en.wikipedia.org/wiki/Operating_system">operating system</a> for <a title="Macintosh" href="http://en.wikipedia.org/wiki/Macintosh">Macintosh</a> computers. It was released in 1988 by <a title="Apple Inc" href="http://en.wikipedia.org/wiki/Apple_Inc">Apple Computer</a> and was part of the <a title="Mac OS" href="http://en.wikipedia.org/wiki/Mac_OS">Mac OS</a> line of operating systems. System 6 was shipped with various Macintosh computers until it was succeeded by <a title="System 7" href="http://en.wikipedia.org/wiki/System_7">System 7</a> in 1991. The boxed version of System 6 cost 49 USD when introduced.<sup><a href="http://en.wikipedia.org/wiki/System_6#cite_note-macuser-0"><span>[</span>1<span>]</span></a></sup> System 6 is classed as a <a title="Monolithic system" href="http://en.wikipedia.org/wiki/Monolithic_system">monolithic</a> operating system. It featured an improved <a title="MultiFinder" href="http://en.wikipedia.org/wiki/MultiFinder">MultiFinder</a>, which allowed for <a title="Co-operative multitasking" href="http://en.wikipedia.org/wiki/Co-operative_multitasking">co-operative multitasking</a>. The last version of System 6 was released in 1991.</p>
<p><span style="font-size:small;">Why system 6?</span></p>
<p>Macintosh Operating System 6 is probably the nicest operating system ever made. Nowadays it&#8217;s considered ancient (development stopped somewhere in 1991) but it&#8217;s far from backward and with the use of the proper vintage software you can be just as productive on a System 6 machine as you&#8217;d be on a modern Mac. System 6 runs on most older Macintosh computers with 68000, 68020 and 68030 processors. Some of these Machines are also able to run later versions of the Mac OS up to 7.55 and 7.61, but the lower-end models, most notably the so called Compact Macs, the Mac Plus, the SE and the Classic, and the lowend 68020&#8217;s, the Mac II and the LC, are better off running System 6. They will be a lot faster with System 6 than with System 7. The reason behind this is the fact that System 6 is not only a lot more compact (it has less features and therefore less code to crunch), but also because System 6 was written in assembly code instead of the high level language C. Assembly code is a bit lower level and because of that a bit closer to the hardware of the machine, making it a lot more responsive.</p>
<p>Read some more system 6 advocacy <a href="http://www.euronet.nl/users/mvdk/advocacy.html">here</a></p>
<p>Link <a href="http://www.euronet.nl/users/mvdk/system_6_heaven.html">System 6 Heven</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hide1713.wordpress.com/278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hide1713.wordpress.com/278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hide1713.wordpress.com/278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hide1713.wordpress.com/278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hide1713.wordpress.com/278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hide1713.wordpress.com/278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hide1713.wordpress.com/278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hide1713.wordpress.com/278/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hide1713.wordpress.com/278/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hide1713.wordpress.com/278/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=278&subd=hide1713&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hide1713.wordpress.com/2009/06/28/system-6-forever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60a05cdce2660296672b37ad2654e00f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hide1713</media:title>
		</media:content>

		<media:content url="http://hide1713.files.wordpress.com/2009/06/sys6_1.jpg?w=300" medium="image">
			<media:title type="html">sys6_1</media:title>
		</media:content>

		<media:content url="http://hide1713.files.wordpress.com/2009/06/sys6_2.jpg?w=300" medium="image">
			<media:title type="html">sys6_2</media:title>
		</media:content>
	</item>
		<item>
		<title>Travelling Salesman Problem</title>
		<link>http://hide1713.wordpress.com/2009/06/23/travelling-salesman-problem/</link>
		<comments>http://hide1713.wordpress.com/2009/06/23/travelling-salesman-problem/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 20:40:02 +0000</pubDate>
		<dc:creator>hide1713</dc:creator>
				<category><![CDATA[C]]></category>

		<guid isPermaLink="false">http://hide1713.wordpress.com/?p=274</guid>
		<description><![CDATA[
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=274&subd=hide1713&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="alignnone" title="http://imgs.xkcd.com/comics/travelling_salesman_problem.png" src="http://imgs.xkcd.com/comics/travelling_salesman_problem.png" alt="" width="640" height="283" /></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hide1713.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hide1713.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hide1713.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hide1713.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hide1713.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hide1713.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hide1713.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hide1713.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hide1713.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hide1713.wordpress.com/274/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=274&subd=hide1713&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hide1713.wordpress.com/2009/06/23/travelling-salesman-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60a05cdce2660296672b37ad2654e00f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hide1713</media:title>
		</media:content>

		<media:content url="http://imgs.xkcd.com/comics/travelling_salesman_problem.png" medium="image">
			<media:title type="html">http://imgs.xkcd.com/comics/travelling_salesman_problem.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Virtual Studio Smart Operator &#8216;=&#8217;. Add Spaces Around Every &#8216;=&#8217;.</title>
		<link>http://hide1713.wordpress.com/2009/06/22/virtual-studio-smart-operator-add-space-around-it/</link>
		<comments>http://hide1713.wordpress.com/2009/06/22/virtual-studio-smart-operator-add-space-around-it/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 23:05:37 +0000</pubDate>
		<dc:creator>hide1713</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[CPP]]></category>

		<guid isPermaLink="false">http://hide1713.wordpress.com/?p=263</guid>
		<description><![CDATA[I find it&#8217;s really hard to extend the environemnt under VS 2008. Anyway, I have to learn some VB.
I really like the SmartOperator.el in Emacs. When I press &#8216;=&#8217; key, it automatically insert two spaces around &#8216;=&#8217;.  The following code can do the same thing. You need to create a new macro in VS and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=263&subd=hide1713&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I find it&#8217;s really hard to extend the environemnt under VS 2008. Anyway, I have to learn some VB.</p>
<p>I really like the SmartOperator.el in Emacs. When I press &#8216;=&#8217; key, it automatically insert two spaces around &#8216;=&#8217;.  The following code can do the same thing. You need to create a new macro in VS and put the code in the new macro and bind &#8216;=&#8217; key to this function.  I hope the code could inspire someone.</p>
<pre class="brush: vb;">

Sub space_around_eq()
 Dim s As TextSelection = DTE.ActiveDocument.Selection
 s.CharLeft(True, 2)
 Dim selection = s.Text
 If selection.StartsWith(&quot;=&quot;) Then
 DTE.ActiveDocument.Selection.Text = &quot;== &quot;
 ElseIf selection.EndsWith(&quot;-&quot;) Or selection.EndsWith(&quot;+&quot;) Or selection.EndsWith(&quot;*&quot;) Or selection.EndsWith(&quot;=&quot;) Or selection.EndsWith(&quot; &quot;) Then
 DTE.ActiveDocument.Selection.Text = selection.ToString() + &quot;= &quot;
 Else
 DTE.ActiveDocument.Selection.Text = selection.ToString() + &quot; = &quot;
 End If
 End Sub
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hide1713.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hide1713.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hide1713.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hide1713.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hide1713.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hide1713.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hide1713.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hide1713.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hide1713.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hide1713.wordpress.com/263/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hide1713.wordpress.com&blog=5229194&post=263&subd=hide1713&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://hide1713.wordpress.com/2009/06/22/virtual-studio-smart-operator-add-space-around-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/60a05cdce2660296672b37ad2654e00f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hide1713</media:title>
		</media:content>
	</item>
	</channel>
</rss>