KaewGB

February 10, 2010

Installing CUDA SDK in Fedora Core 10 (32 bit)

Filed under: Linux — Tags: , , , , , , , — KaewGB @ 12:58 pm

Having @v_unnop (Dew) guide me step-by-step, the installation was quick and easy. (A lot of thanks to him ^^)

Note: this is for computers that do not use NVIDIA graphic cards.

1. Download Packages

  • Navigate to http://developer.nvidia.com/object/cuda_2_3_downloads.html
  • Download
    • CUDA Toolkit for Fedora 10 -> 32 bit
    • CUDA SDK code samples and more (optional)
  • In case your computer has NVIDIA graphics card, I think you’ll need this too:
    • Developer Drivers for Linux (190.42) -> 32bit

2. chmod +x those downloaded files (.run) and run them as root.

  • cudatoolkit_2.3_linux_32_fedora10.run
  • cudasdk_2.3_linux.run

3. Configure environment variables

  • add the following lines into your /etc/profile or .bashrc
    • PATH = $PATH:/usr/local/cuda/bin
    • export PATH
    • LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/usr/local/cuda/lib
    • export LD_LIBRARY_PATH

4. Test the SDK

  • cd ~/NVIDIA_GPU_Computing_SDK/C
  • sudo make emu=1
  • If everything is OK, all the example code will be successfully build
  • cd bin/linux/emurelease
  • run some example program you just compiled

At this step, If you’re lucky, you’re done.

If not, you may have to deal with SELinux

If you cannot run the program because of this error:

./<program_name> error while loading shared libraries: /usr/local/cuda/lib/libcudart.so.2: cannot restore segment prot after reloc: Permission denied

This is an SELinux problem, it blocks libcudart.so.2, which the program needed to use.

You can add the exception to SELinux list with this command:

sudo chcon -t textrel_shlib_t ‘/usr/local/cuda/lib/libcudart.so.2.3′

(libcudart.so.2 is actually a link to libcudart.so.2.3)

Try running the program again, and, We’re done!!!

February 5, 2010

My 1st IELTS Exam

Filed under: English — Tags: , , , , , — KaewGB @ 3:08 pm

รอผลสอบ TOEFL อยู่ค่ะ น่าจะออกไม่วันนี้ก็พรุ่งนี้ (หวังว่า)… ระหว่างลุ้นๆ เลยเขียนเรื่องสอบ IELTS ซะหน่อย

เผอิญปีที่แล้วสมัครสอบ TOEFL ล่วงหน้าไปไกลมาก (รอบ 23 มกรา 53 สมัครตั้งแต่พฤศจิกา — จาก บล็อกศูนย์สอบ TOEFL) จนเหมือนว่าผลลัพธ์จะใช้ส่งมหาลัยที่ปิด 1 Feb ไม่ทัน ประมาณวันที่ 19 ธันวา เลยตัดสินใจสมัครสอบ IELTS อย่างด่วน ว่าแล้วก็ลาก @eig กับ @agidot ไปสมัครรอบเร็วที่สุดที่มี (เสาร์ 9 มกรา 2553) โดยที่แต่ละคนจะก็แทบจะไม่รู้อะไรเกี่ยวกะ IELTS เลย – -”

โชคดีมากที่รอบ 9 มกราที่ British Council เต็มแล้ว (รู้จักอยู่ที่เดียว) ระหว่างกำลังรู้สึก fail ก็ลองหาๆ ดูว่ามีที่ไหนรับสอบอีกไหม… แต่นแต๊น และแล้วก็เจอ IDP Thailand ขี่ม้าขาวเข้ามาช่วย — IDP เป็นตัวแทนศูนย์สอบ IELTS ของทางฝั่งออสเตรเลีย เหมือนกับที่ British Council เป็นของทางฝั่งอังกฤษ — สรุปก็เลยไปสมัครที่ IDP ..สมัครเสร็จเห็นป้ายที่แปะว่ามี “IELTS Workshop สมัคร FREE!” ก็เลยสมัครมาฟังกันด้วย ปรากฎว่าดีมาก อาจารย์ฝรั่งซึ่งเป็น examiner มาพูดเอง เน้นส่วน speaking, writing โดยบอกเกณฑ์การให้คะแนน และข้อผิดพลาดส่วนใหญ่ที่เจอ ฯลฯ แค่ 2-3 ชั่วโมง แต่คุ้มมาก และทำให้รู้สึกมั่นใจว่าจะสอบ IELTS ได้คะแนนออกมา ok

