<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/wordpress-mu-1.2.3-2.2.1" -->
<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/"
	>

<channel>
	<title>Shunsuke Saruwatari</title>
	<link>http://www.illigal.uiuc.edu/web/saru</link>
	<description>Personal Webpage</description>
	<pubDate>Wed, 24 Oct 2007 22:23:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=wordpress-mu-1.2.3-2.2.1</generator>
	<language>en</language>
			<item>
		<title>[jena] how to read seq</title>
		<link>http://www.illigal.uiuc.edu/web/saru/2007/10/24/jena-how-to-read-seq/</link>
		<comments>http://www.illigal.uiuc.edu/web/saru/2007/10/24/jena-how-to-read-seq/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 22:23:02 +0000</pubDate>
		<dc:creator>saru</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.illigal.uiuc.edu/web/saru/2007/10/24/jena-how-to-read-seq/</guid>
		<description><![CDATA[jena can read seq from rdf file.
If there is following rdf,

&#60;rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" &#62;
  &#60;rdf:Description rdf:about="http://www.illigal.uiuc.edu/saru"&#62;
    &#60;rdf:_3&#62;Uncategorized&#60;/rdf:_3&#62;
    &#60;rdf:_2&#62;programming&#60;/rdf:_2&#62;
    &#60;rdf:_1&#62;Books&#60;/rdf:_1&#62;
    &#60;rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq"/&#62;
  &#60;/rdf:Description&#62;
&#60;/rdf:RDF&#62;

And, you execute following code,

Model model = ModelFactory.createDefaultModel();
InputStream in = FileManager.get().open("sample.rdf");
model.read(in, "");

seq = model.getSeq("http://www.illigal.uiuc.edu/saru");

for(int i = 1; i [...]]]></description>
			<content:encoded><![CDATA[<p>jena can read seq from rdf file.</p>
<p>If there is following rdf,</p>
<pre><code>
&lt;rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" &gt;
  &lt;rdf:Description rdf:about="http://www.illigal.uiuc.edu/saru"&gt;
    &lt;rdf:_3&gt;Uncategorized&lt;/rdf:_3&gt;
    &lt;rdf:_2&gt;programming&lt;/rdf:_2&gt;
    &lt;rdf:_1&gt;Books&lt;/rdf:_1&gt;
    &lt;rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq"/&gt;
  &lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</code></pre>
<p>And, you execute following code,</p>
<pre><code>
Model model = ModelFactory.createDefaultModel();
InputStream in = FileManager.get().open("sample.rdf");
model.read(in, "");

seq = model.getSeq("http://www.illigal.uiuc.edu/saru");

for(int i = 1; i &lt;= seq.size(); i++){
    System.out.println(i + ": " + seq.getObject(i));
}
</code></pre>
<p>output will be</p>
<blockquote><p>
1: Books<br />
2: programming<br />
3: Uncategorized
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.illigal.uiuc.edu/web/saru/2007/10/24/jena-how-to-read-seq/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[jena] how to write seq</title>
		<link>http://www.illigal.uiuc.edu/web/saru/2007/10/24/jena-how-to-manage-seq-1/</link>
		<comments>http://www.illigal.uiuc.edu/web/saru/2007/10/24/jena-how-to-manage-seq-1/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 22:19:51 +0000</pubDate>
		<dc:creator>saru</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.illigal.uiuc.edu/web/saru/2007/10/24/jena-how-to-manage-seq-1/</guid>
		<description><![CDATA[JENA can make list using seq on RDF.

Model model = ModelFactory.createDefaultModel();        

Seq seq = model.createSeq("http://www.illigal.uiuc.edu/saru");
seq.add("Books");
seq.add("programming");
seq.add("Uncategorized");

model.write(System.out);

We can create seq by Model::createSeq. Arguments is description URI. If you execute previous code,

&#60;rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" &#62;
  &#60;rdf:Description rdf:about="http://www.illigal.uiuc.edu/saru"&#62;
    &#60;rdf:_3&#62;Uncategorized&#60;/rdf:_3&#62;
    &#60;rdf:_2&#62;programming&#60;/rdf:_2&#62;
    [...]]]></description>
			<content:encoded><![CDATA[<p>JENA can make list using seq on RDF.</p>
<pre><code>
Model model = ModelFactory.createDefaultModel();        

Seq seq = model.createSeq("http://www.illigal.uiuc.edu/saru");
seq.add("Books");
seq.add("programming");
seq.add("Uncategorized");

model.write(System.out);
</code></pre>
<p>We can create seq by Model::createSeq. Arguments is description URI. If you execute previous code,</p>
<pre><code>
&lt;rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" &gt;
  &lt;rdf:Description rdf:about="http://www.illigal.uiuc.edu/saru"&gt;
    &lt;rdf:_3&gt;Uncategorized&lt;/rdf:_3&gt;
    &lt;rdf:_2&gt;programming&lt;/rdf:_2&gt;
    &lt;rdf:_1&gt;Books&lt;/rdf:_1&gt;
    &lt;rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq"/&gt;
  &lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
</code></pre>
<p>will be output. _1, _2, _3 is order of the objects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.illigal.uiuc.edu/web/saru/2007/10/24/jena-how-to-manage-seq-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[jena] minimum rdf</title>
		<link>http://www.illigal.uiuc.edu/web/saru/2007/10/20/jena-minimum-rdf/</link>
		<comments>http://www.illigal.uiuc.edu/web/saru/2007/10/20/jena-minimum-rdf/#comments</comments>
		<pubDate>Sat, 20 Oct 2007 13:56:20 +0000</pubDate>
		<dc:creator>saru</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.illigal.uiuc.edu/web/saru/2007/10/20/jena-minimum-rdf/</guid>
		<description><![CDATA[
Model model = ModelFactory.createDefaultModel();        

model.write(System.out);

this outputs

&#60;rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" &#62;
&#60;/rdf:RDF&#62;

]]></description>
			<content:encoded><![CDATA[<pre><code>
Model model = ModelFactory.createDefaultModel();        

model.write(System.out);
</code></pre>
<p>this outputs</p>
<pre><code>
&lt;rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" &gt;
&lt;/rdf:RDF&gt;
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.illigal.uiuc.edu/web/saru/2007/10/20/jena-minimum-rdf/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[LAMP + Ajax] naming rule</title>
		<link>http://www.illigal.uiuc.edu/web/saru/2007/10/04/lamp-ajax-naming-rule/</link>
		<comments>http://www.illigal.uiuc.edu/web/saru/2007/10/04/lamp-ajax-naming-rule/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 19:17:48 +0000</pubDate>
		<dc:creator>saru</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.illigal.uiuc.edu/web/saru/2007/10/04/lamp-ajax-naming-rule/</guid>
		<description><![CDATA[I couldn&#8217;t find naming rule for LAMP + Ajax. So, I am making my naming rule. This rule might reduce bugs in javascript and php.
In HTML tags
tag id attribute must be lower case and finished at &#8220;_id&#8221;
tag class attribute name must be finished at &#8220;_class&#8221;
tag name attribute is not added anything.
In Javascript
local variant must be [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t find naming rule for LAMP + Ajax. So, I am making my naming rule. This rule might reduce bugs in javascript and php.</p>
<p>In HTML tags</p>
<li>tag id attribute must be lower case and finished at &#8220;_id&#8221;</li>
<li>tag class attribute name must be finished at &#8220;_class&#8221;</li>
<li>tag name attribute is not added anything.</li>
<p>In Javascript</p>
<li>local variant must be Hungarian notation with mixed lower case and upper case without _</li>
<p><code>strTopic (string), elmTopic (element), objTopic (object)</code> </p>
<li>global vaiant must be Hungrian notation with only lower case and _</li>
<p><code>str_topic (string), elm_topic (element), obj_topic (object)</code></p>
<p><a href="http://bluedb.org">WordPress</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.illigal.uiuc.edu/web/saru/2007/10/04/lamp-ajax-naming-rule/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[javascript] incident bug</title>
		<link>http://www.illigal.uiuc.edu/web/saru/2007/09/30/javascript-incident-bug/</link>
		<comments>http://www.illigal.uiuc.edu/web/saru/2007/09/30/javascript-incident-bug/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 16:31:54 +0000</pubDate>
		<dc:creator>saru</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.illigal.uiuc.edu/web/saru/2007/09/30/javascript-incident-bug/</guid>
		<description><![CDATA[When we use setAttribute, getAttribute, removeAttribute in IE, readonly should be readOnly. Same things happen in maxLength, bgColor, and so on.
]]></description>
			<content:encoded><![CDATA[<p>When we use setAttribute, getAttribute, removeAttribute in <strong>IE</strong>, readonly should be read<strong>O</strong>nly. Same things happen in maxLength, bgColor, and so on.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.illigal.uiuc.edu/web/saru/2007/09/30/javascript-incident-bug/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[javascript] solve browser incompatibility</title>
		<link>http://www.illigal.uiuc.edu/web/saru/2007/09/20/javascript-solve-browser-incompatibility/</link>
		<comments>http://www.illigal.uiuc.edu/web/saru/2007/09/20/javascript-solve-browser-incompatibility/#comments</comments>
		<pubDate>Thu, 20 Sep 2007 16:04:36 +0000</pubDate>
		<dc:creator>saru</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.illigal.uiuc.edu/web/saru/2007/09/20/javascript-solve-browser-incompatibility/</guid>
		<description><![CDATA[Color
use rgb color parser
Event
use Event class in prototype.js
Element
don&#8217;t use same tag id name, javascript variable name, and tag class name, and use Element class and $()  in prototype.js.
I think we need naming rule at id name, variable name, and class name.
like

 tag id name: xxx_id
 javascript variable: elmXXX (like hangarian style?)
 tag class name: [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Color</strong></p>
<p>use <a href="http://www.phpied.com/rgb-color-parser-in-javascript/">rgb color parser</a></p>
<p><strong>Event</strong></p>
<p>use <em>Event class</em> in <a href="http://www.prototypejs.org/">prototype.js</a></p>
<p><strong>Element</strong></p>
<p>don&#8217;t use same tag id name, javascript variable name, and tag class name, and use <em>Element class</em> and $()  in <a href="http://www.prototypejs.org/">prototype.js</a>.<br />
I think we need naming rule at id name, variable name, and class name.<br />
like</p>
<ul>
<li> tag id name: xxx_id</li>
<li> javascript variable: elmXXX (like hangarian style?)</li>
<li> tag class name: xxx_class</li>
</ul>
<p>If someone has good idea, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.illigal.uiuc.edu/web/saru/2007/09/20/javascript-solve-browser-incompatibility/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[javascript] color compatibility of IE and Firefox</title>
		<link>http://www.illigal.uiuc.edu/web/saru/2007/09/19/javascript-color-compatibility-of-ie-and-firefox/</link>
		<comments>http://www.illigal.uiuc.edu/web/saru/2007/09/19/javascript-color-compatibility-of-ie-and-firefox/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 21:38:16 +0000</pubDate>
		<dc:creator>saru</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.illigal.uiuc.edu/web/saru/2007/09/19/javascript-color-compatibility-of-ie-and-firefox/</guid>
		<description><![CDATA[javascript sometimes makes browser depended color compatibility problem.
This javascript library solves the problem.
http://www.phpied.com/rgb-color-parser-in-javascript/
It&#8217;s like
var el = document.getElementById("mycolor");
var color = new RGBColor(el.style.backgroundColor);
alert(color.toHex()); // #cccccc
alert(color.toRGB()); // rgb(204,204,204)
]]></description>
			<content:encoded><![CDATA[<p>javascript sometimes makes browser depended color compatibility problem.</p>
<p>This javascript library solves the problem.<br />
<a href="http://www.phpied.com/rgb-color-parser-in-javascript/">http://www.phpied.com/rgb-color-parser-in-javascript/</a></p>
<p>It&#8217;s like</p>
<p><code>var el = document.getElementById("mycolor");<br />
var color = new RGBColor(el.style.backgroundColor);<br />
alert(color.toHex()); // #cccccc<br />
alert(color.toRGB()); // rgb(204,204,204)</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.illigal.uiuc.edu/web/saru/2007/09/19/javascript-color-compatibility-of-ie-and-firefox/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[mysql] sql query: combine two table</title>
		<link>http://www.illigal.uiuc.edu/web/saru/2007/08/28/mysql/</link>
		<comments>http://www.illigal.uiuc.edu/web/saru/2007/08/28/mysql/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 19:27:58 +0000</pubDate>
		<dc:creator>saru</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.illigal.uiuc.edu/web/saru/2007/08/28/mysql/</guid>
		<description><![CDATA[combine two tables, count specific values, order by the count, and show only top 10.
SELECT table1.comment_id comment_id, count(table1.comment_id) point, parent_id, subparent_id, text FROM table1 LEFT JOIN comments ON table1.comment_id=table2.comment_id WHERE board_id=1 GROUP BY table1.comment_id ORDER BY point DESC LIMIT 10
]]></description>
			<content:encoded><![CDATA[<p>combine two tables, count specific values, order by the count, and show only top 10.</p>
<p><code>SELECT table1.comment_id comment_id, count(table1.comment_id) point, parent_id, subparent_id, text FROM table1 LEFT JOIN comments ON table1.comment_id=table2.comment_id WHERE board_id=1 GROUP BY table1.comment_id ORDER BY point DESC LIMIT 10</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.illigal.uiuc.edu/web/saru/2007/08/28/mysql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[eclipse] divide editor window</title>
		<link>http://www.illigal.uiuc.edu/web/saru/2007/08/25/eclipse-divide-editor-window/</link>
		<comments>http://www.illigal.uiuc.edu/web/saru/2007/08/25/eclipse-divide-editor-window/#comments</comments>
		<pubDate>Sat, 25 Aug 2007 14:18:17 +0000</pubDate>
		<dc:creator>saru</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.illigal.uiuc.edu/web/saru/2007/08/25/eclipse-divide-editor-window/</guid>
		<description><![CDATA[1. right click editor tab.

2. select &#8220;New Editor&#8221;.


3. drag down to status bar.


]]></description>
			<content:encoded><![CDATA[<p>1. right click editor tab.</p>
<p><a href='http://www.illigal.uiuc.edu/web/saru/files/2007/08/eclipse1.jpg' title='eclipse1'><img src='http://www.illigal.uiuc.edu/web/saru/files/2007/08/eclipse1.jpg' alt='eclipse1' width="400/"></a></p>
<p>2. select &#8220;New Editor&#8221;.</p>
<p><a href='http://www.illigal.uiuc.edu/web/saru/files/2007/08/eclipse2.jpg' title='eclipse2'><img src='http://www.illigal.uiuc.edu/web/saru/files/2007/08/eclipse2.jpg' alt='eclipse2' width="400/"></a></p>
<p><a href='http://www.illigal.uiuc.edu/web/saru/files/2007/08/eclipse3.jpg' title='eclipse3'><img src='http://www.illigal.uiuc.edu/web/saru/files/2007/08/eclipse3.jpg' alt='eclipse3' width="400/"></a></p>
<p>3. drag down to status bar.</p>
<p><a href='http://www.illigal.uiuc.edu/web/saru/files/2007/08/eclipse4.jpg' title='eclipse4'><img src='http://www.illigal.uiuc.edu/web/saru/files/2007/08/eclipse4.jpg' alt='eclipse4' width="400/"></a></p>
<p><a href='http://www.illigal.uiuc.edu/web/saru/files/2007/08/eclipse5.jpg' title='eclipse5'><img src='http://www.illigal.uiuc.edu/web/saru/files/2007/08/eclipse5.jpg' alt='eclipse5' width="400/"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.illigal.uiuc.edu/web/saru/2007/08/25/eclipse-divide-editor-window/feed/</wfw:commentRss>
		</item>
		<item>
		<title>[php] dynamic class loading</title>
		<link>http://www.illigal.uiuc.edu/web/saru/2007/08/18/php-dynamic-class-loading/</link>
		<comments>http://www.illigal.uiuc.edu/web/saru/2007/08/18/php-dynamic-class-loading/#comments</comments>
		<pubDate>Sat, 18 Aug 2007 23:08:18 +0000</pubDate>
		<dc:creator>saru</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.illigal.uiuc.edu/web/saru/2007/08/18/php-dynamic-class-loading/</guid>
		<description><![CDATA[When you want to load MyClass via string variant,
$classname = "MyClass";
$object = new $classname();
]]></description>
			<content:encoded><![CDATA[<p>When you want to load MyClass via string variant,</p>
<p><code>$classname = "MyClass";<br />
$object = new $classname();</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.illigal.uiuc.edu/web/saru/2007/08/18/php-dynamic-class-loading/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
