<?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>Vunknown's Weblog</title>
	<atom:link href="http://logboook.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://logboook.wordpress.com</link>
	<description>knownledge act as old man</description>
	<lastBuildDate>Tue, 03 Feb 2009 16:17:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='logboook.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Vunknown's Weblog</title>
		<link>http://logboook.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://logboook.wordpress.com/osd.xml" title="Vunknown&#039;s Weblog" />
	<atom:link rel='hub' href='http://logboook.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Oh Error!</title>
		<link>http://logboook.wordpress.com/2009/02/03/oh-error/</link>
		<comments>http://logboook.wordpress.com/2009/02/03/oh-error/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 16:17:40 +0000</pubDate>
		<dc:creator>wearetherock</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[regular expression]]></category>

		<guid isPermaLink="false">http://logboook.wordpress.com/?p=229</guid>
		<description><![CDATA[constraints = ((OtherComp_IpAddress != &#8217;10.10.10.*&#8217; &#124;&#124; OtherComp_IpAddress != &#8217;10.10.*.*&#8217; ) &#38;&#38; (OtherComp_UserName != &#8216;wearetherock&#8217; &#124;&#124; OtherComp_UserName != &#8216;jack&#8217; &#124;&#124; OtherComp_UserName != &#8216;java*&#8217; ) &#38;&#38; (MyCpu_LoadPercentage &#60;= 17) &#38;&#38; (MyComp_FreePhysicalMemory &#62;= 30)); SyntaxChecker :: manage wildcard, input with wildcard :constraints = ((OtherComp_IpAddress != &#8217;10.10.10.*&#8217; &#124;&#124; OtherComp_IpAddress != &#8217;10.10.*.*&#8217; ) &#38;&#38; (OtherComp_UserName != &#8216;wearetherock&#8217; &#124;&#124; OtherComp_UserName != [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=229&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>constraints = ((OtherComp_IpAddress != &#8217;10.10.10.*&#8217; || OtherComp_IpAddress != &#8217;10.10.*.*&#8217; ) &amp;&amp; (OtherComp_UserName != &#8216;wearetherock&#8217; || OtherComp_UserName != &#8216;jack&#8217; || OtherComp_UserName != &#8216;java*&#8217; ) &amp;&amp; (MyCpu_LoadPercentage &lt;= 17) &amp;&amp; (MyComp_FreePhysicalMemory &gt;= 30));<br />
SyntaxChecker :: manage wildcard, input with wildcard :constraints = ((OtherComp_IpAddress != &#8217;10.10.10.*&#8217; || OtherComp_IpAddress != &#8217;10.10.*.*&#8217; ) &amp;&amp; (OtherComp_UserName != &#8216;wearetherock&#8217; || OtherComp_UserName != &#8216;jack&#8217; || OtherComp_UserName != &#8216;java*&#8217; ) &amp;&amp; (MyCpu_LoadPercentage &lt;= 17) &amp;&amp; (MyComp_FreePhysicalMemory &gt;= 30));<br />
SyntaxChecker :: I found the text &#8220;OtherComp_IpAddress != &#8217;10.10.10.*&#8217; |&#8221; starting at index 16 and ending at index 53.</p>
<p>SyntaxChecker :: I found the text &#8221; OtherComp_IpAddress != &#8217;10.10.*.*&#8217;&#8221; starting at index 54 and ending at index 89.</p>
<p>SyntaxChecker :: I found the text &#8221; OtherComp_UserName != &#8216;java*&#8217;&#8221; starting at index 167 and ending at index 197.</p>
<p>SyntaxChecker :: * part :OtherComp_IpAddress != &#8217;10.10.10.*&#8217; |<br />
SyntaxChecker :: replace string ,/10.10.10.*/ |<br />
SyntaxChecker :: * part :OtherComp_IpAddress != &#8217;10.10.*.*&#8217;<br />
SyntaxChecker :: replace string ,/10.10.*.*/<br />
SyntaxChecker :: * part :OtherComp_UserName != &#8216;java*&#8217;<br />
SyntaxChecker :: replace string ,/java*/<br />
SyntaxChecker :: manager wildcard, output :constraints = ((((&#8221;+OtherComp_IpAddress).match(/10.10.10.*/ |) == null) | ((&#8221;+OtherComp_IpAddress).match(/10.10.*.*/) == null)  ) &amp;&amp; (OtherComp_UserName != &#8216;wearetherock&#8217; || OtherComp_UserName != &#8216;jack&#8217; || ((&#8221;+OtherComp_UserName).match(/java*/) == null)  ) &amp;&amp; (MyCpu_LoadPercentage &lt;= 17) &amp;&amp; (MyComp_FreePhysicalMemory &gt;= 30));<br />
Matchmaker :: requestor&#8217;s requirement expression :<br />
&#8211; requirements = true;<br />
Matchmaker :: provider&#8217;s constraint expression :<br />
&#8211; constraints = ((((&#8221;+OtherComp_IpAddress).match(/10.10.10.*/ |) == null) | ((&#8221;+OtherComp_IpAddress).match(/10.10.*.*/) == null)  ) &amp; (OtherComp_UserName != &#8216;wearetherock&#8217; | OtherComp_UserName != &#8216;jack&#8217; | ((&#8221;+OtherComp_UserName).match(/java*/) == null)  ) &amp; (MyCpu_LoadPercentage &lt;= 17) &amp; (MyComp_FreePhysicalMemory &gt;= 30));<br />
Matchmaker-ERROR :: sun.org.mozilla.javascript.internal.EvaluatorException: syntax error (&lt;Unknown source&gt;#1) in &lt;Unknown source&gt; at line number 1<br />
Matchmaker-ERROR :: syntax error , please check your requirement/constraint expression java.lang.NoSuchMethodException: no such method: getConstraintEvaluate</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/logboook.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/logboook.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/logboook.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/logboook.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/logboook.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/logboook.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/logboook.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/logboook.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/logboook.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/logboook.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/logboook.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/logboook.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/logboook.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/logboook.wordpress.com/229/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=229&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://logboook.wordpress.com/2009/02/03/oh-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">wearetherock</media:title>
		</media:content>
	</item>
		<item>
		<title>Slide 3</title>
		<link>http://logboook.wordpress.com/2009/01/05/slide-3/</link>
		<comments>http://logboook.wordpress.com/2009/01/05/slide-3/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 05:54:44 +0000</pubDate>
		<dc:creator>wearetherock</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[slide]]></category>

		<guid isPermaLink="false">http://logboook.wordpress.com/?p=197</guid>
		<description><![CDATA[วันพุธที่ 17 ธันวาคม 2551 เวลา 9.30 &#8211; 12.00 น. ณ ห้องสัมมนา SC 234 แก้หมดแล้ว โปรแกรมจริงๆ ไม่เหมือนใน slide หรอก Slide 3 [PDF]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=197&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>วันพุธที่ 17 ธันวาคม 2551 เวลา 9.30 &#8211; 12.00 น. ณ ห้องสัมมนา SC 234</p>
<p>แก้หมดแล้ว โปรแกรมจริงๆ ไม่เหมือนใน slide หรอก</p>
<p><a href="http://logboook.files.wordpress.com/2009/01/present3.pdf">Slide 3 [PDF]</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/logboook.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/logboook.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/logboook.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/logboook.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/logboook.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/logboook.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/logboook.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/logboook.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/logboook.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/logboook.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/logboook.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/logboook.wordpress.com/197/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/logboook.wordpress.com/197/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/logboook.wordpress.com/197/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=197&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://logboook.wordpress.com/2009/01/05/slide-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">wearetherock</media:title>
		</media:content>
	</item>
		<item>
		<title>To : ANJ &#8211; MySQL Database</title>
		<link>http://logboook.wordpress.com/2008/10/28/to-anj-mysql-database/</link>
		<comments>http://logboook.wordpress.com/2008/10/28/to-anj-mysql-database/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 11:56:41 +0000</pubDate>
		<dc:creator>wearetherock</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://logboook.wordpress.com/2008/10/28/to-anj-mysql-database/</guid>
		<description><![CDATA[&#3607;&#3635;&#3605;&#3634;&#3617;&#3651;&#3627;&#3657;&#3592;&#3610; http://www.netbeans.org/kb/60/ide/mysql.html<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=196&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&#3607;&#3635;&#3605;&#3634;&#3617;&#3651;&#3627;&#3657;&#3592;&#3610; <a href="http://www.netbeans.org/kb/60/ide/mysql.html" target="_parent">http://www.netbeans.org/kb/60/ide/mysql.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/logboook.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/logboook.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/logboook.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/logboook.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/logboook.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/logboook.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/logboook.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/logboook.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/logboook.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/logboook.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/logboook.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/logboook.wordpress.com/196/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/logboook.wordpress.com/196/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/logboook.wordpress.com/196/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=196&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://logboook.wordpress.com/2008/10/28/to-anj-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">wearetherock</media:title>
		</media:content>
	</item>
		<item>
		<title>To : ANJ &#8211; ให้โปรแกรมรับ Input จากผู้ใช้</title>
		<link>http://logboook.wordpress.com/2008/10/26/to-anj-%e0%b9%83%e0%b8%ab%e0%b9%89%e0%b9%82%e0%b8%9b%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b8%a3%e0%b8%a1%e0%b8%a3%e0%b8%b1%e0%b8%9a-input-%e0%b8%88%e0%b8%b2%e0%b8%81%e0%b8%9c%e0%b8%b9%e0%b9%89%e0%b9%83/</link>
		<comments>http://logboook.wordpress.com/2008/10/26/to-anj-%e0%b9%83%e0%b8%ab%e0%b9%89%e0%b9%82%e0%b8%9b%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b8%a3%e0%b8%a1%e0%b8%a3%e0%b8%b1%e0%b8%9a-input-%e0%b8%88%e0%b8%b2%e0%b8%81%e0%b8%9c%e0%b8%b9%e0%b9%89%e0%b9%83/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 08:58:12 +0000</pubDate>
		<dc:creator>wearetherock</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aow and joom]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://logboook.wordpress.com/?p=193</guid>
		<description><![CDATA[โค้ดเดิมแต่เปลี่ยนจาก fix w=200, h= 300, l=500 เป็นให้โปรแกรมรับข้อมูลจากผู้ใช้แทน ให้ใช้คลาส Console ..ตัวอย่างการใช้งาน import java.io.Console; import java.sql.SQLException; public class MainClass { public static void main(String[] args) throws ClassNotFoundException, SQLException { Console console = System.console(); if (console == null) { System.err.println("sales: unable to obtain console"); return; } String username = console.readLine("Enter username: "); System.out.println(username); } } สังเกตจากตัวอย่าง ..ข้อมูลที่มาจากผู้ใช้เป็น String [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=193&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>โค้ดเดิมแต่เปลี่ยนจาก fix w=200, h= 300, l=500 เป็นให้โปรแกรมรับข้อมูลจากผู้ใช้แทน ให้ใช้คลาส Console ..ตัวอย่างการใช้งาน</p>
<pre><span style="font-weight:bold;color:#000000;">import</span><span style="color:#808000;"> java.io.Console;</span>
<span style="font-weight:bold;color:#000000;">import</span><span style="color:#808000;"> java.sql.SQLException;</span>

<span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="font-weight:bold;color:#000000;">class</span><span style="color:#000000;"> MainClass {</span>
<span style="color:#000000;">  </span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">static</span><span style="color:#000000;"> </span><span style="color:#800000;">void</span><span style="color:#000000;"> </span><span style="color:#000080;">main</span><span style="color:#000000;">(</span><span style="font-weight:bold;color:#0095ff;">String</span><span style="color:#000000;">[] args) </span><span style="font-weight:bold;color:#000000;">throws</span><span style="color:#000000;"> </span><span style="font-weight:bold;color:#0095ff;">ClassNotFoundException</span><span style="color:#000000;">, </span><span style="font-weight:bold;color:#0095ff;">SQLException</span><span style="color:#000000;"> {</span>
<span style="color:#000000;">    Console console = </span><span style="font-weight:bold;color:#0095ff;">System</span><span style="color:#000000;">.</span><span style="color:#000080;">console</span><span style="color:#000000;">();</span>
<span style="color:#000000;">    </span><span style="font-weight:bold;color:#000000;">if</span><span style="color:#000000;"> (console == </span><span style="font-weight:bold;color:#000000;">null</span><span style="color:#000000;">) {</span>
<span style="color:#000000;">      </span><span style="font-weight:bold;color:#0095ff;">System</span><span style="color:#000000;">.</span><span style="color:#000080;">err</span><span style="color:#000000;">.</span><span style="color:#000080;">println</span><span style="color:#000000;">(</span><span style="color:#dd0000;">"sales: unable to obtain console"</span><span style="color:#000000;">);</span>
<span style="color:#000000;">      </span><span style="font-weight:bold;color:#000000;">return</span><span style="color:#000000;">;</span>
<span style="color:#000000;">    }</span>

<span style="color:#000000;">    </span><span style="font-weight:bold;color:#0095ff;">String</span><span style="color:#000000;"> username = console.</span><span style="color:#000080;">readLine</span><span style="color:#000000;">(</span><span style="color:#dd0000;">"Enter username: "</span><span style="color:#000000;">);</span>
<span style="color:#000000;">    </span><span style="font-weight:bold;color:#0095ff;">System</span><span style="color:#000000;">.</span><span style="color:#000080;">out</span><span style="color:#000000;">.</span><span style="color:#000080;">println</span><span style="color:#000000;">(username);</span>
<span style="color:#000000;">  }</span>
<span style="color:#000000;">}</span></pre>
<p>สังเกตจากตัวอย่าง ..ข้อมูลที่มาจากผู้ใช้เป็น String , ที่คุณต้องทำคือ จะเปลง String ให้เป็นตัวเลขยังไง? &#8230;</p>
<p>เอกสาร<br />
- <a href="http://java.sun.com/javase/6/docs/api/java/io/Console.html">http://java.sun.com/javase/6/docs/api/java/io/Console.html</a> (เอกสาร api ของคลาส Console)<a href="http://java.sun.com/javase/6/docs/api/java/io/Console.html"><br />
</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/logboook.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/logboook.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/logboook.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/logboook.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/logboook.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/logboook.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/logboook.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/logboook.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/logboook.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/logboook.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/logboook.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/logboook.wordpress.com/193/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/logboook.wordpress.com/193/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/logboook.wordpress.com/193/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=193&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://logboook.wordpress.com/2008/10/26/to-anj-%e0%b9%83%e0%b8%ab%e0%b9%89%e0%b9%82%e0%b8%9b%e0%b8%a3%e0%b9%81%e0%b8%81%e0%b8%a3%e0%b8%a1%e0%b8%a3%e0%b8%b1%e0%b8%9a-input-%e0%b8%88%e0%b8%b2%e0%b8%81%e0%b8%9c%e0%b8%b9%e0%b9%89%e0%b9%83/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">wearetherock</media:title>
		</media:content>
	</item>
		<item>
		<title>To : ANJ &#8211; ตัวอย่าง (หรือว่าเฉลยกันแน่)</title>
		<link>http://logboook.wordpress.com/2008/10/26/to-anj-%e0%b8%95%e0%b8%b1%e0%b8%a7%e0%b8%ad%e0%b8%a2%e0%b9%88%e0%b8%b2%e0%b8%87-%e0%b8%ab%e0%b8%a3%e0%b8%b7%e0%b8%ad%e0%b8%a7%e0%b9%88%e0%b8%b2%e0%b9%80%e0%b8%89%e0%b8%a5%e0%b8%a2%e0%b8%81/</link>
		<comments>http://logboook.wordpress.com/2008/10/26/to-anj-%e0%b8%95%e0%b8%b1%e0%b8%a7%e0%b8%ad%e0%b8%a2%e0%b9%88%e0%b8%b2%e0%b8%87-%e0%b8%ab%e0%b8%a3%e0%b8%b7%e0%b8%ad%e0%b8%a7%e0%b9%88%e0%b8%b2%e0%b9%80%e0%b8%89%e0%b8%a5%e0%b8%a2%e0%b8%81/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 06:36:42 +0000</pubDate>
		<dc:creator>wearetherock</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aow and joom]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://logboook.wordpress.com/?p=189</guid>
		<description><![CDATA[interface Box{ public int getWidth(); public int getHeight(); public void setWidth(int width); public void setHeight(int height); } interface Calculator{ public int findArea(int width, int height); } //Box implementation class MyBox implements Box{ private int width; private int height; public int getWidth(){ return width; } public int getHeight(){ return height; } public void setWidth(int width){ this.width [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=189&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre><span style="font-weight:bold;color:#000000;">interface</span><span style="color:#000000;"> </span><span style="font-weight:bold;color:#0095ff;">Box</span><span style="color:#000000;">{</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> </span><span style="color:#000080;">getWidth</span><span style="color:#000000;">();</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> </span><span style="color:#000080;">getHeight</span><span style="color:#000000;">();</span>

<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">void</span><span style="color:#000000;"> </span><span style="color:#000080;">setWidth</span><span style="color:#000000;">(</span><span style="color:#800000;">int</span><span style="color:#000000;"> width);</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">void</span><span style="color:#000000;"> </span><span style="color:#000080;">setHeight</span><span style="color:#000000;">(</span><span style="color:#800000;">int</span><span style="color:#000000;"> height);</span>
<span style="color:#000000;">}</span>
<span style="font-weight:bold;color:#000000;">interface</span><span style="color:#000000;"> Calculator{</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> </span><span style="color:#000080;">findArea</span><span style="color:#000000;">(</span><span style="color:#800000;">int</span><span style="color:#000000;"> width, </span><span style="color:#800000;">int</span><span style="color:#000000;"> height);</span>
<span style="color:#000000;">}</span>
<span style="font-style:italic;color:#808080;">//Box implementation</span>
<span style="font-weight:bold;color:#000000;">class</span><span style="color:#000000;"> MyBox </span><span style="font-weight:bold;color:#000000;">implements</span><span style="color:#000000;"> </span><span style="font-weight:bold;color:#0095ff;">Box</span><span style="color:#000000;">{</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">private</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> width;</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">private</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> height;</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> </span><span style="color:#000080;">getWidth</span><span style="color:#000000;">(){</span>
<span style="color:#000000;">		</span><span style="font-weight:bold;color:#000000;">return</span><span style="color:#000000;"> width;</span>
<span style="color:#000000;">	}</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> </span><span style="color:#000080;">getHeight</span><span style="color:#000000;">(){</span>
<span style="color:#000000;">		</span><span style="font-weight:bold;color:#000000;">return</span><span style="color:#000000;"> height;</span>
<span style="color:#000000;">	}</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">void</span><span style="color:#000000;"> </span><span style="color:#000080;">setWidth</span><span style="color:#000000;">(</span><span style="color:#800000;">int</span><span style="color:#000000;"> width){</span>
<span style="color:#000000;">		</span><span style="font-weight:bold;color:#000000;">this</span><span style="color:#000000;">.</span><span style="color:#000080;">width</span><span style="color:#000000;"> = width;</span>
<span style="color:#000000;">	}</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">void</span><span style="color:#000000;"> </span><span style="color:#000080;">setHeight</span><span style="color:#000000;">(</span><span style="color:#800000;">int</span><span style="color:#000000;"> height){</span>
<span style="color:#000000;">		</span><span style="font-weight:bold;color:#000000;">this</span><span style="color:#000000;">.</span><span style="color:#000080;">height</span><span style="color:#000000;"> = height;</span>
<span style="color:#000000;">	}</span>
<span style="color:#000000;">}</span>
<span style="font-style:italic;color:#808080;">//Calculator implementation</span>
<span style="font-weight:bold;color:#000000;">class</span><span style="color:#000000;"> MyCalculator </span><span style="font-weight:bold;color:#000000;">implements</span><span style="color:#000000;"> Calculator{</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> </span><span style="color:#000080;">findArea</span><span style="color:#000000;">(</span><span style="color:#800000;">int</span><span style="color:#000000;"> width, </span><span style="color:#800000;">int</span><span style="color:#000000;"> height){</span>
<span style="color:#000000;">		</span><span style="color:#800000;">int</span><span style="color:#000000;"> area = width * height;</span>
<span style="color:#000000;">		</span><span style="font-weight:bold;color:#000000;">return</span><span style="color:#000000;"> area;</span>
<span style="color:#000000;">	}</span>
<span style="color:#000000;">}</span>
<span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="font-weight:bold;color:#000000;">class</span><span style="color:#000000;">  Main{</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">static</span><span style="color:#000000;"> </span><span style="color:#800000;">void</span><span style="color:#000000;"> </span><span style="color:#000080;">main</span><span style="color:#000000;">(</span><span style="font-weight:bold;color:#0095ff;">String</span><span style="color:#000000;"> args[]){</span>
<span style="color:#000000;">		MyBox b = </span><span style="font-weight:bold;color:#000000;">new</span><span style="color:#000000;"> </span><span style="color:#000080;">MyBox</span><span style="color:#000000;">();</span>

<span style="color:#000000;">		b.</span><span style="color:#000080;">setWidth</span><span style="color:#000000;">(</span><span style="color:#0000ff;">200</span><span style="color:#000000;">);</span>
<span style="color:#000000;">		b.</span><span style="color:#000080;">setHeight</span><span style="color:#000000;">(</span><span style="color:#0000ff;">300</span><span style="color:#000000;">);</span>
<span style="color:#000000;">		</span>
<span style="color:#000000;">		MyCalculator c = </span><span style="font-weight:bold;color:#000000;">new</span><span style="color:#000000;"> </span><span style="color:#000080;">MyCalculator</span><span style="color:#000000;">();</span>

<span style="color:#000000;">		</span><span style="color:#800000;">int</span><span style="color:#000000;"> area = c.</span><span style="color:#000080;">findArea</span><span style="color:#000000;">(b.</span><span style="color:#000080;">getWidth</span><span style="color:#000000;">(), b.</span><span style="color:#000080;">getHeight</span><span style="color:#000000;">());</span>
<span style="color:#000000;">		</span><span style="font-weight:bold;color:#0095ff;">System</span><span style="color:#000000;">.</span><span style="color:#000080;">out</span><span style="color:#000000;">.</span><span style="color:#000080;">println</span><span style="color:#000000;">(</span><span style="color:#dd0000;">"area = "</span><span style="color:#000000;">+ area);</span>
<span style="color:#000000;">	}</span>
<span style="color:#000000;">}</span></pre>
<p>เขียนต่อให้เสร็จแล้วกัน</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/logboook.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/logboook.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/logboook.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/logboook.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/logboook.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/logboook.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/logboook.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/logboook.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/logboook.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/logboook.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/logboook.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/logboook.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/logboook.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/logboook.wordpress.com/189/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=189&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://logboook.wordpress.com/2008/10/26/to-anj-%e0%b8%95%e0%b8%b1%e0%b8%a7%e0%b8%ad%e0%b8%a2%e0%b9%88%e0%b8%b2%e0%b8%87-%e0%b8%ab%e0%b8%a3%e0%b8%b7%e0%b8%ad%e0%b8%a7%e0%b9%88%e0%b8%b2%e0%b9%80%e0%b8%89%e0%b8%a5%e0%b8%a2%e0%b8%81/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">wearetherock</media:title>
		</media:content>
	</item>
		<item>
		<title>To : ANJ &#8211; Implement Interface</title>
		<link>http://logboook.wordpress.com/2008/10/23/to-anj-implement-interface/</link>
		<comments>http://logboook.wordpress.com/2008/10/23/to-anj-implement-interface/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 12:05:04 +0000</pubDate>
		<dc:creator>wearetherock</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aow and joom]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://logboook.wordpress.com/?p=182</guid>
		<description><![CDATA[// you have to implements this interface. interface Calculator{ public int findCapacity(int width, int height, int longs); public int findArea(int width,int longs); } // you have to implement this interface. interface Box{ //private int width; //private int height; //private int longs; public int getWidth(); public int getHeight(); public int getLongs(); public void setWidth(int width); public [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=182&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre><span style="font-style:italic;color:#808080;">// you have to implements this interface.</span>
<span style="font-weight:bold;color:#000000;">interface</span><span style="color:#000000;"> Calculator{</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> </span><span style="color:#000080;">findCapacity</span><span style="color:#000000;">(</span><span style="color:#800000;">int</span><span style="color:#000000;"> width, </span><span style="color:#800000;">int</span><span style="color:#000000;"> height, </span><span style="color:#800000;">int</span><span style="color:#000000;"> longs);</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> </span><span style="color:#000080;">findArea</span><span style="color:#000000;">(</span><span style="color:#800000;">int</span><span style="color:#000000;"> width,</span><span style="color:#800000;">int</span><span style="color:#000000;"> longs);</span>
<span style="color:#000000;">}</span>

<span style="font-style:italic;color:#808080;">// you have to implement this interface.</span>
<span style="font-weight:bold;color:#000000;">interface</span><span style="color:#000000;"> </span><span style="font-weight:bold;color:#0095ff;">Box</span><span style="color:#000000;">{</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">//private</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> width;</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">//private</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> height;</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">//private</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> longs;</span>

<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> </span><span style="color:#000080;">getWidth</span><span style="color:#000000;">();</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> </span><span style="color:#000080;">getHeight</span><span style="color:#000000;">();</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">int</span><span style="color:#000000;"> </span><span style="color:#000080;">getLongs</span><span style="color:#000000;">();</span>

<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">void</span><span style="color:#000000;"> </span><span style="color:#000080;">setWidth</span><span style="color:#000000;">(int width);</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">void</span><span style="color:#000000;"> </span><span style="color:#000080;">setHeight</span><span style="color:#000000;">(int height);</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">void</span><span style="color:#000000;"> </span><span style="color:#000080;">setLongs</span><span style="color:#000000;">(int longs);</span>
<span style="color:#000000;">}</span>

<span style="font-style:italic;color:#808080;">// not modify this class</span>
<span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="font-weight:bold;color:#000000;">class</span><span style="color:#000000;"> </span><span style="color:#000080;">Main</span><span style="color:#000000;">(){</span>
<span style="color:#000000;">	</span>
<span style="color:#000000;">	MyBox b = </span><span style="font-weight:bold;color:#000000;">new</span><span style="color:#000000;"> </span><span style="color:#000080;">MyBox</span><span style="color:#000000;">();</span>
<span style="color:#000000;">	b.</span><span style="color:#000080;">setWidth</span><span style="color:#000000;">(</span><span style="color:#0000ff;">200</span><span style="color:#000000;">);</span>
<span style="color:#000000;">	b.</span><span style="color:#000080;">setHeight</span><span style="color:#000000;">(</span><span style="color:#0000ff;">300</span><span style="color:#000000;">);</span>
<span style="color:#000000;">	b.</span><span style="color:#000080;">setLongs</span><span style="color:#000000;">(</span><span style="color:#0000ff;">500</span><span style="color:#000000;">);</span>

<span style="color:#000000;">	MyCalculator c = </span><span style="font-weight:bold;color:#000000;">new</span><span style="color:#000000;"> </span><span style="color:#000080;">MyCalculator</span><span style="color:#000000;">();</span>
<span style="color:#000000;">	</span><span style="color:#800000;">int</span><span style="color:#000000;"> boxArea = c.</span><span style="color:#000080;">findArea</span><span style="color:#000000;">(b.</span><span style="color:#000080;">getWidth</span><span style="color:#000000;">(), b.</span><span style="color:#000080;">getLongs</span><span style="color:#000000;">());</span>
<span style="color:#000000;">	</span><span style="color:#800000;">int</span><span style="color:#000000;"> boxCapacity = c.</span><span style="color:#000080;">findCapacity</span><span style="color:#000000;">(b.</span><span style="color:#000080;">getWidth</span><span style="color:#000000;">(), b.</span><span style="color:#000080;">getHeight</span><span style="color:#000000;">(), b.</span><span style="color:#000080;">getLongs</span><span style="color:#000000;">());</span>

<span style="color:#000000;">	</span><span style="font-weight:bold;color:#0095ff;">System</span><span style="color:#000000;">.</span><span style="color:#000080;">out</span><span style="color:#000000;">.</span><span style="color:#000080;">println</span><span style="color:#000000;">(</span><span style="color:#dd0000;">"box area ="</span><span style="color:#000000;">+ boxArea);</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#0095ff;">System</span><span style="color:#000000;">.</span><span style="color:#000080;">out</span><span style="color:#000000;">.</span><span style="color:#000080;">println</span><span style="color:#000000;">(</span><span style="color:#dd0000;">"box capacity ="</span><span style="color:#000000;">+ boxCapacity);</span>
<span style="color:#000000;">}</span></pre>
<p>ผมเขียน Interface ให้สอง Interface (ข้างในยังไม่ Implement อะไรสักอย่าง)  ให้คุณเขียนคลาสใหม่ขึ้นมาสองคลาส คือ MyCalculator และ MyBox แล้ว Implements Interface ข้างบน  หลังจากนั้นลองใช้ Class Main เพื่อใช้เรียกใช้งานคลาสทั้งสอง (ผลลัพท์การคำนวณต้องถูกต้องด้วย) ให้ส่งโค้ดมาที่เมล์ผมนะครับ</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/logboook.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/logboook.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/logboook.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/logboook.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/logboook.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/logboook.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/logboook.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/logboook.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/logboook.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/logboook.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/logboook.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/logboook.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/logboook.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/logboook.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=182&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://logboook.wordpress.com/2008/10/23/to-anj-implement-interface/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">wearetherock</media:title>
		</media:content>
	</item>
		<item>
		<title>To : Aow and Joom ทำไมถึง Compile ไม่ผ่าน</title>
		<link>http://logboook.wordpress.com/2008/10/23/to-aow-and-joom-%e0%b8%97%e0%b8%b3%e0%b9%84%e0%b8%a1%e0%b8%96%e0%b8%b6%e0%b8%87-compile-%e0%b9%84%e0%b8%a1%e0%b9%88%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99/</link>
		<comments>http://logboook.wordpress.com/2008/10/23/to-aow-and-joom-%e0%b8%97%e0%b8%b3%e0%b9%84%e0%b8%a1%e0%b8%96%e0%b8%b6%e0%b8%87-compile-%e0%b9%84%e0%b8%a1%e0%b9%88%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 07:11:53 +0000</pubDate>
		<dc:creator>wearetherock</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aow and joom]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://logboook.wordpress.com/?p=179</guid>
		<description><![CDATA[class Person{ public static String species = "HOMO SAPIAN"; private String id; private String name; } class Student extends Person{ private double gpa; private String studentId; } class Teacher extends Person{ private double salary; } public class Main{ public static void main(String args[]){ Student s = new Student(); System.out.println(s.species); //System.out.println(s.gpa); //System.out.println(s.studenId); Teacher t = new [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=179&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre><span style="font-weight:bold;color:#000000;">class</span><span style="color:#000000;"> Person{</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">static</span><span style="color:#000000;"> </span><span style="font-weight:bold;color:#0095ff;">String</span><span style="color:#000000;"> species = </span><span style="color:#dd0000;">"HOMO SAPIAN"</span><span style="color:#000000;">;</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">private</span><span style="color:#000000;"> </span><span style="font-weight:bold;color:#0095ff;">String</span><span style="color:#000000;"> id;</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">private</span><span style="color:#000000;"> </span><span style="font-weight:bold;color:#0095ff;">String</span><span style="color:#000000;"> name;</span>
<span style="color:#000000;">	</span>
<span style="color:#000000;">}</span>

<span style="font-weight:bold;color:#000000;">class</span><span style="color:#000000;"> Student </span><span style="font-weight:bold;color:#000000;">extends</span><span style="color:#000000;"> Person{</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">private</span><span style="color:#000000;"> </span><span style="color:#800000;">double</span><span style="color:#000000;"> gpa;</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">private</span><span style="color:#000000;"> </span><span style="font-weight:bold;color:#0095ff;">String</span><span style="color:#000000;"> studentId;</span>
<span style="color:#000000;">}</span>

<span style="font-weight:bold;color:#000000;">class</span><span style="color:#000000;"> Teacher </span><span style="font-weight:bold;color:#000000;">extends</span><span style="color:#000000;"> Person{</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">private</span><span style="color:#000000;"> </span><span style="color:#800000;">double</span><span style="color:#000000;"> salary;</span>
<span style="color:#000000;">}</span>

<span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="font-weight:bold;color:#000000;">class</span><span style="color:#000000;"> Main{</span>
<span style="color:#000000;">	</span><span style="font-weight:bold;color:#000000;">public</span><span style="color:#000000;"> </span><span style="color:#800000;">static</span><span style="color:#000000;"> </span><span style="color:#800000;">void</span><span style="color:#000000;"> </span><span style="color:#000080;">main</span><span style="color:#000000;">(</span><span style="font-weight:bold;color:#0095ff;">String</span><span style="color:#000000;"> args[]){</span>
<span style="color:#000000;">		Student s = </span><span style="font-weight:bold;color:#000000;">new</span><span style="color:#000000;"> </span><span style="color:#000080;">Student</span><span style="color:#000000;">();</span>
<span style="color:#000000;">		</span><span style="font-weight:bold;color:#0095ff;">System</span><span style="color:#000000;">.</span><span style="color:#000080;">out</span><span style="color:#000000;">.</span><span style="color:#000080;">println</span><span style="color:#000000;">(s.</span><span style="color:#000080;">species</span><span style="color:#000000;">);</span>
<span style="color:#000000;">		</span><span style="font-style:italic;color:#808080;">//System.out.println(s.gpa);</span>
<span style="color:#000000;">		</span><span style="font-style:italic;color:#808080;">//System.out.println(s.studenId);</span>
<span style="color:#000000;">		</span>
<span style="color:#000000;">		Teacher t = </span><span style="font-weight:bold;color:#000000;">new</span><span style="color:#000000;"> </span><span style="color:#000080;">Teacher</span><span style="color:#000000;">();</span>
<span style="color:#000000;">		</span><span style="font-weight:bold;color:#0095ff;">System</span><span style="color:#000000;">.</span><span style="color:#000080;">out</span><span style="color:#000000;">.</span><span style="color:#000080;">println</span><span style="color:#000000;">(t.</span><span style="color:#000080;">species</span><span style="color:#000000;">);</span>
<span style="color:#000000;">		</span><span style="font-style:italic;color:#808080;">//System.out.println(t.salary);</span>
<span style="color:#000000;">		</span>
<span style="color:#000000;">	}</span>
<span style="color:#000000;">}</span></pre>
<p>ถามว่า ถ้าเอา Comment ออก ทำไมถึง Compile ไม่ผ่าน .. บอกได้ไหมคุณเห็นข้อสังเกตอะไรบ้างจากโค้ดด้านบน บอกเป็นข้อๆ ก็ดีครับ</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/logboook.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/logboook.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/logboook.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/logboook.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/logboook.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/logboook.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/logboook.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/logboook.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/logboook.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/logboook.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/logboook.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/logboook.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/logboook.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/logboook.wordpress.com/179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=179&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://logboook.wordpress.com/2008/10/23/to-aow-and-joom-%e0%b8%97%e0%b8%b3%e0%b9%84%e0%b8%a1%e0%b8%96%e0%b8%b6%e0%b8%87-compile-%e0%b9%84%e0%b8%a1%e0%b9%88%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">wearetherock</media:title>
		</media:content>
	</item>
		<item>
		<title>To : Aow and Joom &#8211; Class Specification</title>
		<link>http://logboook.wordpress.com/2008/10/21/to-auw-and-joom-class-specification/</link>
		<comments>http://logboook.wordpress.com/2008/10/21/to-auw-and-joom-class-specification/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 17:34:43 +0000</pubDate>
		<dc:creator>wearetherock</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[aow and joom]]></category>

		<guid isPermaLink="false">http://logboook.wordpress.com/?p=170</guid>
		<description><![CDATA[["public"] ["abstract"&#124;"final"]"class" Class_name ["extends" object_name] ["implements" interface_name] "{" // properties declarations // behavior declarations "}" นี้เป็นโครงสร้าง Class ภาษา Java ช่วยบอกหน่อยได้ไหมว่าแต่ละคำ หมายความว่าอย่างไร ตัวอย่าง เช่น public เป็น การประกาศว่าคลาสนี้จะสามารถมองเห็นได้จากทุกที &#8230; abstract is ? final is ? extends, implement is ?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=170&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>["public"] ["abstract"|"final"]"class" Class_name
  ["extends" object_name] ["implements" interface_name]
"{"
// properties declarations
// behavior declarations
"}"</pre>
<p>นี้เป็นโครงสร้าง Class ภาษา Java ช่วยบอกหน่อยได้ไหมว่าแต่ละคำ หมายความว่าอย่างไร ตัวอย่าง เช่น public เป็น การประกาศว่าคลาสนี้จะสามารถมองเห็นได้จากทุกที &#8230;</p>
<p>abstract is ?<br />
final is ?<br />
extends, implement is ?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/logboook.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/logboook.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/logboook.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/logboook.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/logboook.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/logboook.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/logboook.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/logboook.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/logboook.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/logboook.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/logboook.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/logboook.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/logboook.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/logboook.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=170&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://logboook.wordpress.com/2008/10/21/to-auw-and-joom-class-specification/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">wearetherock</media:title>
		</media:content>
	</item>
		<item>
		<title>C# 2 : oracle database connection
using &#8230;</title>
		<link>http://logboook.wordpress.com/2008/10/21/c-2-oracle-database-connectionusing/</link>
		<comments>http://logboook.wordpress.com/2008/10/21/c-2-oracle-database-connectionusing/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 04:01:42 +0000</pubDate>
		<dc:creator>wearetherock</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://hpcs.wordpress.com/2008/10/21/c-2-oracle-database-connectionusing/</guid>
		<description><![CDATA[C# 2 : oracle database connection using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.OracleClient; using System.Windows.Forms; &#160; namespace Windows1 { &#160; &#160; class OracleConnector &#160; &#160; { &#160; &#160; &#160; &#160; static string connString = &#8220;Data Source=oracleserver2/orcl;User Id=U37;Password=U37;Integrated Security=no; Unicode=true&#8221;; &#160; &#160; &#160; &#160; static OracleConnection conn; &#160; &#160; &#160; &#160; &#160; public [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=228&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>C# 2 : oracle database connection</p>
<ol>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;"><span style="color:rgb(6,0,255);">using</span> <span style="color:rgb(0,128,128);">System</span>;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;"><span style="color:rgb(6,0,255);">using</span> <span style="color:rgb(0,128,128);">System.Collections.Generic</span>;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;"><span style="color:rgb(6,0,255);">using</span> <span style="color:rgb(0,128,128);">System.Linq</span>;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;"><span style="color:rgb(6,0,255);">using</span> <span style="color:rgb(0,128,128);">System.Text</span>;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;"><span style="color:rgb(6,0,255);">using</span> <span style="color:rgb(0,128,128);">System.Data.OracleClient</span>;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;"><span style="color:rgb(6,0,255);">using</span> <span style="color:rgb(0,128,128);">System.Windows.Forms</span>;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;"><span style="color:rgb(6,0,255);">namespace</span> Windows1</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;"><span style="color:rgb(0,0,0);">{</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; <span style="color:rgb(255,0,0);">class</span> OracleConnector</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; <span style="color:rgb(0,0,0);">{</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(6,0,255);">static</span> <span style="color:rgb(255,0,0);">string</span> connString <span style="color:rgb(0,128,0);">=</span> <span style="color:rgb(102,102,102);">&#8220;Data Source=oracleserver2/orcl;User Id=U37;Password=U37;Integrated Security=no; Unicode=true&#8221;</span>;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(6,0,255);">static</span> OracleConnection conn;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(6,0,255);">public</span> <span style="color:rgb(6,0,255);">static</span> <span style="color:rgb(6,0,255);">void</span> Connect<span style="color:rgb(0,0,0);">(</span><span style="color:rgb(0,0,0);">)</span> <span style="color:rgb(0,0,0);">{</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(6,0,255);">try</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(0,0,0);">{</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn <span style="color:rgb(0,128,0);">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:rgb(0,128,0);">new</span></a> OracleConnection<span style="color:rgb(0,0,0);">(</span><span style="color:rgb(0,0,0);">)</span>;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.<span style="color:rgb(0,0,255);">ConnectionString</span> <span style="color:rgb(0,128,0);">=</span> connString;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(6,0,255);">if</span> <span style="color:rgb(0,0,0);">(</span>conn.<span style="color:rgb(0,0,255);">State</span> <span style="color:rgb(0,128,0);">==</span> <span style="color:rgb(0,0,0);">System.<span style="color:rgb(0,0,255);">Data</span></span>.<span style="color:rgb(0,0,255);">ConnectionState</span>.<span style="color:rgb(0,0,255);">Open</span><span style="color:rgb(0,0,0);">)</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(0,0,0);">{</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.<span style="color:rgb(0,0,255);">Close</span><span style="color:rgb(0,0,0);">(</span><span style="color:rgb(0,0,0);">)</span>;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(0,0,0);">}</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; conn.<span style="color:rgb(0,0,255);">Open</span><span style="color:rgb(0,0,0);">(</span><span style="color:rgb(0,0,0);">)</span>;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(0,0,0);">}</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(6,0,255);">catch</span> <span style="color:rgb(0,0,0);">(</span>Exception e<span style="color:rgb(0,0,0);">)</span> <span style="color:rgb(0,0,0);">{</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MessageBox.<span style="color:rgb(0,0,255);">Show</span><span style="color:rgb(0,0,0);">(</span><span style="color:rgb(102,102,102);">&#8220;Database Connection Failed&#8221;</span> <span style="color:rgb(0,128,0);">+</span> e ,<span style="color:rgb(102,102,102);">&#8220;Error&#8221;</span>,MessageBoxButtons.<span style="color:rgb(0,0,255);">OK</span>,MessageBoxIcon.<span style="color:rgb(0,0,255);">Error</span><span style="color:rgb(0,0,0);">)</span>;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(0,0,0);">}</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(0,0,0);">}</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(6,0,255);">public</span> <span style="color:rgb(6,0,255);">static</span> OracleConnection Conn</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(0,0,0);">{</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get <span style="color:rgb(0,0,0);">{</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(6,0,255);">return</span> conn;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(0,0,0);">}</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp;</div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:rgb(0,0,0);">}</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp; &nbsp; <span style="color:rgb(0,0,0);">}</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;"><span style="color:rgb(0,0,0);">}</span></div>
</li>
<li>
<div style="background:inherit inherit inherit inherit inherit;font-family:monospace;font-weight:normal;font-style:normal;color:rgb(0,0,32);margin:0;padding:0;">&nbsp;</div>
</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/logboook.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/logboook.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/logboook.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/logboook.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/logboook.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/logboook.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/logboook.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/logboook.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/logboook.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/logboook.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/logboook.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/logboook.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/logboook.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/logboook.wordpress.com/228/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=228&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://logboook.wordpress.com/2008/10/21/c-2-oracle-database-connectionusing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">wearetherock</media:title>
		</media:content>
	</item>
		<item>
		<title>C# 2 : oracle database connection  cla &#8230;</title>
		<link>http://logboook.wordpress.com/2008/10/21/c-2-oracle-database-connectioncla/</link>
		<comments>http://logboook.wordpress.com/2008/10/21/c-2-oracle-database-connectioncla/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 03:43:55 +0000</pubDate>
		<dc:creator>wearetherock</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://hpcs.wordpress.com/2008/10/21/c-2-oracle-database-connectioncla/</guid>
		<description><![CDATA[class OracleConnector { static string connString = “Data Source=oracleserver2/orcl;User Id=U37;Password=U37;Integrated Security=no; Unicode=true”; static OracleConnection conn; public static void Connect() { try { conn = new OracleConnection(); conn.ConnectionString = connString; if (conn.State == System.Data.ConnectionState.Open) { conn.Close(); } conn.Open(); } catch (Exception e) { MessageBox.Show(”Database Connection Failed” + e ,”Error”, MessageBoxButtons.OK,MessageBoxIcon.Error); } } }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=227&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div style="width:95%;margin:0 auto;">
<div class="csharp csharp" style="border:1px solid #d0d0d0;font-family:monospace;color:#000066;background-color:#f0f0f0;">
<ol>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"><span style="color:#ff0000;">class</span> OracleConnector</div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"><span style="color:#000000;">{</span></div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"><span style="color:#0600ff;">static</span> <span style="color:#ff0000;">string</span> connString <span style="color:#008000;">=</span></div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;">“Data Source<span style="color:#008000;">=</span>oracleserver2<span style="color:#008000;">/</span>orcl;User Id<span style="color:#008000;">=</span>U37;Password<span style="color:#008000;">=</span>U37;Integrated Security<span style="color:#008000;">=</span>no; Unicode<span style="color:#008000;">=</span><span style="color:#0600ff;">true</span>”;</div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"><span style="color:#0600ff;">static</span> OracleConnection conn;</div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"></div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"><span style="color:#0600ff;">public</span> <span style="color:#0600ff;">static</span> <span style="color:#0600ff;">void</span> Connect<span style="color:#000000;">(</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span></div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"><span style="color:#0600ff;">try</span> <span style="color:#000000;">{</span></div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;">conn <span style="color:#008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color:#008000;">new</span></a> OracleConnection<span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;">conn.<span style="color:#0000ff;">ConnectionString</span> <span style="color:#008000;">=</span> connString;</div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"></div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"><span style="color:#0600ff;">if</span> <span style="color:#000000;">(</span>conn.<span style="color:#0000ff;">State</span> <span style="color:#008000;">==</span> <span style="color:#000000;">System.<span style="color:#0000ff;">Data</span></span>.<span style="color:#0000ff;">ConnectionState</span>.<span style="color:#0000ff;">Open</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span></div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;">conn.<span style="color:#0000ff;">Close</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"><span style="color:#000000;">}</span></div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;">conn.<span style="color:#0000ff;">Open</span><span style="color:#000000;">(</span><span style="color:#000000;">)</span>;</div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"><span style="color:#000000;">}</span> <span style="color:#0600ff;">catch</span> <span style="color:#000000;">(</span>Exception e<span style="color:#000000;">)</span> <span style="color:#000000;">{</span></div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;">MessageBox.<span style="color:#0000ff;">Show</span><span style="color:#000000;">(</span>”Database Connection Failed” <span style="color:#008000;">+</span> e ,”Error”,</div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;">MessageBoxButtons.<span style="color:#0000ff;">OK</span>,MessageBoxIcon.<span style="color:#0000ff;">Error</span><span style="color:#000000;">)</span>;</div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"><span style="color:#000000;">}</span></div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"><span style="color:#000000;">}</span></div>
</li>
<li>
<div style="font-family:monospace;font-weight:normal;font-style:normal;color:#000020;margin:0;padding:0;"><span style="color:#000000;">}</span></div>
</li>
</ol>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/logboook.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/logboook.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/logboook.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/logboook.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/logboook.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/logboook.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/logboook.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/logboook.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/logboook.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/logboook.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/logboook.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/logboook.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/logboook.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/logboook.wordpress.com/227/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=logboook.wordpress.com&amp;blog=4331916&amp;post=227&amp;subd=logboook&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://logboook.wordpress.com/2008/10/21/c-2-oracle-database-connectioncla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">wearetherock</media:title>
		</media:content>
	</item>
	</channel>
</rss>
