ข้ามไปที่เนื้อหาหลัก

บทความ

หมดหวังกับรายการทีวีในประเทศไทย

ไม่ได้เขียน Blog มานานสกิลด้านเขียนไม่รู้จะยังดีเหมือนเดิมมั้ยนะครับ (หัวข้อก็จะ clickbait  ตามแนว Content ยุคใหม่) จริงๆ แล้ว คิดจะเขียนมาตั้งนานแล้วแต่ไม่รู้จะเขียนอะไร พอดีวันนี้อ่านเจอโพสต์ของเพื่อนในเฟสบุ๊คที่แชร์มา หัวข้อประมาณว่า ประเทศไทยมีความพยายามทำให้คนโง่ลง คือผมก็ติดตามข่าวมาเรื่อยๆ ช่วงไปอยู่จีนก็ยังติดตามอยู่ แต่มีความรู้สึกว่าข่าวของประเทศเรากับประเทศจีนนี่คือคนละขั้วเลย ที่จีนข่าวส่วนใหญ่จะเป็นข่าวที่ค่อนข้างมีสาระ และไม่มีข่าวงมงาย น่าจะเนื่องมาจากกฎหมายของประเทศไทยที่ค่อนข้างคุมเข้มกับสื่อ ย้อนกลับมาที่ไทย ประเทศเราไม่มีกฎหมายคุมเข้มสื่อเหมือนประเทศจีนขนาดนั้น สื่อประเทศเราค่อนข้างมีอิสระในการนำเสนอ แต่หลังๆ มานี่ผมเห็นแต่ข่าวอาชญากรรม หรือข่าวให้หวยซะส่วนใหญ่ ก็เข้าใจว่าต้องการยอดผู้ชม แต่การที่สื่อนำเสนอแบบนั้นนี่ไม่แน่ใจว่าจะดีต่ออนาคตประเทศชาติหรือไม่นะครับ คนดูข่าวเพื่อจะรอเลขเอาไปซื้อหวย ไม่แน่ใจว่าสนใจอะไรมากกว่าระหว่างหวยกับข่าว ตอนจะมีกฎหมายหวยออนไลน์ก็เห็นออกมาต่อต้านบอกมอมเมาประชาชน แต่สิ่งที่สื่อกำลังนำเสนออยู่นั้นมันย้อนแย้งในตัวเองชอบกล...

Fluent NHibernate Configuration

I have a C# project which I have to develop for MS SQL Server, customer requirment, but since I do not have a license for it. Then I decide to go with NHibernate but NHibernate is relied on XML based configuration, which is not my preference, I research a little bit more, definitely I found out Fluent NHibernate is a good replacement for XML based configuration. I can map the entities with C# code that can reduce the errors prone in my code. I use Firebird database in the development, though it can be used in production, I define the mapping as normal NHibernate (also Hibernate in Java). But when I try to build the configure for Fluent NHibernate, it's not the same as SQLite example, I try to fine the solution one by one from StackOverflow and the steps below can solved my problem. Add the reference for NHibernate and its dependecies (NHibernate.dll, Iesi.Collections.dll) Add a reference for Fluent NHibernate (FluentNHibernate.dll), you can get it from nuget packacge manager...

Standalone MySQL setup

Currently I am learning Spring Boot. I follow some tutorials but there is a part requires to use DBMS. So I decide to use MySQL as a database. But I don't want to install it as as service neither install with Windows installer. I decide to download an archive version to run it as standalone application. I expect it will be ready to use as the installer version but it is not as easy as I think. The first thing you have to do after extract the archive file is to copy my-default.ini to my.ini Open my.ini with notepad or text editor that you like, edit these lines as show below basedir = X:/<pat to your mysql folderh>/mysql-5.7.9-winx64 datadir = X:/<pat to your mysql folderh>/mysql-5.7.9-winx64/data Important!  Don't forget to create the folder data to the path they you refer in datadir  Second you have to mysql bin directory and then input the following command in command prompt mysqld --initialize --console --console is optional to see the verbose in...

Xiao Mi band reached 1 million ship out

Today Xiao Mi band weibo official account announced that they already ship out 1 million bands since it was launch. For more information follow the link

