<?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: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-483315827067728580</id><updated>2011-11-28T06:23:56.663+07:00</updated><category term='hibernate'/><category term='rmi'/><category term='shell script'/><category term='lighttpd'/><category term='jsf'/><category term='javascript'/><category term='java'/><category term='spring framework'/><category term='note'/><category term='pl/sql'/><category term='spring security'/><category term='jsp'/><category term='maven'/><category term='cxf'/><category term='ext js'/><category term='django'/><category term='turbogears2'/><category term='oracle'/><category term='portlet'/><category term='log4j'/><category term='c#'/><category term='liferay'/><category term='activemq'/><category term='annotation'/><category term='nokia5800'/><category term='python'/><category term='html'/><category term='web service'/><category term='richfaces'/><category term='portal'/><category term='windows'/><category term='eclipse'/><category term='ubuntu'/><category term='json'/><category term='jax-ws'/><title type='text'>Kan</title><subtitle type='html'>OpenSource Programmer</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>79</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-6593603025861313384</id><published>2011-07-20T19:15:00.000+07:00</published><updated>2011-07-20T19:15:49.070+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='richfaces'/><category scheme='http://www.blogger.com/atom/ns#' term='spring framework'/><category scheme='http://www.blogger.com/atom/ns#' term='spring security'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>taglib Authorization by spring security on spring3 richfaces4 jsf2</title><summary type='text'>ในส่วน authorization นี้ พูดในเรื่องของ tag ที่ใช้ในการกำหนดสิทธิ บนหน้า web เป็นหลัก โดยต่อยอดมาจากบนความก่อนหน้าในเรื่อง authentication 

authentication by spring security on spring3 richfaces4 jsf2 

สิ่งสำคัญในของหน้าที่ authorization คือ การให้สิทธิ ที่ไม่เท่าเทียมกันของ ผู้เข้ามาใช้ระบบ ซึ่ง บางคนสามารถทำการสร้างลบข้อมูลได้ ส่วนบางคน ควรจะมีหน้าที่ดู เพื่อรับข้อมูลอย่างเดียว เป็นต้น

</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/6593603025861313384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=6593603025861313384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6593603025861313384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6593603025861313384'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2011/07/taglib-authorization-by-spring-security.html' title='taglib Authorization by spring security on spring3 richfaces4 jsf2'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-2797440299454342429</id><published>2011-07-20T18:45:00.001+07:00</published><updated>2011-07-20T18:48:37.830+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='richfaces'/><category scheme='http://www.blogger.com/atom/ns#' term='spring framework'/><category scheme='http://www.blogger.com/atom/ns#' term='spring security'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>authentication by spring security on spring3 richfaces4 jsf2</title><summary type='text'>authentication กล่าวเกริ่นแบบไม่แปลให้งงเล่นได้ว่า ในส่วนของ web หรือ application ที่เราได้สร้างขึ้นมานั้น ส่วนที่ทำให้ระบบเราปลอดภัย และจำกัดผู้ไม่เกี่ยวข้องในการใช้งานอันดับแรกเลยก็คนเป็นเรื่องของการแสดงตัวตนผู้ใช้ที่เข้ามาในระบบนั่นเอง

ในส่วนนี้จะมี library ที่จำเป็น และ ใช้งานได้ง่ายดังนี้ โดยจะขอยกยอดมาจาก เนื้อเรื่อง spring framework บทก่อนๆ  นะครับ </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/2797440299454342429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=2797440299454342429' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2797440299454342429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2797440299454342429'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2011/07/authentication-by-spring-security-on.html' title='authentication by spring security on spring3 richfaces4 jsf2'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-7045715846931381921</id><published>2011-06-24T02:30:00.000+07:00</published><updated>2011-06-24T02:30:10.193+07:00</updated><title type='text'>Hibernate Annotation generate id from oracle function</title><summary type='text'>แก้ไขการ Generate ID จาก ORACLE Sequence มาเป็น เรียก ORACLE Function
แนะนำความต้องทำความรู้จัก Hibernate, Spring Framework เบื้องต้น ก็จะเป็นการดีครับผม 

- spring framework 3 quickstart 
- Spring Framework and Hibernate on Annotation 

เรามาเข้าจุดที่เราสนใจกันจริง ๆ ดีกว่า ในส่วนของ Hibernate Map Class Model กับ Database นั้น 
เราจะมีการเขียน Class ในลักษณะนี้ครับ

โดยในตัวอย่างแรกนี้ </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/7045715846931381921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=7045715846931381921' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7045715846931381921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7045715846931381921'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2011/06/hibernate-annotation-generate-id-from.html' title='Hibernate Annotation generate id from oracle function'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-2930468493797308665</id><published>2011-06-17T12:49:00.001+07:00</published><updated>2011-06-17T12:56:33.613+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>what ? difference for 'Action' and 'ActionListener' in JSF</title><summary type='text'>action จะ return outcome ซึ่งจะมีผลให้ระบบ navigator system ทำงาน
ว่าทำ action นี้แล้วไปที่ view ไหน (โดยดูจาก outcome ) คล้ายๆกับ findforward ใน Struts น่ะครับ

ส่วน actionListener นั้นเป็น event handler จากการทำ action นี้น่ะครับ
ไม่มีการเปลี่ยน view 

อีกอย่าง method signature ของทั้งสองจะต่างกันด้วย โดยตัว method ของ actionListener นั้นจะมี argument ที่เป็น ActionEvent ด้วย เช่น

public void </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/2930468493797308665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=2930468493797308665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2930468493797308665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2930468493797308665'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2011/06/what-difference-for-action-and.html' title='what ? difference for &apos;Action&apos; and &apos;ActionListener&apos; in JSF'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-5969322059395452127</id><published>2011-06-16T19:28:00.001+07:00</published><updated>2011-06-16T19:33:38.882+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>JSF2 and Internationalization</title><summary type='text'>ขอรวบรัดนิดนึงครับ ว่าจะเอา ตัวอย่างมาจากบทก่อน เพื่อแก้เพิ่มเนื่องจากเวลาจำกัด
ให้ดูตัวอย่างเริ่มต้นจากด้านล่างนี้ครับ แล้วเราจะมาเพิ่มเติมกันเลย 

JSF 2.0 and Spring Framework annotation example

เริ่มแรกให้เราไปเพิ่ม locale และ path file properties ให้ app เรารู้จักก่อน โดยไปเพิ่มที่ file
faces-config.xml
&lt;application&gt;
 &lt;locale-config&gt;
  &lt;default-locale&gt;en&lt;/default-locale&gt;
  &lt;supported-locale&gt;</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/5969322059395452127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=5969322059395452127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5969322059395452127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5969322059395452127'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2011/06/jsf2-and-internationalization.html' title='JSF2 and Internationalization'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-8077957165711421573</id><published>2011-05-06T10:56:00.003+07:00</published><updated>2011-06-09T11:14:42.377+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='spring framework'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>JSF 2.0 and Spring Framework annotation example</title><summary type='text'>หลังจากที่เราเรียนรู้ spring ในบทก่อน ๆ กันไปแล้ว มาตอนนี้เราก็มาเพิ่มในส่วนของ user interface กันดีกว่า เหตุผลการใช้คือ ช่วงนี้เค้า ชอบใช้กัน แค่นั้นเอง คือเหตุผลที่เราต้องใช้ -_-" 

ในตัวอย่างที่เขียนนี้เป็นแค่หน้ากรอก ขื่อผู้ใช้เข้ามา แล้วลง ชื่อ และ เวลาที่เข้าใช้ใน database 

จะช้าไปใย เราก็เริ่มกันเลยดีกว่า 
เริ่มจาก create project ในรูปแบบของ web แล้วเราจะได้ โครงสร้าง แล้วเพิ่ม file ต่าง </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/8077957165711421573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=8077957165711421573' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8077957165711421573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8077957165711421573'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2011/05/jsf-20-and-spring-framework-annotation.html' title='JSF 2.0 and Spring Framework annotation example'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-37356603392399990</id><published>2011-05-04T10:10:00.002+07:00</published><updated>2011-05-04T13:30:16.544+07:00</updated><title type='text'>URL Repository Java Maven</title><summary type='text'>my url repository maven for get jar or source
-----------------------------------------------------
http://repo1.maven.org/maven2/
http://repository.jboss.org/nexus/content/groups/public-jboss/
http://download.java.net/maven/2/
http://repo2.maven.org/maven2/
http://download.java.net/maven/2/
-----------------------------------------------------</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/37356603392399990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=37356603392399990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/37356603392399990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/37356603392399990'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2011/05/url-repository-java-maven.html' title='URL Repository Java Maven'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-3021413052366790789</id><published>2011-04-26T10:59:00.002+07:00</published><updated>2011-04-26T11:15:33.241+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jax-ws'/><category scheme='http://www.blogger.com/atom/ns#' term='web service'/><category scheme='http://www.blogger.com/atom/ns#' term='spring framework'/><category scheme='http://www.blogger.com/atom/ns#' term='annotation'/><title type='text'>Spring Framework and Web Service JAX-WS on Annotation</title><summary type='text'>หลังจากที่เราได้รู้เรื่องการติดต่อ Database กับไปแล้วจากบทนี้

Spring Framework and Hibernate on Annotation

ตอนนี้เราก็มารู้เรื่องเกี่ยวกับ Web Service กันต่อเลย แต่จะย่อหน่อย เป็นตัวอย่าง
เพราะจริง ๆ ก็เขียนอยู่แค่นี้เอง 

ProjectCheckListWS.java
package th.go.nhso.projecttracking.webservice.service;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/3021413052366790789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=3021413052366790789' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3021413052366790789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3021413052366790789'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2011/04/spring-framework-and-web-service-jax-ws.html' title='Spring Framework and Web Service JAX-WS on Annotation'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-7294715790580023868</id><published>2011-04-26T10:25:00.003+07:00</published><updated>2011-04-26T10:44:56.153+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='spring framework'/><category scheme='http://www.blogger.com/atom/ns#' term='annotation'/><title type='text'>Spring Framework and Hibernate on Annotation</title><summary type='text'>แปลกใจตัวเองไม่ได้เขียนอันนี้ขึ้นมา ทั้งที่น่าจะใช้บ่อย Spring Framework และ Hibernate config on Annotation
แต่เอาเหอ ถึงจะขี้เกียจนิดหน่อย แต่มาเริ่มกันดีกว่า ว่าจะทำอะไรก่อนดี บทนี้น่าจะต่อจาก

Java Spring framework 3 Quickstart

