Google


Monthly Archive for February, 2009

จัดไปกับ Microsoft Arc™ Mouse

วันนี้ผมไปรับ Mouse ตัวเก่า Logitech V270 Bluetooth, HD Optical ตัวเก่าที่เอาไปเคลมได้กลับมาเป็น V320 Wireless RF, HD Optical แล้วทีนี้เลยกะว่าจะเอาตัวที่เคลมได้ขายแล้วซื้อตัวใหม่ซึ่งก้คือ Microsoft Arc™ Mouse ตัวนี้นี่เองครับ วันนี้ผมมาเป็นเซลล์ขายของอีกแล้ว ;P แต่ถ้าอยากอ่านเต็ม ๆ แนะนำไปอ่านที่นี่ดีกว่าครับ Reviews "ARC Mouse" จาก ไมโครซอฟท์ เพราะว่าเค้า review ละเอียดดีมาก ๆ ;)

IMAG0752

กางออกมุนด้านหลัง

IMAG0753

มุมด้านหน้า ตัว scroll ได้แค่ขึ้นและลง โยงไปซ้ายและขวาไม่ได้

IMAG0754 IMAG0755

ที่เก็บ Snap-in Transceiver แปะไว้ด้านล่าง เป็นแม่เหล็กดูดติดกับตัว Mouse เลย

IMAG0758

ขนาดตัว Snap-in Transceiver ก็ไม่ใหญ่มากครับ

ราคาค่าตัว 2,150 บาทครับ จากร้าน P & Y ที่ Pantip ครับ

image

image

