<link href='http://fonts.googleapis.com/css?family=Philosopher' rel='stylesheet' type='text/css'>

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://narnia.cs.ttu.edu/drupal"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Forrest Sheng Bao&#039;s Cyberhome</title>
 <link>http://narnia.cs.ttu.edu/drupal</link>
 <description></description>
 <language>en</language>
<item>
 <title>Choice rule not choosing </title>
 <link>http://narnia.cs.ttu.edu/drupal/node/40</link>
 <description>&lt;p&gt;The two answer set programming (ASP) programs below are different. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Program 1&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;1{a(D):b(D)}1.

b(x).
b(y). &lt;/pre&gt;&lt;p&gt;
&lt;b&gt;Program 2&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;1{a(D)}1 :- b(D).


b(x).
b(y). 
&lt;/pre&gt;&lt;p&gt;
To understand their differences, see their answer sets respectively. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Answer set(s) for program 1&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;Answer: 1
b(x) b(y) a(y) 
Answer: 2
b(x) b(y) a(x) &lt;/pre&gt;&lt;p&gt;
&lt;b&gt;Answer set(s) for program 2&lt;/b&gt;&lt;/p&gt;
&lt;pre&gt;Answer: 1
b(x) b(y) a(y) a(x) &lt;/pre&gt;&lt;p&gt;
Now I think you have figured out. The condition in choice rule plays a role.&lt;/p&gt;
</description>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/5">programming</category>
 <pubDate>Sat, 14 Apr 2012 14:35:48 +0000</pubDate>
 <dc:creator>forrest</dc:creator>
 <guid isPermaLink="false">40 at http://narnia.cs.ttu.edu/drupal</guid>
</item>
<item>
 <title>Why knowledge representation matters</title>
 <link>http://narnia.cs.ttu.edu/drupal/node/186</link>
 <description>&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Knowledge_representation_and_reasoning&quot;&gt;Knowledge representation&lt;/a&gt; (KR) is a branch of AI, but not at hot/popular/attractive to young AI researchers as other fields, such as machine learning (ML). &lt;/p&gt;
&lt;p&gt;However, it matters. (I will explain later in this post why it is not as popular as machine learning.) &lt;/p&gt;
&lt;p&gt;Allow me to use one example. I am writing an email to Dr. H. I usually write to Dr. H while CC&#039;ing to Dr. X on issues about research topic A. But today, I do not CC to Dr. X but Dr. Z because today&#039;s email is about research topic B. &lt;/p&gt;
&lt;p&gt;Gmail, maybe using some statistic strategy, thinks I put Dr. Z by mistake and suggests me to put Dr. X in the CC field. &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://narnia.cs.ttu.edu/drupal/node/186&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/9">AI</category>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/3">research</category>
 <pubDate>Tue, 03 Apr 2012 03:05:37 +0000</pubDate>
 <dc:creator>forrest</dc:creator>
 <guid isPermaLink="false">186 at http://narnia.cs.ttu.edu/drupal</guid>
</item>
<item>
 <title>SSH log-in without password </title>
 <link>http://narnia.cs.ttu.edu/drupal/node/135</link>
 <description>&lt;p&gt;
This page has been moved to &lt;a href=&quot;http://forrestbao.blogspot.com/2012/02/logging-vis-ssh-without-password.html&quot; title=&quot;http://forrestbao.blogspot.com/2012/02/logging-vis-ssh-without-password.html&quot;&gt;http://forrestbao.blogspot.com/2012/02/logging-vis-ssh-without-password....&lt;/a&gt;&lt;/p&gt;
</description>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/4">Linux</category>
 <pubDate>Tue, 07 Feb 2012 05:49:46 +0000</pubDate>
 <dc:creator>forrest</dc:creator>
 <guid isPermaLink="false">135 at http://narnia.cs.ttu.edu/drupal</guid>