แต่ในบทนี้จะไม่พูดถึงเรื่อง coltroller จะพูดเรื่อง ผูก service hibernate กับ spring เป็นหลัก 
อันดับแรก ให้สร้าง Web Project หรือ Java Web Application ด้วย Netbean </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/7294715790580023868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=7294715790580023868' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7294715790580023868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7294715790580023868'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2011/04/getstart-spring-framework-and-hibernate.html' title='Spring Framework and Hibernate on Annotation'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-1160382651599557555</id><published>2011-03-30T19:27:00.003+07:00</published><updated>2011-03-30T20:13:25.352+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='jsp'/><category scheme='http://www.blogger.com/atom/ns#' term='json'/><title type='text'>Convert Object array To JSON List  (support JDK 1.4)</title><summary type='text'>-ตัวอย่าง code นี้ทำขึ้นเพื่อ นำไปใส่บน  JSP เนื่องจาก การนำ library JSON ที่เป็น file javascript (.js) หรือ java file (.java) ที่มีอยู่ทั่วไป แล้วดีอยู่แล้วไปไว้นั้น เป็นเรื่องยุ่งยาก ณ ตอนนี้ และ อีกอย่างคือ ไม่มีสิทธิในการ restart Server ด้วย จึงจำเป็นต้องเขียนกันตรงนั้นเลย จึงทำขึ้นมาเองวางเอง เ้น้นง่าย เรียก library ต่าง ๆ ให้น้อยที่สุด แต่เขียนให้ดูง่ายที่สุดเช่นกัน 

-จุดประสงค์หลัก </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/1160382651599557555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=1160382651599557555' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1160382651599557555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1160382651599557555'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2011/03/convert-object-array-to-json-list.html' title='Convert Object array To JSON List  (support JDK 1.4)'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-7126944305529857019</id><published>2011-02-02T10:34:00.001+07:00</published><updated>2011-03-31T16:22:17.132+07:00</updated><title type='text'>ซินเจียยู่อี่ ซินนี้ฮวดใช้ 万事如意 新年发财 (2011/02/02)</title><summary type='text'>ปีใหม่ขอให้ทุกอย่าง สมหวัง ปีใหม่ขอให้ร่ำรวย
มีโชคลาภ ร่ำรวย เงินทอง สุขภาพแข็งแรงสมบูรณ์สวยงาม
จิตใจสดชื่นแจ่มใส การงานเจริญก้าวหน้ามั่นคง
มีคนรักและอุปถัมป์ค้ำชูมากมาย ทุกสิ่งเป็นไปดั่งใจสมปารถนา

祝：春 节 快 乐，
万 事 如 意 ，恭 喜 发 财！
身 体 健 康，合 家 欢 乐！

恭喜发财 กงสี่ฟาไฉ..ขอให้ร่ำรวย
万事如意 ว่านซื่อหยูอี้ ....สมความปรารถนา
财源广进 ไฉเหยียนกว่างจิ้น...เงินทองไหลมา
年年有余 เหนียนเหนียนโหย่วหยวี๋..เหลือกินเหลือใช้
</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/7126944305529857019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=7126944305529857019' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7126944305529857019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7126944305529857019'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2011/02/20110202.html' title='ซินเจียยู่อี่ ซินนี้ฮวดใช้ 万事如意 新年发财 (2011/02/02)'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-861946895532842100</id><published>2010-11-17T12:13:00.001+07:00</published><updated>2010-11-17T12:17:31.290+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='log4j'/><title type='text'>Add header on config for log4j</title><summary type='text'>วิธีการเพิ่ม header ให้กับ log file ของ log4j เจอตัวอย่างมา
ก็เลยไปไล่ดู สรุป มันมี get header อยู่แล้วให้ทำการ overwrite มัน
ก็จะได้ประมาณนี้

//-------------- ex -------------------
public class MyPatternLayout extends PatternLayout {
    public MyPatternLayout() {
        super();
    }