Set up uncache proxy server - Privoxy

In this article I will show you how to configure privoxy on Windows. I note this method on my blog because I have some problems with my VPN service provider. They don't allow me to share my proxy on another devices in my LAN if I need to share I have to pay more extra money. Thus it would be better I can set up my PC to be a proxy server and by pass to this VPN route. First: You need to do is download an program Privoxy . The version I download is privoxy_setup_3.0.21.exe.(510.4 kB) which is not a small application but it is very useful. Second: You need to install it on your PC. Just only click next next and next.. Third: You need to do is configure your Privoxy server to by pass to VPN proxy server. Edit Main Configuration  Append 2 lines in section 5.1 to enable forward proxy to VPN proxy. forward    /    127.0.0.1: forward :443 127.0.0.1:  Modify 1 line in section 4.1 listen-address  127.0.0.1:8118 -> listen-addr...

Mighty No. 9 was already funded

Yesterday I received an email from Kickstarter that the viral crowdfunding game "Mighty No. 9" was already funded. This project is reunion project of the same team with "Rockman" . At the time I am writing now it was already achieved Mac and Linux version by $1,387,057 (the achievement is $1,350,000) but it is still far away from console version if you would like play it on your favorite console you can pledge the project on http://www.kickstarter.com/projects/mightyno9/mighty-no-9 . By the way the game will be launch in 2015 and please accept the risk if the project would not success.

Enable Skype icon on Unity notification panel on Ubuntu 13.04

Due to I switch back from Windows to Ubuntu. The most important program for me is " Skype ". After I download installation from Skype official website it seems there is no problem at all I am able to installed in by Ubuntu Software Center. The problem  was occurring after I launch Skype and close the main window opens I expect it will be closed and shown the icon on notification panel area. But there is no icon on notification area then I launch Skype application again the windows instance comes up thus I try to log in again, suddenly I get an error message about another instance was already running. After I search on google a bit I found that Ubuntu 13.04 was removed system tray whitelist feature from its unity. so I found this website to re-enable the whitelist by below instruction. sudo add-apt-repository ppa:timekiller/unity-systrayfix sudo apt-get update sudo apt-get upgrade After finished installation I do the following steps to add Skype to notification whitelis...

Compact your eclipse 4.x interface and make it looks better in Ubuntu 13.04

It has been a long time I haven't used Ubuntu since it has some issues about my laptop driver. Yesterday I decided to format and install Ubuntu 13.04. It seems everything work well with a little bit effort to fix some driver problems. Therefore I am as Java developer I cannot avoid to use eclipse as my default IDE (personal preference) but after I installed Eclipse Kepler (4.3). There is an ugly theme with weird gradient, let say it looks worse than in Windows, so I search for the solution, eventually I got one solution that we need to change the theme in eclipse back to "Classic" theme (Window->Preferences->General->Appearance) in my opinion it looks better than in . Another problem is eclipse layout is not compact as in Windows nor as same as former version (3.x). The solution to fix this is create a file .gtkrc-2.0 in your home directory with the following content . style "gtkcompact" { GtkButton::default_border={0,0,0,0} GtkButton::default_...

เตือนภัย Windows ของแท้ ไม่ขายผ่านเน็ทนะ

