Monthly Archives: December 2008

Merry X’Mas 2008

แวะมาทักทายระหว่างหยุดยาวไปต่างจังหวัดฉลองปีใหม่ข้ามปี
ถึงวันคริสต์มาสแล้วไม่ทักทายก็ดูจะไม่เข้ากับเทศกาล

Merry X’Mas ครับทุกๆ คน

มีความสุขมากๆ ในคืนคริสมาสต์อีฟนะครับ

Share

CrossPress v0.2 is now available.

The consequent release is about adding new feature and fixing some bugs.  The details are as follows,

  • Post only summary text.
  • Fixed some option value cannot be committed to database.
  • Don’t crosspost twice in case of edit the posted page.

Get new CrossPress version by locating into project home,

Share

Ubuntu – การติดตั้ง Apache-MySQL-PHP

สำหรับผู้ที่ไม่ต้องการติดตั้ง LAMP แต่ต้องการลง Apache -MySQL – PHP แบบแยกส่วนบน Ubuntu นั้น สามารถทำได้ตามขั้นตอนดังนี้

1. ติดตั้ง Apache 2

1.1 พิมพ์คำสั่งเพื่อติดตั้ง Apache 2

sudo aptitude install apache2

1.2 ลองเปิด Browser เพื่อทดสอบว่า Apache 2 ได้ทำงานอย่างถูกต้อง โดยพิมพ์ url ดังนี้ (ถ้า Apache ทำงาานแล้ว Browser จะขึ้นหน้าที่เป็น default ว่า “It works!!!”)

http://localhost

1.3 Home Directory ของ Apache 2 จะเริ่มต้นที่

/var/www

หรือตรวจสอบ Home Directory ได้ดังนี้

cat /etc/apache2/sites-available/default

โดย Home Directory จะอยู่ที่บรรทัดที่ขึ้นต้นด้วยคำว่า DocumentRoot ในกรณีที่ apache ไม่ทำงาน ให้ลอง restart server โดยใช้คำสั่งดังนี้

sudo /etc/init.d/apache2 restart

2. ติดตั้ง PHP5

2.1 ทำการพิมพ์คำสั่งเพื่อติดตั้ง PHP5 ดังนี้

sudo aptitude install php5 libapache2-mod-php5

2.2 ลองสร้างไฟล์ download.php ไว้ที่ /var/www/

echo “<? echo ‘test’; ?>” > download.php

และไปที่ Browser พิมพ์ในช่อง URL ว่า http://localhost/download.php เพื่อทดสอบว่า php ใช้งานร่วมกับ apache ได้แล้ว ถ้า Browser พยายามดาวโหลด download.php แทนที่จะประมวลผลไฟล์ให้พิมพ์คำสั่งดังนี้ เพื่อทำการเพิ่มให้ Apache รู้จัก php แล้วทำการ restart apache

sudo a2enmod php5 sudo /etc/init.d/apache2 restart

3. ติดตั้ง MySQL เพื่อ PHP5

3.1 พิมพ์คำสั่งดังนี้เพื่อทำการติดตั้ง MySQL เพื่อใช้งานกับ PHP5

sudo aptitude install mysql-server mysql-client php5-mysql libmysqlclient15-dev

3.2 เมื่อทำการลง MySQL เสร็จแล้วไม่มีการถามให้เราใส่ค่า Password ต้องทำการ reset password ใหม่ดังนี้

sudo dpkg-reconfigure mysql-server-5.0

จะมี Dialog ให้เราใส่ค่า Pasword สำหรับ root เพื่อใช้งาน MySQL ต่อไป

3.3 ติดตั้ง phpMyAdmin เพื่อใช้ควบคุม MySQL

sudo aptitude install phpmyadmin

พอติดตั้ง phpmyadmin เสร็จแล้วจะมี Dialog ถามว่าเราใช้ Webserver อะไร ให้เราเลือก Apache 2 แล้วกด Enter

Share

CrossPress releases – WordPress Plugin (Crosspost)

Regarding to the question, how I can publish post in my atthakorn.com and the same content is automatically added into atthakorn.multiply.com; my favourite social network. Therefore I start developing a wordpress plugin; WordPress-2-Multiply, to solve the problem. Originally it only does the job posting to multiply  each time I have a post in my official wordpress site. It works fine for a long.

Suddently, I was just noticed that the protocol (post-via-email) I used in plug-in, can be generic used across social network site. So I renamed WordPress-2-Multiply to CrossPress and extend it to behave more feature.

CrossPress is the wordpress-plugin which automatically, cross-posting to associated site/blog to enabling the post-via-email option with PIN code e.g. multiply.com, livejournal.com, blogspot.com and much more.

Initially, CrossPress contains these features,

  • Immediately, crossposting to target sites when publishing a new post.
  • Multiple sites support.
  • Append signature for each post.

Know CrossPress more here,

Share

ประวัติของภาษาคอมพิวเตอร์