การเตรียมตัว

สมัครเสร็จแทบจะไ่ม่ีมีเวลาเลย ต้องปั่นโปรเจคจบและหาสาขาที่อยากเรียนต่อ กับมหาลัย ฯลฯ เลยมีการเตรียมตัวมาแนะนำแค่นี้ (หลักสูตรเร่งรัด)

  • แนะนำให้เข้า workshop ของ IDP ค่ะ: ไม่แน่ใจว่าเค้ายังจัด workshop อยู่มั้ย แต่เจ้าหน้าที่บอกว่า จะพยายามจัดเรื่อยๆ ใครสนใจก็ไปตามๆ เอาที่เว็บ http://www.thailand.idp.com/ หรือโทร.ถามก็ได้
  • ใช้ Cambridge IELTS 1-7: เป็นหนังสือรวมแบบทดสอบพร้อมไฟล์เสียง หนึ่งเล่มมีข้อสอบ 4 ชุด อันนี้ใน workshop แนะนำมา ซึ่งก็เหมือนการสอบจริงทีเดียว เพราะ Cambridge เป็นหนึ่งในผู้ออกข้อสอบ 555 (แ่ต่ทำไม่ทันอะ ได้ลองทำบางชุดในเล่ม 5 กับ 6 แค่นั้น)
  • ดูเกณฑ์การให้คะแนนค่ะ
    • Speaking: http://www.ielts.org/pdf/UOBDs_SpeakingFinal.pdf
      • ถ้า Speak at length (พูดต่อเนื่องกันยาวๆ คล่องๆ) ไม่ได้ ก็หมดสิทธิ์ได้ Band 7
      • ดูการเลือกใช้คำ รูปประโยคและสำนวน และการออกเสียงด้วย
      • อาจารย์ฝรั่งบอกว่า ถ้ายัง speak at length ไม่ได้ ก็ให้ฝึกจนได้ก่อน ค่อยสนอย่างอื่น — สรุปก็เลยฝึกแต่ speak at length
    • Writing:

(more…)

February 4, 2010

ASUS P320: Upgrading to Windows Mobile 6.5

Filed under: ASUS P320 — Tags: , , , , , — KaewGB @ 6:12 pm
My P320 after upgrading to WM6.5 Build 23016

My P320 after upgrading to WM6.5 Build 23016

My fate with Windows Mobile started when I got ASUS P320 for free. I wasn’t quite impressed with it, especially when compared to my iTouch, so I kept telling myself “This is just for a while,  I’ll change as soon as I find a phone I really want”. I eventually found HTC Hero and, later, Google Nexus One but couldn’t buy any of them due to the timings and unexpected events. Then I realized I have been using P320 for over a year now. This is no longer “a while”, so for now I’ll just try to improve my P320 and be happy with it, start from upgrading WM to 6.5 — thanks to @l3aml3oo for suggestions :)

ปลายปี 2008 ได้ ASUS P32o มาฟรี เลยได้ลองใช้ Windows Mobile โดยไม่ได้ตั้งใจ ..แต่ก็ไม่ค่อยจะชอบมันเท่าไหร่ (อันที่จริงก็เคยบอกกับใครหลายต่อหลายคนว่า เกลียดมัน 555) ก็เลยกะว่าใช้ๆ ไปก่อนรอมือถือเจ๋งๆ ออกจะได้เปลี่ยน แต่ไปๆ มาๆ แห้วทั้ง HTC Hero กะ Nexus One + กว่าจะได้ซื้ออีกทีก็อีกนาน รอซื้อรุ่นใหม่คุ้มกว่า สรุปก็เลยตัดใจ หันไปปรับปรุง P32o ของเราให้มันเจริญตาเจริญใจขึ้นดีกว่า — ขอบคุณ @l3aml3oo ที่แนะนำให้อัพเกรดเป็น WM6.5 คะร้าบ :)