ขนาดตามมาตรฐานของมือเราพอดีครับ ไม่เล็กไป (ภาพจากเว็บ Microsoft)

  • 2.4 GHz – 30 ft. Wireless Range

    The 2.4 GHz wireless USB micro-transceiver connects wirelessly right out of the box with virtually no interference and has up to a 30 foot wireless range

  • Folds For Portability

    Mouse folds to 60% of its fully expanded size using the strong metal hinge. Folding the mouse closed automatically turns it off.

  • Scroll Wheel

    Save time and effort with the scroll wheel—navigate documents and Web pages without using the on-screen scroll bar.

  • Battery Status Indicator

    You won’t get caught with a dead battery—the Battery Status LED Indicator glows red when the battery is running low.

  • Snap-in Transceiver

    Micro-Transceiver snaps into the bottom of the mouse.

  • One-touch access to Windows Flip 3D*

    Allows you to flip through open windows in a stack and quickly switch between applications for added productivity.

  • Customizable Buttons

    Get quick access to the media, programs, and files you use most often with customizable buttons.

  • Comfort for Either Hand

    Use your mouse with your left or right hand—ambidextrous design makes it comfortable either way.

  • Ergonomic Design

    Point and click in comfort—ergonomic design helps you work longer without discomfort.

  • Designed for Notebook PCs

    Compact and comfortable, our handy notebook and laptop products are designed for convenience and mobility.

  • Snap-in Receiver

    Plug in the snap-in receiver when you’re ready to work, then snap it into your mouse when you travel, preserving battery life.

  • Laser Technology

    Microsoft Laser Mouse products are more precise, more responsive, and deliver smoother tracking.

  • 6+ Months Battery Life

    Work with less interruption with longer battery life.

  • 3-Year Limited Hardware Warranty

    Ref : Microsoft Hardware : Arc™ Mouse

  • ย้าย datadir ของ MySQL ใน Ubuntu Server 8.10

    พอได้ Server ใหม่ของ ThaiThinkPad มาแล้วกำลัง Tuning ตัวระบบอยู่ สิ่งที่ต้องทำคือการย้าย datadir ของ MySQL ออกมาอีก I/O แยกจาก H/D หลัก ซึ่งตัว Server ผมมี H/D อยู่สองลูกครับ

    วิธีการทำก็ไม่ยากครับ แต่มึนตอนแรกตรง AppArmor เนี่ยแหละ เพราะตอนผมทำบน Windows หรือบน CentOS มันไม่มีปัญหานี้ พอมา Ubuntu Server นี่มันมีส่วนนี้เลยต้องแก้ไขส่วนนี้เพิ่มเติมครับ เรามาเริ่มกันเลย

    ปิด Service MySQL

    CODE:
    1. $ sudo /etc/init.d/mysql stop
    2. * Stopping MySQL database server mysqld [ OK ]

    ทำการ copy แบบ archive (คงสภาพของ owner/mode ของไฟล์) ไปไว้ที่ H/D นึง ผม mount ไว้ที่ /datasvr (ย้ายจาก /var/lib/mysql ไป /datasvr)

    CODE:
    1. $ sudo cp -a /var/lib/mysql /datasvr

    ทำการ Backup ตัวเก่าไว้ก่อนด้วยการเปลี่ยนชื่อ dir ไว้เฉย ๆ กันเหนี่ยวไว้ก่อน

    CODE:
    1. $ sudo mv /var/lib/mysql /var/lib/mysqlbk

    ทำการ change owner เป็น group mysql และ user mysql สักหน่อยเผื่อไว้

    CODE:
    1. $ sudo chown -R mysql:mysql /datasvr

    แก้ไขไฟล์ my.conf

    CODE:
    1. $ sudo nano /etc/mysql/my.conf

    แก้ไขค่าของ

    CODE:
    1. datadir = /var/lib/mysql

    เป็น

    CODE:
    1. datadir = /datasvr/mysql

    ถ้าใช้ Ubuntu 8.10 Server แก้ไขตัว Application Armor เสียด้วย โดยไปที่

    CODE:
    1. $ sudo nano /etc/apparmor.d/usr.sbin.mysqld

    โดยแทรกข้อมูลด้านล่างลงไป โดยเปลีย่น /datasvr/mysql/ เป็น path ของ datadir ที่เราต้องการย้ายไป

    CODE:
    1. /datasvr/mysql/ r,
    2. /datasvr/mysql/** rwk,
    3.  

    แล้ว restart Service AppArmor

    CODE:
    1. sudo /etc/init.d/apparmor restart

    แล้วก็เปิด Service MySQL ทำงานต่อไปได้เลย

    CODE:
    1. $sudo /etc/init.d/mysql start
    2. * Starting MySQL database server mysqld [ OK ]

    แค่นี้ก็เสร็จสิ้นกรรมวิธีการย้ายข้อมูลแล้ว คราวนี้ก็แบ่ง ๆ โหลด I/O ไปคนละ H/D ครับ

    แก้ปัญหา PHP-ExcelReader ใน 64Bit system

    ตัว PHP-ExcelReader เป็น PHP Class ที่นำมาใช้อ่านไฟล์ Excel 97-2003 ได้ดีมากตัวนึง และแม้จะไม่ได้ update มาตั้งแต่ปี 2007 ก็ยังทำงานได้ดีบน PHP 5.2.8 ซึ่งบนระบบ Development Environment นั้นไม่มีปัญหา ซึ่งบนเครื่องผมเป็น Core 2 Duo ที่ทำงานบน Windows XP Pro 32bit ซึ่งทำงานได้ปรกติดี แต่แล้วพอเอาขึ้น Production Environment มันก็เกิดปัญหาขึ้นที่ function GetInt4d ซึ่งผมควานหาปัญหาและไล่ว่ามันเกิดจากตัว code เองหรือเปล่า หรือว่ามีปัญหากับ function พื้นฐานต่าง ๆ จาก Extension ของ PHP เองหรือเปล่า ซึ่งผมก็ว่าไม่ใช่ และพอเอาไปทำงานบน Production ตัวนึงที่เป็น 32bit CPU กลับไม่มีปัญหา ซึ่งลง Extension เหมือน ๆ กันด้วย –_-‘

    แต่สุดท้ายผมก็ไล่ไปเจอสิ่งที่ผมคิดว่ามันเป็นเรื่องที่ทำให้ผม งง แต่มันก็เกิดขึ้นก็คือ [ 1487371 ] AMD64 dead loop fix สรุปง่าย ๆ ว่าเป็นปัญหาของ bitshift ใน OS 64bit ที่ bit ตัวแรกจะได้ค่าไม่ตรงกับใน OS 32bit ทำให้เกิดความผิดพลาด

    ตัว error ที่พบคือ

    CODE:
    1. Notice: Uninitialized string offset: -138 in /home/www/public_html/excel/oleread.inc on line 27
    2. Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /home/www/public_html/excel/oleread.inc on line 133

    ซึ่งแก้ไขได้ง่าย ๆ ด้วยการเปลี่ยนแปลง function GetInt4d ใหม่ตามด้านล่าง ก็สามารถทำงานบน OS 64bit ได้แล้ว

    แก้ไขในไฟล์ oleread.inc

    PHP:
    1. function GetInt4d($data, $pos) {
    2.   // Hacked by Andreas Rehm 2006 to ensure correct result of the <&lt;24 block on 32 and 64bit systems
    3.   $_or_24 = ord($data[$pos+3]);
    4.   if ($_or_24>=128) $_ord_24 = -abs((256-$_or_24) <<24);
    5.   else $_ord_24 = ($_or_24&127) <<24;
    6.  
    7.   return ord($data[$pos]) | (ord($data[$pos+1]) <<8) | (ord($data[$pos+2]) <<16) | $_ord_24;
    8. }