<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>NAzT&#039;s Blog &#187; Groovy</title> <atom:link href="http://www.together.in.th/tag/groovy/feed/" rel="self" type="application/rss+xml" /><link>http://www.together.in.th</link> <description>technology, misc</description> <lastBuildDate>Sat, 17 Dec 2011 14:00:31 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>มาทำโปรแกรมแปลภาษาอังกฤษ -&gt;ภาษาไทย กันดีกว่า (Google Translation API)</title><link>http://www.together.in.th/google-language-api-using-java-javascript/</link> <comments>http://www.together.in.th/google-language-api-using-java-javascript/#comments</comments> <pubDate>Thu, 06 Jan 2011 23:26:37 +0000</pubDate> <dc:creator>NAzT</dc:creator> <category><![CDATA[Google Translation]]></category> <category><![CDATA[client-side]]></category> <category><![CDATA[google]]></category> <category><![CDATA[google language api]]></category> <category><![CDATA[google translation api]]></category> <category><![CDATA[grails]]></category> <category><![CDATA[Groovy]]></category> <category><![CDATA[java]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[language]]></category> <category><![CDATA[language api]]></category> <category><![CDATA[rest]]></category> <category><![CDATA[server-side]]></category> <category><![CDATA[translation]]></category> <category><![CDATA[translation api]]></category> <category><![CDATA[เร็วส์]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=3129</guid> <description><![CDATA[Google Language API Google มี ระบบแปลภาษา หรือ google translate ให้เราใช้ เท่านั้นยังไม่พอ!! พี่กู(เกิ้ล)แกยังมี goole translation/language api ให้เราเอามาเขียนโปรแกรมกันอีกด้วย วันนี้เรามาลองเขียนโปรแกรมเพื่อแปลภาษาอังกฤษเป็นภาษาไทยกันครับ เราจะติดต่อกับ Google translation/language api ได้ยังไงล่ะ ? เนื่องจาก google translation เป็น   REST webservice อยู่แล้ว เราสามารถติดต่อ translation api ได้สองวิธีคือ ยิง REST โดยตรง (server-side) ยิง REST ผ่าน javascript (client-side) อ่านเพิ่มที่ Google translation api: Calling styles แต่วันนี้เราจะพูดถึงการเขียนโค้ดติดต่อกันเลยนะครับ ซึ่งมี 2 ภาษาดังนี้ครับ java [...]]]></description> <wfw:commentRss>http://www.together.in.th/google-language-api-using-java-javascript/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>เนรมิต Web Service ตัดคำ (ใช้ grails + xfire) ภาค SOAP</title><link>http://www.together.in.th/create-grails-web-service-thai-tokenizer-soap/</link> <comments>http://www.together.in.th/create-grails-web-service-thai-tokenizer-soap/#comments</comments> <pubDate>Tue, 04 May 2010 10:10:35 +0000</pubDate> <dc:creator>Nat</dc:creator> <category><![CDATA[Grails]]></category> <category><![CDATA[git]]></category> <category><![CDATA[GIVES]]></category> <category><![CDATA[Groovy]]></category> <category><![CDATA[LexTo]]></category> <category><![CDATA[ตัดคำ]]></category> <category><![CDATA[ตัดคำภาษาไทย]]></category> <category><![CDATA[ตัดคำไทย]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=1900</guid> <description><![CDATA[วันนี้ผมจะมานำเสนอการทำ Web Service ตัดคำภาษาไทย โดยใช้ grails framework   (ภาค SOAP) สั่ง grails create-app _appname_ เพื่อสร้าง grails application cd _appname_ แล้วสั่ง grails install-plugin xfire เพื่อติดตั้ง plug-in เพื่อทำ webservice ฉบับ soap สั่ง grails create-service TokenizeService เพื่อสร้าง Service ตัดคำ copy LexTo.jar ไว้ใน /lib แล้วเอา lexitron.txt ไว้ใน / เขียน Code นิดหน่อย ดังนี้ /grails-app/conf/BootStrap.groovy  (อยากจะ new Object ครั้งเดียว) code : /grails-app/services/TokenizeService.groovy [...]]]></description> <wfw:commentRss>http://www.together.in.th/create-grails-web-service-thai-tokenizer-soap/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>การเข้าถึง servletContext (ใน Service)</title><link>http://www.together.in.th/accessing-the-servlet-context/</link> <comments>http://www.together.in.th/accessing-the-servlet-context/#comments</comments> <pubDate>Tue, 04 May 2010 09:37:39 +0000</pubDate> <dc:creator>Nat</dc:creator> <category><![CDATA[Grails]]></category> <category><![CDATA[Groovy]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=1896</guid> <description><![CDATA[import org.codehaus.groovy.grails.web.context.ServletContextHolder as SCH def servletContext = SCH.servletContext ที่มา  http://bit.ly/cCXFni Related Blogs เรื่องที่เกี่ยวข้องมกราคม 7, 2011 -- มาทำโปรแกรมแปลภาษาอังกฤษ ->ภาษาไทย กันดีกว่า (Google Translation API)พฤษภาคม 4, 2010 -- เนรมิต Web Service ตัดคำ (ใช้ grails + xfire) ภาค SOAPเมษายน 29, 2010 -- แกะ Link ทั้งหมดด้วย cyberneko (Groovy Java)เมษายน 27, 2010 -- ตัดคำภาษาไทยด้วย Groovy (ไม่ใช้ grails)เมษายน 27, 2010 -- classpath [...]]]></description> <wfw:commentRss>http://www.together.in.th/accessing-the-servlet-context/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>แกะ Link ทั้งหมดด้วย cyberneko (Groovy Java)</title><link>http://www.together.in.th/cyberneko-groovy-java-encoding/</link> <comments>http://www.together.in.th/cyberneko-groovy-java-encoding/#comments</comments> <pubDate>Wed, 28 Apr 2010 23:35:29 +0000</pubDate> <dc:creator>Nat</dc:creator> <category><![CDATA[Groovy]]></category> <category><![CDATA[Java]]></category> <category><![CDATA[cyberneko]]></category> <category><![CDATA[git]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=1771</guid> <description><![CDATA[แกะ Link ทั้งหมดด้วย cyberneko (Groovy Java) จาก code ข้างบน จะเป็นการแกะ link ออกมาเฉพาะลิ้งค์ที่มีคำว่า id groovy -cp nekohtml.jar:xml-apis.jar:xercesImpl.jar nekoReg.groovy Related Blogs เรื่องที่เกี่ยวข้องเมษายน 20, 2010 -- Set Encoding ให้ Cyberneko แล้วก็ Grep Image Sourceพฤษภาคม 4, 2010 -- เนรมิต Web Service ตัดคำ (ใช้ grails + xfire) ภาค SOAPเมษายน 27, 2010 -- ตัดคำภาษาไทยด้วย Groovy (ไม่ใช้ grails)เมษายน 8, 2010 -- Grails [...]]]></description> <wfw:commentRss>http://www.together.in.th/cyberneko-groovy-java-encoding/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>ตัดคำภาษาไทยด้วย Groovy (ไม่ใช้ grails)</title><link>http://www.together.in.th/thai-tokenizer-groovy-not-grails/</link> <comments>http://www.together.in.th/thai-tokenizer-groovy-not-grails/#comments</comments> <pubDate>Tue, 27 Apr 2010 16:14:33 +0000</pubDate> <dc:creator>Nat</dc:creator> <category><![CDATA[Groovy]]></category> <category><![CDATA[git]]></category> <category><![CDATA[ตัดคำ]]></category> <category><![CDATA[ตัดคำภาษาไทย]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=1818</guid> <description><![CDATA[เหล้าเก่าเอามาเล่าใหม่ขวดใหม่ ผมโมดิฟาย LexTo ของ Sansarn overload method addDict  โดยเพิ่ม addDict (string ) เพราะว่าก่อนหน้านี้มีแต่ addDict (File ) มันมีปัญหาเรื่อง Encoding ของ Dictionary กับ Input String ไม่ตรงกัน  ตัดไม่ได้อีก เลยต้องโมดิฟายนิดหน่อย โหลดได้ที่ http://github.com/NAzT/LT (เป็น Netbeans Project ) หลังจากนั้นทำเป็น .jar (กด Build ได้เลย) def Tokenizer = new LongLexTo(&#8220;Self&#8221;)  // ใช้ constructor เป็น LongLexTo(String ) เพื่อไม่ให้มันไปโหลด Dict def input = &#8220;สวัสดีครับผม&#8221;  // [...]]]></description> <wfw:commentRss>http://www.together.in.th/thai-tokenizer-groovy-not-grails/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>classpath กับ groovyConsole</title><link>http://www.together.in.th/classpath-groovyconsole/</link> <comments>http://www.together.in.th/classpath-groovyconsole/#comments</comments> <pubDate>Tue, 27 Apr 2010 14:43:16 +0000</pubDate> <dc:creator>Nat</dc:creator> <category><![CDATA[Groovy]]></category> <category><![CDATA[groovyConsole]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=1813</guid> <description><![CDATA[Blog  ด้วยภาพ ถ้าเข้า groovyConsole แบบธรรมดา  จะเกิด unable to resolve class &#8230;&#8230; ถ้าจะให้ใช้ได้ก็ใส่ option -cp  เข้าไป เช่น groovyConsole -cp LT/dist/LexTo.jar ก็จะได้แล้วล่ะ  เย้ Related Blogs เรื่องที่เกี่ยวข้องมกราคม 7, 2011 -- มาทำโปรแกรมแปลภาษาอังกฤษ ->ภาษาไทย กันดีกว่า (Google Translation API)พฤษภาคม 4, 2010 -- เนรมิต Web Service ตัดคำ (ใช้ grails + xfire) ภาค SOAPพฤษภาคม 4, 2010 -- การเข้าถึง servletContext (ใน Service)เมษายน 29, 2010 [...]]]></description> <wfw:commentRss>http://www.together.in.th/classpath-groovyconsole/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Set Encoding ให้ Cyberneko แล้วก็ Grep Image Source</title><link>http://www.together.in.th/set-encoding-%e0%b9%83%e0%b8%ab%e0%b9%89-cyberneko-%e0%b9%81%e0%b8%a5%e0%b9%89%e0%b8%a7%e0%b8%81%e0%b9%87-grep-image-source/</link> <comments>http://www.together.in.th/set-encoding-%e0%b9%83%e0%b8%ab%e0%b9%89-cyberneko-%e0%b9%81%e0%b8%a5%e0%b9%89%e0%b8%a7%e0%b8%81%e0%b9%87-grep-image-source/#comments</comments> <pubDate>Tue, 20 Apr 2010 06:06:40 +0000</pubDate> <dc:creator>Nat</dc:creator> <category><![CDATA[Groovy]]></category> <category><![CDATA[cyberneko]]></category> <category><![CDATA[git]]></category> <category><![CDATA[Grep]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=1766</guid> <description><![CDATA[Set Encoding ให้ Cyberneko html parser (บาง Site ไม่ยอมกำหนดว่าเป็น Encoding แบบใด) แล้วก็ Grep Image Source Code ตามข้างล่างนี้ Related Blogs เรื่องที่เกี่ยวข้องเมษายน 29, 2010 -- แกะ Link ทั้งหมดด้วย cyberneko (Groovy Java)พฤษภาคม 4, 2010 -- เนรมิต Web Service ตัดคำ (ใช้ grails + xfire) ภาค SOAPเมษายน 27, 2010 -- ตัดคำภาษาไทยด้วย Groovy (ไม่ใช้ grails)เมษายน 8, 2010 -- Grails &#038; Legacy [...]]]></description> <wfw:commentRss>http://www.together.in.th/set-encoding-%e0%b9%83%e0%b8%ab%e0%b9%89-cyberneko-%e0%b9%81%e0%b8%a5%e0%b9%89%e0%b8%a7%e0%b8%81%e0%b9%87-grep-image-source/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Grails &amp; Legacy Database กับการ MAP id เข้ากับ String</title><link>http://www.together.in.th/grails-legacy-database-mapping-id-with-string/</link> <comments>http://www.together.in.th/grails-legacy-database-mapping-id-with-string/#comments</comments> <pubDate>Thu, 08 Apr 2010 14:35:03 +0000</pubDate> <dc:creator>Nat</dc:creator> <category><![CDATA[Grails]]></category> <category><![CDATA[git]]></category> <category><![CDATA[Groovy]]></category> <category><![CDATA[ลืม]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=1727</guid> <description><![CDATA[โจทย์ Grails วันนี้คือ ถ้ามี Database อยู่แล้ว จะสร้าง Grails Application มาครอบ Table ที่มีอยู่แล้ว ยังไง ? โจทย์นี้ยากสำหรับผม เพราะว่า ผมสร้าง Application ใหม่อย่างเดียวเลย Table ก็เกิดใหม่ทุกครั้งเลยไม่เจอปัญหาอะไร ก็เลยหาคำตอบ ด้วยการ Search ไปๆ มาๆ ก็เจอ Mastering Grails: Grails and legacy databases มันคงมีวิธีการ map หลายวิธี แต่ผมอ่านแล้วพอจะเข้าใจอันเดียว คือตรง   ดู code ก็น่าจะเข้าใจเลย เพราะมันก็ตรงไปตรงมาดี แต่ว่าพอทำจริงก็เกิดปัญหาว่า แล้วถ้าไม่มี  id  ที่เป็นตัวเลขล่ะ จะทำยังไง? (แต่มี primary key ที่เป็น string) ครั้นจะไม่มี id [...]]]></description> <wfw:commentRss>http://www.together.in.th/grails-legacy-database-mapping-id-with-string/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>แก้ปัญหา RESTClient ยิงไป update.xml ไม่ได้</title><link>http://www.together.in.th/restclient-update-status-twitter-expectation-failed/</link> <comments>http://www.together.in.th/restclient-update-status-twitter-expectation-failed/#comments</comments> <pubDate>Thu, 08 Apr 2010 14:04:12 +0000</pubDate> <dc:creator>Nat</dc:creator> <category><![CDATA[Groovy]]></category> <category><![CDATA[git]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=1714</guid> <description><![CDATA[ปัญหา ไอ้ Code (post ข้อความออก twitter) ข้างล่าง นี้มัน error [ Caught: groovyx.net.http.HttpResponseException: Expectation Failed ] อ่านมาได้ แต่โพสไม่ได้ ก็เซ็งเป็ด วิธีแก้ไขก็ให้แก้เป็นแบบนี้ (เติม twitter.client.params.setBooleanParameter &#8216;http.protocol.expect-continue&#8217;, false เข้าไปแค่นั้นเอง) เรื่องของเรื่อง (ไม่ต้องอ่านก็ได้ครับ ไร้สาระ) ช่วงนี้จะต้องเขียนโปรแกรมที่ติดต่อกับ REST API​ (เล่นกับ twitter เป็นหลัก) ประกอบกับอยากจะโฟกัสที่  HTTPBuilder เพราะว่า เล่นฟรีเสียเวลา แม่งเลิกๆ ล้มๆไปหลายทีจัด  คราวนี้เลยเอาจริง (กว่าเดิมนิดนึง) พอศึกษาเรื่องการโพสข้อความขึ้น Twitter ดันไปเจอ RESTClient เห็นมันเกี่ยวกับเลยกระโดดเข้าไปจับ แต่ก็เจอปัญหายิ่งใหญ่เพราะว่ามัน Post ไม่ได้ เลยหาๆๆๆๆ จบได้พบแสงสว่าง  :) Code ที่เกี่ยวข้อง http://docs.codehaus.org/display/GROOVY/2009/03/10/REST+Client+proposal+for+HTTPBuilder+0.5 http://fisheye.codehaus.org/browse/~raw,r=636/gmod/httpbuilder/trunk/src/main/script/twitter_restbuilder.groovy http://archive.codehaus.org/lists/org.codehaus.gmod.scm/msg/20090310144321.D6FAA14A8209@codehaus01.managed.contegix.com ขอบคุณ [...]]]></description> <wfw:commentRss>http://www.together.in.th/restclient-update-status-twitter-expectation-failed/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Shuffle List &amp; Iteration &amp; Closure in Groovy</title><link>http://www.together.in.th/shuffle-list-iteration-in-groovy/</link> <comments>http://www.together.in.th/shuffle-list-iteration-in-groovy/#comments</comments> <pubDate>Fri, 02 Apr 2010 05:39:57 +0000</pubDate> <dc:creator>Nat</dc:creator> <category><![CDATA[Groovy]]></category> <category><![CDATA[git]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=1666</guid> <description><![CDATA[Shuffle List &#38; Iteration in Groovy Output : [1, 7, 19, 6, 16, 5, 3, 11, 20, 2, 18, 10, 13, 8, 9, 17, 12, 14, 15, 4] [5, 9, 15, 10, 11, 2, 8, 1, 3, 14, 4, 12, 6, 16, 19, 13, 18, 17, 7, 20] [5, 10, 2, 17, 3, 20, 12, [...]]]></description> <wfw:commentRss>http://www.together.in.th/shuffle-list-iteration-in-groovy/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
