<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1334024809292951947</id><updated>2024-11-08T07:39:55.802-08:00</updated><title type='text'>KnowlegeOfNon</title><subtitle type='html'>จงสนุกกับการเรียนรู้</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>73</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-1620202219447973849</id><published>2016-12-03T23:14:00.003-08:00</published><updated>2016-12-03T23:14:37.197-08:00</updated><title type='text'>Debug GWT in Eclipse</title><content type='html'>ช่างเป็นเรื่องยากลำบากจริงในการใช้งาน Eclipse เนื่องจากเดิมใช้ Netbean อยู่ แต่เนื่องจาก GWT ดูๆแล้วจะยังไม่รองรับ Netbean ดีพอ จึงจำเป็นต้องใช้ Eclipse จากที่ได้ลองใช้ก็ถือว่าดี แต่คิดว่า Netbean ดีกว่านะ เอาหละเริ่มเรื่องกันเลย ได้ลองทำตามตัวอย่างในเว็บของ GWT พอมาถึงการดีบัก มันดันไม่หยุดที่ breakpoint ซะงั้น หาข้อมูลจากเน็ตก็เป็นกันหลายคน วิธีแก้คือต้องใช้ตัวช่วย (คิดในใจ &amp;nbsp;ทำไมต้องใช้ตัวช่วยด้วยวะ ไหงว่า support ไง) คือ SDBG ตามเว็บนี้เลยครับผม&amp;nbsp;&lt;a href=&quot;https://sdbg.github.io/&quot;&gt;https://sdbg.github.io/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/1620202219447973849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/1620202219447973849' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/1620202219447973849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/1620202219447973849'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2016/12/debug-gwt-in-eclipse.html' title='Debug GWT in Eclipse'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-921788563637710409</id><published>2016-05-12T08:11:00.001-07:00</published><updated>2016-05-12T08:11:17.281-07:00</updated><title type='text'>ปัญหาลง window 7 ไม่ผ่าน</title><content type='html'>วันนี้ได้ลง window 7 ใหม่ แต่เกิดปัญหา&lt;br /&gt;
&lt;h1 class=&quot;content-title&quot; id=&quot;threadTitle&quot;&gt;
Error message &quot;The Computer 
Restarted unexpectedly or encountered an unexpected error&quot; after System 
Startup on Windows 7 Recovery&lt;/h1&gt;
ลงตั้งหลายครั้ง เลยหาใน อากู๋ ดู แก้โดยเปลี่ยนค่าใน regedit โดย&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;msgBody wrapWord fullMessage&quot;&gt;
            
1)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; On the same error screen press SHIFT+F10 and it will open up a black Window. (a command prompt window)&lt;br /&gt;