</item>
<item>
 <title>Trimming suffix or perfix of a string in Shell</title>
 <link>http://narnia.cs.ttu.edu/drupal/node/20</link>
 <description>&lt;p&gt;Post moved to &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://forrestbao.blogspot.com/2012/01/trimming-suffix-or-perfix-of-string-in.html&quot; title=&quot;http://forrestbao.blogspot.com/2012/01/trimming-suffix-or-perfix-of-string-in.html&quot;&gt;http://forrestbao.blogspot.com/2012/01/trimming-suffix-or-perfix-of-stri...&lt;/a&gt;&lt;/p&gt;
</description>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/4">Linux</category>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/5">programming</category>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/21">Shell</category>
 <pubDate>Thu, 05 Jan 2012 09:15:18 +0000</pubDate>
 <dc:creator>forrest</dc:creator>
 <guid isPermaLink="false">20 at http://narnia.cs.ttu.edu/drupal</guid>
</item>
<item>
 <title>Adding two SCALARS in POINTDATA for one vtkPolyData object in VTK </title>
 <link>http://narnia.cs.ttu.edu/drupal/node/174</link>
 <description>&lt;p&gt;by Forrest Sheng Bao &lt;a href=&quot;http://fsbao.net&quot; title=&quot;http://fsbao.net&quot;&gt;http://fsbao.net&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In VTK (either the file format or the library), we sometimes associate more than one scalars to points. I just figured out how to do this in VTK (in C++, similarly in its Python, Tcl or Java wrapper). &lt;/p&gt;
&lt;p&gt;Suppose I have a vtkPolyData pointer &lt;/p&gt;
&lt;pre&gt;vtkPolyData* mesh;
&lt;/pre&gt;&lt;p&gt;and two vtkDoubleArray (you can consider a vtkDoubleArray as a list of scalars) pointers &lt;/p&gt;
&lt;pre&gt;vtkDoubleArray* depth; 
 vtkDoubleArray* curv; 
&lt;/pre&gt;&lt;p&gt;
This is how I do it: &lt;/p&gt;
&lt;pre&gt;depth-&gt;SetName(&quot;Depth&quot;);
mesh-&gt;GetPointData()-&gt;SetScalars(depth);
curv-&gt;SetName(&quot;Curvature&quot;);
mesh-&gt;GetPointData()-&gt;AddArray(curv);
&lt;/pre&gt;&lt;p&gt;
You may test this by writing &lt;code&gt;mesh&lt;/code&gt; into a VTK-format file:&lt;/p&gt;
&lt;pre&gt;vtkPolyDataWriter* writer=vtkPolyDataWriter::New();
&lt;/pre&gt;&lt;p&gt;&lt;a href=&quot;http://narnia.cs.ttu.edu/drupal/node/174&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/5">programming</category>
 <pubDate>Wed, 04 Jan 2012 06:35:30 +0000</pubDate>
 <dc:creator>forrest</dc:creator>
 <guid isPermaLink="false">174 at http://narnia.cs.ttu.edu/drupal</guid>
</item>
<item>
 <title>Fixing Firefox plug-in container problem by forcing it to crash</title>
 <link>http://narnia.cs.ttu.edu/drupal/node/55</link>
 <description>&lt;p&gt;by Forrest Sheng Bao &lt;a href=&quot;http://fsbao.net&quot; title=&quot;http://fsbao.net&quot;&gt;http://fsbao.net&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I use two important plug-ins in Firefox, Adobe PDF reader and Flash player. But they sometimes do not work after having been used in Firefox for a while. The embedded PDF reader gives you a black blank after you open several tabs of PDF files. The embedded Flash player just doesn&#039;t play movies after a while. Restarting Firefox doesn&#039;t always work. &lt;/p&gt;
&lt;p&gt;I just found out a solution - killing the Firefox plug-in container to force it to reload. First (optional, for advanced users), find out the plug-in container. &lt;/p&gt;
&lt;pre&gt;$ ps -A | grep plugin
29981 ?        00:00:07 plugin-containe
30024 ?        00:00:00 plugin-containe&lt;/pre&gt;&lt;p&gt;&lt;a href=&quot;http://narnia.cs.ttu.edu/drupal/node/55&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <pubDate>Fri, 30 Dec 2011 03:14:33 +0000</pubDate>
 <dc:creator>forrest</dc:creator>
 <guid isPermaLink="false">55 at http://narnia.cs.ttu.edu/drupal</guid>