Here is my step-by-step guide picked from here and there (I’m a compiler, LOL).

1. Do the Backup

PIM Backup Application

http://www.dotfred.net/default.htm

Good tool to backup your WM phone without synchronizing with your computer.
Installation:
download the program (.exe) to your MicroSD card and run it in your phone.

2. Upgrade ASUS Firmware

Find the newest version here [1]:

http://support.asus.com/download/download.aspx?SLanguage=en-us&model=P320

Installation: unzip and follow instructions in release note.
Note: After upgrading you’ll lose all data in your phone, please make sure that you have backed up.
Warning: The release note said that any compressed data in MicroSD card may not be able to open properly after the upgrade, although in my case there’s nothing wrong with my compressed PIM backup file, copy your backup file to the computer first!

(more…)

November 28, 2009

รวม Review ศูนย์สอบ TOEFL iBT (ในกรุงเทพ)

อาทิตย์ที่แล้วสมัครสอบโทเฟลกับพี่เบลล์ (@bloodmoon) และอิ๊ก(@eig)

ได้ยินหลายๆ คนบอกว่า ศูนย์สอบก็มีผลกับการสอบค่อนข้างมาก (เช่น ไมค์ไม่ดี เสียงไม่เข้า -> speaking คะแนนน้อย, นั่งติดกัน เสียงรบกวนเยอะ เสียสมาธิ เป็นต้น) ก็เลยต้องมีการ google กันหน่อย ว่าสอบที่ไหนดี หาอยู่นานเหมือนกันกว่าจะตัดสินใจ เพราะส่วนใหญ่จะเป็นการเขียน blog review ศูนย์สอบที่แต่ละคนเคยสอบมา ข้อมูลก็เลยกระจัดกระจายหน่อย + ตอนแรกกะจะหาเทียบๆ เฉพาะศูนย์ที่ได้ยินมาว่าดี (เกษมบัณฑิต) กับศูนย์ที่เดินทางสะดวก (ESI, Kinetics) แต่หาไปหามากว่าจะเจอครบก็ได้ของศูนย์อื่นมาเพียบ เลยทำเป็นตารางสรุปซะเลย (แต่ก็ยังไม่ครบทุกศูนย์นะคะ เอาเท่าที่เจอ) เผื่อวันหลังคนอื่นจะได้ไม่ต้องหา :D

หมายเหตุ: + คือข้อดี, – คือข้อเสีย, = คือข้อไม่ดีไม่เสีย 555

