Tag: Project’
การทำลายน้ำบนภาพด้วย Java (Java Image Watermarking)
- by Nat
อันดับแรกต้องไป ดาวน์โหลด library watermarker-0.0.4.jar มาก่อน แล้วก็ตามด้วย dozer-4.2.1.jar หลังจากนั้นก็ add JAR file ลงไปใน Project ของเรา Read this article »
Grails RunApp: : Error starting Sun’s native2ascii
- by Nat
ปัญหา RunApp: : Error starting Sun’s native2ascii ตอนสั่ง $ grails run-appปัญหาบน ubuntu Read this article »
[Google Maps Geocoding] ลอง Parse Json ด้วย Groovy + Java (Netbeans)
- by Nat
โปรเจ็คตลกๆมาอีกแล้ว เพราะโปรเจ็คนี้ผมใช้ Json Lib + Groovy + Java
แต่ผมใช้ Groovy ดึง json (URL.text) แล้วใช้ Java เป็นตัวแกะ jsonObject เป็น jsonArray
หลังจากนั้นเอาข้อมูลโยนกลับไปให้ Groovy ถอดเอาเฉพาะส่วนที่ต้องการออกมา (ในที่นี้คือ coordinates — latitude ,longitude นั่นแหละ)
ดูวุ่นวายมาก ทั้งๆที่ เขียน Groovy อย่างเดียวก็ได้ เพราะ Json Lib ก็ลองรับ groovy หรือจะเขียน Java เพียวๆ เลยก็ได้
เรื่องของเรื่องคืออยากเขียน Java ร่วมกับ Groovy อีกครั้ง เพราะไม่ค่อยถูกกับ Java จริงๆ
มันดูเวื่นเว้อ มันเขียนเวิ่นเว้อด้วย ยาวๆ งงๆ (อาจเป็นเพราะไม่ได้ศึกษาอย่างลึกซึ้ง)
groovy มันสั้น เข้าใจง่าย ไม่เวิ้นเว้อ (อาจจะใช้ได้ไม่เต็มประสิทธิภาพ แต่ผมชอบ พวก Closures )
เหตุผลที่ไม่เขียน Groovy เพียวๆไปเลยก็เพราะว่า
code ตัวอย่างที่เค้ามีให้ดู มันพิมพ์ผิด
def fromList = [1,true,'json'] as JSONarray
มันควรจะต้องเป็น JSONArray เมื่อแก้และเอาอันอื่นมาลองดู มัน cast เป็น Type พวก net.sf.json.* ไม่ได้ อาการประมาณนี้
ก็เลยลองซัด Java + Groovy ไปเลย
มันก็เจอปัญหานิดหน่อยเพราะ ไม่ได้อ่าน Dependency List เลยค่อยๆตามหา พอได้ครบแล้วเพิ่งจะเห็นว่ามันมีบอกไว้ว่า
Json-lib requires (at least) the following dependencies in your classpath:
- jakarta commons-lang 2.4
- jakarta commons-beanutils 1.7.0
- jakarta commons-collections 3.2
- jakarta commons-logging 1.1.1
- ezmorph 1.0.6
น่าเขกกะโหลกจริงๆ Read this article »
[cache] Grails Project : การตัดคำภาษาไทย(ด้วย Java) และประมวลผลด้วย Grails
- by NAzT
ครึกครื้นอยากเขียน …
พอดีได้โจทย์ซึ่งเป็น Senior Project ของเพื่อน แต่ว่าอยากทำเลยเอามาลองเสียหน่อย
(ฝึกเขียน grails ด้วยการทำ โจทย์)
ได้ความรู้ + ประสบการณ์ มากเลยทีเดียว เพราะว่า
เพิ่งเริ่มจับ grails แล้วทำงานแบบเป็นชิ้นเป็นอัน ครั้งนี้ก็ครั้งแรก
แต่ก่อนหน้านี้มีใช้ grails + xfire ในการทำ project วิชา SOAp ก็เรียบร้อยไป
(แต่ client ใช้ nusoap + codeigniter) เล่นกันทีเดียวคุ้ม Read this article »
Twitter Follow Back Script
- by NAzT
517 sudo gem update –system 518 sudo gem install rubygems-update 519 sudo update_rubygems 520 sudo gem install twitter
#!/usr/bin/env ruby
require 'rubygems'
require 'twitter'config = YAML::load(open(".twitter")) httpauth = Twitter::HTTPAuth.new(config['email'], config['password']) base = Twitter::Base.new(httpauth)
base.followers.each do |follower| if !follower.following begin base.friendship_create(follower.id, true) rescue puts "An error occurred: #{$!}" end puts "Created friendship with #{follower.screen_name}" end end
แล้วใน .twitter ก็จะเก็บ .twitter
email: traffy password: -mac
Related Blogs
- Puppet type for HTTP Authentication
- Opera Finds Flash Unappetizing For Web Video [Blockquote] | Gadget …
- mmamixer.com » Genki Sudo – Es Muy Loco!
- Config-Model related project for GSoC 2010 « Ddumont's Blog
- Opera Finds Flash Unappetizing For Web Video [Blockquote]
- Saturday Notebook: The End of the Elbow, Pierce's Struggles …
- Matthew Yglesias » Trouble With the “End User” Exemption
- Japan to decide on U.S. base plan Monday: report | todayshotnews.net
- Opera Finds Flash Unappetizing For Web Video [Blockquote …
- SLAM ONLINE | » Jackson, Artest Put Twitter Beef To Bed
- Michael Jackson's Kids to End up in Care? | Showbiz Spy …
- What is Twitter? It's Social News Networking | SEOptimise
- HTTP authentication from PHP
- Palin: Founders meant to base law on Bible and Ten Commandments …
- "Really!" Weekend Update | Amy Poehler – Seth Meyers – Tina Fey …
- In the Fedora 12 install Google applications – Desktop …
- Travel to Macedonia, the hidden gem of Balkans – Sep '09 | Where …
- Car bomb targets military base in Dagestan
- » Chavez Launches Twitter Account, Has 200 Aides Working on it …
- THE END OF MOVIE THEATERS? FCC Will Allow Studios To Send First …
[Pre] GitHub Command (Blog From Terminal)
- by NAzT
nazts-macbook:~ NAzT$history | grep git 68 grails create-app gitdemo 69 cd gitdemo/ 79 cd gitdemo/ 80 git init 81 git add . 82 git commit -m “initial checkin” Read this article »
[Twitter] Follow กลับ คนที่มา Follow เรา
- by NAzT
Script Follow กลับ ด้าวยภาษา ruby
ก่อนอื่นต้องลง twitter gem ด้วยคำสั่ง sudo gem install twitter (อย่าลืมอัพเดต ก่อนด้วยนะ)
ไฟล์ config มีหน้าตาเป็นแบบนี้นะ FILE (.twitter)
email: my_twitter_email password: my_twitter_password
#!/usr/bin/env ruby
require 'rubygems'
require 'twitter'config = YAML::load(open(".twitter")) httpauth = Twitter::HTTPAuth.new(config['email'], config['password']) base = Twitter::Base.new(httpauth)
base.followers.each do |follower| if !follower.following begin base.friendship_create(follower.id, true) rescue puts "An error occurred: #{$!}" end puts "Created friendship with #{follower.screen_name}" end end ได้มาจาก http://travisonrails.com/2009/04/22/Twitter-Gem-Examples
Related Blogs
- Puppet type for HTTP Authentication
- Specops software upgrades password management products …
- Building a More Efficient Ruby Interpreter | My Efficient Planet
- Config-Model related project for GSoC 2010 « Ddumont's Blog
- Matthew Yglesias » Trouble With the “End User” Exemption
- 4 Email Marketing Strategies – Improve Your Sales or Traffic via …
- How do I get started developing Ruby Web applications …
- SLAM ONLINE | » Jackson, Artest Put Twitter Beef To Bed
- Michael Jackson's Kids to End up in Care? | Showbiz Spy …
- What is Twitter? It's Social News Networking | SEOptimise
- HTTP authentication from PHP
- Palin: Founders meant to base law on Bible and Ten Commandments …
- Reach More Customers With An Email Marketing List « Shopping-Mall.net
- Base camp, friends, waiting… « Jordan Romero
- Letitbit Password Generator v1.2 [UPDATED] By HIPER Rapidshare …
- Travel to Macedonia, the hidden gem of Balkans – Sep '09 | Where …
- Citibank Presale Password John Mayer in Bethel, NY …
- Free Presale Password for Rush in San Antonio, TX | Going2theshow.com
- Free Presale Password for John Mayer in First Midwest Bank …
- Email @gmail.com Is No longer Verified By Google
วิธีการใช้ GLUT บน MAC ด้วย Eclipse
- by NAzT
Glut With Eclipse On Mac
ก่อนอื่นเราต้องใช้ (Use This)
#include <GL/gl.h> #include <GL/glut.h>
- คลิกขวาที่ Project ด้านซ้ายมือ
- เลือก Properties
- เลือก “C/C++ Build:Properties”
- มองหาและไปที่ “Tool Settings”
- เลือกไปที่ “Mac OS X C++ Linker : Miscellaneous”
- เพิ่มใช่ช่อง “Linker flags” field: ด้วย -framework GLUT -framework OpenGL