2)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;In&amp;nbsp; the black windows type the word &quot;regedit&quot;(without the inverted commas and hit enter. That will&amp;nbsp;open the&amp;nbsp;registry editor.&lt;br /&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;In the Registry Editor..&lt;br /&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Browse to....&lt;br /&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;HKLocal machine/SYSTEM/SETUP/STATUS/ChildCompletion, and 
after highliting childcompletion,on the right hand side check for 
setup.exe.&amp;nbsp;if the value is 1 change it to 3.(by double clicking on 
setup.exe and changing the value shown in the box).&lt;br /&gt;

Then close the registry editor and then also close the black window.&lt;br /&gt;

&lt;/div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Then click on OK for the error and the computer will restart 
and the installation may complete.&amp;nbsp; just try it and let me know if it 
worked.&lt;br /&gt;
&lt;br /&gt;
วิธีการนี้เป็นของคุณ &lt;a class=&quot;userNameShowWhiteSpace&quot; href=&quot;http://answers.microsoft.com/en-us/profile/310dc295-6456-e011-8dfc-68b599b31bf5&quot; ms.agtid=&quot;310dc295-6456-e011-8dfc-68b599b31bf5&quot; ms.cmpnm=&quot;answers_user&quot; ms.cmptyp=&quot;link&quot; ms.interactiontype=&quot;1&quot; ms.title=&quot;j0seph red&quot; title=&quot;J0seph Red&quot;&gt;J0seph Red&lt;/a&gt;&amp;nbsp; ครับซึ่งก็ได้ผลนะ ที่ต้องกด SHIFT+F10 เพราะยังเข้าวินโดวไม่ได้ครับ จะอยู่ได้แค่หน้า start service ครับผม</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/921788563637710409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/921788563637710409' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/921788563637710409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/921788563637710409'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2016/05/window-7.html' title='ปัญหาลง window 7 ไม่ผ่าน'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-8768137521740292478</id><published>2016-04-11T03:31:00.000-07:00</published><updated>2016-08-21T08:18:36.963-07:00</updated><title type='text'>ใช้งาน reCaptcha</title><content type='html'>เนื่องจาก jCaptcha เมื่อส่งไปยังโฮสตอนแรกก็ไม่มีปัญหา แต่พอใกล้จะหมดระยะเช่าซื้อโฮสดันใช้ไม่ได้ซะงั้น และโฮสก็ล่มบ่อยมาก ทำให้ผมต้องมานั่งหาวิธีทำ captcha ใหม่ที่ไม่น่าจะมีปัญหาต่อไปในอนาคต ตัวเก่ามีปัญหาดังนี้&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyGeW5H5O97AAWtR5MwXEj8QqhSRWoRc0HvjZvNQU0xuTOOdV8chhDdty6xuBGWkXBRIhdzT57TxDlO6X6M1OnvbfeEdaDeWK6_0sx2q0l9dvBYTPJnpAeK5tfdyRHvzm5CBAdZeipEhN9/s1600/%25E0%25B8%259B%25E0%25B8%25B1%25E0%25B8%258D%25E0%25B8%25AB%25E0%25B8%25B2.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;272&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyGeW5H5O97AAWtR5MwXEj8QqhSRWoRc0HvjZvNQU0xuTOOdV8chhDdty6xuBGWkXBRIhdzT57TxDlO6X6M1OnvbfeEdaDeWK6_0sx2q0l9dvBYTPJnpAeK5tfdyRHvzm5CBAdZeipEhN9/s640/%25E0%25B8%259B%25E0%25B8%25B1%25E0%25B8%258D%25E0%25B8%25AB%25E0%25B8%25B2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
ปัญหานี้น่าจะเกิดจากโฮสเองเพราะในเครื่องผมก็ไม่มีปัญหาอะไร แต่ก็ไม่ทราบว่าทางโฮสมีปัญหาอะไรเหมือนกัน แต่ก็นั่นแหละไม่มีเวลารอแล้ว จึงตัดสินใจไม่ใช้ jCaptcha จึงไปลองใช้ reCaptcha ของ google แทนซึ่งง่ายกว่า jCaptcha ที่ผมใช้อยู่เยอะเลย(ดีแล้วที่เปลี่ยน) โดยมีขั้นตอนดังต่อไปนี้&lt;br /&gt;
&lt;br /&gt;
1. ต้องสมัครก่อน ที่&amp;nbsp;&lt;a href=&quot;https://www.google.com/recaptcha/intro/index.html&quot;&gt;https://www.google.com/recaptcha/intro/index.html&lt;/a&gt;&amp;nbsp;ดังรูป&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLDsHK4gfdHoG1ZXz2nR_fljFh047NsIu67jrIp6c6rxcpi3Jiush8S5PMoJtKo3w0kWw7WhxoR-iPn3voe9XWR4jIjUFpzt956HCYZTSqYZCvGvurjmxfaQ8L0AzDNKvvZKAbRZ3ib-vz/s1600/recaptchaweb.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;379&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLDsHK4gfdHoG1ZXz2nR_fljFh047NsIu67jrIp6c6rxcpi3Jiush8S5PMoJtKo3w0kWw7WhxoR-iPn3voe9XWR4jIjUFpzt956HCYZTSqYZCvGvurjmxfaQ8L0AzDNKvvZKAbRZ3ib-vz/s640/recaptchaweb.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1o4VjlIRAGMoytdWUqNC4mUoQtkl_f7MhRmWmKQCmyCt82UTKecPG9zdiNc-Ikv7NMj3o-dYgoKEHqyaSoCCIBoQ2l1tobYJ4oFMSxBDJcigL4VW6bnLALXnMMN_X9Miws7mf3wu8vN78/s1600/manageRecaptcha.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;348&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1o4VjlIRAGMoytdWUqNC4mUoQtkl_f7MhRmWmKQCmyCt82UTKecPG9zdiNc-Ikv7NMj3o-dYgoKEHqyaSoCCIBoQ2l1tobYJ4oFMSxBDJcigL4VW6bnLALXnMMN_X9Miws7mf3wu8vN78/s640/manageRecaptcha.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZJd0J9FG2q_22zYBMZrM6xnIt4hr_mHZUaWVocgE1qPzhq6TbH_3IpOiW35c2ijbm_7bmto3IG43wD9yD6JDkN96KBi3ulb5CnpEuV1d1m3nZvOV0DeDzKjzrNZ0HS1WDh4MATEXTr_Hv/s1600/key.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;348&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZJd0J9FG2q_22zYBMZrM6xnIt4hr_mHZUaWVocgE1qPzhq6TbH_3IpOiW35c2ijbm_7bmto3IG43wD9yD6JDkN96KBi3ulb5CnpEuV1d1m3nZvOV0DeDzKjzrNZ0HS1WDh4MATEXTr_Hv/s640/key.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;คลิกที่ ปุ่ม Get reCAPTCHA แล้วไปสมัครใช้งานซะดังรูปแรก&lt;/li&gt;
&lt;li&gt;รูปที่สองจะเห็นว่าเราสามารถที่จะเพิ่ม web เขาไปได้อีกนะครับ กี่เว็บก็ได้ และโดย default แล้วเราสามารถที่จะใช้ reCaptcha บน localhost ได้เลยนะ สำหรับของผมสมัครไว้เว็บเดียวเท่านั้น และก็สามารถใช้บน localhost ได้เลยไม่จำเป็นต้องเพิ่ม localhost ใน reCaptcha แต่อย่างใด&lt;br /&gt;&lt;b&gt;แต่ต่อมาก็มีปัญหาครับ คือว่าทาง reCaptcha จะให้ใช้แบบ localhost ได้ระยะเวลาหนึ่งเท่านั้น ฉนั้นให้ทำการลงทะเบียน localhost ไปด้วยครับเพื่อต่อไปจะได้ไม่มีปัญหาครับผม แต่ก็จะแยก key กันนะ ระหว่าง localhost กับ site จริงๆที่เราใช้งาน&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;จากนั้นก็คลิกที่ชื่อ web ที่เราสมัครไว้นะครับเพื่อที่จะนำ key มาใช้ reCaptcha ต่อไป&lt;/li&gt;
&lt;li&gt;รูปที่สาม เป็นการนำ key ที่ reCaptcha ให้มาใช้งานนะ คลิกที่ปุ่ม Keys ในรูปที่สามได้เลย จะให้มา 2 key ด้วยกันคือ Site key และ Secret key โดยผมจะใช้แค่ Site key เท่านั้นครับ&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
2. จากนั้นก็มาเริ่มเขียน Code ต่อไป สำหรับการสอนการใช้งานแบบละเอียดสามารถดูได้จาก เว็บ&amp;nbsp;&lt;a href=&quot;https://developers.google.com/recaptcha/intro&quot;&gt;https://developers.google.com/recaptcha/intro&lt;/a&gt;&amp;nbsp;ได้เลยครับ ซึ่งที่ผมเขียนอยู่นี้เป็นเวอร์ชั่น 2.0 นะ ส่วน code ที่ผมเขียนจะเป็นดังนี้&lt;br /&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;จั่วหัวกันก่อน เพื่อระบุไปที่เว็บ google ส่วน onload=onloadCallback หมายถึงจะมีการเรียน function onloadCallback เมื่อตอนเริ่มต้นของ reCaptcha ส่วน render=explicit เป็นการจัดการการแสดงผล reCapcha เอง จริงๆแล้วการ render มีสองแบบนะ 1. auto 2. explicit&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;script br=&quot;&quot; src=&quot;https://www.google.com/recaptcha/api.js?onload=onloadCallback&amp;amp;render=explicit&quot;&gt;&lt;/font&gt;&lt;font color=&quot;#0000ff&quot;&gt;                async defer&gt;&lt;br&gt;&lt;/font&gt;&lt;font color=&quot;#0000ff&quot;&gt;&lt;/script&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;render function เป็นฟังก์ชั่นในการ render captcha ขึ้นมา โดยจะต้องระบุ id ของ tag div และ site key และ ฟังก์ชั่น callback (เมื่อผ่าน captcha แล้ว) และสามารถปรับ theme ได้ในที่นี้คือสีดำ dark&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;var onloadCallback = function() {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //render captcha&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; grecaptcha.render(&#39;recaptcha&#39;, {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;sitekey&#39; : &#39;334sToVybVqmBUwsRTXg3jP&#39;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;callback&#39; : verifyCallback,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;theme&#39; : &#39;dark&#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/blockquote&gt;
&lt;ul&gt;&lt;/ul&gt;
&lt;ul&gt;&lt;/ul&gt;
&lt;ul&gt;&lt;/ul&gt;
&lt;ul&gt;&lt;/ul&gt;
&lt;ul&gt;&lt;/ul&gt;
&lt;ul&gt;&lt;/ul&gt;
&lt;ul&gt;&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;callback function เป็นฟังก์ชั่นที่จะทำงานก็ต่อเมื่อผ่าน captcha แล้ว ต้องให้ตรงกับที่กำหนดไว้ที่ render function นะ&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var verify = null;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;//เอาไว้ตรวจสอบว่ามีการเลือก captcha ถูกต้องแล้วหรือไม่&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var verifyCallback = function(response) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; verify = response;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(response !== null){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; document.getElementById(&quot;btnBooking&quot;).src = &quot;images2/booking-now.png&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/span&gt;&lt;/blockquote&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;์&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Note &lt;i&gt;ทั้งสาม code ด้านบนจะอยู่ในส่วนของ javascript นะครับ&lt;/i&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;สุดท้ายก็เพิ่มในส่วนแสดงภาพ render captcha ว่าจะให้อยู่ที่ไหนก็ได้ใน tag body โดยวาง tag div ไว้ในที่ๆต้องการได้เลย สังเกตว่าชื่อ id=&lt;span style=&quot;color: blue;&quot;&gt;&quot;recaptcha&quot; &lt;/span&gt;จะต้องเหมือนกับชื่อที่ใช้ในการ render ของ render function นะ&lt;/li&gt;
&lt;ul&gt;&lt;br /&gt;&lt;/ul&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;ul&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;div id=&quot;recaptcha&quot;&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;ul&gt;&lt;br /&gt;&lt;br /&gt;เป็นอันเสร็จครับผม ง่ายจริงๆ ส่วน jCaptcha ผมยังไม่ได้เอาออกทั้งหมด(ขี้เกียจเอาออกหมด) เพียงแต่แก้ไขในส่วนที่จะเปลี่ยนแค่นั้น(หน้าที่ต้องใช้ captcha) ไปดูได้ที่เว็บ&amp;nbsp;&lt;a href=&quot;http://www.budsatravel.com/webBudsa/booking/index.jsp&quot;&gt;http://www.budsatravel.com/webBudsa/booking/index.jsp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/8768137521740292478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/8768137521740292478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/8768137521740292478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/8768137521740292478'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2016/04/recaptcha.html' title='ใช้งาน reCaptcha'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyGeW5H5O97AAWtR5MwXEj8QqhSRWoRc0HvjZvNQU0xuTOOdV8chhDdty6xuBGWkXBRIhdzT57TxDlO6X6M1OnvbfeEdaDeWK6_0sx2q0l9dvBYTPJnpAeK5tfdyRHvzm5CBAdZeipEhN9/s72-c/%25E0%25B8%259B%25E0%25B8%25B1%25E0%25B8%258D%25E0%25B8%25AB%25E0%25B8%25B2.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-2645297866324488605</id><published>2015-10-06T09:43:00.000-07:00</published><updated>2015-10-06T09:43:29.198-07:00</updated><title type='text'>สาเหตุที่ผู้ประกอบการเจ๊งตั้งแต่เริ่มต้น</title><content type='html'>1.เกิดจากการมองโลกในแง่ดีเกินไป&lt;br /&gt;
2.เจ้าของประเมินความสามารถตัวเองสูงเกินไป&lt;br /&gt;
3.โดนสกัดดาวรุ่ง จากคู่แข่ง ที่มีอยู่ก่อน&lt;br /&gt;
4.โดนโกงจนขาดทุน&lt;br /&gt;
5.ขาดเงินทุนสำรอง ไม่มีก๊อก 2
</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/2645297866324488605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/2645297866324488605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/2645297866324488605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/2645297866324488605'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2012/05/blog-post.html' title='สาเหตุที่ผู้ประกอบการเจ๊งตั้งแต่เริ่มต้น'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-1534979505340418146</id><published>2015-10-06T09:38:00.001-07:00</published><updated>2015-10-06T09:42:18.668-07:00</updated><title type='text'>เพิ่มการ์ดแลนใหม่ให้ clearos 5.2 แต่ดันไม่เห็นซะงั้น</title><content type='html'>&lt;br /&gt;
ผมได้ทำการเพิ่มการ์ดแลนอีกตัว เดิมมีอยู่แล้ว 2 ตัว และ ออนบอร์ดอีก 1 ตัว เพิ่มอีกตัวก็เป็น 4 นะครับ&lt;br /&gt;
ผมจะต่อเน็ต 3 เส้น&lt;br /&gt;
แต่ว่า clearos ไม่เจอการ์ดแลนที่เพิ่มไป ผมได้นำวิธีจากเว็บนี้นะครับ&amp;nbsp;&lt;a href=&quot;http://talk.ict.in.th/44467&quot;&gt;http://talk.ict.in.th/44467&lt;/a&gt;&amp;nbsp;แต่ได้ลดขั้นตอนลงเนื่องจากว่า ใน&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;ect/sysconfig/network-scripts&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;&amp;nbsp;กับ&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;ect/sysconfig/network-scripts&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;&amp;nbsp;นั้น Mac Address ไม่ตรงกันก็เลยไม่ได้ไปยุ่งกับ&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;ect/sysconfig/network-scripts&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;&amp;nbsp;เลยนะครับ แต่ผมจะยุ่งกับ&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;1. putty&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;2.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;ect/sysconfig/network-scripts&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
คือผมจะหา mac address ใน putty ดังรูปจะเห็นว่าบรรทัดแรกคือ mac address ของตัวใหม่นะ ของเดิมจะเป็น eth0-eth2&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv9HG7IRZcEVpK7pXDFqMoZZncKQMP1GlgPtn39AFqpAQr-EE46h7W_B3pYcyOG4VSTx9zQA9EXPGel0FAJYT_Ne1r7bqg1dni3HK9JpVAClsUcv2wljpFh3YbWjBYOi30V6t5eVo_E5aI/s1600/ifconfig+-a.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;287&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv9HG7IRZcEVpK7pXDFqMoZZncKQMP1GlgPtn39AFqpAQr-EE46h7W_B3pYcyOG4VSTx9zQA9EXPGel0FAJYT_Ne1r7bqg1dni3HK9JpVAClsUcv2wljpFh3YbWjBYOi30V6t5eVo_E5aI/s320/ifconfig+-a.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
แล้วมาดูใน&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;ect/sysconfig/network-scripts ที่เป็น eth ต่างๆนะครับ ของผมมี eth0-eth2 ผมก็เลยเพิ่ม eth3 ชื่อว่า&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;ifcfg-eth3&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;เข้าไปโดย copy ข้อมูลจาก&amp;nbsp;ifcfg-eth0&amp;nbsp;ซึ่งเป็น lan onboard โดยไฟล์มีข้อมูลดังนี้&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;DEVICE=eth3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;TYPE=&quot;Ethernet&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;ONBOOT=&quot;yes&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;USERCTL=&quot;no&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;HWADDR=&quot;14:cc:20:03:62:08&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;BOOTPROTO=&quot;static&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;IPADDR=&quot;192.168.1.5&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;NETMASK=&quot;255.255.255.0&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;GATEWAY=&quot;192.168.1.2&quot;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
หรือดังรูปแล้วครับ เดิมไม่มีไฟล์&amp;nbsp;&lt;span style=&quot;font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;ifcfg-eth3 นะครับผม&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4MOVwoatbQ7SgonSiKUUyl_qEYc66uJrZgOc3iS1g7wocSVXmUR4CNCnymDoRYh5Ap91qKkW5PTdLlDvYjm7u4bltr4pWxm8amjXlTeLR1ovaaEQRkQNqk6SQnPyM1oI9pnMeZcQaB9j0/s1600/creat+eth3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4MOVwoatbQ7SgonSiKUUyl_qEYc66uJrZgOc3iS1g7wocSVXmUR4CNCnymDoRYh5Ap91qKkW5PTdLlDvYjm7u4bltr4pWxm8amjXlTeLR1ovaaEQRkQNqk6SQnPyM1oI9pnMeZcQaB9j0/s320/creat+eth3.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif; font-size: 14.6667px; line-height: 19.0667px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&amp;nbsp;จากนั้นก็ save ไฟล์ครับผม ต่อไป...&lt;br /&gt;
เข้าไปใน putty พิมพ์คำสั่ง service network restart ครับ&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl683G4LWMTYPm-9wHz1ZZasToVkl-HFW_H2B3Yts8-8DS_iRdjfF-HDV46Nm3lq84w9RvA7eWRfhJQm91YEEEYLPTn2MgEh5Kxoj-viF8vTX1luJTUKu50iFiD484Mle1NvJra-xpRPyz/s1600/service+network+restart.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;129&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl683G4LWMTYPm-9wHz1ZZasToVkl-HFW_H2B3Yts8-8DS_iRdjfF-HDV46Nm3lq84w9RvA7eWRfhJQm91YEEEYLPTn2MgEh5Kxoj-viF8vTX1luJTUKu50iFiD484Mle1NvJra-xpRPyz/s320/service+network+restart.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
ก็เป็นอันเสร็จเรียบร้อยครับ เพิ่มมาแล้ว eth3&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw6Ma7NYMXyMpmMn2pccWWkEuadI8XkUOQmK4spTpLVED65M3krLhyphenhyphenlEqKRaafJHC4sme60RzBh0HTk9oPI5q3eCFzTZKQ5DeKpQUqjWlv5np084rwcTv6DRqEzDGaVTgCkvfRt2-BpGdY/s1600/ifconfig.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;308&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw6Ma7NYMXyMpmMn2pccWWkEuadI8XkUOQmK4spTpLVED65M3krLhyphenhyphenlEqKRaafJHC4sme60RzBh0HTk9oPI5q3eCFzTZKQ5DeKpQUqjWlv5np084rwcTv6DRqEzDGaVTgCkvfRt2-BpGdY/s320/ifconfig.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
และไปเปิดที่หน้า webcofig ดูจะเห็นว่ามี eth3 เพิ่มมาแล้วครับผม&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/1534979505340418146/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/1534979505340418146' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/1534979505340418146'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/1534979505340418146'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2015/10/clearos-52.html' title='เพิ่มการ์ดแลนใหม่ให้ clearos 5.2 แต่ดันไม่เห็นซะงั้น'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv9HG7IRZcEVpK7pXDFqMoZZncKQMP1GlgPtn39AFqpAQr-EE46h7W_B3pYcyOG4VSTx9zQA9EXPGel0FAJYT_Ne1r7bqg1dni3HK9JpVAClsUcv2wljpFh3YbWjBYOi30V6t5eVo_E5aI/s72-c/ifconfig+-a.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-1704652622504633543</id><published>2014-10-15T06:11:00.001-07:00</published><updated>2014-10-15T06:29:33.517-07:00</updated><title type='text'>แสดง captcha ด้วย jcaptcha v.1.0 และปัญหาไม่แสดงภาพ</title><content type='html'>เนื่องจากผมต้องการ captcha มาไว้ในเว็บเพื่อป้องกัน bot ต่างเข้ามาพิมพ์โน่นพิมพ์นี่เอง ทำให้ต้องหาๆๆๆ และก็หา เลยไปเจอ jcaptcha v 1.0 ตามลิ้งค์นี้เลย&amp;nbsp;&lt;a href=&quot;http://jcaptcha.sourceforge.net/&quot;&gt;http://jcaptcha.sourceforge.net/&lt;/a&gt;&amp;nbsp;ดาวน์โหลดมาเลย&lt;br /&gt;
ผมโหลด v 1.0 พอดีมีอยู่เวอร์ชั่นเดียวสงสัยไม่พัฒนาต่อแล้วแหละ และตามด้วย&amp;nbsp;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;external-link&quot; href=&quot;http://commons.apache.org/downloads/download_logging.cgi&quot; rel=&quot;nofollow&quot; style=&quot;background-color: white; color: #326ca6; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; text-decoration: none;&quot;&gt;commons-logging&lt;/a&gt;&amp;nbsp;และ&amp;nbsp;&lt;a class=&quot;external-link&quot; href=&quot;http://commons.apache.org/downloads/download_collections.cgi&quot; rel=&quot;nofollow&quot; style=&quot;background-color: white; color: #326ca6; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; text-decoration: none;&quot;&gt;commons-collection&lt;/a&gt;&amp;nbsp;เอาไฟล์ .jar ทั้งสามไป add ใน Library ใน Netbean (ผมพัฒนาด้วย Netbean ครับ) เสร็จแล้วก็ขั้นตอนต่อไป&lt;br /&gt;
&lt;br /&gt;
กำหนด servlet mapping ในไฟล์ dwr ดังนี้&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIInl70y2E9lOVF-GjZE9lQAZXcsXtyONRlSm7KYPCbbxUaGuOsX6mjVbgHfl7NxlmhyWWG19Qh3FuMTRA1JoSwtbqcH8J4cISK3auzDIhQmhNCM1qzg8ONXoahOI2BQzrJlutNsFIyhOC/s1600/1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIInl70y2E9lOVF-GjZE9lQAZXcsXtyONRlSm7KYPCbbxUaGuOsX6mjVbgHfl7NxlmhyWWG19Qh3FuMTRA1JoSwtbqcH8J4cISK3auzDIhQmhNCM1qzg8ONXoahOI2BQzrJlutNsFIyhOC/s1600/1.jpg&quot; height=&quot;137&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
เสร็จแล้วก็ไปขั้นตอนสร้าง servlet ต่อไปครับ โดยผมสร้าง java package JCaptchaService ขั้นมาข้างในประกอบไปด้วย 3 Class ด้วยกันคือ&lt;br /&gt;
1.&amp;nbsp;CaptchaServiceSingleton&lt;br /&gt;
2.&amp;nbsp;ImageCaptchaServlet &lt;span style=&quot;color: red;&quot;&gt;ซึ่งเป็น Servlet&lt;/span&gt;&lt;br /&gt;
3.&amp;nbsp;validateJCaptcha &lt;span style=&quot;color: red;&quot;&gt;สร้างขึ้นมาเองเอาไว้ตรวจสอบเวลาใช้งานกับ DWR&lt;/span&gt;&lt;br /&gt;
โดย 2 Class แรก copy มาจากเขาเลยดังนี้&lt;br /&gt;
1.CaptchaServiceSingleton&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;package JCaptchaService;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;import com.octo.captcha.service.image.DefaultManageableImageCaptchaService;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;import com.octo.captcha.service.image.ImageCaptchaService;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;* @author Nonpatan&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;public class CaptchaServiceSingleton {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; private static ImageCaptchaService instance = new DefaultManageableImageCaptchaService();&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; public static ImageCaptchaService getInstance(){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return instance;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
2.&amp;nbsp;ImageCaptchaServlet&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;public class ImageCaptchaServlet extends HttpServlet {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; /**&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Processes requests for both HTTP&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* &lt;code&gt;GET&lt;/code&gt; and&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* &lt;code&gt;POST&lt;/code&gt; methods.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param request servlet request&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @param response servlet response&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @throws ServletException if a servlet-specific error occurs&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* @throws IOException if an I/O error occurs&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; protected void processRequest(HttpServletRequest request, HttpServletResponse response)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; throws ServletException, IOException {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] captchaChallengeAsJpeg = null;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// the output stream to render the captcha image as jpeg into&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ByteArrayOutputStream jpegOutputStream = new ByteArrayOutputStream();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // get the session id that will identify the generated captcha.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //the same id must be used to validate the response, the session id is a good candidate!&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String captchaId = request.getSession().getId();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // call the ImageCaptchaService getChallenge method&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BufferedImage challenge =&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CaptchaServiceSingleton.getInstance().getImageChallengeForID(captchaId,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.getLocale());&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt; //ImageIO.write(challenge, &quot;jpeg&quot;, jpegOutputStream);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // a jpeg encoder&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;JPEGImageEncoder jpegEncoder =&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JPEGCodec.createJPEGEncoder(jpegOutputStream);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: magenta;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; jpegEncoder.encode(challenge);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (IllegalArgumentException e) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response.sendError(HttpServletResponse.SC_NOT_FOUND);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (CaptchaServiceException e) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; captchaChallengeAsJpeg = jpegOutputStream.toByteArray();&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // flush it in the response&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response.setHeader(&quot;Cache-Control&quot;, &quot;no-store&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response.setHeader(&quot;Pragma&quot;, &quot;no-cache&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response.setDateHeader(&quot;Expires&quot;, 0);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response.setContentType(&quot;image/jpeg&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ServletOutputStream responseOutputStream =&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; response.getOutputStream();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; responseOutputStream.write(captchaChallengeAsJpeg);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; responseOutputStream.flush();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; responseOutputStream.close();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
3.&amp;nbsp;validateJCaptcha&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;public class validateJCaptcha {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; public boolean validate(String captchaId,String value){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Boolean isResponseCorrect =Boolean.FALSE;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; isResponseCorrect = CaptchaServiceSingleton.getInstance().validateResponseForID(captchaId,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (CaptchaServiceException e) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return isResponseCorrect;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.blogger.com/blogger.g?blogID=1334024809292951947&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
ก็เป็นอันเสร็จนะครับ ในการเพิ่ม คลาส ต่อไปจะเป็นส่วนแสดงภาพ captcha กัน&lt;br /&gt;
&lt;br /&gt;
ผมทำจะทำร่วมด้วยกับ javascript&amp;nbsp;+ dwr นะครับฉนั้นจะต้องแสดงประกอบไปด้วย ส่วน dwr จะไม่อธิบายในนี้นะครับ&lt;br /&gt;
นี่คือส่วนแสดงภาพนะครับ&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSHjXNMdDLfBVaQq2YGaNgcXcSQSQ-7OGsrxiP83rUNhbM_KoOZ69Whv-1vjLbbUHBkHUvMxx2mWlsrMYUzfCvbiXbmI40K5Z6Wh9_5SgE17mxu0JR674QFI2usjWrShoDRB3QdNkX4lPj/s1600/2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSHjXNMdDLfBVaQq2YGaNgcXcSQSQ-7OGsrxiP83rUNhbM_KoOZ69Whv-1vjLbbUHBkHUvMxx2mWlsrMYUzfCvbiXbmI40K5Z6Wh9_5SgE17mxu0JR674QFI2usjWrShoDRB3QdNkX4lPj/s1600/2.jpg&quot; height=&quot;20&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
ต่อไปส่วนใส่ตัวอักษรที่เห็นนะ&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiODqzG0AjiuwII4zn77ifPxOojMo3ZJz2zZxa6TLLxvRCWj6wWceUQmm0NaKI1jIcA-LKwJcLi2JfHVotDcS39-VHj1N2paFmrX7rf-Bn_M9f55yEMCJJ-FvT1FzuR0_X3sl645Jexzp9Y/s1600/3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiODqzG0AjiuwII4zn77ifPxOojMo3ZJz2zZxa6TLLxvRCWj6wWceUQmm0NaKI1jIcA-LKwJcLi2JfHVotDcS39-VHj1N2paFmrX7rf-Bn_M9f55yEMCJJ-FvT1FzuR0_X3sl645Jexzp9Y/s1600/3.jpg&quot; height=&quot;21&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
ต่อไปคือส่วนเปลี่ยนภาพในกรณีที่ดูภาพไ่ม่ออกอยากจะเอาภาพใหม่&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfItTUbpHFmEmKhpTQg1tqwrlYbtdQsvvI9yU3fkWPi9FvZjAHEHfTVRRVqXj4DXJ0iRlaKsZ8L-Mrd5jGgtRDsxp7Rt-cvgWagWxrr0Kn4JXfEXKbnAr-DN-YiFTP75-ecsYVuRbTByzW/s1600/4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfItTUbpHFmEmKhpTQg1tqwrlYbtdQsvvI9yU3fkWPi9FvZjAHEHfTVRRVqXj4DXJ0iRlaKsZ8L-Mrd5jGgtRDsxp7Rt-cvgWagWxrr0Kn4JXfEXKbnAr-DN-YiFTP75-ecsYVuRbTByzW/s1600/4.jpg&quot; height=&quot;19&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
จะเห็นว่าในส่วนเปลี่ยนภาพใหม่นั้นจะมีการเรียก javascript ด้วยคือ reloadImg(); ดังนั้นก็ต้องไปสร้าง javascript เพื่อเปลี่ยนภาพด้วยดังนี้&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function reloadImg() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var d = new Date();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; document.getElementById(&quot;jcap&quot;).src = &quot;/&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;webPackage ของคุณ&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;/jcaptcha?a=&quot; + d.getTime();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
จะเห็นว่าจะต้องใช้ date(); เพื่อหลอกให้มันเปลียนภาพ&lt;br /&gt;
เสร็จแล้วต่อไปก็จะเป็นส่วนของการตรวจสอบว่าสิ่งที่พิมพ์ไปใน textbox นั้นตรงกับภาพหรือไม่ครับดังนี้&lt;br /&gt;
แต่ส่วนนี้จะเป็นหน้าที่ของ DWR ด้วยคือผมจะนำมาไม่หมดทั้ง function นะหลักๆก็ตามไฮไลน์สี่เขียวนะ&lt;br /&gt;
นอกนั้นจะเป็นในส่วนของ callback function ซึ่งเป็นเนื่อหาของ DWR&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;function validateForm(){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //ทำการตรวจสอบ captcha&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: lime;&quot;&gt;var sid = &quot;&amp;lt;%=(String)request.getSession().getId() %&amp;gt;&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: lime;&quot;&gt;var valueCap = dwr.util.getValue(&quot;japtcha&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: lime;&quot;&gt; if(valueCap===&#39;&#39;){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert(&quot;Please fill charactor&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var japtcha = dwr.util.byId(&quot;japtcha&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; japtcha.focus();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //ทำการตรวจสอบ captcha ก่อนเลยว่าถูกหรือไม่&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: lime;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; validateJCaptcha.validate(sid,valueCap,&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; callback:function(ok){&lt;/span&gt;&lt;br /&gt;
จะเห็นไว้ว่าในส่วนสีเขียว จะดึง sessionid มาเก็บไว้ที่ sid และดึงค่าที่ผู้ใช้เว็บป้อนมาทาง textbox มาเก็บไว้ที่ valueCap จากนั้นนำค่าทั้งสองไปให้ฟังก็ชั้นที่สร้างเองชื่อว่า&amp;nbsp;validateJCaptcha.validate() ตามที่ได้สร้างไว้ก่อนหน้านี้ในข้อ 3 ถ้าตรงก็จะ return true ถ้าไม่ตรงก็จะ return false ครับผม จบยังเนี่ย เกือบจบแต่ไม่จบ&lt;br /&gt;
คือว่าเมื่อเสร็จแล้วผมก็นำขึ้นโฮสต์แต่ว่าไม่แสดงภาพเหมือนที่ทำกับ Notebook ที่บ้านเลย จึงถามโฮสต์ว่าใช้ jvm เวอร์ชั่นไหนก็ตอบมาว่า version 7 ผมใช้ version 6 และตอนที่ built ใน netbean มันก็บอกว่า&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;JPEGCodec &lt;/span&gt;จะยกเลิกใช้แล้วก็เลยสงสัยว่าจะเป็นที่คลาสเนี่ยแหละที่ทำให้ไม่เห็นภาพมันอาจจะยกเลิกไปแล้วใน java 7 ผมก็เลยถ้างั้นหาตัวอื่นก็ได้เลยไปหามาคือ simple captcha ก็ง่ายดีแต่ก็มีปัญหากับ DWR อีกคือจะต้องส่ง session object ของ captcha ไปตรวจสอบที่ validate function ซึ่งส่งยากมากทำๆไปก็ไม่ได้ซักกะทีใครรู้บอกผมด้วยละกันส่งยังไง ก็เลยงั้นกลับมาแก้โค๊ดของ jcaptcha ก็ได้ซึ่งพอทำจริงๆก็ไม่ยากครับ ลองดูใน code ของ 2 นะที่ผมทำสีแดงและ comment เอาไว้หนะ เอา comment ออก และในส่วนของสีชมพูในข้อ 2 ก็ลบออกเลยครับ เสร็จจริงๆแล้วคราวนี้ครับผม สรุปว่าที่ไม่ขึ้นภาพเพราะ&amp;nbsp;&lt;span style=&quot;color: magenta;&quot;&gt;JPEGCodec&lt;/span&gt;&lt;span style=&quot;color: magenta;&quot;&gt;&amp;nbsp;ถูกยกเลิกไปแล้วครับผม&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/1704652622504633543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/1704652622504633543' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/1704652622504633543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/1704652622504633543'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2014/10/captcha-jcaptcha-v10.html' title='แสดง captcha ด้วย jcaptcha v.1.0 และปัญหาไม่แสดงภาพ'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIInl70y2E9lOVF-GjZE9lQAZXcsXtyONRlSm7KYPCbbxUaGuOsX6mjVbgHfl7NxlmhyWWG19Qh3FuMTRA1JoSwtbqcH8J4cISK3auzDIhQmhNCM1qzg8ONXoahOI2BQzrJlutNsFIyhOC/s72-c/1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-7842444760608008983</id><published>2014-10-13T07:44:00.001-07:00</published><updated>2014-10-15T06:31:57.413-07:00</updated><title type='text'>ส่งเมลส์ด้วย javaMail ผ่าน gmail</title><content type='html'>วันนี้ได้ทดลองส่งเมลส์ด้วย javaMail ดู แต่ก่อนหน้านี้ก็ได้ลองทำแล้วแต่ใช้ mail ที่ localhost&lt;br /&gt;
เริ่มเลยละกัน ออ ผมใช้ netbean นะครับ ฉนั้นพวก import เนี่ยผมไม่พูดละกันมันหาให้เองแหละ&lt;br /&gt;
&lt;br /&gt;
-การจะติดต่อได้ก็ต้องมี API ก่อนนะ ผมใช้ javaMail คือมีทั้ง javax.mail และ&amp;nbsp;activation หาโหลดเองนะครับ ผมลืมแล้วว่าเว็บไหน ปรึกษา google ได้เลย จากนั้นก็เอาไปไว้ที่&amp;nbsp;WEB-INF\lib&lt;br /&gt;
&lt;br /&gt;
-จากนั้นก็เขียน code กัน อันนี้เป็นที่ผมทำไว้ใน web นะครับ ใช้ได้เลย(ลองในเครื่องตัวเองนะ)&lt;br /&gt;
การใช้ javaMail นั้นมีอยู่ด้วยกัน 3 แบบนะ ปกติ smtp จะเป็น port 25 นะ แต่ gmail.com จะใ้ห้เราใช้ port อื่น เพราะต้องใช้ Authen ด้วย&lt;br /&gt;
1. ใช้ smtp ไม่ใช้ Authen&lt;br /&gt;
2. ใช้ smtp ใช้ TLS Authen&lt;br /&gt;
3. ใช้ smtp ใช้ SSL Authen&lt;br /&gt;
&lt;br /&gt;
สำหรับ gmail.com จะใช้ได้ทั้ง TLS และ SSL นะครับ สำหรับผมใช้แบบ TLS Authen&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String auth_host = &quot;smtp.gmail.com&quot;;//กำหนด host&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String auth_port = &quot;587&quot;;//กำหนด port&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final String auth_email = &quot;satravel@gmail.com&quot;;//กำหนด email&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; final String auth_password = &quot;password&quot;;//กำหนด password&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Get system properties object&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Properties properties = System.getProperties();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Setup mail server โดยใช้ TLS Authentication&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; properties.put(&quot;mail.smtp.host&quot;, auth_host);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; properties.put(&quot;mail.smtp.port&quot;, auth_port);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; properties.put(&quot;mail.smtp.auth&quot;, &quot;true&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; properties.put(&quot;mail.smtp.starttls.enable&quot;, &quot;true&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Authenticator auth = new Authenticator(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Override&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public PasswordAuthentication getPasswordAuthentication(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return new PasswordAuthentication(auth_email,auth_password);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Session mailSession = Session.getInstance( properties , auth);//สร้าง session&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Create a default MimeMessage object.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MimeMessage message = new MimeMessage(mailSession);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Set From: header field of the header.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; message.setFrom(new InternetAddress(from,&quot;Budsatravel&quot;));//กำหนดชื่อผู้ส่งนะ&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Set Reply To&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; message.setReplyTo(InternetAddress.parse(&quot;satravel@gmail.com&quot;,false));//กำหนด reply&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Set To: header field of the header.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; message.addRecipient(Message.RecipientType.TO,new InternetAddress(to,false));//ผู้รับ&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Set Subject: header field&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; message.setSubject(&quot;Booking From Budsatravel.com&quot;);//หัวข้ออีเมลส์&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Now set the actual message&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; message.setContent(content,&quot;text/html&quot;);//ส่งเป็น html โดย content จะต้องมีลักษณะเป็น html&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Send message&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Transport.send(message);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception mex) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;เรียบร้อยครับผม&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ออในส่วนของ conten ตัวอย่างเช่น content = &lt;b&gt;หัวข้อ&lt;/b&gt; ประมาณนี้ครับผม&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;ข้อควรระวังอีกอย่าง&lt;/span&gt; ปิดการทำงานของ antivirus ด้วย ไม่งั้นอาจจะมีปัญหาเกี่ยวกับ Authen ได้ครับ</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/7842444760608008983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/7842444760608008983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/7842444760608008983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/7842444760608008983'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2014/10/javamail-gmail.html' title='ส่งเมลส์ด้วย javaMail ผ่าน gmail'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-6236524592524469539</id><published>2014-04-29T09:10:00.001-07:00</published><updated>2014-04-29T09:10:51.824-07:00</updated><title type='text'>web.xml มีปัญหา Application at context path /webbudsa could not be started</title><content type='html'>วันนี้ได้ทำการ upload web app ไปที่โฮส ปรากฏว่าไม่ได้ น่าจะเกิดจาก time out&lt;br /&gt;
จากนั้นก็ส่งเมลส์ไปหา host พร้อมกับ war file ทาง host ก็แจ้งมาว่ามีปัญหา &quot;&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 14px;&quot;&gt;Application at context path /webbudsa could not be started&quot; ทำให้ผมต้องหาสาเหตุ ก็ปรากฏว่า สาเหตุมาจาก การเรียง &lt;servlet&gt; กับ &lt;servlet-mapping&gt; สะเปะสะปะ อาจจะเนื่องจากผมได้ทำการเขียนบน tomcat 7 ซึ่งน่าจะฉลาดกว่า tomcat 6(บน host) ทำให้สามารถทำงานได้ปกติในระหว่างการเขียนโปรแกรม แต่เมื่อ upload บน host จริงๆกลับมีปัญหาดังกล่าวก็เป็นได้ จึงต้องทำการเรียงซะให้ โดยเรียง &lt;servlet&gt; ก่อน แล้วตามด้วย &lt;servlet-mapping&gt; ทีหลัง ก็เป็นอันเรียบร้อย&lt;/servlet-mapping&gt;&lt;/servlet&gt;&lt;/servlet-mapping&gt;&lt;/servlet&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/6236524592524469539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/6236524592524469539' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/6236524592524469539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/6236524592524469539'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2014/04/webxml-application-at-context-path.html' title='web.xml มีปัญหา Application at context path /webbudsa could not be started'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-8062604998749334091</id><published>2014-01-22T06:22:00.002-08:00</published><updated>2014-01-22T06:22:30.667-08:00</updated><title type='text'>ไดรเวอร์ printer เครื่องลูก</title><content type='html'>วันนี้ผมได้ลง window 7 64 bit ที่เครื่องแม่ เมื่อลงเสร็จแล้ว เครื่องลูกจะทำการ print แต่ไม่ได้เนื่องจากว่าในเครื่องแม่นั้น ไม่มี driver 32 bit ทำให้เครื่องลูกไม่สามารถปริ้นได้&lt;br /&gt;
&lt;b&gt;ทางแก้&lt;/b&gt;&lt;br /&gt;
ที่ปริ้นเตอร์เราสามารถเลือก driver 32 เพิ่มเข้าไปได้(เครื่องแม่) &amp;nbsp;window ก็จะถาม driver 32 bit จากนั้นก็หา driver ของ printer มาลง และ window ก็จะถาม ntprint.inf อันนี้ไปหามาจากเครื่องที่ลง window 32 bit มา เท่านี้ก็เสร็จ</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/8062604998749334091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/8062604998749334091' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/8062604998749334091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/8062604998749334091'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2014/01/printer.html' title='ไดรเวอร์ printer เครื่องลูก'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-4054948597022608641</id><published>2013-12-16T08:20:00.001-08:00</published><updated>2014-10-15T04:54:23.769-07:00</updated><title type='text'>ดึง Session ID จาก java มาไว้ที่ javascript</title><content type='html'>เนื่องจากผมจะต้องใช้ jsessionid ของ java มาใช้ในการแสดงผลภาพ captcha แต่ในตัวอย่างนั้นผมจะต้องใช้เป็น servlet แต่ผมไม่ต้องการใช้ อยากใช้แบบ Ajax DWR แทน เลยต้องหาค่า 2 ค่าก่อนส่งไปที่ class ของ jcaptcha นั่นคือ sessionid กับ ค่าที่ผู้ใช้เว็บป้อนเข้ามา ปัญหาคือจะหา sessionid ได้ยังไงส่วนค่าที่ผู้ใช้เว็บป้อนมานั้นง่ายเลยติดแค่ sessionid อย่างเดียว&lt;br /&gt;
หาอยู่ตั้งนานว่าจะทำไงโดยใช้ javascript แต่ก็ไม่ได้และยุ่งยากเกินไป ก็มาได้ง่ายๆด้วย java นี่แหละ(มัวแต่คิดถึง Ajax อย่างเดียวเลยลืมเพื่อนเก่าที่เป็น scriptlet ไปเลยนะเนี่ย) ง่่ายๆครับ คือ&lt;br /&gt;
&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;/p&gt;
&lt;p&gt;
         var val=&quot;&lt;%=(String)request.getSession().getId() %&gt;&quot;;&lt;/p&gt;
&lt;p&gt;
&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
ง่ายๆแค่นี้เลยโดยใช้ expression ใน jsp แค่เนี่ย หาอยู่ตั้งนาน แต่ไม่ได้เป็น object เป็น String อย่างเดียวแค่นั้น</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/4054948597022608641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/4054948597022608641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/4054948597022608641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/4054948597022608641'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2013/12/session-id-java-javascript.html' title='ดึง Session ID จาก java มาไว้ที่ javascript'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-4967532943076729749</id><published>2013-04-09T09:08:00.001-07:00</published><updated>2013-04-09T09:08:17.005-07:00</updated><title type='text'>mySQL error 121</title><content type='html'>วันนี้สร้างตารางขึ้นมาชื่อว่า booking โดยเป็น weak entity แบบ M:N ทีนี้สร้างในฐานข้อมูลจริงไม่ได้ เกิด error 121 เลยไปหาในเน็ตทางแก้คือเปลี่ยนชื่อ attribute ของ table booking ที่ fk ไป table อื่นซะ ลองดูในเว็บที่ฝรั่งถามไว้นะครับ&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/3316410/sql-error-errno-121&quot;&gt;http://stackoverflow.com/questions/3316410/sql-error-errno-121&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/4967532943076729749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/4967532943076729749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/4967532943076729749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/4967532943076729749'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2013/04/mysql-error-121.html' title='mySQL error 121'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-7063648566178194891</id><published>2013-03-28T09:09:00.001-07:00</published><updated>2013-03-28T09:09:53.852-07:00</updated><title type='text'>การใช้ Transactions ใน Java</title><content type='html'>&lt;br /&gt;
&lt;h2 style=&quot;color: #f90000; font-family: sans-serif; font-size: 17px;&quot;&gt;
&lt;a href=&quot;&quot; id=&quot;disable_auto_commit&quot; name=&quot;disable_auto_commit&quot;&gt;Disabling Auto-Commit Mode&lt;/a&gt;&lt;/h2&gt;
&lt;div&gt;
เมื่อทำการสร้าง connection นั้น จะอยู่ในโหมด Auto Commit โดยอัตโนมัติ นั่นหมายถึงว่าแต่ละคำสั่ง SQL ที่กระทำ transaction นั้นจะ Commit(ยืนยัน) หมด(ถ้าจะให้ละเอียดคือ ในคำสั่ง SQL นั้นจะ Commit เมื่อมันเสร็จสิ้นแล้ว ไม่ใช่ในขณะทำงาน(excuted) )&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
ในการ disable commit คือ con.setAutoCommit(false);&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2 style=&quot;color: #f90000; font-family: sans-serif; font-size: 17px;&quot;&gt;
&lt;a href=&quot;&quot; id=&quot;commit_transactions&quot; name=&quot;commit_transactions&quot;&gt;Committing Transactions&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
หลังจากที่เราได้ทำการ disable commit ไปแล้วจะไม่มีคำสั่ง SQL Statement ไหน commit จนกว่าเราจะใช้คำสั่ง commit เอง คำสั่ง SQL ทั้งหมดจะถูก excute หลังจากเรียกคำสั่ง commit คือเพิ่มเข้าไปใน transection ปัจจุบันและ commit รวมกันเป็นกลุ่ม ดังตัวอย่าง&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre&gt;public void updateCoffeeSales(HashMap&lt;string integer=&quot;&quot;&gt; salesForWeek)
    throws SQLException {

    PreparedStatement updateSales = null;
    PreparedStatement updateTotal = null;

    String updateString =
        &quot;update &quot; + dbName + &quot;.COFFEES &quot; +
        &quot;set SALES = ? where COF_NAME = ?&quot;;

    String updateStatement =
        &quot;update &quot; + dbName + &quot;.COFFEES &quot; +
        &quot;set TOTAL = TOTAL + ? &quot; +
        &quot;where COF_NAME = ?&quot;;

    try {
        con.setAutoCommit(false);
        updateSales = con.prepareStatement(updateString);
        updateTotal = con.prepareStatement(updateStatement);

        for (Map.Entry&lt;string integer=&quot;&quot;&gt; e : salesForWeek.entrySet()) {
            updateSales.setInt(1, e.getValue().intValue());
            updateSales.setString(2, e.getKey());
            updateSales.executeUpdate();
            updateTotal.setInt(1, e.getValue().intValue());
            updateTotal.setString(2, e.getKey());
            updateTotal.executeUpdate();
            con.commit();
        }
    } catch (SQLException e ) {
        JDBCTutorialUtilities.printSQLException(e);
        if (con != null) {
            try {
                System.err.print(&quot;Transaction is being rolled back&quot;);
                con.rollback();
            } catch(SQLException excep) {
                JDBCTutorialUtilities.printSQLException(excep);
            }
        }
    } finally {
        if (updateSales != null) {
            updateSales.close();
        }
        if (updateTotal != null) {
            updateTotal.close();
        }
        con.setAutoCommit(true);
    }
}&lt;/string&gt;&lt;/string&gt;&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ใน method นี้จะ auto-commit mode เป็น disable ซึ่งหมายถึง 2 prepared statements จะ commit รวมกัน เมื่อ commit มีการเรียก&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ในคำสั่ง con.setAutoCommit(true); จะหมายถึงการกลับไปยัง สถานะ default เมื่อคำสั่งต่างๆเสร็จสิ้้น&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;h2 style=&quot;color: #f90000; font-family: sans-serif; font-size: 17px; white-space: normal;&quot;&gt;
&lt;a href=&quot;&quot; id=&quot;transactions_data_integrity&quot; name=&quot;transactions_data_integrity&quot;&gt;Using Transactions to Preserve Data Integrity&lt;/a&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;a href=&quot;&quot; name=&quot;transactions_data_integrity&quot;&gt;
&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ตัวอย่างของ &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; white-space: normal;&quot;&gt;transaction isolation level คือ&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;white-space: normal;&quot;&gt;TRANSACTION_READ_COMMITTED &lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;จะไม่ยอมรับการเข้าถึงข้อมูลจนกว่า transaction เสร็จสิ้น พูดอย่างอย่างคือ DBMS จะไม่ยอมรับการมี dirty reads เกิดขึ้น&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;Transaction Isolation Level แบ่งออกเป็น 5 ระดับ ดังนี้&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;white-space: normal;&quot;&gt;&lt;table border=&quot;1&quot; style=&quot;color: black; font-family: &#39;Times New Roman&#39;;&quot; summary=&quot;Transaction isolation levels&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th id=&quot;h1&quot;&gt;Isolation Level&lt;/th&gt;&lt;th id=&quot;h2&quot;&gt;Transactions&lt;/th&gt;&lt;th id=&quot;h3&quot;&gt;Dirty Reads&lt;/th&gt;&lt;th id=&quot;h4&quot;&gt;Non-Repeatable Reads&lt;/th&gt;&lt;th id=&quot;h5&quot;&gt;Phantom Reads&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td headers=&quot;h1&quot;&gt;&lt;code&gt;TRANSACTION_NONE&lt;/code&gt;&lt;/td&gt;&lt;td headers=&quot;h2&quot;&gt;Not supported&lt;/td&gt;&lt;td headers=&quot;h3&quot;&gt;&lt;em&gt;Not applicable&lt;/em&gt;&lt;/td&gt;&lt;td headers=&quot;h4&quot;&gt;&lt;em&gt;Not applicable&lt;/em&gt;&lt;/td&gt;&lt;td headers=&quot;h5&quot;&gt;&lt;em&gt;Not applicable&lt;/em&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td headers=&quot;h1&quot;&gt;&lt;code&gt;TRANSACTION_READ_COMMITTED&lt;/code&gt;&lt;/td&gt;&lt;td headers=&quot;h2&quot;&gt;Supported&lt;/td&gt;&lt;td headers=&quot;h3&quot;&gt;Prevented&lt;/td&gt;&lt;td headers=&quot;h4&quot;&gt;Allowed&lt;/td&gt;&lt;td headers=&quot;h5&quot;&gt;Allowed&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td headers=&quot;h1&quot;&gt;&lt;code&gt;TRANSACTION_READ_UNCOMMITTED&lt;/code&gt;&lt;/td&gt;&lt;td headers=&quot;h2&quot;&gt;Supported&lt;/td&gt;&lt;td headers=&quot;h3&quot;&gt;Allowed&lt;/td&gt;&lt;td headers=&quot;h4&quot;&gt;Allowed&lt;/td&gt;&lt;td headers=&quot;h5&quot;&gt;Allowed&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td headers=&quot;h1&quot;&gt;&lt;code&gt;TRANSACTION_REPEATABLE_READ&lt;/code&gt;&lt;/td&gt;&lt;td headers=&quot;h2&quot;&gt;Supported&lt;/td&gt;&lt;td headers=&quot;h3&quot;&gt;Prevented&lt;/td&gt;&lt;td headers=&quot;h4&quot;&gt;Prevented&lt;/td&gt;&lt;td headers=&quot;h5&quot;&gt;Allowed&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td headers=&quot;h1&quot;&gt;&lt;code&gt;TRANSACTION_SERIALIZABLE&lt;/code&gt;&lt;/td&gt;&lt;td headers=&quot;h2&quot;&gt;Supported&lt;/td&gt;&lt;td headers=&quot;h3&quot;&gt;Prevented&lt;/td&gt;&lt;td headers=&quot;h4&quot;&gt;Prevented&lt;/td&gt;&lt;td headers=&quot;h5&quot;&gt;Prevented
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;non-repeatable read&lt;/em&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp; เกิดขึ้นเมื่อ transaction A รับค่าแถว,ลำดับต่อมา transaction B update แถว และลำดับต่อมา transaction A รับค่าที่แถวเดิมอีกครั้ง transaction A รับค่าที่แถวเดิม 2 ครั้งแต่ได้ค่าต่างไปจากเดิม&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;em style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;phantom read &amp;nbsp;&lt;/em&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;เกิดขึ้นเมื่อ transaction A รับค่าจะแถวโดยผ่าน condition (where),ลำดับต่อมา transaction B ก็ทำการเพิ่มและ update แถวโดยผ่าน condition เดียวกันกับ transaction A ต่อมา transaction A ก็มารับค่าตาม condition อีกครั้ง แต่ปรากฏว่าเห็นแถวเพิ่มขึ้น แถวที่เพิ่มขึ้นนี้เองเรียกว่า &amp;nbsp;phantom&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;โดยทั่วไปเราไม่ต้องทำอะไรเกี่ยวกับ&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;Transaction Isolation Level&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; white-space: normal;&quot;&gt;&amp;nbsp;สามารถใช้ค่า defalut ของ DBMS ได้เลย ค่า default ของ DBMS จะขึ้นอยู่กับ DBMS ที่ใช้ เช่น&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; white-space: normal;&quot;&gt;&amp;nbsp;Java DB คือ&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;white-space: normal;&quot;&gt;TRANSACTION_READ_COMMITTED &lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ถ้าต้องการหาว่า DBMS ใช้ Level ไหนใช้คำสั่ง&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;white-space: normal;&quot;&gt;Connection&lt;/code&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; white-space: normal;&quot;&gt;&amp;nbsp;method&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;white-space: normal;&quot;&gt;getTransactionIsolation &lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;และถ้าต้องการ set เองใช้&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code style=&quot;white-space: normal;&quot;&gt;Connection&lt;/code&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; white-space: normal;&quot;&gt;&amp;nbsp;method&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;white-space: normal;&quot;&gt;setTransactionIsolation&amp;nbsp;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Note &lt;/b&gt;JDBC driver อาจจะไม่ support transaction level ทั้งหมด ถ้าไม่ support level ที่ระบุใน&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;setTransactionIsolation &lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ก็สามารถสลับไปใช้ level ที่สูงกว่า ถ้า driver ไม่สามารถสลับไปที่ level ที่สูงกว่าได้จะเกิด&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;SQLException &lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ใช้&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; white-space: normal;&quot;&gt;method&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;white-space: normal;&quot;&gt;DatabaseMetaData.supportsTransactionIsolationLevel &lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ในการหาว่า driver support level ไหน&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;&lt;h2 style=&quot;color: #f90000; font-family: sans-serif; font-size: 17px; white-space: normal;&quot;&gt;
&lt;a href=&quot;&quot; id=&quot;set_roll_back_savepoints&quot; name=&quot;set_roll_back_savepoints&quot;&gt;Setting and Rolling Back to Savepoints&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;white-space: normal;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;method&amp;nbsp;&lt;/span&gt;&lt;code&gt;Connection.setSavepoint &lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;คือ set Savepoint Object ใน transaction ปัจจุบัน&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;code&gt;Connection.rollback&lt;/code&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;method คือส่ง Savepoint ไปเป็น agument&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;white-space: normal;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;ตัวอย่างถ้าต้องการเพิ่มราคาแล้วราคานั้นเกินกว่าที่กำหนดไว้ก็จะ rollback ไปค่าเริ่มต้นใหม่อีกครั้ง&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;white-space: normal;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;white-space: normal;&quot;&gt;public void modifyPricesByPercentage(
    String coffeeName,
    float priceModifier,
    float maximumPrice)
    throws SQLException {
    
    con.setAutoCommit(false);

    Statement getPrice = null;
    Statement updatePrice = null;
    ResultSet rs = null;
    String query =
        &quot;SELECT COF_NAME, PRICE FROM COFFEES &quot; +
        &quot;WHERE COF_NAME = &#39;&quot; + coffeeName + &quot;&#39;&quot;;

    try {
        Savepoint save1 = con.setSavepoint();
        getPrice = con.createStatement(
                       ResultSet.TYPE_SCROLL_INSENSITIVE,
                       ResultSet.CONCUR_READ_ONLY);
        updatePrice = con.createStatement();

        if (!getPrice.execute(query)) {
            System.out.println(
                &quot;Could not find entry &quot; +
                &quot;for coffee named &quot; +
                coffeeName);
        } else {
            rs = getPrice.getResultSet();
            rs.first();
            float oldPrice = rs.getFloat(&quot;PRICE&quot;);
            float newPrice = oldPrice + (oldPrice * priceModifier);
            System.out.println(
                &quot;Old price of &quot; + coffeeName +
                &quot; is &quot; + oldPrice);

            System.out.println(
                &quot;New price of &quot; + coffeeName +
                &quot; is &quot; + newPrice);

            System.out.println(
                &quot;Performing update...&quot;);

            updatePrice.executeUpdate(
                &quot;UPDATE COFFEES SET PRICE = &quot; +
                newPrice +
                &quot; WHERE COF_NAME = &#39;&quot; +
                coffeeName + &quot;&#39;&quot;);

            System.out.println(
                &quot;\nCOFFEES table after &quot; +
                &quot;update:&quot;);

            CoffeesTable.viewTable(con);

            if (newPrice &amp;gt; maximumPrice) {
                System.out.println(
                    &quot;\nThe new price, &quot; +
                    newPrice +
                    &quot;, is greater than the &quot; +
                    &quot;maximum price, &quot; +
                    maximumPrice +
                    &quot;. Rolling back the &quot; +
                    &quot;transaction...&quot;);

                con.rollback(save1);

                System.out.println(
                    &quot;\nCOFFEES table &quot; +
                    &quot;after rollback:&quot;);

                CoffeesTable.viewTable(con);
            }
            con.commit();
        }
    } catch (SQLException e) {
        JDBCTutorialUtilities.printSQLException(e);
    } finally {
        if (getPrice != null) { getPrice.close(); }
        if (updatePrice != null) {
            updatePrice.close();
        }
        con.setAutoCommit(true);
    }
}&lt;/pre&gt;
&lt;pre style=&quot;white-space: normal;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;method เริ่มต้นโดยสร้าง Savepoint ด้วยคำสั่ง &lt;/span&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;Savepoint save1 = con.setSavepoint();&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: normal;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;method จะทำการตรวจสอบค่า new price ว่ามากกว่า maximum price หรือไม่ถ้ามากกว่าก็ให้กลับไปค่าปัจจุบัน &lt;/span&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;con.rollback(save1);&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;ดังนั้น เมื่อ method commit transaction โดยเรียก &lt;/span&gt;&lt;code style=&quot;white-space: normal;&quot;&gt;Connection.commit&lt;/code&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; white-space: normal;&quot;&gt;&amp;nbsp;method มันจะไม่ commit แถวใดๆที่มีความสัมพันธ์กับ Savepoint ที่มีการ rolled back มันจะ commit แถวอื่น&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;h2 style=&quot;color: #f90000; font-family: sans-serif; font-size: 17px; white-space: normal;&quot;&gt;
&lt;a href=&quot;&quot; id=&quot;release_savepoints&quot; name=&quot;release_savepoints&quot;&gt;Releasing Savepoints&lt;/a&gt;&lt;/h2&gt;
&lt;div style=&quot;white-space: normal;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;white-space: normal;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Times New Roman&#39;; white-space: normal;&quot;&gt;method&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;white-space: normal;&quot;&gt;Connection.releaseSavepoint &lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;โดยป้อน Savepoint Object เป็น parameter และจะ remove Savepoint จาก transaction ปัจจุบัน&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;white-space: normal;&quot;&gt;
&lt;code style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;Savepoint จะ Release โดยอัตโนมัติ เมื่อมีการ commit หรือเมื่อ transaction rolle back&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;white-space: normal;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2 style=&quot;color: #f90000; font-family: sans-serif; font-size: 17px; white-space: normal;&quot;&gt;
&lt;a href=&quot;&quot; id=&quot;call_rollback&quot; name=&quot;call_rollback&quot;&gt;When to Call Method rollback&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;&quot; name=&quot;call_rollback&quot;&gt;
&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;การเรียน method rollback จะทำให้ออกจาก transaction และทำการ return ค่าใดที่ทำการเปลียนแปลงก่อนหน้าให้เป็นค่าเริ่มต้น ถ้าคุณทดลอง execute statment ใน transaction จะทำให้เกิด SQLException การเรียก method จะทำให้ transaction จบ และทำการเริ่มต้น transacton ใหม่อีกครั้ง&lt;/span&gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;pre style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;code style=&quot;white-space: normal;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/7063648566178194891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/7063648566178194891' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/7063648566178194891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/7063648566178194891'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2013/03/transactions-java.html' title='การใช้ Transactions ใน Java'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-3935110752013353603</id><published>2012-12-01T19:16:00.000-08:00</published><updated>2012-12-01T19:16:57.735-08:00</updated><title type='text'>deep freeze v.7 ไม่เห็นใน Task bar</title><content type='html'>ผมได้ทำการแช่แข็ง Harddisk ไว้ แล้วทีนี้จะทำการแก้ไข window นิดนึงจึงทำการปลดล็อคแต่ปรากฎว่า&lt;br /&gt;
ปลดล็อกไม่ได้ เนื่องจาก ไม่เห็นรูปไอคอน deep freeze &quot;มันหายไปไหนเนี่ย&quot; หาอยู่ตั้งนานว่าจะทำไง เกือบลง window ใหม่แล้วเชียว ไปพบวิธีแก้ซะก่อน คือ&lt;br /&gt;
-ให้ทำการ logout ก่อนนะ&lt;br /&gt;
-จากนั้นก็เข้า window ใหม่ ไม่ต้อง boot เครื่องใหม่นะกดเข้าไปเลย&lt;br /&gt;
ก็จะเห็น deep freeze และก็จัดการได้เลย ง่ายซะไม่มี</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/3935110752013353603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/3935110752013353603' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/3935110752013353603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/3935110752013353603'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2012/12/deep-freeze-v7-task-bar.html' title='deep freeze v.7 ไม่เห็นใน Task bar'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-5196615048770952496</id><published>2012-04-15T09:09:00.000-07:00</published><updated>2012-04-15T09:09:35.348-07:00</updated><title type='text'>JavaScript undefined Properties</title><content type='html'>เป็นการระบุว่า ไม่มีการกำหนดค่าให้กับตัวแปร ดังตัวอย่าง&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;courier new&#39;; font-size: 13px;&quot;&gt;&lt;script type=&quot;text/javascript&quot;&gt;
&lt;/span&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; background-color: rgb(255, 255, 255); &quot;&gt;var t1=&quot;&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; background-color: rgb(255, 255, 255); &quot;&gt;var t2;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; background-color: rgb(255, 255, 255); &quot;&gt;if (t1==undefined)&lt;/span&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; background-color: rgb(255, 255, 255); &quot;&gt;{&lt;/span&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; background-color: rgb(255, 255, 255); &quot;&gt;document.write(&quot;t1 is undefined&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; background-color: rgb(255, 255, 255); &quot;&gt;}&lt;/span&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; background-color: rgb(255, 255, 255); &quot;&gt;if (t2==undefined)&lt;/span&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; background-color: rgb(255, 255, 255); &quot;&gt;{&lt;/span&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; background-color: rgb(255, 255, 255); &quot;&gt;document.write(&quot;t2 is undefined&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; background-color: rgb(255, 255, 255); &quot;&gt;}&lt;/span&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;br style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; &quot;&gt;&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: 13px; background-color: rgb(255, 255, 255); &quot;&gt;
&lt;/script&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;courier new&#39;; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: x-small;&quot;&gt;ได้ผลลัพธ์คือ&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;courier new&#39;; font-size: 13px;&quot;&gt;t2 is undefined&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;courier new&#39;; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;courier new&#39;; font-size: x-small;&quot;&gt;จะเห็นได้ว่า ตัวแปร t2 ยังไม่ได้กำหนดค่าให้ทำให้มีคุณสมบัติเป็น undefined&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/5196615048770952496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/5196615048770952496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/5196615048770952496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/5196615048770952496'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2012/04/javascript-undefined-properties.html' title='JavaScript undefined Properties'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-2638525527781133105</id><published>2012-04-07T04:36:00.001-07:00</published><updated>2012-04-07T04:36:21.884-07:00</updated><title type='text'>มีอะไรใหม่ใน J2SE 5.0</title><content type='html'>&lt;a href=&quot;http://0x00.wikidot.com/programming:java-j2se-5&quot;&gt;http://0x00.wikidot.com/programming:java-j2se-5&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/2638525527781133105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/2638525527781133105' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/2638525527781133105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/2638525527781133105'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2012/04/j2se-50.html' title='มีอะไรใหม่ใน J2SE 5.0'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-3076653070233379437</id><published>2012-03-25T03:10:00.001-07:00</published><updated>2012-03-25T03:14:23.678-07:00</updated><title type='text'>Callback  Function ใน DWR</title><content type='html'>หลักการที่สำคัญใน Ajax คือ callback function หรือพูดง่ายคือ ฟังก์ชั่นที่จะรับข้อมูลกลับเพื่อทำงานต่อนั่นเอง ใน DWR callback ใช้ทำงานกับข้อมูลที่ส่งมาจาก method 
&lt;br /&gt;ประเภทของ callback function คือ
1.&lt;br /&gt;1.ถ้าฟังก์ชั่นไม่มี parameter เช่น HorizontalMenu.getMenuItems(setMenuItems) ฟังก์ชั่นนี้จริงๆแล้วไม่มี parameter แต่ในการเรียกใช้โดย javascript เราจึงได้เพิ่ม callback function เข้าไป คือ setMenuItems นั่นเอง
2.&lt;br /&gt;
2.ถ้าฟังก์ชั่นนั้นมี parameter เช่น CountryDB.getContries(selectLetters,setCountryRows) โดย selectLetters คือ input parameter และ setCountryRows คือ callback function&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;สำหรับแบบนี้ ในการใช้ callback function คือ meta-data object ในการที่ javascript จะเรียกใช้งาน เช่น

        CountryDB.saveCountryNotes(ccode,newNotes,{
           callback:function(newNote)
&lt;br /&gt;&amp;nbsp;{
             //function body here&lt;br /&gt;&amp;nbsp;}
        });&lt;br /&gt;&amp;nbsp;ฟังก์ชั่นนี้ คือ anonymous และมัน implementation โดยการเพิ่ม javascript ที่เรียก เข้าไปยัง remote Java method ประโยชน์ในการทำลักษณะนี้คือ ง่ายในการอ่าน และจะ execute ทันทีหลังจากได้รับค่าที่ return มาจาก Java method &lt;br /&gt;สำหรับประโยชน์อื่นๆคือเราสามารถเพิ่ม option ในการเรียกได้ คือสามารถเพิ่ม timeout และ error handler เช่น&lt;br /&gt;&amp;nbsp;CountryDB.saveCountryNotes(ccode,newNotes,{
          callback:function(newNotes)&lt;br /&gt;&amp;nbsp;{
            //function body here
          },
          timeout:10000,
          errorHandler:function(errorMsg){ alert(errorMsg);}
      });
&lt;br /&gt;&lt;br /&gt;&amp;nbsp;มีความเป็นไปได้ว่า Java method จะไม่ return ค่ากลับมา ในการเพิ่ม callback ไปยัง method ที่ไม่ return ค่า จะมีประโยชน์ในการรับการแจ้งเตือน เมื่อ remote call ทำงานเสร็จ</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/3076653070233379437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/3076653070233379437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/3076653070233379437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/3076653070233379437'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2012/03/callback-function-dwr.html' title='Callback  Function ใน DWR'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-5513414900289317833</id><published>2011-12-18T05:44:00.001-08:00</published><updated>2011-12-18T05:44:35.469-08:00</updated><title type='text'></title><content type='html'>&lt;div style=&#39;clear: both; text-align: center; font-size: xx-small;&#39;&gt;Published with Blogger-droid v2.0.2&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/5513414900289317833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/5513414900289317833' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/5513414900289317833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/5513414900289317833'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2011/12/published-with-blogger-droid-v2.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-8575441015999718456</id><published>2011-12-17T22:48:00.000-08:00</published><updated>2011-12-17T22:57:16.546-08:00</updated><title type='text'>ลองเล่นของใหม่ Android</title><content type='html'>ผมได้ได้มือถือมาเป็น HTC เลยคิดว่าน่าจะเขียนโปรแกรมสำหรับมือถือซะหน่อย เลยโหลดหนังสือมา แล้วก็ Eclipse Indigo กับ sdk ของ google แต่ปัญหามันมีอยู่ว่า run แล้วไม่ผ่านปัญหาเยอะเหมือนกันนะ ที่เจอคือ&lt;br /&gt;1.เราจะต้องเปลี่ยนไปที่ control panel แล้วเปลี่ยนเครื่องเราเป็น US ซะ ไม่ว่าจะเป็นวันที่ ประเทศ อะไรต่างๆ ไม่งั้นจะทำให้เกิดปัญหาหมดอายุของโปรแกรมเพราะมันนับอายุเป็น ค.ศ.&lt;br /&gt;2.เวลา ทดสอบ ก็คลิกที่ project และ F11(debug)รอซักครูเหมือนมือถือแหละนะ ไม่งั้นจะมีปัญหา out.xml(เพราะไปคลิดที่ไฟล์ xml) นะ &lt;br /&gt;ที่เขียนตรงนี้ไม่ขั้นตอนนะครับแต่เป็นปัญหาทีเจอมา หลายวันทีเดียวกว่าจะเป็นได้ ประมาณ 3 วันได้แหละ ผมย้ายไป netbean 7 อยู่พักนึงนะแต่ดูว่าจะไม่เวอร์คเพราะเขาใช้ eclipse ทั้งน้าน ว่าจะเลิกแล้วเชียวดันมาได้ซะก่อนทำง่ายๆไหงปัญหาเยอะจัด แต่ก็นะของใหม่ครับ</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/8575441015999718456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/8575441015999718456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/8575441015999718456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/8575441015999718456'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2011/12/android.html' title='ลองเล่นของใหม่ Android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-1897978431547117958</id><published>2011-06-17T21:24:00.000-07:00</published><updated>2011-06-17T21:27:56.469-07:00</updated><title type='text'>firefox ไม่แสดง javascript ที่แก้ไข</title><content type='html'>วันนี้ได้ทดลอง run โปรเจ็ค gallery และได้ทำการแก้ไข javascript ที่ netbean7 ปรากฏว่า firefox&lt;div&gt;ไม่ทำการ update javascript ที่แก้ไขให้เลย จึงทำการ run ใน chrome ก็สามารถใช้ได้เลย แสดงว่า&lt;/div&gt;&lt;div&gt;firefox สร้างปัญหาให้เราได้เหมือนกันนนะเนี่ย นี่ดีนะที่มี plugin firebug ถ้าไม่งั้นเลิกใช้ไปแล้ว กิน&lt;/div&gt;&lt;div&gt;แรมก็เยอะ&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/1897978431547117958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/1897978431547117958' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/1897978431547117958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/1897978431547117958'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2011/06/firefox-javascript.html' title='firefox ไม่แสดง javascript ที่แก้ไข'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-5174476033600763249</id><published>2011-05-28T09:13:00.000-07:00</published><updated>2011-05-28T09:20:17.118-07:00</updated><title type='text'>ปัญหา mysql ไม่รองรับไทย หลังจากห่างหายไปนาน</title><content type='html'>ผมติดปัญหา mysql ไม่เป็นภาษาไทยมาหลายวัน เป็นแต่ ????&lt;div&gt;งง มากเลย ทั้งๆที่ปัญหานี้เราแก้ได้นานแล้วนี่(พักการเขียนไปนาน)&lt;/div&gt;&lt;div&gt;ไม่ว่าจะกำหนด mysql ให้เป็น utf-8 หมด กำหนด encoding ของไฟล์เป็น utf-8 หมด&lt;/div&gt;&lt;div&gt;ก็ไม่ได้ซักทีทำไงดีเนี่ยยยยยย&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;เลยมา track ดูผลปรากฏว่า ใน instance ของ Statement เป็น ISO8859-1&lt;/div&gt;&lt;div&gt;ก็เลยน่าจะมาจาก Driver &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;สุดท้ายก็จริงๆด้วย สาเหตุมาจากผมได้นำ Driver ver.3 โดยเป็น Version เก่า&lt;/div&gt;&lt;div&gt;ทำให้ไม่รองรับไทย และใน Library ของ project สามารถ add library mysql&lt;/div&gt;&lt;div&gt;มาได้โดยได้ version 5 ก็เลยทำการลบ Driver เก่าและลง Driver ใหม่ซะะเลย&lt;/div&gt;&lt;div&gt;จบ................. เฮ้อ ห่างหายไปนานลืมซะได้ว่า netbean มี Driver mysql ให้ add อยู่แล้ว&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/5174476033600763249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/5174476033600763249' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/5174476033600763249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/5174476033600763249'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2011/05/mysql.html' title='ปัญหา mysql ไม่รองรับไทย หลังจากห่างหายไปนาน'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-2189306150836956196</id><published>2011-02-12T08:38:00.001-08:00</published><updated>2011-02-12T08:42:49.297-08:00</updated><title type='text'>คำถามเกี่ยวกับ transaction</title><content type='html'>ผมถามไว้ในเว็บ narisa.com&lt;br /&gt;&lt;a href=&quot;http://www.narisa.com/forums/index.php?showtopic=27601&quot;&gt;http://www.narisa.com/forums/index.php?showtopic=27601&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;เพิ่มเติม เป็น article&lt;br /&gt;&lt;a href=&quot;http://www.agiledata.org/essays/concurrencyControl.html&quot;&gt;http://www.agiledata.org/essays/concurrencyControl.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/2189306150836956196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/2189306150836956196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/2189306150836956196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/2189306150836956196'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2011/02/transaction_12.html' title='คำถามเกี่ยวกับ transaction'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-7954255027969127238</id><published>2011-02-12T08:38:00.000-08:00</published><updated>2011-02-12T08:39:45.197-08:00</updated><title type='text'>คำถามเกี่ยวกับ transaction</title><content type='html'>ผมถามไว้ในเว็บ narisa.com&lt;br /&gt;&lt;a href=&quot;http://www.narisa.com/forums/index.php?showtopic=27601&quot;&gt;http://www.narisa.com/forums/index.php?showtopic=27601&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/7954255027969127238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/7954255027969127238' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/7954255027969127238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/7954255027969127238'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2011/02/transaction.html' title='คำถามเกี่ยวกับ transaction'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-4633088593729336623</id><published>2011-02-01T08:04:00.000-08:00</published><updated>2011-02-01T08:05:32.198-08:00</updated><title type='text'>เทคนิค 30 อย่าง ที่น่าสนใจในการทำ Web 2.0</title><content type='html'>&lt;a href=&quot;http://www.demoncodez.com/development/81-30-tip-web-20.html&quot;&gt;http://www.demoncodez.com/development/81-30-tip-web-20.html&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/4633088593729336623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/4633088593729336623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/4633088593729336623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/4633088593729336623'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2011/02/30-web-20.html' title='เทคนิค 30 อย่าง ที่น่าสนใจในการทำ Web 2.0'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-4873354508538240998</id><published>2011-01-27T02:34:00.001-08:00</published><updated>2011-01-27T02:34:44.857-08:00</updated><title type='text'>เสียง beep code</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, &#39;san serif&#39;; border-collapse: collapse; font-size: 14px; line-height: 21px; &quot;&gt;เสียงบี๊บสั้นๆ 1 ครั้ง&lt;br /&gt;(Beep) เครื่องทำงานปกติดี , POST ผ่าน&lt;br /&gt;&lt;br /&gt;เสียงบี๊บสั้นๆ 2 ครั้ง /&lt;br /&gt;(Beep Beep) เครื่องทำงานผิดปกติ , POST ไม่ผ่าน&lt;br /&gt;&lt;br /&gt;เสียงบี๊บสั้นๆ หลายครั้งอย่างต่อเนื่อง&lt;br /&gt;(Beep Beep Beep Beep Beep) แหล่งจ่ายไฟ (PowerSupply) หรือเมนบอร์ดมีปัญหา&lt;br /&gt;&lt;br /&gt;เสียงบี๊บยาวๆ 1 ครั้ง และสั้นๆ 1 ครั้ง&lt;br /&gt;(Beep... Beep) เมนบอร์ดมีปัญหา&lt;br /&gt;&lt;br /&gt;เสียงบี๊บยาวๆ 1 ครั้ง และสั้นๆ 3 ครั้ง&lt;br /&gt;(Beep... Beep Beep Beep) การ์ดจอเสียบไม่แน่น หรือการ์ดจอเสีย&lt;br /&gt;&lt;br /&gt;เสียงบี๊บยาวๆ หลายครั้งอย่างต่อเนื่อง&lt;br /&gt;(Beep... Beep... Beep... Beep... Beep...) แรมเสียบไม่แน่น หรือหน้าสัมผัสสกปรก&lt;br /&gt;&lt;br /&gt;ไม่มีเสียง... BIOS ล่ม, power supply มีปัญหา, หรือเมนบอร์ดเสีย&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/4873354508538240998/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/4873354508538240998' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/4873354508538240998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/4873354508538240998'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2011/01/beep-code.html' title='เสียง beep code'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1334024809292951947.post-3184379526353327068</id><published>2011-01-18T07:41:00.000-08:00</published><updated>2011-01-18T07:44:56.799-08:00</updated><title type='text'>aStore</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, helvetica, &#39;MS Sans Serif&#39;; line-height: 20px; &quot;&gt;&lt;b&gt;ปัจจัยที่ทำให้ผมขายของได้จาก aStore&lt;/b&gt;&lt;br /&gt;1. การติดหน้าแรกจากการค้นหา ด้วย Google&lt;br /&gt;2. Keyword ที่ใช้ในการค้นหา&lt;br /&gt;3. ความน่าเชื่อถือของร้าน : ว่าด้วยข้อความบนหน้า aStore&lt;br /&gt;4. ความน่าเชื่อถือของร้าน : ว่าด้วย Theme ของ aStore&lt;br /&gt;5. ควมลับที่ค้นพบโดยตั้งใจ... อิอิ&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, helvetica, &#39;MS Sans Serif&#39;; line-height: 20px; &quot;&gt;6. Theme&amp;amp;Trick&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, helvetica, &#39;MS Sans Serif&#39;; line-height: 20px; &quot;&gt;&lt;b&gt;เริ่มที่ข้อ 1&lt;/b&gt; : ส่วนตัวนั้นผมคิดว่าทุกคนคงจะรู้อยู่แล้ว หากจะให้คนเข้าเว็บเราจาก Search Engine คงจะต้องทำให้ติดหน้าแรกให้ได้ จำไว้ครับ หน้าแรกเท่านั้น..จริงๆ&lt;br /&gt;&lt;b&gt;ตามด้วยข้อ 2&lt;/b&gt; : keyword ที่ใช้ในการทำ ppc กับ seo ผมว่ามันก็คือหลักการเดียวกัน Buying Keyword ย่อมมีโอกาสในการขายของได้มากกว่า เช่น sale discount cheap buy แล้วเคยทดสอบไหมครับ ว่าอันไหนคนค้นหาเยอะกว่ากัน ถ้ายังคงต้องไปลองนะครับ&lt;br /&gt;&lt;b&gt;แถมด้วยข้อ 3&lt;/b&gt; : ความน่าเชื่อถือของ aStore มีความสำคัญมากๆครับ ดังนั้นหลายๆท่านที่นำ keyword ไปพิมพ์ซ้ำๆกัน เพื่อเพิ่ม keyword density คงต้องคำนึงให้มากในส่วนนี้ด้วย ส่วนตัวผมแล้วเริ่มต้นผมก็ทำเช่นเดียวกับทุกท่าน แต่ว่าเป็นภาษาอังกฤษที่อ่านรู้เรื่อง คือไม่ใช่ใส่ keyword จนคนเข้าเว็บงงว่านี่มันอะไรวะเนี่ย..  ลองนึกสภาพสมมุติว่าเดินไปร้านมือถือพอเจอหน้าพนักงานขายยังไม่ได้ถามอะไรเลย ก็เข้ามาพูดกับคุณใหญ่เลยว่า &quot;โนเกีย โนเกีย เอ็นเจ็ดศูนย์ เอ็นเจ็ดศูนย์โนเกีย ซื้อโนเกีย โนเกียลดราคา โนเกียมือหนึ่ง โนเกีย เกียโน(มีเล่น miss spell ด้วย) โนกิ โนไก นกไอ โนกิเอ็นเจ็ด โนไกเอ็นเจ็ด นกไอเอ็นเจ็ด&quot; หลังจากนั้นก็จบด้วยว่า &quot;เมื่อคุณจะซื้อเราจะส่งคุณไปที่ อาเมซอนนนนน&quot;  เป็นคุณจะงงมั้ยหละครับ จะกล้าซื้อของร้านนี้ไหม (คงคิดในใจว่า คนขายมันบ้าเปล่าว๊ะะะ ไปซื้อที่ amazon เองก็ได้ไม่เห็นต้อง้อออ)&lt;br /&gt;&lt;b&gt;ตบด้วยข้อ 4&lt;/b&gt; : หน้าตาร้านถือว่าเป็นส่วนหนึ่งที่สำคัญอย่างมาก หลังจากที่ได้ทดสอบดู ร้านที่ปรับแต่ง css กับร้านที่ไม่ปรับแต่ง css ร้านที่แต่งมี order มากกว่าถึง 10% ครับ แต่ใช่ว่าทุก theme จะช่วยให้ร้านเราขายของได้ง่ายขึ้น เราต้องเลือก theme ที่ช่วยส่งเสริมในการขายให้เรา สำหรับ Theme ที่ผมใช้ส่วนใหญ่แล้วขายได้ ผมก็ไป copy มาเขามาใช้แหละ ดูที่ของแถมข้อ 6 แล้วกัน&lt;br /&gt;&lt;b&gt;ปิดท้ายด้วยข้อ 5&lt;/b&gt; : ถึงแม้ว่า aStore จะเป็นร้านที่สร้างโดยระบบของ amazon ก็จริง สำหรับคนที่ตั้งใจจะซื้อของนั้นเขาจำเป็นที่จะต้องเช็คราคาจากหลายๆเว็บด้วยกัน และแน่นอนว่าเมื่อเขาตัดสินใจได้ว่าเขาจะซื้อของที่ amzon เขากลับไม่ซื้อผ่าน aStore ของเรา แต่ไปซื้อกับ amazon.com ซึ่งจุดนี้เราไม่ได้ Commision ใดๆทั้งสิ้น สิ่งสำคัญที่เราต้องทำคือ เมื่อเขาตัดสินใจแล้วว่าจะซื้อของที่ Amazon จะทำยังไงให้เขา Click ผ่าน Link (เราสามารถใส่ได้ที่ Link Back to your page ไรนี่แหละ) ที่เราฝัง tracking-id ของเราไว้เรียบร้อยแล้ว ซึ่งถ้าเกิดเขาเข้าหน้าเว็บด้วยกรณีนี้ เราก็ได้ Commission แน่นอนครับ&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ของแถมสุดวิเศษ&lt;/b&gt;&lt;br /&gt;&lt;b&gt;ลาจากด้วย ข้อ 6&lt;/b&gt; : เข้าไปยัง url ด้านล่างเลยครับ คิดว่ายังอยู่อันดับ 1 นะ ถ้าไม่อยู่แสดงว่าเพื่อนๆ คงหมดบุญแล้ว 5555 ใครเจอก็ขอให้โชคดีนะครับ ในนั้นมีเคล็ดลับบางอย่างมาช่วยทำให้วิธีใน ข้อ 5 สามารถทำเงินให้เราได้มากขึ้น&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, helvetica, &#39;MS Sans Serif&#39;; line-height: 20px; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 20px;&quot;&gt;จากคุณ &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, helvetica, &#39;MS Sans Serif&#39;; &quot;&gt;&lt;b&gt;&lt;a href=&quot;http://forums.thaisem.com/index.php?action=profile;u=977&quot; title=&quot;ดูรายละเอียดของ nonezero&quot; style=&quot;color: rgb(167, 77, 153); text-decoration: none; font-size: 12pt; font-family: Tahoma, helvetica, &#39;MS Sans Serif&#39;; &quot;&gt;nonezero&lt;/a&gt; thaisem&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://knowlege-of-non.blogspot.com/feeds/3184379526353327068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/1334024809292951947/3184379526353327068' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/3184379526353327068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1334024809292951947/posts/default/3184379526353327068'/><link rel='alternate' type='text/html' href='http://knowlege-of-non.blogspot.com/2011/01/astore.html' title='aStore'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11396329016645476635</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>