นับตั้งแต่ภาษา Fortran ได้ถือกำเนิดขึ้นในปี 1954 (ไม่รวมถึงภาษาระดับต่ำเช่น ภาษาเครื่อง (Machine) หรือ ภาษา Assembly พัฒนาการของภาษาคอมพิวเตอร์ได้แตกแขนงอย่างมากมายเป็นกิ่งก้านสาขา ภาษาคอมพิวเตอร์เก่าๆ บางภาษาก็ยังมีการใช้งานให้เห็นในปัจจุบัน (Cobol) แต่ก็ถูกปรับปรุงให้ทันสมัยยิ่งขึ้น บางภาษาก็เป็นการยุบรวมจุดเด่นของภาษาคอมพิวเตอร์สองตัวเพื่อพัฒนาเป็นภาษาใหม่  การอยู่รอดของภาษาคอมพิวเตอร์จึงขึ้นอยู่กับความเหมาะสมของการใช้งาน ความสามารถในการแก้ไขปัญหา ความยากง่ายของโครงสร้างภาษา และความนิยมของผู้พัฒนา

ภาษาคอมพิวเตอร์ก็เหมือนสปีชี่ย์หนึ่งของสิ่งมีชีวิต ที่มีการวิวัฒนาการ มีการออกแตกหน่อ(สิ่งมีชีวิตเซลล์เดียว) หรือแม้กระทั่งการผสมพันธุ์เพื่อรวมลักษณะที่ดีของสองภาษาที่แตกต่างกัน เพื่อก่อกำเนิดภาษาคอมพิวเตอร์ภาษาใหม่ เพื่อความอยู่รอด (ขึ้นอยู่กับความนิยมของผู้พัฒนาและความสามารถของภาษา) ในแต่ละยุคแต่ละสมัย

ปัจจุบันมีภาษาคอมพิวเตอร์ ที่ถูกปรับปรุงให้เหมาะสมกับการทำงานด้านต่างๆ มากมายหลายภาษาให้เลือกใช้ ตามลักษณะของซอฟแวร์ที่แบ่งออกเป็น 3 ลักษณะคือ

  1. ภาษาคอมพิวเตอร์ที่เหมาะสมกับซอฟแวร์ที่ใช้งานบนระบบอินเตอร์เนท Web Application) เช่น  php, ruby, asp, javascript, flex
  2. ภาษาคอมพิวเตอร์ที่เหมาะสมกับซอฟแวร์ที่ใช้งานเฉพาะบนเครื่องคอมพิวเตอร์ (Standalone) เช่น c/c++, basic, cobol, delphi
  3. ภาษาคอมพิวเตอร์ที่รวมสองลักษณะข้างต้นไว้ด้วยกัน เช่น java, python, perl, และบางภาษาในตระกูล .net

สำนักพิมพ์ O’reilly จัดพิมพ์วิวัฒนาการของภาษาคอมพิวเตอร์เป็นไฟล์ PDF ไว้ให้ผู้ที่สนใจได้ดาวโหลดไปศึกษาที่นี่ Programming Lanuage Poster (701k) หรือกดที่รูปข้างล่างเพื่อดาวโหลดไฟล์ในรูปแบบของภาพ JPG.

วิวัฒนาการของภาษาตั้งแต่ปี 1954-2004

History of Programming Language

Share

Mike’s farewell

Last night, we organized the farewell party for Mike; my boss. He is going back to UK next week after he has been working at Thailand for year and a half. The club we choosed for this party is Sortel at Narathiwas road. The party started at 7:00 PM until the club closed.

Conclusively, definitely, there is no doubt. We all put ourselves being drunk , especially my boss.

Yes, again! the mission has been completed.

Share

Smart Phone powered By Android OS

Since T-Mobile has released HTC Dream G1 at the end of October’08. Now There are more two brands of smart-phone which are powered by Google Android OS and coming up in the year 2009.  Here are they,

T-Mobile G1 (HTC)

G1 is the first Android phone. It comes with the great hardwares like iPHONE except the multi-touch feature. G1 has been released since end of October’08 and suddently with Google announced the first release of Android SDK.

QIQI – i6

QIQI – i6 is the Chinese  brand of smart phone. QIQI has two versions; first is running on Android and the second one is powered by Window Mobile.

QIQI comes with2.6 inches touch screeen, cpu speed is 624 MHZ. The Bluetooth, GPS, Wi-Fi are all avalialbe except the 3G system is missing. QIQI plans to release these two versions of phone next year.

KOGAN AGORA

KOGAN is the austrailian brand. They develop Blackberry-like phone with 2.5 inches touch screen but powered by Google Android OS. KOGAN AGORA feature is likely to other brands including GPS, 3G, Wi-Fi support.

KOGAN now opens for booking. The phone will be dispatched to the customer an the end of January’09.

Share

The Day The Earth Stood Still