ศูนย์สอบ อุปกรณ์ต่างๆ เสียงรบกวน อื่นๆ อ้างอิง
Assumption
(อัสสัมชัญ)
+ คอมมีที่กั้น - ห้องไม่ใหญ่มาก
- อยู่ใกล้กันไปหน่อย ได้ยินเสียงคนข้างๆ พูดชัดเจน
+ การเดินทางสะดวก นั่งแท็กซี่ไปจากรถไฟฟ้าไม่ไกลมาก
+ ห้องน้ำโอเค มีหลายห้อง
- ไม่มี locker
[1]
Cyber School of English - สอบในโน้ตบุ๊ค
- เคยระบบล่ม ต้องรอเกือบ 2 ชม. กว่าจะได้สอบ
- ไมโครโฟนไม่ค่อยติด ต้องเอามือจับ อาจส่งผลให้บางข้อเสียงไม่เข้า ไม่ได้คะแนน
N/A + เจ้าหน้าที่คุมสอบอธิบายกติกาดี มีความเป็นกันเอง
- สถานที่ค่อนข้างโทรม
- ห้องน้ำไม่น่าเข้า (เล็ก สกปรก มีเพียงห้องเดียว)
[2][3]
ECC - เครื่องมีปัญหาหลายครั้ง - มีเสียงรบกวนแน่นอน ห้องเล็ก N/A [4]
ESI Language Centers + หูฟัง คอม ลำโพง ดี (ใหม่)
+ มีคอกกั้นระหว่างโต๊ะสอบ
- โต๊ะสอบติดกันเกินไป ต่อกันเรียงเป็นแถวยาว
- เสียงตีกันวุ่นวาย [5]
- ไม่เป็นส่วนตัว
+ มีที่จอดรถสะดวก มีที่นั่งรอสบายดี
+ พนักงานบริการดี ไม่ห้ามกินน้ำ กินลูกอมในห้องสอบ
+ แอร์เย็นกำลังดี ไม่หนาว
+ ห้องน้ำสะดวกดี
= อยู่ตรงข้ามประตูงามวงศ์วาน มหาวิทยาลัยเกษตรศาสตร์
- เสียสมาธิ ไม่แนะนำ โดยเฉพาะอย่างยิ่งสำหรับคนสอบครั้งแรก
[5][6][9]
KBU: Kasembundit University
(ม.เกษมบัณฑิต วิทยาเขตร่มเกล้า)
+ อุปกรณ์โสตทัศนูปกรณ์ดีมาก
+ โต๊ะกลมใหญ่ๆ กั้นเป็นสี่คอก
+ การจัดเรียงที่นั่งเป็นสัดส่วนและกว้างขวาง
+ มีความเป็นส่วนตัวสูง
+ เสียงรบกวนน้อยที่สุด [1]
+ ห้องน้ำสะอาด ดี แต่ค่อนข้างไกล เดินประมาณ 1 นาที
+ บริเวณนั่งรอเข้าสอบเงียบสงบ และมีที่นั่งมาก
+ มีอาหารว่างและเครื่องดื่มบริการฟรี (น้ำ โอวัลติน กาแฟ)
+ มี locker ให้บริการ
+ เจ้าหน้าที่มาเติมกระดาษให้ตลอด
- เจ้าหน้าที่ไม่ค่อยอธิบายกติกา
- ไกลมาก (แถวสุวรรณภูมิ/มีนบุรี)
- แอร์หนาวมาก [8]
[1][3][8]
Kinetics Education & Training Center - ไม่มีที่กั้น
= ห้องนึงสอบได้ 15 คน แบ่งเป็น 3 คอลัมน์ 4 แถว
- คนที่ต้องนั่งแถวหน้าจะต้องมีคนมานั่งติดด้วย เสียสมาธิกว่า
- เวลาพูดได้ยินกันหมด
= อยู่แถวจตุจักร [7]
Knowledge Plus N/A - ห้องเล็กกว่ามณียา
- ที่นั่งใกล้มากๆ
- ได้ยินเสียงคนข้างๆ ชัดเจน
+ มีการแจ้งเตือนล่วงหน้าเรื่องสอบ เช่นส่ง SMS
+ ที่จอดรถเพียงพอ
- เจ้าหน้าที่เดินไปเดินมาทำให้เสียสมาธิ
- ห้องน้ำมีแค่ห้องเดียว
[1]
MANEEYA
(มณียา)
- จอคอมยังเป็นจอ CRT [8]
- กั้นคอกด้วยกระดาษแข็ง
- ห้องเล็ก
- ที่นั่งค่อนข้างใกล้กัน
- ได้ยินเสียงคนอื่นพูดแน่นอน
+ การเดินทางสะดวก BTS ลงสถานีชิดลม
+ มีความเข้มงวด (บังคับฝากของใน Locker, ให้ใส่เสื้อหนาวไปจากข้างนอก เพื่อที่เข้าไปแล้วจะรบกวนคนอื่นน้อยที่สุด)
+ มีบริการน้ำดื่ม
+ อากาศกำลังสบาย ไม่หนาว
[1][8]
VBAC - อุปกรณ์ต้องลุ้น
- ไมค์เสียงเข้าบ้างไม่เข้าบ้าง ทำให้ต้องจับตลอดตอนสอบ
- ไม่มีคอกกั้น กระจายกันตามมุมห้อง
- เก้าอี้เป็นเก้าอี้หมุน ไม่มีพนักพิง เมื่อยหลัง
N/A + เจ้าหน้าที่เป็นอาจารย์ฝรั่งวัยรุ่น ใจดี ยิ้มแย้ม พยายามช่วยเหลือ
- อยู่ฝั่งธน รถไฟฟ้าไปไม่ถึง
[1]
ลาดกระบัง + ห้องคอมพิวเตอร์คณะวิทย์ อุปกรณ์ดีมาก
- กั้นคอกด้วยกระดาษแข็ง
- ห้องใหญ่ คนเยอะ ราวๆ 30 คน
- เสียงดังตอนพูด
- มีกล้องตัวเดียว ประกอบกับคนเยอะ ทำให้รอถ่ายรูปก่อนสอบนานมาก [9]