</item>
<item>
 <title>The RIGHT code to enable MathJax on your website</title>
 <link>http://narnia.cs.ttu.edu/drupal/node/129</link>
 <description>&lt;p&gt;by Forrest Sheng Bao &lt;a href=&quot;http://fsbao.net&quot; title=&quot;http://fsbao.net&quot;&gt;http://fsbao.net&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I started using &lt;a href=&quot;http://www.mathjax.org/&quot;&gt;MathJax&lt;/a&gt; to display math on my blog (Drupal and Google Blogger) recently. OMG, my life is much easier. LaTeX is easier to type math than MathML and MathJax does not render math into pictures but vector symbols. &lt;/p&gt;
&lt;p&gt;But I noticed two problems. &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Firefox for Linux has a little problem with the Javascript code on &lt;a href=&quot;http://www.mathjax.org/docs/1.1/start.html&quot;&gt;MathJax official instruction&lt;/a&gt;. The fonts are odd - no such problem on Chrome for Linux.&lt;/li&gt;
&lt;li&gt;MathJax&#039;s official instruction does not work for Blogger&#039;s HTML template.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Then I found out this instruction that fixed both of my problems:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://narnia.cs.ttu.edu/drupal/node/129&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/5">programming</category>
 <pubDate>Mon, 26 Dec 2011 01:23:30 +0000</pubDate>
 <dc:creator>forrest</dc:creator>
 <guid isPermaLink="false">129 at http://narnia.cs.ttu.edu/drupal</guid>
</item>
<item>
 <title>Happening sequence for plans with both simple and durative actions in PDDL2.1</title>
 <link>http://narnia.cs.ttu.edu/drupal/node/177</link>
 <description>&lt;p&gt;by Forrest Sheng Bao &lt;a href=&quot;http://fsbao.net&quot; title=&quot;http://fsbao.net&quot;&gt;http://fsbao.net&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have been struggling with a definition in an important paper about temporal planning in past few weeks. And today i finally understand it with the help of one of the authors. In his words, this definition is sorta counter-intuitive. So I am now writing this blog and hope it will help others struggling with this as well. &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://narnia.cs.ttu.edu/drupal/node/177&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/3">research</category>
 <pubDate>Sun, 18 Dec 2011 10:47:18 +0000</pubDate>
 <dc:creator>forrest</dc:creator>
 <guid isPermaLink="false">177 at http://narnia.cs.ttu.edu/drupal</guid>
</item>
<item>
 <title>Accessing matrix elements of different indexes in different rows in Octave or MATLAB</title>
 <link>http://narnia.cs.ttu.edu/drupal/node/89</link>
 <description>&lt;p&gt;Here is a tricky programming problem in Octave or MATLAB. Given a matrix A, and another array Y, how to build a new array Z such that&lt;br /&gt;
&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;code&gt;Z(i)=A(i, Y(i))&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://narnia.cs.ttu.edu/drupal/node/89&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/16">MATLAB</category>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/5">programming</category>
 <pubDate>Sat, 17 Dec 2011 12:27:50 +0000</pubDate>
 <dc:creator>forrest</dc:creator>
 <guid isPermaLink="false">89 at http://narnia.cs.ttu.edu/drupal</guid>
</item>
<item>
 <title>Adding model library in Cadence spectre2</title>
 <link>http://narnia.cs.ttu.edu/drupal/node/175</link>
 <description>&lt;p&gt;To selecting device simulation model in Cadence Spectre for Cadence Affirma, here is how.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;/drupal/files/image/2011/spectre2_ModelLibrary_Setup.png&quot; /&gt;&lt;/p&gt;
</description>
 <category domain="http://narnia.cs.ttu.edu/drupal/taxonomy/term/4">Linux</category>
 <pubDate>Fri, 16 Dec 2011 23:44:54 +0000</pubDate>
 <dc:creator>forrest</dc:creator>
 <guid isPermaLink="false">175 at http://narnia.cs.ttu.edu/drupal</guid>
</item>
</channel>
</rss>