    public String getManualHeader(){
        StringBuffer buf = new StringBuffer();
        buf.append(" ==</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/861946895532842100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=861946895532842100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/861946895532842100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/861946895532842100'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/11/add-header-on-config-for-log4j.html' title='Add header on config for log4j'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-6102037769009066483</id><published>2010-10-06T10:17:00.000+07:00</published><updated>2010-10-06T10:17:00.572+07:00</updated><title type='text'>special charactor for html</title><summary type='text'>✎✟ஐ ≈ ✲ ❈ ➹ ҳ̸Ҳ̸ҳ ☀☂☁【】┱ ┲ ❣ ✚ ✪ ✄ ☪ ☣ ☢ ☠ ☭ ♈ ➸ ✓ ✔ ✕ ✖ ∷ ღ ☃ ❆ ￡∆ Š Õεїз Ő ő ∞ © ‡ † ☆ ★♀♂♫ ♬ ♪ ♩ ♭ ♪ o O ＃ ♀♂ √ ╮╭ ╯╰ ァ ┱ ┲-─
-─═┳︻∝╬══→┠♥:: ======&gt;&gt;　┈━═☆　(*)·´`·.¸.»┣▇▇▇═─ .:* «-(¯`v´¯)«-- ..·.¸¸·´¯`·.¸¸.ஐ ..¤¸¸.·´¯`·.¸·.&gt;&gt;--» ‧ °º¤ø,¸¸,ø¤º°`°º¤ø•.★*... ...*★.•━══━

Letters
άåαÀẵ ÄªäÅÄÀÁặ βвБ฿вß Ç℃© כċς δÐđ ḗέәЕỀỂ℮ēềёξè ғ₣₣ƒſfƒ Ĝġģ ђЂҢĤĥħ їίÎĮįι ĴĵјЈĴ ĵj ķĶҚķĸκ Ļ₤ℓł£łḺĽ м ηйиή ๐ØΘỢỔổǿΦõō●ớσ </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/6102037769009066483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=6102037769009066483' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6102037769009066483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6102037769009066483'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/10/special-charactor-for-html.html' title='special charactor for html'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-5045625013882672550</id><published>2010-09-29T17:42:00.000+07:00</published><updated>2010-09-29T17:42:20.837+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='javascript'/><title type='text'>how to check "undefined" on javascript</title><summary type='text'>undefined คือค่าที่ javascript ไม่สามารถกำหนดได้ 
คือไม่ได้มีค่ากำหนดมา แล้วอยู่ ๆ เราก็ดึกมาใช้งาน 
มีวิธีเช็ค โดยใช้คำสั่งดังนี้

if(typeof(value) !== 'undefined') {
    // command...
}

//or 
if (typeof(value) === "undefined"){
    // command...
}
</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/5045625013882672550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=5045625013882672550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5045625013882672550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5045625013882672550'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/09/how-to-check-undefined-on-javascript.html' title='how to check &quot;undefined&quot; on javascript'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-5422330576443587179</id><published>2010-09-26T05:44:00.002+07:00</published><updated>2010-09-26T05:45:55.196+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='liferay'/><category scheme='http://www.blogger.com/atom/ns#' term='portlet'/><category scheme='http://www.blogger.com/atom/ns#' term='portal'/><title type='text'>Get start liferay tomcat on eclipse</title><summary type='text'>เอาหละ เรื่องง่าย ๆ ของการ develop web ก็มาถึงซะที เมื่อ user ขี้จุกจิก ต้องการเปลี่ยน content ไป ๆ มา ๆ 
เราเลยได้พบกับอะไรที่มันง่ายขึ้น สามารถให้ user ปรับแต่งเองได้ (จริง ๆ แล้ว user ต้องการ เหอ ๆ เราเลยต้องเรียนรู้ซะหน่อย)

แล้วไอ้เจ้า portal คืออะไรหว่า ? 
เป็น web site ที่ผู้ใช้สามารถที่เข้าถึงข้อมูลข่าวสารต่างๆได้อย่างรวดเร็ว โดยที่ portal จะคำนึงถึงผู้ใช้เป็นศูนย์กลาง </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/5422330576443587179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=5422330576443587179' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5422330576443587179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5422330576443587179'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/09/liferay-tomcat-on-eclipse.html' title='Get start liferay tomcat on eclipse'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-1280453498009671342</id><published>2010-08-31T15:02:00.000+07:00</published><updated>2010-08-31T15:02:56.157+07:00</updated><title type='text'>start css</title><summary type='text'>CSS คืออะไรอ่า ??? 
ว่าแต่จริง ๆ เขียนบทความนี้ค่อนข้างเก่า 
แต่จำเป็นอย่างมากสำหรับ web ต่าง ๆ นา ๆ 
ก็เลยเขียนไว้เล่น ๆ ขึ้นดีฟ่า 
ใหน ๆ ก็ไม่รู้จะเขียนอะไรมานานมากมายแล้ว 
ให้ blog ขยับบ้าง เล็ก ๆ น่ารัก ๆ 

CSS คือ ?
-Cascading Style Sheets &lt;&lt; เฮ้ย นี่ไม่ใช่ "คือ" นี่มันชื่อเต็ม 
 -_-" 
-เอาเป็นว่า มันใช้ในการกำหนด style ให้กับ web ของเรา 
แล้วดีอย่างไงหรอ ก็ดีตรงที่ เรากำหนด รูปแบบ กับ web </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/1280453498009671342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=1280453498009671342' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1280453498009671342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1280453498009671342'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/08/start-css.html' title='start css'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-5401361141864021731</id><published>2010-07-28T13:39:00.001+07:00</published><updated>2010-07-28T13:44:06.934+07:00</updated><title type='text'>design database for item product</title><summary type='text'>เคยได้ทำการเขียนโปรแกรมที่ทำการซื้อขาย จัดการ หรือ ERP แล้วไม่เคย สะดุดใจเลยว่าราคาเป็นส่วนหนึ่งของ product 
รูปร่างหน้าตาการ design เลยออกมาแบบนี้

---------------------------------
PRODUCT
---------------------------------
id
name
detail
color    &lt;&lt; optional
size      &lt;&lt; optional
width   &lt;&lt; optional
height  &lt;&lt; optional
barcode
type    &lt;&lt; type_id
buy_price
sale_price
create_datetime
create_by
</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/5401361141864021731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=5401361141864021731' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5401361141864021731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5401361141864021731'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/07/design-database-for-item-product.html' title='design database for item product'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-844266408046176384</id><published>2010-07-27T17:10:00.006+07:00</published><updated>2010-07-27T17:52:34.214+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>visual c# diff java</title><summary type='text'>อ่าว ไหง ออกมา .net ได้เนี่ย แต่มิใช่ปัญหาเลยเมื่อมองลองดูเนื้อภาษากันจริง ๆ แล้วสำหรับคนที่เคยเขียน java จะบอกว่า
เขียนแทบจะเหมือนกัน และด้วย concept oop ที่แน่นมากทำให้ลักษณะ และคุณสมบัติ ของทั้ง สองภาษานี้ เหมือนกันเลย 
แล้วที่ต่างกันอะ น่านสิ ลองดูเล่น ๆ กันดีกว่า

อย่างแรกเลยคงเป็น package หรือลำดับการเข้าถึง
java : เนื่องด้วยการเก็บ file ไว้ใน folder จริงทำให้มีการอ้างถึงตาม folder ที่อยู่
</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/844266408046176384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=844266408046176384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/844266408046176384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/844266408046176384'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/07/visual-c-test.html' title='visual c# diff java'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-4120090137590220961</id><published>2010-07-27T12:23:00.001+07:00</published><updated>2010-07-27T13:08:01.216+07:00</updated><title type='text'>python solution for of for of for</title><summary type='text'>อ่า หัวข้องง ๆ กันเลยทีเดียว
หลายคนคงเคยเจอกันแล้ว ที่ มีการวน loop ซ้อน loop ซ้อน loop
มันจะเป็นประมาณนี้ ให้นำแต่ละตัวมารวมกัน ใส่อีก list นึง

l1 = ['www', 'wap']
l2 = ['google', 'yahoo', 'gmail']
l3 = ['com', 'co.th']

list = []
for i in l1:
    for j in l2:
        for k in l3:
            list.append('http://%s.%s.%s' %(i, j, k))

print list

ผลลัพท์
['http://www.google.com', 
'http://</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/4120090137590220961/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=4120090137590220961' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/4120090137590220961'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/4120090137590220961'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/07/python-solution-for-of-for-of-for.html' title='python solution for of for of for'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-9052090939216682020</id><published>2010-07-27T11:51:00.001+07:00</published><updated>2010-07-27T11:53:03.488+07:00</updated><title type='text'>SyntaxHighlighter include link for blog</title><summary type='text'>  



 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf';
SyntaxHighlighter.all();


</summary><link rel='related' href='http://alexgorbatchev.com/SyntaxHighlighter/' title='SyntaxHighlighter include link for blog'/><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/9052090939216682020/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=9052090939216682020' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/9052090939216682020'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/9052090939216682020'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/07/syntaxhighlighter.html' title='SyntaxHighlighter include link for blog'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-5849467610579863445</id><published>2010-05-12T11:37:00.012+07:00</published><updated>2011-05-18T15:21:23.107+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rmi'/><category scheme='http://www.blogger.com/atom/ns#' term='spring framework'/><title type='text'>rmi remote client on spring framework by annotation</title><summary type='text'>หลังจากที่ได้ทำ service server rmi ไปแล้ว เราก็ไปทำที่ client บ้างดีกว่า concept
จะต่างกับ server นิดหน่อยคือ service มีกี่ service ก็จะประกาศเท่าจำนวน แต่ clinet
นั้นเนื่องจากเราเอา Annotation ไปแปะไว้ตอนเรียกที่ต่าง ๆ ทำให้เราต้องมีการ check
ก่อนว่า service ที่เราเรียกนั้น มันเคยถูกประกาศไว้หรือยัง ฟังแล้วอาจงง ไปเริ่มดีกว่า

บทความก่อนหน้า 
rmi remote server on spring framework by annotation 
</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/5849467610579863445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=5849467610579863445' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5849467610579863445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5849467610579863445'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/05/rmi-remote-client-on-spring-framework.html' title='rmi remote client on spring framework by annotation'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-8922990711273219051</id><published>2010-05-12T11:07:00.005+07:00</published><updated>2011-05-18T15:19:08.910+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rmi'/><category scheme='http://www.blogger.com/atom/ns#' term='spring framework'/><title type='text'>rmi remote server on spring framework by annotation</title><summary type='text'>rmi คือ การ remote service ข้ามเครื่องวิธีหนึ่ง ส่วนใหญ่จะใช้ในกรณีแยก service ออกจาก interface เพื่อ

1. ความปลอดภัย คือ ทำให้สามารถควบคุมการเข้าถึง การเรียกใช้ และการดึงข้อมูลที่สำคัญ หรือเป็นความลับ 
รวมถึงการกำหนดข้อจำกัดต่าง ๆ

2. การทำเป็น service กลาง ซึ่งทำให้ไม่ต้องเขียน service ขึ้นมาใหม่บ่อย ๆ ในรูปแบบงานที่คล้าย ๆ กันเกิดขึ้นใหม่ 
และเป็นการแยก interface ทำให้สามารถ แก้ไข หรือ </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/8922990711273219051/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=8922990711273219051' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8922990711273219051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8922990711273219051'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/05/rmi-remote-server-on-spring-framework.html' title='rmi remote server on spring framework by annotation'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-3217483563137256368</id><published>2010-05-11T11:25:00.002+07:00</published><updated>2010-05-11T13:27:00.478+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note'/><title type='text'>note_2010-05-11</title><summary type='text'>11:25
เช้าวันนี้ก็มาทำงานตามปกติ แต่ปลั๊กกลับไม่มีไฟซะงั้น กว่าจะใช้ได้ก็ 9:30 น

ได้เห็นเกมส์ StarCraft 2 แล้วก็อยากกลับไปเล่นอีกที ^^'

วันนี้ก็มาทำ RMI เป็น Annotation บน Spring Framework กันต่อ ทำไปก็งงไป 
แกะจากพี่ไวท์อีกที ในฝั่ง server แกะโครงมาได้และ ยังไม่ได้ test เพราะ
รอในส่วน client ที่กำลังทำเนีี่ยแหละ ว่าแต่ concept ต่างกันนิดหน่อย -_-'
แต่คงต้องรีบทำให้เสร็จภายในอาทิตย์นี้สินะ </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/3217483563137256368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=3217483563137256368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3217483563137256368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3217483563137256368'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/05/note11-05-2010.html' title='note_2010-05-11'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-8679942163753995528</id><published>2010-05-06T10:09:00.004+07:00</published><updated>2011-05-18T15:28:48.974+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='spring framework'/><category scheme='http://www.blogger.com/atom/ns#' term='cxf'/><title type='text'>java web-service with cxf(2.2.7) on spring framework</title><summary type='text'>ตกลงก็มามอง cxf ในการทำ web-service ทั้ง client และ server เพราะความง่าย อะอย่างพล่ามมากเลย เริ่มดีกว่า
เราก็ต้อง create project เป็น web อยู่แล้ว ในที่นี้ก็คงต้องเดินไปหา 
project/WebContent/WEB-INF/web.xml แล้วก็ละเลงตามนี้
&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;!-- display-name&gt;Test1

    Auth Manager

    
        contextConfigLocationclasspath:com/company/auth/service/cxf.xml
    
        </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/8679942163753995528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=8679942163753995528' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8679942163753995528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8679942163753995528'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/05/java-web-service-with-cxf227-on-spring.html' title='java web-service with cxf(2.2.7) on spring framework'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-6528362271762042925</id><published>2010-05-06T09:30:00.012+07:00</published><updated>2011-05-18T15:30:34.233+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='spring framework'/><title type='text'>java spring framework 3 quickstart</title><summary type='text'>ในส่วนนี้จะเป็นการทบทวนเล็ก ๆ เนื่องจากห่างไปสักพัก กับ java spring framework
สำหรับผู้ที่ยังไม่มีประสพการณ์แนะนำอ่าน Servlet, JSP ก่อนเลยนะเพราะต่อยอดมาครับ

ขั้นแรกก็คงมิพ้น file 
project/WebContent/WEB-INF/web.xml
&lt;?xml version="1.0" encoding="UTF-8"?&gt;

    TestJsp
    
        contextConfigLocationclasspath:conf/applicationContext.xml
    
        </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/6528362271762042925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=6528362271762042925' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6528362271762042925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6528362271762042925'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/05/java-spring-framework-3-quickstart.html' title='java spring framework 3 quickstart'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-6506381588428588986</id><published>2010-02-10T16:27:00.006+07:00</published><updated>2010-05-12T15:52:29.169+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='turbogears2'/><title type='text'>Turbogears2 How to receive Data on MIME</title><summary type='text'>ในส่วนนี้ เกิดขึ้นจากปัญหาการรับ request data ที่ได้จากข้อมูลสองชุด ลักษณะข้อมูลที่ได้จาก body


#Example data 1
#-------------------------------------------------

--sendReport@sdgs:8I50nM01
Content-Type: text/xml; charset=utf-8
Content-Transfer-Encoding: binary
Content-ID: 

...data xml format string...
--sendReport@sdgs:8I50nM01
Content-Type: application/x-gzip
Content-Transfer-Encoding: </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/6506381588428588986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=6506381588428588986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6506381588428588986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6506381588428588986'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/02/turbogears2-how-to-receive-data-on-mime.html' title='Turbogears2 How to receive Data on MIME'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-8428955951733244314</id><published>2010-02-10T15:22:00.004+07:00</published><updated>2010-05-12T15:55:12.867+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='turbogears2'/><title type='text'>Turbogears2 Basic receive Data</title><summary type='text'>ในส่วน turbogears2 นั้นถ้าเราเขียน method รับ request จะมีหน้าตาแบบนี้

@expose()
def func(self, *arg, **kw):
    pass

นี่คือหน้าตาปกติ โดยที่

self เป็นตัวแปรที่ทำหน้าที่แทน class controller ปัจจุบัน

*arg จะเป็น data ต่อจาก url เช่น
url = http://localhost:8080/func/a/b/c
*arg = ['a', 'b', 'c']
**kw จะเป็น name, value เช่น
url = http://localhost:8080/func?a=12&amp;b=13&amp;c=14
**kw = {'a':12, 'b':13, </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/8428955951733244314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=8428955951733244314' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8428955951733244314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8428955951733244314'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/02/turbogears2-basic-receive-data.html' title='Turbogears2 Basic receive Data'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-1087798855317695449</id><published>2010-01-13T14:28:00.000+07:00</published><updated>2010-01-13T15:58:40.481+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Python convert Python syntax color to HTML</title><summary type='text'>หัวข้อนี้น่าสนใจมากครับ สำหรับคนทำ Blog หรือ Web ที่นำเสนอ Code Python 
อยากเสนออย่างรุนแรง อาจเป็นเรื่องเก่านะครับ แต่นำมาเล่าใหม่

เพราะเจ้าของ Blog ส่วนใหญ่ที่เรา ๆ เขียนกันนั้น ถ้าเป็น Code Python กันแล้ว
ก็จะมีการนำเสนอ โดยการเขียน code ลงไปใน Blog กับแบบนี้


&lt;code&gt;
&lt;pre&gt;
list = ['a', 'b', 'c', 'd']
r = ''
i = 1
for l in list:
    r = i == len(list) and '%s%s' %(r, l) or '%s%s, ' %(r, l)
</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/1087798855317695449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=1087798855317695449' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1087798855317695449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1087798855317695449'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/01/python-convert-python-syntax-color-to.html' title='Python convert Python syntax color to HTML'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-3258469322017558965</id><published>2010-01-13T12:18:00.001+07:00</published><updated>2010-05-12T15:36:07.620+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python for loop check islast</title><summary type='text'>คงเคยเจอกันบ่อยแล้วนะครับ สำหรับ Develop ทุกท่าน ที่ต้องมานั่งเขียน loop 
แล้วต้องเช็คว่า ถ้าเป็นข้อมูลสุดท้าย ให้ใส่ข้อแม้เพิ่ม หรือปิด ท้ายด้วยอะไรสักอย่าง

ถ้าเป็น code ปกติ เราก็จะเขียนอะไรบางอย่างเพื่อนให้รู้ว่าเป็นข้อมูลสุดท้ายของ list นั้น ๆ 

ข้อมูลมีว่า
list = ['a', 'b', 'c', 'd']

ว่าจะเขียนถึง z เอาเป็นว่าไร้สาระ แค่ยกตัวอย่าง ไม่ต้องมากขนาดนั้น
ก็เลยสงสัยจริง ๆ ว่าคนที่ทำ How to </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/3258469322017558965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=3258469322017558965' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3258469322017558965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3258469322017558965'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/01/python-for-loop-check-islast.html' title='Python for loop check islast'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-6587101470011829802</id><published>2010-01-08T12:45:00.001+07:00</published><updated>2010-05-12T15:40:01.745+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python list to string on comma ','</title><summary type='text'>ตอนนี้กระผมเริ่มไม่รู้จะเขียนอะไร 555+ 
คือนึกมุขเท่ ๆ ไม่ค่อยออก ไม่ค่อยอยากเขียน tutorial เท่าไร
มันดูซ้ำกับชาวบ้าน และก็ใน web หลัก ๆ ของ Python ก็แทบจะบอกซะหมดแล้ว
เขียนไปก็เปลืองพื้นที่ชาวบ้านเปล่า ๆ ให้เค้าเอาไว้เตะตะกล้อดีกว่า งึม ๆ 
แล้ววันนี้จะนำเสนออะไรดีอะเนี่ย เอาเป็นแนวคิดในการเขียน เล่น ๆ ดีกว่า
ว่าแล้วก็มาใช้สมองอันน้อยนิดกัน

เริ่มจาก มี Logic ที่ว่า ต้องการเอาข้อมูล list </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/6587101470011829802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=6587101470011829802' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6587101470011829802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6587101470011829802'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2010/01/python-list-to-string-on-comma.html' title='Python list to string on comma &apos;,&apos;'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-1756479312500855296</id><published>2009-10-23T04:30:00.002+07:00</published><updated>2010-05-12T15:43:16.266+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python send mail email e-mail</title><summary type='text'>วันนี้ได้ไปเล่นกับ blog ของ นายบอส มามีในส่วนการส่งเมล์ เผอิญที่เป็นเป็น รูปแบบธรรมดา
ยาว ๆ เลยขอมาจับแยกให้ดูดีขึ้น แต่ยังไม่ได้ test เลย คือเอามาแปลงอย่างเดียว
เดี๋ยวถ้าว่าง ๆ จะมาประกอบและ test ใหม่ 

ตอนนี้ง่วงมาก ๆ เลย Z z z z . . .

อ้างอิงจาก : http://bluegear.wordpress.com/2009/10/20/email-attach-file-with-python/#comment-32

import smtplib
from email.mime.multipart import MIMEMultipart
</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/1756479312500855296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=1756479312500855296' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1756479312500855296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1756479312500855296'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/10/python-send-mail-email-e-mail.html' title='Python send mail email e-mail'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-8928442540121338575</id><published>2009-10-21T19:49:00.001+07:00</published><updated>2010-05-12T15:48:06.294+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python lambda</title><summary type='text'>lambda ในภาษา python นับเป็นเครื่องอำนวยความสะอาดอย่างหนึ่ง
คือ ทำให้เราสามารถ ย่น code ที่ไม่มีอะไรซับซ้อน ได้ ทำให้
การอ่าน code เป็นไปอย่างสบายตา แต่ไม่ใช่ว่าต้องใช้ทุกครั้งไปนะครับ
ดูที่ความเหมาะสม 

จริง ๆ แล้วก็เป็นเหมือนการเขียน function ที่ไม่ซับซ้อนให้อยู่
ในบรรทัดเดียว

ตัวอย่าง ถ้าเราเขียน function ขึ้นมาอย่างหนึ่ง
ใช้หาเลขคู่ ก็จะได้ประมาณนี้
a = [1, 2, 3, 4]
ab = []
for b in a:
    </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/8928442540121338575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=8928442540121338575' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8928442540121338575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8928442540121338575'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/10/python-lambda.html' title='Python lambda'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-4323122275972334838</id><published>2009-09-10T18:41:00.000+07:00</published><updated>2009-09-10T20:08:39.350+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><category scheme='http://www.blogger.com/atom/ns#' term='turbogears2'/><title type='text'>run turbogears2 on eclipse</title><summary type='text'>และแล้วก็ต้องหันหน้ามาใช้ eclipse อีกเช่นเคย หลังจากห่ายหายจากการเขียน Javaไปสักพัก คราวนี้เกิดอะไรขึ้นทำไมต้องใช้ eclipse ก็เนื่องจาก javascript นี่สิที่เป็นปัญหา ต้องยอมรับว่า tool ฟรี หาได้บน eclipseจริง ๆ ใช้ JSLint ในการ validate javascript syntax แล้ว project ที่ใช้ก็คือ Turbogears2 เอาไงดี ใหน ๆ ก็พี่งพา tool ระดับเทพนี้แล้วก็ต้องใช้ให้มันคุ้มกับความหน่วง เลยไปเจอวิธีมา ว่าจะ run project </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/4323122275972334838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=4323122275972334838' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/4323122275972334838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/4323122275972334838'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/09/run-turbogears2-on-eclipse.html' title='run turbogears2 on eclipse'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-6457522896630434289</id><published>2009-09-10T12:10:00.000+07:00</published><updated>2009-09-10T18:41:06.157+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ext js'/><title type='text'>Basic Ext JS</title><summary type='text'>เป็น Web Template ที่ผสานระหว่าง Html(CSS + DOM) + Javascript โดน site หลักอยู่ตามนี้ครับExt JSข้อดีคือ สามารถ แยกในส่วนที่เป็น server site และ client site ได้ขาดจากกันจริง ๆและให้ client site ทำการติดต่อกับ server site ได้โดย Ajax ที่รองรับทั้งJSON และ XML ทำให้ Web ดูรายรืนและเนียรจริง ๆ ตามนี้ไปก่อนนะครับ เดี๋ยวมาแกะใส่ทีละอันครับTutorial:Ext StartUp Guide (Thai)Tutorial:Introduction to Ext </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/6457522896630434289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=6457522896630434289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6457522896630434289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6457522896630434289'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/09/basic-ext-js.html' title='Basic Ext JS'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-6419953369154822623</id><published>2009-09-09T10:18:00.000+07:00</published><updated>2009-09-09T12:13:20.026+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pl/sql'/><title type='text'>Basic PL/SQL</title><summary type='text'>จนแล้วจนรอด programmer ก็ต้องเขียน SQL อันนี้ง่ายถูไถ ไปเรื่อยก็รอด แต่พอมาเป็น Database ของ Oracle แล้วนี้ มันปวดใจจริง ๆ กับ PL/SQL ทำไมต้องมาเขียน program สองที่หว่าแต่เอาเป็นว่า เอ่อ เขียนก็เขียนเพราะงานมันก็คนละแบบจริง ๆ ครับ โครงสร้างภาษา PL/SQL[ DECLARE &lt;&lt; ประกาศตัวแปร ถ้าไม่มีไม่ต้องใส่ก็ได้]  BEGIN &lt;&lt; เริ่ม process[ EXCEPTION &lt;&lt; ประกาศการจัดการกับ Error ถ้าไม่มีไม่ต้องใส่ก็ได้]END; &lt;&lt; จบ</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/6419953369154822623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=6419953369154822623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6419953369154822623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6419953369154822623'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/09/basic-plsql.html' title='Basic PL/SQL'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-3568996432828750043</id><published>2009-08-31T02:20:00.000+07:00</published><updated>2009-08-31T03:29:30.614+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><title type='text'>install django on windows</title><summary type='text'>ในที่สุดก็ลองมาจับ django (web framework ทางฝั่งพี่ python) หลังจากที่จับ turbogear อยู่นานประมาณนึงครับ ใจริงก็ยังเป็นสาวก Turbogear อยู่น้าาาาวันนี้ก็ลองเล่น ๆ ดู ครับ จะพยายามจริง ๆ ก็ recommend ให้ลงบน linux เพราะมันทำมาเพื่อสิ่งนั้น แต่ developer ไทยน้อยคนคงใช้ linux บนเครื่องส่วนตัว ที่ทำงาน เนื่องจาก มันเอาไว้เล่นเกมส์ไม่ได้ !!! ไม่เกี่ยว คือมันเปิด และจัดการงานเอกสาร๖(เช่น Word, Excell)</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/3568996432828750043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=3568996432828750043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3568996432828750043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3568996432828750043'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/08/install-django-on-windows.html' title='install django on windows'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-2745512741636805949</id><published>2009-08-26T02:12:00.001+07:00</published><updated>2010-05-12T16:03:23.183+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>java batch list model</title><summary type='text'>ตัว java class model ตัวนี้ เขียนขึ้น เนื่องจากเกิดปัญหา การเก็บข้อมูลเป็น list โดยแต่ละ
list มีหัวข้อคนละชุด งงหละสิ 
ถ้ามองก็คล้าย database ครับ(จริง ๆ ก็ทำเพื่อสิ่งนั้น)
คือ ผมมีข้อมูล 
A ประกอบไปด้วย A1, A2, A3, - A10
B ประกอบไปด้วย Ba, Bb, Bc, Bd, - Bz
C ประกอบไปด้วย Ca2, Ca4, Ca8, Cb2, Cb4, Cb8
คร่าว ๆ ประมาณนี้

แล้วถ้าผมอยู่ ๆ ต้องการเพิ่ม 
D ประกอบไปด้วย ก, ข, ค, ง, - ฮ

แล้วต้องการลบ A </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/2745512741636805949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=2745512741636805949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2745512741636805949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2745512741636805949'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/08/java-batch-list-model.html' title='java batch list model'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-7592760758808603142</id><published>2009-08-25T22:07:00.004+07:00</published><updated>2011-05-09T15:15:40.114+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Java for loop list &amp; map ,Python for loop array &amp; map</title><summary type='text'>ในส่วนของการเขียน program นั้น ย่อมต้องมีเรื่องการอ่าน data มากมายเข้ามาเกี่ยวข้องเป็นธรรมดา
ถ้าเป็นเรื่อง List การวนดึงข้อมูลก็คงไม่ใช่เรื่องยุ่งยาก แต่สำหรับ ดังตัวอย่าง
List&lt;String&gt; strList = new LinkedList&lt;String&gt;();
strList.add("comment1-hi,");
strList.add("comment2-i");
strList.add("comment3-am");
strList.add("comment4-Programmer");

for(String str : strList){
    System.out.println(" &gt;&gt; " </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/7592760758808603142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=7592760758808603142' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7592760758808603142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7592760758808603142'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/08/java-for-loop-list-map-python-for-loop.html' title='Java for loop list &amp; map ,Python for loop array &amp; map'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-844674004724104047</id><published>2009-08-07T13:57:00.000+07:00</published><updated>2009-08-07T14:17:50.668+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>ubuntu auto script startup</title><summary type='text'>หลายคนที่เกี่ยวข้องกับ server นั้น จะเจอปัญหาที่ว่า เวลาที่เครื่อง server down ไปเนื่องจากสาเหตุอะไรก็แล้วแต่คนดูแลนั้น ก็จะต้องมานั่ง start service ทีละตัวๆ  แต่ถ้าวันนั้น มีการ down server บ่อยก็ต้องมานั่งทำงานซ้ำ ๆ แบบนี้หลายรอบ พาลจะทำให้หลุดได้ ในกรณีที่มี application มากมายก่ายกอง บนนั้นในส่วนของ ubuntu หากเราต้องการให้ เมื่อ server มีการ run process ที่เราต้องการ ในตอนที่ server มีการ </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/844674004724104047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=844674004724104047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/844674004724104047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/844674004724104047'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/08/ubuntu-auto-script-startup.html' title='ubuntu auto script startup'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-70403453678617850</id><published>2009-08-05T19:11:00.001+07:00</published><updated>2010-05-12T16:16:39.367+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>datetime python</title><summary type='text'>ในส่วนนี้จะเป็นตัวอย่างเกี่ยวกับการใช้ datetime ใน python ซึ่งเราจะพบเจอบ่อยมาก

ตัวอย่าง

1.การดึงเวลาปัจจุบัน ของเครื่องขณะนั้น
from datetime import datetime
&gt;&gt;&gt; now = datetime.now()
&gt;&gt;&gt; now
datetime.datetime(2009, 8, 5, 19, 9, 47, 870000)

เรียงลำดับ ก็ได้ได้เป็น 
(2009, 8, 5, 19, 9, 47, 870000)
(ปี, เดือน, วัน, ชั่วโมง, นาที, วินาที, หน่วยที่น้อยกว่า วินาที)

2.การแปลงจาก datetime ให้อยู่ใน </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/70403453678617850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=70403453678617850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/70403453678617850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/70403453678617850'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/08/datetime-python.html' title='datetime python'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-6369836775476790910</id><published>2009-07-30T03:49:00.001+07:00</published><updated>2010-05-12T16:19:19.754+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python encode decode hex string example</title><summary type='text'>วันนี้ลองหยิบ code ในการเข้ารหัสตัวอักษร ไว้สำหรับทำงาน, ส่ง parameter 
หรือใช้ทำอะไรอีกต่าง ๆ มามายให้ดูกันครับ

งานส่วนใหญ่ที่ใช้การ encode นี้ส่วนใหญ่จะใช้เพื่อแปลงภาษาไทย เป็นส่วนใหญ่
เนื่องจากภาษาไทยนั้น ไม่ใช่พื้นฐานของภาษาที่คอมพิวเตอร์จะถอดรหัสได้ทันที และ
มาตรฐานที่มากมายในการเข้าถึง และแปลงรหัส เพื่อให้ได้ ภาษาที่ถูกต้อง  

ตัวอย่างเล็ก ๆ เอาไปลอง run แล้วพอจะเห็นภาพนะครับ ...

# -*- </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/6369836775476790910/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=6369836775476790910' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6369836775476790910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6369836775476790910'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/07/python-encode-decode-hex-string-example.html' title='python encode decode hex string example'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-687916238614276734</id><published>2009-07-13T15:24:00.000+07:00</published><updated>2009-08-07T14:19:58.553+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>Key Microsoft Windows 7 RC1 Build 7057</title><summary type='text'>Microsoft Windows 7 RC1 Build 7057.0.090305-2000 32BitISO 2,5 Gb | English |http://ugotfile.com/file/69475/w7-logo.pngRelease InformationMICROSOFT.WINDOWS.7.7057.0.090305-2000.ULTIMATE.X86.DVD-ISODescription: Microsoft Windows 7 x86 DVD ISO - the official versionSize: 2 692 204 544 bytes (2.50 GB)MD5: 2A3863AFE3453D1BE642201FD3260AB2SHA-1: 0F32DFE92D544F4690AB91C02B59DBA665D4CA0FEvaluation copy. </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/687916238614276734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=687916238614276734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/687916238614276734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/687916238614276734'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/07/key-microsoft-windows-7-rc1-build-7057.html' title='Key Microsoft Windows 7 RC1 Build 7057'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-5062286537335165749</id><published>2009-06-29T10:59:00.000+07:00</published><updated>2009-06-29T11:39:33.677+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='turbogears2'/><title type='text'>turbogears 2 and database</title><summary type='text'>project ส่วนใหญ่นั้น จะมีการเก็บข้อมูลไว้เพื่อใช้อ้างอิงหรือออก report จึงทำเป็นต้องมี database เพื่อเก็บข้อมูลในส่วนของ turbogears 2 ในบทความนี้ จะใช้ session ครับ โดย tg2 นี้จะเตรียมไว้ให้แล้ว ใน project/package/model/__init__.py คือ DBSession คราวนี้ก็มาเตรียม model กัน สิ่งที่ต้องทำสองอย่างคือ ----------------------------------------setup ----------------------------------------1. สร้าง class</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/5062286537335165749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=5062286537335165749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5062286537335165749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5062286537335165749'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/06/turbogears-2-and-database.html' title='turbogears 2 and database'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-8033397615860129337</id><published>2009-06-11T17:19:00.000+07:00</published><updated>2009-07-21T22:21:03.991+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='turbogears2'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>set oracle client for turbogears2</title><summary type='text'>ให้ทำการ download Oracle Database 10g Express Edition Clientได้ที่http://www.oracle.com/technology/software/products/database/xe/htdocs/102xewinsoft.htmlมาเพื่อเป็นเหมือนตัวแทน oracle clientในที่นี้ไว้ที่ drive d: ก็จะได้D:\XEClient\binสามารถเปลี่ยน directory ได้ตามความพอใจครับทำการ set ORACLE_HOME = D:\XEClient ได้ที่ คลิ๊กขวาที่ My Computer &gt;&gt; properties &gt;&gt; System Properties &gt;&gt; Advanced กดปุ่ม </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/8033397615860129337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=8033397615860129337' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8033397615860129337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8033397615860129337'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/06/set-oracle-client-for-turbogears2.html' title='set oracle client for turbogears2'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-4404405565881280304</id><published>2009-06-11T16:34:00.000+07:00</published><updated>2009-07-21T22:24:27.012+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='turbogears2'/><title type='text'>install turbogears2 on windows</title><summary type='text'>ขั้นตอนแรก ให้ทำการ install python version Python 2.5.4 ก่อนครับเนื่องจาก turbogears 2 นั้น run ด้วย python แต่อย่าเกิน version 2.5 ครับ เพราะ ไม่ supportโหลดที่:http://www.python.org/download/ทดลองว่าเสร็จแล้วโดยลองพิมพ์:$ python --versionPython 2.5.4ทำการ download ez_setup.py โหลดที่:http://peak.telecommunity.com/dist/ez_setup.pyพิมพ์ command:$ python ez_setup.pyทดลองว่าเสร็จแล้วโดยลองพิมพ์:$ </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/4404405565881280304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=4404405565881280304' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/4404405565881280304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/4404405565881280304'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/06/install-turbogears2-on-windows.html' title='install turbogears2 on windows'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-7225248103420927920</id><published>2009-05-28T22:54:00.001+07:00</published><updated>2010-05-12T16:21:57.234+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Python direct function by string</title><summary type='text'>สักวันหนึ่งเราคงได้พบว่า การเขียน if else เพื่อเลือกเรียก function นั้น เป็นเรื่องรกและสิ้นเปลืองพลังงาน แถมยังทำให้ code ไม่สวยงาม 
ในส่วนของ post ชุดนี้จึงนำเสนอวิธีการเรียก function ด้วย string มาแต่จำเป็นที่ string นั้น จะต้องเป็นชื่อเดียวกับ function นะครับ โดยตัวอย่างนี้มีอยู่สองวิธีครับ ตามด้านล่างเลย

สมมุติ code มีอยู่ว่า

class Test(object):
    def __init__(self):
        pass
    def </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/7225248103420927920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=7225248103420927920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7225248103420927920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7225248103420927920'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/05/python-direct-function-by-string.html' title='Python direct function by string'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-2175181750266625923</id><published>2009-05-26T03:13:00.000+07:00</published><updated>2009-05-26T04:06:39.293+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='lighttpd'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Lighttpd change http port and path url</title><summary type='text'>Lighttpd เป็น tool ตัวหนึ่งในการช่วยจัดการกับ การเข้าถึง web, directory, load balance, block pathดู ๆ ข้างในแล้ว เหมือนจะทำขึ้นเพื่อ php มากเลย -.-" (เอาเป็นว่ารายละเอียดไว้ทีหลัง การติดตั้งหรืออะไรต่าง ๆ หรือไปอ่านเองก่องเถอะครับ เหอ ๆ ว่าง ๆ คงได้เอามาลงครับ) ตอนนี้จะเป็นการ เปลี่ยน path url การเข้าถึง และ เปลี่ยน port url พร้อม ๆ กัน (สถาณการณ์บีบบังคับ ทำให้งานออกมาได้จิง ๆ ไม่ต้องรอ บริ้วววว</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/2175181750266625923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=2175181750266625923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2175181750266625923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2175181750266625923'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/05/lighttpd-change-http-port-and-path-url.html' title='Lighttpd change http port and path url'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-1828920693962211905</id><published>2009-05-13T17:37:00.002+07:00</published><updated>2010-05-12T16:27:23.864+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python yield</title><summary type='text'>เห็นแว๊บ ๆ สำหรับ keyword 'yield' สำหรับ python ก็มานั่งดูว่าใช้ประโยชน์อะไรได้บ้าง พอดีเห็นตัวอย่างง่าย ๆ เอามาทำความเข้าใจ เหมือนกับว่า มันจะใช้ช่วยในการ return ข้อมูลออกมา จาก function ที่กำลังดำเนินการาอยู่ ดูตัวอย่างดีกว่า

def odds(limit):
    i = 1
    while True:
        if limit &gt; i
            break
        print 'in odds : &gt; %s' % str(i)
        yield i
        i += 2

for i in odds(5)</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/1828920693962211905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=1828920693962211905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1828920693962211905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1828920693962211905'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/05/python-yield.html' title='python yield'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-1065817781362828049</id><published>2009-05-11T01:18:00.001+07:00</published><updated>2009-08-13T13:56:11.024+07:00</updated><title type='text'>Python and XML</title><summary type='text'>xxxreference site : ElementTree</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/1065817781362828049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=1065817781362828049' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1065817781362828049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1065817781362828049'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/05/python-and-xml.html' title='Python and XML'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-1574127819804121839</id><published>2009-05-08T02:33:00.001+07:00</published><updated>2010-05-12T16:29:51.799+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python cut string by count to list</title><summary type='text'>ตัวอย่างเล็ก ๆ เกี่ยวกับการ ตัดข้อความทีละจำนวนตัวอักษรที่เรากำหนด
m = 'abcdefghijklmnopqrstuvwxyz0123456789'
x = '10'

l = [m[i:i+x] for i in range(0, len(m), x)]
print l

result
['abcdefghij', 'klmnopqrst', 'uvwxyz0123', '456789']
ประโยชน์ก็อาจเพื่อเอาไว้สำหรับ ตัดข้อความขึ้นบรรทัดใหม่ หรือ แบ่งข้อความเพื่อ
จัดส่งทีละชุดอย่างเป็นระเบียบ แล้วแต่ความต้องการ 

หวังว่าคงมีประโยชน์บ้างน่อ ^_^</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/1574127819804121839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=1574127819804121839' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1574127819804121839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1574127819804121839'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/05/python-cut-string-by-count-to-list.html' title='python cut string by count to list'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-796574690248882613</id><published>2009-05-07T03:31:00.001+07:00</published><updated>2010-05-12T16:32:06.676+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python check message is thai language</title><summary type='text'>code แบบง่าย ๆ เอาไปใช้ก่อน
#function long

def isthaistr(s):
    for i in s:
        if 255 &lt; ord(i):
            return True
    return False


#function short

def isthaistr(s):
    return any( ord( c ) &gt; 255 for c in s ) 

ในกรณีที่ข้อความเราได้มานั้น เป็น TIS-620 เราอาจต้องแปลงเป็น UTF-8
โดย encode มันด้วยสำสั่งแบบนี้
s = 'ก'
print ord(s) # 161
s = s.decode('its-620')
pirnt ord(s) # 3585

s </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/796574690248882613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=796574690248882613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/796574690248882613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/796574690248882613'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/05/python-check-message-is-thai-language.html' title='python check message is thai language'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-6186161544998833091</id><published>2009-05-07T02:34:00.002+07:00</published><updated>2010-05-12T16:35:10.378+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python multi decorator</title><summary type='text'>เนื่องจากเมื่อครั้งก่อนหน้านี้ ได้สร้าง decorator ในหัวข้อ python decorator แล้วบังเอิญว่า ไม่ได้ใช้ พอมาจับอีกทีถึงรู้ว่า คราวที่แล้ว ที่กำหนด decorator เป็น class นั้น มัีนค่อยข้างบีบความสามารถ ไว้ถ้าว่าง ๆ คงไปนั่งแก้และหาวิธีแก้ไขเพิม เนื่องเติมจาก ช่วงนี้ มีการเขียน code ที่ต้องเกี่ยวข้องกับระบบอื่น ๆ มากมาย หรือเรียกว่า ในส่วนที่ทำเป็น adaptor ก็ถูก

เอาเป็นว่าเข้าเรื่องดีกว่า ไม่รู้โม้ทำไม</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/6186161544998833091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=6186161544998833091' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6186161544998833091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6186161544998833091'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/05/python-multi-decorator.html' title='python multi decorator'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-775471083376007694</id><published>2009-03-31T15:32:00.000+07:00</published><updated>2009-09-15T17:00:52.175+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu set static ip address</title><summary type='text'>เนื่องจาก เวลาที่เราต้องการนำ web หรือ application ไปไว้ยัง server เพื่อเป็น service บางอย่างนั้นจำเป็นต้องให้ ip address ของเครื่อง server ที่เราต้องการนั้น ไม่ถูกเปลี่ยนแปลง เมื่อมีการ shutdown หรือเปลี่ยนแปลง ระบบเครือข่าย ในส่วนของ ubuntu ก็จะมีวิธีการประมาณนี้ครับเข้าไปแก้ไข file ที่ทำการ setup ip โดยจำเป็นต้องใช้สิทธิ root ครับ ตามด้านล่างนี้ ...$ sudo vi /etc/network/</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/775471083376007694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=775471083376007694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/775471083376007694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/775471083376007694'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/03/ubuntu-set-static-ip-address.html' title='Ubuntu set static ip address'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-4832511672596885956</id><published>2009-03-26T14:29:00.001+07:00</published><updated>2010-05-12T16:37:03.979+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='turbogears2'/><title type='text'>python receive http post text stream by turbogears2</title><summary type='text'>ในส่วน ของ web controller ของ turbogear นั้น โดยปกติก็จะรับ เป็น kw อยู่แล้ว คือรับ name:value ตาม format

    @expose('templatename')
    def servicename(self, **kw):
        print 'data key, value :', kw
        return dict(page='templatename')

ในกรณีที่เราต้องการ รับ text stream เช่น client อาจ post xml มาเพื่อ information บางอย่างก็จะต้อง ดึงจาก body แทน code ก็จะเพิ่มประมาณนี้ครับ

import </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/4832511672596885956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=4832511672596885956' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/4832511672596885956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/4832511672596885956'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/03/python-receive-http-post-text-stream-by.html' title='python receive http post text stream by turbogears2'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-1640666313747726154</id><published>2009-03-26T13:53:00.002+07:00</published><updated>2010-05-12T16:39:27.301+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python http post text stream</title><summary type='text'>ในกรณีที่เราต้องการ post text string หรือ data บางอย่าง เช่น xml information บางอย่าง
ในส่วนของ การ post ส่วนใหญ่จะเป็นในกรณี name:value โดยตัวอย่าง format จะเป็นประมาณ
http://localhost:8080web?name=uname&amp;data=udataname:value จะเป็น name:uname , data:udata

แต่กรณีที่เราต้องการ post text อย่างเดียว จะเป็นการ post body ตัวอย่างด้านล่าง

http://localhost:8080/web
body = '&lt;xml&gt;&lt;auth&gt;&lt;user&gt;userxy&lt;/</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/1640666313747726154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=1640666313747726154' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1640666313747726154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1640666313747726154'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/03/python-post-text-stream.html' title='python http post text stream'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-4269600051356698634</id><published>2009-03-25T14:49:00.001+07:00</published><updated>2010-05-12T16:40:46.750+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python one line code style</title><summary type='text'>python เป็นภาษา script นั่นคือ ส่วนใหญ่จะมี syntex ที่ค่อยข้างอ่านง่าย และกระชับ และใช้งานได้ทันที
การเขียน คำสั่งเล็ก ๆ ในบรรทัดเกียวก็จึงเป็นเรื่องง่าย 

ตัวอย่าง code 1
mstr = 'data1,data2  ,  data3,'
l = [m.strip() for m in mstr.split(',') if '' != m.strip()]
print l
output:

['data1', 'data2', 'data3']
# ตัวอย่างเป็นการแยก data ออกจากกันด้วยเครื่องหมาย ',' return เป็น list และตัดช่องว่างออก
</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/4269600051356698634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=4269600051356698634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/4269600051356698634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/4269600051356698634'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/03/python-one-line-code-style.html' title='python one line code style'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-367671450994782650</id><published>2009-03-23T11:49:00.001+07:00</published><updated>2010-05-12T16:43:21.193+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='activemq'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>activemq python listener(receive) with stomp.py</title><summary type='text'>ในส่วนที่แล้วมีการพูดถึง send to queue(jms activemq) ไปแล้ว ในส่วนนี้เป็นการรับข้อมูลจาก queue โดยใช้ listener คือ เมื่อมี data เข้ามายัง queue process ก็จะเริ่มทำงาน
  ลักษณะการ connect จะคล้ายกับ send แต่จะต่างกันตรงที่ทำการ add class ที่ทำการ listener เข้าไปครับ ตามนี้

file name : listener.py
import time
import sys
import stomp
import logging
from threading import Thread
    
class MyListener</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/367671450994782650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=367671450994782650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/367671450994782650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/367671450994782650'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/03/activemq-python-listenerreceive-with.html' title='activemq python listener(receive) with stomp.py'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-8724610049489756021</id><published>2009-03-23T11:10:00.001+07:00</published><updated>2010-05-12T16:45:57.432+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='activemq'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>activemq python send with stomp.py</title><summary type='text'>การทำงานที่มีความซับซ้อนขึ้น และ เป็นงานประเภท transaction มาก ส่วนใหญ่จะมีการใช้ queue มาทำการแบ่ง process ต่าง ๆ ออกจากกัน ในส่วนของผู้ที่เคยเขียน java มานั้น คงรู้จัก JMS ดีกันอย่างดี หรือพอสมควร
  ทำไมไม่ใช้ queue ของ python ? เนื่องด้วย ผมก็มองว่า ภาษา python เป็น ภาษาที่ใช้ในการ Integrate เป็นส่วนใหญ่ เนื่องจากแก้ไขได้ง่าย รวดเร็ว ดู code สะอาดตา แค่นี้ก็พอแล้วสำหรับ python ส่วน java นั้น </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/8724610049489756021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=8724610049489756021' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8724610049489756021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8724610049489756021'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/03/activemq-python-send-with-stomppy.html' title='activemq python send with stomp.py'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-5796966827797984320</id><published>2009-03-05T10:21:00.001+07:00</published><updated>2010-05-12T16:47:37.059+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python decorator</title><summary type='text'>Decorator เป็นการเขียน function ครอบ function เพื่อให้สามารถ แยก logic บางอย่าง เช่น validate, connection ต่าง ๆ ออกจาก business ได้

รูปแบบ ก็จะเป็นแบบนี้
function( function( function (data) ) )

function( function( function (data), condition ), condition )
และก็ไม่จำเป็นเสมอไปที่ function ข้างนอกสุดจะทำก่อน มันขึ้นอยู่ตอน เราเขียน decorator
ว่าจะให้ทำอะไรก่อนครับ ตามตัวอย่างได้ อธิบายไว้ </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/5796966827797984320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=5796966827797984320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5796966827797984320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5796966827797984320'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/03/python-decorator.html' title='python decorator'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-4596085631458825843</id><published>2009-03-04T19:26:00.001+07:00</published><updated>2010-05-12T16:51:06.308+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python script check and replace data key dict() empty</title><summary type='text'>เนื่องจากความง่ายของ python ในการส่ง data เป็น dict ซึ่งจะสามารถทำให้ โยกย้าย หรือแก้ไข script ได้ง่าย และการจัดการ interface ก็แก้ไขน้อยครับ เมื่อเทียบกับ model
แต่ปัญหาก็เกิดขึ้น ถ้ามีการ dev เพิ่มขึ้น ทำ parameter เพิ่มขึ้น การcheck ว่าข้อมูลบางอย่างถูกส่งมาหรือไม่ก็จะเกิดขึ้นมาให้รก code เล่น แต่ก็จำเป็นต้องทำ ถ้าเราไม่ต้องการให้ค่าที่ไม่ได้ส่งมาเป็น None ออกไปยัง function ที่กำลังทำงาน

##</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/4596085631458825843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=4596085631458825843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/4596085631458825843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/4596085631458825843'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/03/python-script-check-and-replace-data.html' title='python script check and replace data key dict() empty'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-6461857865634543407</id><published>2009-03-02T23:08:00.000+07:00</published><updated>2009-03-02T23:09:18.085+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='nokia5800'/><title type='text'>เลี่ยง cert สำหรับ hack trial program nokia5800</title><summary type='text'>หลายคงคงเจอว่า โปรแกรมบาง โปรแกรมบน nokia 5800 ส่วนใหญ่จะเป็น trial version กันหมด แต่เนื่องจากปัญญาอันน้อยนิดของเราที่ยังไม่มีพลังพอจะ ซื้อได้ จึงขอใ้ช้ก่อนแ้ล้วจ่ายทีหลังนะ ถ้ามีตังเหลือตัวอย่าง เช่นถ้าทำการ download program adobe reader มาด้วนๆ เลย เวลาเรียกใช้งานทุกครั้ง มันจะบอกว่า เตรียมตังซื้อนะ เวลาของคุณจะหมดในอีก ... วัน (T.T เห็นแล้วเศร้าใจ)เห็นมีตัว crack บน web ก็เอามาลงเลย </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/6461857865634543407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=6461857865634543407' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6461857865634543407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/6461857865634543407'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/03/cert-hack-trial-program-nokia5800.html' title='เลี่ยง cert สำหรับ hack trial program nokia5800'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-3716584015426577186</id><published>2009-03-02T17:05:00.000+07:00</published><updated>2009-07-21T22:35:43.031+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>FileUpload, flash upload multifile Turbogear Python</title><summary type='text'>เริ่มสร้าง ปุ่มสำหรับ การ upload ทีละหลายๆ  file บังเอิญว่า ความสามารถ ของ html เพียว ๆ น่าจะไม่สามารถ ถ้าจะใช้ java script ก็จะเยิ้นเย้อ เกินไปหน่ยอ ก็เลยได้ ตัวอย่างนึงมาจาก PHP แล้วก็มาแปลงเอาอ่าโดย ที่มาจาก :http://profile.un-no.com/ozone_me/entry-13-Flash+Upload+Multi+File.htmlเป็นภาษาไทย ค่อยข้างอ่านรู้เรื่อง จะมีประโยชน์มากถ้าใช้ PHP คือเสนอให้ศึกษาจาก web นี้ก่อนนะครับ </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/3716584015426577186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=3716584015426577186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3716584015426577186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3716584015426577186'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2009/03/fileupload-flash-upload-multifile.html' title='FileUpload, flash upload multifile Turbogear Python'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-3933216541133127667</id><published>2008-12-30T14:41:00.000+07:00</published><updated>2009-06-23T14:39:16.835+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu Linux how to uninstall desktop</title><summary type='text'>desktop = gui (graphic user interface) ที่เราเห็นเป็น window, icon, taskbar ต่าง ๆ เหล่านี้ บนหน้าจอของเราเนื่องจาก บางทีเราก็ไม่ต้องการ gui สำหรับ server เนื่องจากเพื่อความรวดเร็ว และ ประหยัดเนื้อที่ และ การทำงานโดยใช้ gui อีกอย่างคือไม่มีใครมานั่งทำงานบนเครื่อง server หรอกมั้งครับdesktop สำหรับ linux ubuntu นี้แล้ว สามารถ แยกออกมาได้ ทั้งที่เป็น ubuntu-desktop และ ubunut-serversolutionเริ่มด้วย</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/3933216541133127667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=3933216541133127667' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3933216541133127667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3933216541133127667'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/12/ubuntu-linux-how-to-uninstall-desktop.html' title='Ubuntu Linux how to uninstall desktop'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-3274081133621501692</id><published>2008-10-17T20:08:00.000+07:00</published><updated>2009-07-21T22:18:16.137+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu Linux How to Install IpMsg</title><summary type='text'>ipmsg หรือ Ip Messengerโปรแกรมคล้าย msn คือ ส่ง messgae &amp; file แต่ในเฉพาะวง Network หรือ Lan อะครับเริ่มแรก ให้ไป Download code มาจาก site :http://www.ipmsg.org/index.html.enหรือhttp://www.ipmsg.org/ก่อนครับ เลือกที่ :UNIX &gt;&gt; GNOME2 IP Messenger by xxxxxxxพยายามหาให้เจอแระกัน -.-ตัวอย่างชื่อ File ที่ download มาจะเป็นประมาณนี้g2ipmsg-X.X.X.tar.gzหลังจากนั้น ให้ทำการ Unzip file(tar -xvzf </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/3274081133621501692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=3274081133621501692' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3274081133621501692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3274081133621501692'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/10/ubuntu-linux-how-to-install-ipmsg.html' title='Ubuntu Linux How to Install IpMsg'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-7500448762245490520</id><published>2008-10-16T12:48:00.000+07:00</published><updated>2009-06-23T14:40:12.577+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu Set Wireless ให้มองเห็น Wireless network บน</title><summary type='text'>วิธีแก้ intel wireless ใช้งานไม่ได้(คาดว่าแก้ได้ทุกยี่ห้อที่มีปัญหา เพราะผมเอาวิธีแก้อันนี้มาจากกระทู้ Sony Vaio ใช้ wireless ไม่ได้) ให้เพิ่มบรรทัดนี้ในไฟล์ /etc/modprobe.d/optionsoptions iwl3945 disable_hw_scan=1ที่มา : http://forum.ubuntuclub.com/ubuntu-desktop/ubuntu-8-04-wireless/ทั้งหมดนี้ ทำเสร็จแล้ว restart เครื่องด้วยนะ***ในกรณีนี้คือ เห็น Hardware แล้วรับ แต่ view ไม่เห็น Wireless </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/7500448762245490520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=7500448762245490520' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7500448762245490520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7500448762245490520'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/10/driver-wireless-acer-ubuntu.html' title='Ubuntu Set Wireless ให้มองเห็น Wireless network บน'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-5972940232272629103</id><published>2008-08-22T16:10:00.000+07:00</published><updated>2009-07-21T22:48:35.366+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu how to set java by manual install</title><summary type='text'>แพคเกจตัวนี้ชื่อว่า update-alternative ("/etc/alternavtive") ดูเอกสารเพิ่มเติมได้  man update-alternatives วิธีการติดตั้ง alternative link ใหม่$ update-alternatives --verbose --install /usr/bin/java  java /opt/jdk.1.6.0/jre/bin/java 99หลังจากติดตังคราวนี้มาเลือกโปรแกรม default สาำหรับทำงานกัน$ update-alternatives --config javaจะมี list ขึ้นมาให้เลือก แล้วให้เราใส่ หมายเลขของ รายการ </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/5972940232272629103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=5972940232272629103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5972940232272629103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5972940232272629103'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/08/ubuntu-how-to-set-java-by-manual.html' title='Ubuntu how to set java by manual install'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-2038045067017533694</id><published>2008-07-02T15:34:00.000+07:00</published><updated>2008-07-02T15:48:54.314+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python easy_install how to</title><summary type='text'>Download ez_setup.pyกรณี เป็น linux หรือ windows:แล้วใช้คำสั่ง python ez_setup.py(ในกรณี window จะเป็นการ download easy_install.exe ครับ)กรณี เป็น linux ubuntu :ใช้คำสั่ง apt-get easy_install  (ง่ายอีกแระ ubuntu เนี่ย)</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/2038045067017533694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=2038045067017533694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2038045067017533694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2038045067017533694'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/07/python-easyinstall-how-to.html' title='python easy_install how to'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-1834550406951762014</id><published>2008-06-30T17:33:00.000+07:00</published><updated>2009-07-21T22:51:19.046+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python sqlobject how to install</title><summary type='text'>การ install SQLObject บน Windows และ Linuxในกรณี Windows ให้ทำการ Download ez_setup.py เพื่อที่จะได้ ใช้คำสั่ง easy_install ได้ในกรณี Linux Download ez_setup.py ในกรณี Ubuntu จะใช้แค่คำสั่งapt-get install easy_installแล้วถึงทำการติดตั้ง SQLObjectติดตั้ง SQLObject โดยพิมพ์ตามด้านล่างeasy_install SQLObjectupdate version ล่าสุดeasy_install -U SQLObjectupdate แบบ force version หรือ ต้องการกำหนด </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/1834550406951762014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=1834550406951762014' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1834550406951762014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/1834550406951762014'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/06/python-sqlobject-how-to-install.html' title='python sqlobject how to install'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-8766851545707080704</id><published>2008-06-30T17:32:00.000+07:00</published><updated>2008-07-01T12:04:25.180+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python turbogear how to install</title><summary type='text'>การ install turbogear บน Windows และ Linuxให้ทำการ download file turbogear install จาก web site :http://turbogears.org/จริง ๆ แล้วก็เป็น file : tgsetup.pyให้ทำการ run โดยใช้คำสั่ง : python tgsetup.pyทั้งบน windows และ linux แต่ต้องต่อ Internat ด้วยเนื่องจากจะมีการ download tool เพิ่มครับจบสิ้นไม่มี error ก็เรียบร้อยหรือในกรณี Ubuntu จะใช้แค่คำสั่งapt-get install python-turbogears</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/8766851545707080704/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=8766851545707080704' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8766851545707080704'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8766851545707080704'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/06/python-turbogear-how-to-install.html' title='python turbogear how to install'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-8293090700744162943</id><published>2008-06-30T11:22:00.000+07:00</published><updated>2008-07-02T15:49:00.756+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>python how to install</title><summary type='text'>การ install python บน Windows และ Linuxให้ทำการ download file python install จาก web site :http://python.org/ในกรณี เป็น Windows จะได้ file .msi นั้น สามารถติดตั้งได้โดยการ double clickหลังจากนั้นก็ให้ทำการ set Path ก็จะใช้งานได้ครับส่วนในกรณี python นั้น จะได้เป็น .tgz หรือ .tar.bz2ซึ่ง ถ้าเป็น linux Ubuntu สามารถติดตั้งได้สะดวกมาก โดยเข้าที่ menuApplications )) Add/Remove Applications ))Search </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/8293090700744162943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=8293090700744162943' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8293090700744162943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/8293090700744162943'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/06/python-turbogear-sqlobject-how-to.html' title='python how to install'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-7470865147377529818</id><published>2008-06-26T14:58:00.000+07:00</published><updated>2009-08-07T14:18:57.608+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Linux error: C compiler cannot create executables</title><summary type='text'>install some App you have ./configureinstall fail.you see on dilog :checking for C compiler default output file name... configure: error: C compiler cannot create executablesyou type command :sudo apt-get install build-essentialhave success for install again.</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/7470865147377529818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=7470865147377529818' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7470865147377529818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7470865147377529818'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/06/linux-error-c-compiler-cannot-create.html' title='Linux error: C compiler cannot create executables'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-516629221803655851</id><published>2008-05-13T13:35:00.000+07:00</published><updated>2009-08-07T14:19:37.948+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>linux ubuntu how to install .rpm</title><summary type='text'>Instructions for Installing RPM Files Using Alien- ในการ install .rpm file บน linux ubuntu นั้น จำเป็นต้องแปลง .rpm ให้อยู่ในรูป ของ .deb ก่อน เนื่องจาก ubuntu ไม่ได้กำหนด .rpm สำหรับ install เนื่องจาก .rpm นั้น เกิดจาก linux redhad      - ในที่นี้จะต้อง install Alien เพื่อใช้ในการ convert file .rpm เป็น .deb ก่อน หลังจากนั้น จึงเป็นการ Install ในแบบ .deb ของ ubuntu ซึ่งอันที่จริง linux ubuntu </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/516629221803655851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=516629221803655851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/516629221803655851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/516629221803655851'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/05/linux-ubuntu-how-to-install-rpm.html' title='linux ubuntu how to install .rpm'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-5579831947221978803</id><published>2008-04-28T13:59:00.002+07:00</published><updated>2010-07-27T12:13:13.858+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>shell script command zombie process.</title><summary type='text'>zombie process คือ process ที่ไม่มีการทำงานแล้ว แต่ยังคงค้างในระบบ kill ธรรมดานั้น อย่าหวัง

script for show zombie process.
$ ps aux  awk '{ print $8 " " $2 }'  grep -w Z
-show.

Z 12345  &lt;&lt; Exam. process id and Z declare zombie process. -type of process have by under. R=running.
S=sleeping or stoped.
Z=zombie.

script for kill zombie process.
$ kill -9 `ps -A -ostat,ppid,pid,cmd  grep -e '^[Zz]</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/5579831947221978803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=5579831947221978803' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5579831947221978803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/5579831947221978803'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/04/shell-script-command-zombie-process.html' title='shell script command zombie process.'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-3410272308982051178</id><published>2008-04-28T09:58:00.000+07:00</published><updated>2009-07-21T22:10:28.151+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>shell script ทั่วไป</title><summary type='text'>topดู resource เครื่อง แบบ realtimeuname -aดูรายละเอียดเครื่อง เช่น ชื่อเครื่อง ,OS แบบคร่าว ๆ ของเครื่องhostnameดู ชื่อเครื่องที่กำลังใช้งานอยู่hostname -iดู host IP เครื่องที่กำลังใช้งานอยู่ps -efดู process ที่ run อยู่ในระบบทั้งหมดnetstat -alดูการเชื่อมต่อระบบ network IP และ port ต่าง ๆnetstat -anpดูการเชื่อมต่อระบบ network IP และ port ต่าง ๆ รวมถึง process ID </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/3410272308982051178/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=3410272308982051178' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3410272308982051178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3410272308982051178'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/04/shell-script.html' title='shell script ทั่วไป'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-7446168555848921858</id><published>2008-02-25T18:31:00.000+07:00</published><updated>2009-07-21T22:38:24.584+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>shell script  crontab(การตั้งเวลา)</title><summary type='text'>การตั้งเวลา( crontab )เพื่อ run shell scriptเข้าไปดูว่า มีรายการอะไร ถูกตั้งไว้บ้าง$ crontab -lเข้าไปทำการตั้ง job$ crontab -eformat ในการตั้ง job ลักษณะการตั้ง job จะเหมือนเป็นการเข้าไปใน vi (text editor)0 2 25 1 2008 /usr/local/freebc2/transfercampaign.sh โดยที่0 &lt;&lt; minute2 &lt;&lt; hour25 &lt;&lt; day1 &lt;&lt; month2008 &lt;&lt; year /usr/local/freebc2/transfercampaign.sh &lt;&lt; path script file to run by crontab </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/7446168555848921858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=7446168555848921858' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7446168555848921858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/7446168555848921858'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/02/shell-script-crontab.html' title='shell script  crontab(การตั้งเวลา)'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-3872615238433491295</id><published>2008-02-25T18:27:00.000+07:00</published><updated>2009-07-21T22:40:14.607+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>java parse String to Decimal</title><summary type='text'>// java parse String to DecimalString thaiStr = "ก - ฮ นกเอี้ยง abc ABC \n \t"; Character ch; String strNum; Integer intNum; for(int i=0; i&lt;thaiStr.length(); i++){ch = thaiStr.charAt(i);System.out.println(" Char at : " + i + " " + ch);strNum = Integer.toHexString(ch);System.out.println(" Code String to 16 : " + strNum);intNum = Integer.valueOf(strNum, 16);System.out.println(" Code 16 to 10 : " + </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/3872615238433491295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=3872615238433491295' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3872615238433491295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/3872615238433491295'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/02/java-parse-string-to-decimal.html' title='java parse String to Decimal'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-2990735197979821681</id><published>2008-02-25T18:26:00.000+07:00</published><updated>2009-08-25T10:14:01.752+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>shell script mode vi</title><summary type='text'>ในส่วนของ linux, unix จะมี editor สำหรับแก้ไข text file อยู่ ตัวนึง ชื่อ viโดนทำการ พิมพ์$ vi (filename) (Enter)หาก (filename) ไม่เคยมีอยู่จริงก็จะถูกสร้างขึ้น เมื่อเราทำการ save file หลังจากทำงานเสร็จด้วยคำสั่ง wq! ใน editor และหาก filename นั้นมีอยู่จริงก็จะเป็นการเข้าแก้ไขการทำงานในส่วน text mode นี้ก็จะมี command ที่ใช้สำหรับแก้ไข เพิ่มเติม และ อื่น ๆ ได้แก่(โดยส่วนใหญ่ จะมีก่อนที่จะ พิมพ์ </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/2990735197979821681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=2990735197979821681' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2990735197979821681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2990735197979821681'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/02/shell-script-mode-vi.html' title='shell script mode vi'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-2914899896131003598</id><published>2008-02-25T18:22:00.000+07:00</published><updated>2009-08-07T14:20:15.083+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='windows'/><title type='text'>วิธีแก้ไขให้ Folder Option กลับคืน และการกู้คืน regedit.exe</title><summary type='text'>วิธีแก้ไขให้ Folder Option กลับคืน และการกู้คืน regedit.exe1. Start &gt;&gt; Run &gt;&gt;copy ข้อความข้างล่างนี้ และ Paste ลงไป ก่อนจะ EnterREG add HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /t REG_DWORD /d 0 /f2. Restart เครื่อง3. Start &gt;&gt; Run &gt;&gt; Regedit เปิดตำแหน่งตามด้านล่างHKEY_CURRENT_USER&gt;Software&gt;Microsoft&gt;Windows&gt;CurrentVersion&gt;Policies&gt;</summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/2914899896131003598/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=2914899896131003598' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2914899896131003598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/2914899896131003598'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/02/folder-option-regeditexe.html' title='วิธีแก้ไขให้ Folder Option กลับคืน และการกู้คืน regedit.exe'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-483315827067728580.post-9011106973370424186</id><published>2008-02-25T17:27:00.006+07:00</published><updated>2010-08-27T11:28:01.991+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>shell script ทำการย้าย file ไปยังเครื่อง server</title><summary type='text'>#shell script ทำการย้าย file ไปยังเครื่อง server หรือ เครื่องอื่น. 

#!/bin/bash

#ประกาศ path ต้นทางที่จะทำการย้าย file.
LOCALDIR=/usr/local/log/

#ประกาศ path ปลายทาง ที่จะนำ file ไปไว้.
REMOTESERVER=192.168.XXX.XXX
REMOTEPATH=/usr/local/server/log/

#ชื่อ user login.
LOGIN=user

#password login.
PASSWORD=pass

#ไปยัง path ที่ต้องการย้าย file.
cd $LOCALDIR

#connect ไปยัง server ที่ต้องการย้าย </summary><link rel='replies' type='application/atom+xml' href='http://rpgkan.blogspot.com/feeds/9011106973370424186/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=483315827067728580&amp;postID=9011106973370424186' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/9011106973370424186'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/483315827067728580/posts/default/9011106973370424186'/><link rel='alternate' type='text/html' href='http://rpgkan.blogspot.com/2008/02/shell-script-file-server.html' title='shell script ทำการย้าย file ไปยังเครื่อง server'/><author><name>Kan</name><uri>http://www.blogger.com/profile/04265385590046923869</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/_-oNPfhk8MHA/S0azudIvGMI/AAAAAAAAAB0/aDa5HPeO4bc/S220/myspace-icons-anime1.gif'/></author><thr:total>0</thr:total></entry></feed>