หาได้แบบนี้ สรุปก็เลยเลือก: เกษมบัณฑิต

อ้างอิง

ขอบคุณแหล่งข้อมูลต่อไปนี้ค่ะ :)

[1] PANTIP.COM: H8528499 โทเฟล ทำไงไม่ให้เหลวดีน้า — ตอน สนามสอบ —
[2] PANTIP.COM: H8495369 TOEFL สถานที่สอบ Cyber school of English ดีไหมคะ
[3] Review สถานที่สอบ TOEFL: KBU Testing Center (ม.เกษมบัณฑิต) << A PhD Journey of Mine
[4] ประสบการณ์สอบ TOEFL << Life a is about SHARING
[5] TOEFL_Gang – ศูนย์สอบ TOEFL iBT ที่อยากแนะนำ
[6] My Experiences in America >> สอบโทเฟิล TOEFL IBT Test
[7] Sarunya.org >> กลับมาพร้อมคะแนน TOEFL
[8] TKoy: สถานที่สอบ Toefl ในกรุงเทพ (สอบที่ไหนดี)
[9] เลือกศูนย์สอบ TOEFL iBT ที่ไหนดีครับ

November 18, 2009

Introduction to GRUB2

Filed under: Linux — Tags: , , , , — KaewGB @ 10:24 pm

I just installed Ubuntu 9.10 ‘Karmic Koala’ in my notebook, which already had Windows XP and Fedora Core 10 installed, and the new GRUB2 boot menu created by Ubuntu only consisted of boot entries for itself and Windows XP — FC10’s entry is missed as expected. So I need to take care of it a little bit to get my FC10 back.

The problem is, GRUB2 doesn’t have our familiar configuration file, /boot/grub/menu.lst, anymore! And it took me more than half an hour to learn configuring GRUB2. Most of the time I got lost in some random webboards with too little details about GRUB2 (my bad, maybe I used the wrong keywords = =”), until I found this very useful web page: https://help.ubuntu.com/community/Grub2 — it contains everything I want! But it’s a bit too detailed so I decided to make some quick reference here:

  • /boot/grub/menu.lst has been replaced by /boot/grub/grub.cfg
  • /boot/grub/grub.cfg does not meant to be edited by any user (even root), it should be generated from the scripts in /etc/grub.d/
    • In each (re)generation of grub.cfg, all scripts in /etc/grub.d/ are executed.
    • The default scripts names are lead with a 2-digit number. The lower the number, the sooner it will be executed.
    • We can add arbitrarily any scripts of any names as well.
  • Some scripts worth mentioning in /etc/grub.d:
    • 10_linux: generates entry for the current OS. (Ubuntu 9.04 in this case)
    • 30_os-prober: generates entry for the other OSes it detects. (Windows XP in this case)
    • 40_custom: free space for us to add our custom entries = the new /boot/grub/menu.lst

So… what to do?

  • Copy the entry template from the file /boot/grub/grub.cfg, such as
    • menuentry “Ubuntu, Linux 2.6.31-14-generic” {
      set root=(hd0,7)
      search –no-floppy –fs-uuid –set 3259f467-9dab-45c2-9896-d9963b0629fc
      linux    /boot/vmlinuz-2.6.31-14-generic root=UUID=3259f467-9dab-45c2-9896-d9963b0629fc ro   quiet splash
      initrd    /boot/initrd.img-2.6.31-14-generic
      }
  • Paste it in 40_custom and then modify. (The text in green above is what should be edited)
    • Some keywords/modifiers are changed
      • title -> menuentry
      • root -> set root =
      • kernel -> linux
    • Be careful with the partition numbers, GRUB2 start the count at 1.
    • Device numbers still start at 0.

    The text in orange -> I think it’s not necessary so I commented it out (using #) and it still works, still haven’t searched what it means yet. (If anyone knows please tell me, thank you ^^)

  • If you want to change the order the custom entries appear, then just change the file name (split in to many files too if needed)
    • Every custom files should begin with these 2 lines (to make the system write the contents in all lines below to grub.cfg):
      • #!/bin/sh
      • exec tail -n +3 $0
  • run sudo update-grub to cause all the scripts to be executed :)

