tewson's thoughtstream

ห้วงหนึ่งของความเกรียน

Primary links

  • home
  • films
  • free software
  • about

Recent Posts

  • ภาษาไทยที่บกพร่อง ต้องแก้ไข
  • ห้ามข้าม
  • ทบทวนวรรณกรรม
  • The Only Good To-Do List Is A Written One
  • ความบิดเบือนจากสำนวนแปลบางข่าวของมติชน

Tags in Tags

announcement bangkok event film lecture life poetry tcdc tech thought travel university
more tags

Stay Tuned

Subscribe

programming

org.eclipse.gef 0.0.0 required for installing Android Development Tools on Eclipse 3.5.1

Submitted by tewson on Tue, 17/11/2009 - 17:45
  • android
  • intellect
  • programming

Today I wanted to try the Android SDK on my Ubuntu Karmic Koala, so I followed the instructions in the following URL.

http://developer.android.com/sdk/index.html

I thought that an IDE would be useful so I installed Eclipse 3.5.1 and tried to install the Android Development Tools, or ADT. However, an error "org.eclipse.gef 0.0.0 required" (or something like that) appeared.

After googling for a while, I found a URL for the GEF SDK, which is Eclipse's Graphic Editing Framework, as the following URL.

http://download.eclipse.org/tools/gef/updates/releases/

So I added this update into Eclipse by

  1. Go to the menu 'Help',
  2. Choose 'Install New Software',
  3. Place the GEF SDK updates URL into the box after 'Work with:',
  4. Choose the right version of updates in the box below (for me, GEF SDK 3.5.1),
  5. Click 'Next',
  6. After Eclipse calculates all the dependencies, just click 'Finish' and let it install the plugin.

After installing GEF SDK, return to installation of ADT. You should be able to install it now.

  • 2 comments

Faulty Barcode Detection

Submitted by tewson on Sat, 19/09/2009 - 18:43
  • image processing
  • intellect
  • programming
  • project
  • tech

อันนี้เป็นโครงงานเล็ก ๆ จากวิชา Computer Vision หัวข้อคือ ทำไงก็ได้ให้คอมมันรู้ได้ว่าภาพบาร์โค้ดมันสกปรก มีภาพตัวอย่างมาให้ด้วย

  • 6 comments
  • Read more

BarCamp Bangkok 3

Submitted by tewson on Mon, 25/05/2009 - 01:17
  • bangkok
  • barcampbkk3
  • intellect
  • programming
  • project
  • tech

และแล้วบาร์แค้มป์ กรุงเทพฯ ครั้งที่ 3 ก็จบลงอย่างเงียบ ๆ

ผมขอสดุดีให้กับทีมงานทุกคนสำหรับความอุตสาหะในการจัดงานครั้งนี้ เพราะผมเห็นว่ามันประสบความสำเร็จมาก

บาร์แค้มป์ครั้งนี้มีสิ่งที่พิเศษกว่าครั้งก่อน ๆ มาก ไม่ว่าจะเป็น ดนตรีสด การประกวดมิสบาร์แค้มป์ หรือแม้แต่เชียร์ลีดเด้อร์! ทั้งนี้ก็เพราะเป็นครั้งแรกที่มีการค้างคืนกันนั่นเอง

ผมเองก็เสนอหัวข้อไปตั้งแต่วันแรก แต่ไม่ได้รับการโหวต วันที่สองดูรอบเช้าก็ยังไม่ได้ เลยนิ่งนอนใจ เข้าฟังหัวข้อ ดรูปั้ลปะทะเวิร์ดเพรสปะทะจูมล่า ด้วยความง่วงงุน (คืนก่อนวันงาน นอน 5 ชั่วโมง คืนวันงานนอน 3 ชั่วโมง) เลยเผลอหลับ ตื่นขึ้นมาตอนเลิกพอดี (เพราะเสียงปรบมือ) ก็มั่ว ๆ เดินออกนอกห้องตาม ๆ เขาไป

เจอ @noomz ทักว่าต่อไปเป็นหัวข้อของผม แล้วตะกี้ในห้องเขาก็ถามว่าใครพูดหัวข้อต่อไป แต่ก็ไม่มีใครตอบ (ก็หลับอยู่นี่หว่า) เลยเกิดอาการรน วิ่งไปดูให้แน่ใจแล้ววิ่งกลับมา ยังดีที่มีคนเดินมาฟังบ้าง ก็เลยพูด ด้วยความรนและเพิ่งตื่นเลยพูดเร็วเกิน ต้องขออภัยคนที่ฟังด้วย ข้างล่างนี่เป็นสไล้ด์

Using QtWebKit in PyQt as a N00b
View more Microsoft Word documents from tewson.
  • 1 comment

Python Qt MySQL และภาษาไทย

Submitted by tewson on Mon, 30/03/2009 - 17:08
  • intellect
  • programming
  • python

วันนี้เขียนโปรแกรมโดยใช้ PyQt แล้วติดปัญหาว่าใส่ข้อมูลภาษาไทยลงฐานข้อมูลไม่ได้ โดยฐานข้อมูลใช้ charset เป็น UTF-8

วิธีก็คือ ตอนเชื่อมต่อฐานข้อมูลให้ระบุไปด้วยว่าจะเชื่อมต่อแบบไหน


conn = MySQLdb.connect (
host = "localhost",
user = "user",
passwd = "pass",
db = "db",
use_unicode=True,
charset='utf8')

ต่อมา เนื่องจากเขียนอยู่บน PyQt พอจะเอาข้อความไปใส่ฐานข้อมูล ก็ต้องแปลงจาก QString เป็น String ธรรมดาก่อน ซึ่งจะใช้ฟังก์ชั่น str() เฉย ๆ ไม่ได้ เพราะมันเป็นภาษาไทย เลยต้องใช้ unicode() แทน

ขอขอบคุณ http://www.narisa.com/forums/index.php?showtopic=15869

  • Add new comment

Recent comments

  • Hi! I read your post and
    1 day 10 hours ago
  • มีแลกหนังสือด้วย เท่ว่ะ !
    3 days 11 hours ago
  • แล้วแต่รสนิยม ?
    5 days 11 hours ago
  • the way you translate the
    1 week 2 days ago
  • Thanks a lot.
    1 week 2 days ago
more
Powered by Drupal, an open source content management system

Creative Commons License

This work by http://tewson.com is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
RoopleTheme