เนื่องจากปกติผมจะใช้ Ubuntu ในการใช้งาน แต่เนื่องจากมีความจำเป็นต้องใช้ Windows มาเพื่อใช้งาน + เล่นเกมส์ เลยไปสอบถามเพื่อนที่อยู่บริษัทขาย Software และเพื่อนก็บอกว่าที่บริษัทขาย Windows ได้ถูกกว่า เพราะซื้อจากผู้ขายที่ซื้อมาจากต่างประเทศ จะได้ราคาที่ถูกกว่า (ซึ่งข้อเท็จจริงผมก็ไม่รู้ว่าเป็นอย่างไร) โดยใจจริงก็กำลังจะซื้อจากร้าน ไปสอบถามมาแล้วราคาอยู่ที่ประมาณ 6900 ~ 7000 บาท (Windows 7 Professional) แต่ของที่เพื่อนนำมาขาย ได้ราคาอยู่ประมาณ 3500 บาท     ก็เลยตัดสินใจซื้อเลย เพราะเห็นว่าถูกมาก แต่หลังจากซื้อมาจนแล้วจนรอดก็ยังไม่ได้ใช้งาน จนกระทั่งผ่านมาได้ประมาณ 1 ปี เพิ่งจะนำมาติดตั้งปรากฏว่า Activate ไม่ผ่าน ซึ่งติดต่อไปยังเพื่อนผม ก็บอกว่าจะติดต่อทาง Vendor ให้ (มารู้ทีหลังว่าขายอยู่บนอินเตอร์เน็ท) แต่พอติดต่อไปก็เหมือนจะช่วยเหลือ และส่ง Serial ชุดใหม่มาให้ และบอกจะส่งกล่องมาให้ทีหลัง แต่ก็ถ่วงเวลาไปเรื่อยๆ จนตอนหลังก็ขาดการติดต่อไป หลังจากนั้นผมก็ได้ติดต่อไปทาง Microsoft Thailand  02-263-6888 ( http://www.microsoft.com/thailand/customerrelations/ ) ทาง Micr...

Shell In a Box - Shell on Web Interface

shellinabox เป็นโปรแกรมที่ทำให้เราสามารถใช้ shell หรือ terminal ผ่านเว็บได้ ซึ่งจะคล้ายๆ กับ WebShell (WebShell นั้นพัฒนาต่อยอดมาจาก Ajaxterm ) แต่ shellinabox เป็นตัวที่อยู่ใน wiki ของ Ubuntu วันนี้เลยขอสอนการติดตั้งตัวนี้ครับ และเขียนไว้เป็นบันทึกกันลืมไปในตัว ขั้นแรกให้ดาวน์โหลดตัว shellinabox ของ platform ที่เราใช้อยู่ ในหน้า Download นำไปไว้ใน home folder หรือตำแหน่งที่ต้องการ หลังจากนั้นให้พิมพ์ sudo dpkg -i shellinabox_2.10-1_i386.deb เนื่องจากผมใช้ Ubuntu หารใครใช้ Redhat base ก็ทำตาม RPM เอานะครับ หลังจากนั้นให้เรา start server shellinabox ขึ้นมา ด้วยคำสั่ง sudo /etc/init.d/shellinabox start หรือ sudo invoke-rc.d shellinabox start ซึ่งเมื่อรันแล้ว shell in a box นี่จะรันอยู่บน port 4200 ด้วย protocol HTTPS ครับ ให้เราเปิด Browser ขึ้นมาแล้วเข้าไปที่ https://<ip เครื่องที่เราติดตั้ง>:4200 ก็จะขึ้นหน้าตาดังรูปครับ หน้า login ที่เข้าจาก Shell In a Box

Alfresco Share กับ Error Too many open files

หากใครใช้ Alfresco Share บางที่จะพบว่า หากกดลิงค์ต่างๆ เร็วๆ ไปสักพักจะเจอหน้า Error ซึ่งจาก Error ที่หน้าเว็บฟ้องจะไม่บ่งบอกว่าเกิดอะไรขึ้น เพราะตัวเว็บนั้นจะเรียก Web Script จาก Alfresco RESTful WebService อีกทีนึง สาเหตุที่แท้จริงของ Error นี้คือ ตัว lucene ซึ่งเป็น Engine ที่ทำการ Index file แม้ว่าตัว lucene 2.0 จะแก้ให้เกิดปัญหานี้น้อยลงแล้วก็ตาม แต่เราก็ยังพบปัญหาอยู่ วิธีแก้ไข ให้เราไปเพิ่ม limit ของการเปิดไฟล์ให้มากขึ้น ตัวอย่างเช่นใน ubuntu ใช้คำสั่ง ulimit -n ด้วย user ที่รัน alfresco พบว่าค่าเริ่มต้นที่ระบบตั้งให้คือ 1024 ซึ่งไม่เพียงพอ ให้เราไปเพิ่มในไฟล์ /etc/security/limits.conf ดังนี้ <username> soft nofile 4096 <username> hard nofile 65536 สมมติว่าผมใช้ user เป็น seven ในการ login เข้า shell จึงเพิ่มเป็น seven soft nofile 4096 seven hard nofile 65536 ให้ทำการ logout และ login อีกรอบแล้วพิมพ์คำสั่ง ulimit -n อีกครัง จะพบว่าค่าที่ตอบกลับมาคือ 4096 ตามที่เราตั้งไว้ เป็นอันว่าเรียบร้อยแล้วสำหรับการแก้ปัญหาที่ error ไม่ทราบสาเหตุจาก alfresco s...

Lady Java

ลองฟังกันดูครับ

Google TV and Android 2.2 (Froyo) and Business Model

จากงาน Google I/O 2010 ที่ผ่านมา Google นำเสนอผลิตภัณฑ์ใหม่ของ Google ด้วยกันสองตัว คือ Google TV Android 2.2 (Froyo) โดยรวมๆ แล้วสิ่งที่ Google เสนอนั้นอาจดูเหมือนเป็นการเสนอผลิตภัณฑ์ของ Google ตามปกติ แต่จริงแล้วมันคือช่องทางในการจำหน่ายในอนาคตของ Google นั่นคือ Marker Place นั่นเอง Google พยายามจะนำ Technology ต่างๆ มาผสมกันให้อุปกรณ์ทุกชนิดสามารถ Sync กันได้ ในอนาคตไม่แน่เราอาจจะผูกติดกับ Google ไปตลอดก็เป็นได้ เพราะใน Keynote ครั้งนี้นั้นสิ่งที่ Google นำมาเสนอคือ เค้าสามารถบอกเราได้หมดว่าเรามี อุปกรณ์ Android อะไรบ้าง และมีกี่ตัว แต่ละตัวลงอะไรเอาไว้บ้าง ช่องทางการจำหน่ายนี้อาจดูไม่น่าตื่นเต้นมากนัก แต่หากวันหนึ่ง อุปกรณ์ทุกชนิดมี Android มาลงล่ะก็ จะทำให้ Google สามารถทำการโฆษณาต่างๆ ผ่านทางช่องทางนี้ได้อย่างดีเยี่ยม อาจกล่าวได้ว่าการที่ Google ทำ Android มาให้ใช้กันฟรีๆ จริงๆ แล้วมันเป็น Business Model ที่ Google ต้องการเข้าถึงลูกค้าให้ได้มากที่สุด เพื่อที่จะขยายตลาดโฆษณาของตนต่อออกไป นั่นคือช่องทางการจัดจำหน่ายที่เราทั้งหลายอาจคิดไม่ถึงก็เป็นได้ บทความนี้เป็นบทความที่วิเคราะห์...

Ubuntu 10.04 Lucid Lynx มาแล้วครับ

สามารถดู features ได้ที่ Take The Ubuntu Tour Preview (ไม่ใช่ Review นะครับ) ภาษาไทย ดูได้จาก Blognone โหลดได้ที่ Ubuntu Download หรือ mirror ku

Netbeans IDE 6.9 Beta ออกแล้ว

เวอร์ชั่นนี้จะเน้นไปที่ JavaFX (สงสัยอยู่ว่าเมื่อไหร่มันจะสู้ Flash หรือ Silverlight ได้เนี่ย) สามารถสร้างได้แบบตอนสร้าง Swing GUI Builder ได้แล้ว นอกจากนี้ยังสนับสนุนการสร้าง OSGi bubdles ด้วย Maven อีกด้วย สนับสนุน JavaFX SDK 1.3, PHP Zend Framework, Ruby on Rails 3.0 นอกจากนี้ยังปรับปรุงประสิทธิภาพของ Java Editor , Dubugger, issue tracking (ประมาณพวก redmine, trac, bugzilla) อีกด้วย และอื่นๆ อีกมากมายติดตามได้ที่ลิงค์เลยครับ Netbeans IDE 6.9 Beta Release Information

HipHop JIT จาก Facebook (ไม่ใช่แนวเพลงนะ)

จากก่อนหน้านี้ที่ facebook ประกาศจะ opensource HipHop JIT ตอนนี้ก็ได้ปล่อยมาให้โหลดกันแล้วนะ HipHop ไม่ใช่ตัวแปลภาษานะครับ(Compiler) มันเป็นเพียงตัวแปลง source code เท่านั้นให้ code PHP กลายเป็น C/C++ นั่นเอง แล้วก็ใช้ C Compiler ทำให้มันเป็น native อีกทีครับ(น่าจะเป็น GCC นะครับ เพราะ facebook นั้นขึ้นชื่อว่าองค์กร Opensource จ้าา) โหลด HipHop JIT (แต่ต้องใช้ GIT นะคร้าบบบ) ที่มา Facebook announced the HipHop for PHP runtime environment

Martin Fowler เปลี่ยนชื่อ IoC เป็น Dependency Injection

ไม่มีอะไรใหม่ครับ แค่เค้าเปลี่ยนชื่อ Pattern จากที่เค้าตั้งไว้ว่า Inversion of Control แต่สงสัยพี่ท่านจะทนต่อกระแส Lightweight Container ไม่ไหวเลยเปลี่ยนชื่อ Pattern ตามเป็น Dependency Injection อ่านเพิ่มเติมได้ที่ Inversion of Control Containers and the Dependency Injection pattern

Hibernate 3.5.1 Released - Supporting JSR 317

JBoss ได้ปล่อย Hibernate 3.5.1 มาแล้วเมื่อปลายเดือนที่แล้ว สิ่งที่น่าสนใจคือมัน s upport JSR 317 หรือที่รู้จักกันในนามของ The JPA 2 Specification (ทำไม opensource มัน Spec เยอะจัง ท่าทางจะเลือกมากนะ =P ) สิ่งที่เปลี่ยนแปลงไปมีดังต่อไปนี้ JSR 317 (JPA2) Support รวม hibernate-annotations, hibernate-entitymanager และ hibernate-envers เป็น core project แล้ว ปรับปรุงประสิทธิภาพการ Cache Immutable support อ่านอย่างเดียว รองรับ JDBC 4 ถ้าใช้ใน JVM 1.6 รองรับการทำงานในระดับ column ตอนนี้ทำได้แต่ในไฟล์ hbm เท่านั้นครับ โหลก Hibernate 3.5.1 แปลจาก TheServerSide

เปลี่ยนเว็บเดิมให้ Pluggable ด้วย OSGi

เป็นบทความภาษาอังกฤษครับลองอ่านดู เปลี่ยน Web application เดิมให้ยืดหยุ่นด้วย OSGi เพิ่มเติ่มให้ครับ OSGi คืออะไร เป็น Specification ครับที่เจ้าใหญ่ของ Java เค้าทำมาเพื่อให้เกิดความเป็น modularized ครับ ซึ่งถ้าจะให้เห็นภาพคือการทำงานของ plugin น่ะครับ ที่เราสามารถเปิดปิดการทำงานของมันได้ตลอดเวลาเมื่อเอามาใส่ web application ก็ทำให้เราสามารถถอดหรือเสียบ plugin ใหม่ๆ ได้ตลอดเวลา โดยที่ plugin นี้ใน OSGi จะเรียกว่า module ครับ หรือถ้าเป็นศัพท์เทคนิคเค้าจะเรียกว่า Bundle ครับ ลองไปอ่านบทความกันดูครับ ซึ่ง OSGi นั้นจริงๆ แล้วมันเป็น Specification เหมือนกับ EJB หรือ Servlet นี่แหละครับ แต่ตัว implement นั้นแล้วแต่ว่าใครจะนำไป implement นะครับ ที่ดังๆ อยู่ในตอนนี้ก็เห็นมีอยู่สองสามเจ้า Equinox อันนี้หลายๆ คนคงจะคุ้นเคยกันดีมันคือเจ้า eclipse ของเรานั่นเองใช้ตัวนี้อยู่ครับ ส่วนอีกตัวเป็นของ Apache Felix ครับ ลักษณะการใช้งานจะแตกต่างกันบาง และตัว module อาจจะเรียกไม่เหมือนกันบางอันเป็น Bundle บางอันอาจไม่ใช่ ผมก็จำไม่ได้แล้วเหมือนกันครับ ลองไปศึกษากันดูครับ น่าสนใจทีเดียว อีกตัวนั้นจะเป็นของ Sp...