เมื่อวัตถุลึกลับในอวกาศอันไกลโพ้นกำลังเดินทางด้วยความเร็วสูง มุ่งสู่จุดหมายปลายทางที่ชื่อว่าดาวโลก พร้อมๆ กับที่ดาวเทียมสอดแนม และเครื่องยิงขีปนาวุธเพื่อความมั่นคงของกระทรวงกลาโหมสหรัฐได้หยุดทำงานโดยไม่ทราบสาเหตุ ส่งผลให้แผนการที่จะยิงขีปนาวุธเพื่อเบียงวิถีการโคจรของวัตถุประหลาดได้ถูกล้มเลิก ดังนั้นเจ้าหน้าที่ผู้เกี่ยวข้องได้เรียกระดมนักวิทยศาสตร์ และผู้คนจากหลากหลายสาขาวิชาระดับหัวกะทิ เพื่อมาวิเคราะห์หาทางหยุดยั้งวัตถุลึกลับที่เดินทางมายังโลก และพร้อมจะพุ่งชนโลกในอีกไม่กี่ชั่วโมง ด้วยความเสียหายที่มิอาจประมาณค่าได้

แต่แล้วเมื่อถึงเวลาวัตถุลึกลับได้ชะลอความเร็ว เผยให้เห็นเป็นลักษณะทรงกลมกลางน่านฟ้ากรุงนิวยอร์ค และร่อนลงสู่เซ็ลทรัลพาร์ค ท่ามกลางฝูงชนนับพันที่กำลังเดินขวักไขว่ หน่วยความมั่นคงได้เตรียมพร้อมส่งเจ้าหน้าที่พร้อมอาวุธหนักเข้าประจำการเพื่อพร้อมจะโจมตีวัตถุดังกล่าวได้เมื่อรับคำสั่ง และนักวิทยาศาสตร์ ในกลุ่มนักวิทยาศาสตร์นี้ เฮเลน นักจุลชีววิทยา นางเอกของเรื่องก็ประจำในหน่วยเฉพาะกิจนี้ด้วย เมื่อวัตถุทรงกลมได้ลงจอดลง ณ เซนทรัลพาร์คแล้ว ได้มีสิ่งมีชีวิตเดินออกมา มุ่งตรงไปสู่กลุ่มเจ้าหน้าที่

เสียงปืนดังปัง สิ่งมีชีวิตนอกโลกได้รับบาดเจ็บสาหัส ทันใดนั้นได้มีหุ่นยนต์ร่างสูงใหญ่ ตาเดียว ออกมาเพื่อทำการรักษาบาดแผลเบื้องต้นให้กับมนุษย์ต่างดาวที่ได้รับบาดเจ็บ และเปิดจากโจมตีทำลายรถถัง และอาวุธหนักในบริเวณนั้นทันที โดยที่ไม่ได้ทำร้ายมนุษย์ จากนั้นก็หยุดนิ่ง

Read more »

Share

Mix them up.

Since yesterday, someone may notice the change little bit in my site. I had mixed up the Thai and English page into the single structure instead of maintaining them by using two sub-domains like this,

  • Thai – http://www.atthakorn.com
  • English – http://en.atthakorn.com

As there were twos sub-domains, I have to log-in to my writing panel and post the contents separately. It’s quite awful why I need to post the topic into the different places so I put them into one point access and seperate the English & Thai contents by apply taxonomy concepts as you see in the navigation on top of this site. There are two menu added; Thai, and English to classifiy the contents for each language.

Additionally, I put the function to this site to be able to publish the contents to my multiply site therefore for some people there who are in my network will have ability to see an article synchronizely.

Thus, from now my English site is removed and the only multi-language site will be online in the world of cyberspace.

Share

Tuning Eclipse 3.4 for Performance Purpose

Recently, eclipse has released the core ide development code named Ganymede. I had tried the changes and feel badly in performance experience (My office PC is little bit old).  So I need to tune up the eclipse engine so it can start and run smoothly during my work. Here is the few step to increase the performance in Eclipse.

Adding garbage collector option and memory capacity.
In eclipse.ini file under eclipse home directory, please add the following lines before next time starting eclipse


-vmargs

-Xms128m
-Xmx256m
-XX:+UseParallelGC

The first two items, -Xms128 and -Xmx256m indicate eclipse to start up with the minimun memory = 128 mb and maximun memory = 256 mb. This will reserve a heap to eclipse and avoid eclipse to memory leak in case of a big project assigned.

-XX:+UseParallelGC force the garbace collector to reclaim the memory in parallel. The parallel method will reduce the “Stop The World” pause time slightly.

Turn off some inessential options in Eclipse preference.
1. Uncheck “Enable Capture” option in Usage data collector menu under Eclipse Perferences.
2. In validation menu, again in preference. Please tun on “suspend all validators” option.
3. Ignore the spell checking features by check out “enable spell checking” option in preference/editors/text editors/spellings.
4. Not allow eclipse to build package automatically in eclipse menu -> project->build automatically.

PS. Some features are available in 3.4 eclipse. For the previous used in Europa 3.3–, you can set tune a part of feature without the whole steps.

Share
Page 1 of 212