May 27, 2009

Barcamp Bangkok #3 – Day 2

Filed under: BarcampBangkok — Tags: — KaewGB @ 12:28 pm

FYI: Barcamp Bangkok 3 was held on Saturday 23th- Sunday 24th May 2009 at Sripatum University (SPU), read more details at http://barcampbangkok.org/

วันอาทิตย์ คนมาน้อยลงมาก (ตามคาด) วันนี้ก็ฟังอย่างเดียวอีกเช่นเคย ด้วยข้ออ้างที่ว่าเมื่อวานไม่ค่อยสบาย ไม่ได้แก้สไลด์ (จริงๆ ก็คือปอด ไม่อยากพูด ยังรู้ไม่เยอะพอด้วย 555) แต่โอกาสหน้าคงได้พูดแน่ เพราะยังทำโปรเจคเรื่องนี้ต่อ ถึงตอนนั้นคงเชี่ยวกว่านี้มาก — ลืมบอกไป จะพูดเรื่องสถาปัตยกรรม Cell BE

ไปถึง 10 โมงกว่าๆ เดินเข้ามาเจอนนท์ (SKE) ขอเสื้ออยู่ เพราะเมื่อวานลืมเอา ก็เลยเข้าไปขอเสื้ือให้อาไฉด้วย เพราะอาไฉ register สายไป เืมื่อวานเค้าไม่ยอมให้เสื้อ วันนี้เป็นอีกคนนึง เค้ายอมให้แฮะ แต่เหลือแต่ size XXL …ตายแน่อาไฉ 55555

มาสรุปเนื้อหาแต่ละเซสชั่นต่อดีกว่า จะพยายามให้สั้น

(more…)

May 26, 2009

Barcamp Bangkok #3 – Day 1

Filed under: BarcampBangkok — Tags: — KaewGB @ 1:56 pm

FYI: Barcamp Bangkok 3 was held on Saturday 23th- Sunday 24th May 2009 at Sripatum University (SPU), read more details at http://barcampbangkok.org/

ตอนบาร์แคมป์ 2 ว่าจะบล็อกแล้ว แต่สุดท้ายก็ยุ่งและผัดวันประกันพรุ่งจนไม่ได้เขียน คราวนี้ยังพอมีเวลาว่าง เพิ่งจบบาร์แคมป์ก็รีบๆ เขียนซะ (ยกให้เป็นเอนทรี่แรกของบล็อกใหม่เลย)

เช้าวันเสาร์รู้สึกไม่ค่อยสบายเท่าไหร่  (ไม่ใช่หวัดค่า) แต่มีหรือจะพลาดวันแรกของบาร์แคมป์ได้  (ถ้าพลาดนี่เสื้อไซส์ S, M ไม่มีเหลือแน่นอน 55) บวกกับเพิ่งชวนพ่อ กะเพื่อนอีก 2 คน (อาไฉ กะโอ๊ต) ไปบาร์แคมป์เพิ่มได้ คนถูกชวนอุตส่าห์ไปแต่คนชวนไม่ไปมันก็กระไรอยู่ สุดท้ายก็ถ่อไปถึงจนได้ ประมาณเกือบ 11 โมง โชคดีที่เค้ายังโหวตๆ กันอยู่ ก็ไปรับเสื้อ รับ wi-fi โหวตๆ เรื่องที่อยากฟัง แล้วก็เริ่มฟังเซสชั่นดังต่อไปนี้

*หมายเหตุ: เซสชั่นที่คนพูดเป็น N/A คือเข้าไปไม่ทันคนพูดแนะนำตัว หรือคนพูดไม่ได้แนะนำตัว หากใครทราบช่วยบอกด้วยค่ะ จะได้ใส่เป็น credit

(more…)

Blog at WordPress.com.