- \centering
- \begin{table} \centering \caption \begin{tabular}
- \begin{table*}, \begin{figure*} สำหรับ กว้างคลุมทั้ง 2 คอลัมน์
- \epsfig, \psfig
- \newtheorem{theorem}{Theorem}
- \newdef{definition}{Definition} ใช้กับ \begin{definition}
- \secit ใช้ทำตัวเอียงสำหรับ text ที่อยู่ตรง section โดยเฉพาะ
- \ttlit สำหรับ Title
- proof environment, \begin{proof}
วันพุธ, กันยายน 07, 2548
sig-alternative document class
สำหรับเป็น Template มีคำสั่ง เฉพาะที่น่าจดน่าจำดังนี้
วันจันทร์, กันยายน 05, 2548
เปลี่ยนมาใช้ WindowMaker แทน Gnome
How to switch to Thai keyboard layout in WindowMaker (or virtually any X11 window manager)
GNOME มันเดี้ยงๆ มาตั้งหลายวันแล้ว ไม่รู้ทำไม ก็เลยคิดจะลองเปลี่ยนมาใช้ WindowMaker ดู
แต่ว่ามีปัญหาเล็กน้อย คือติดเรื่อง การเปลี่ยนคีย์บอร์ดเลย์เอาท์ ภาษาไทย แต่วันนี้แก้ปัญหาได้แล้ว
พึ่งรู้ว่ามันง่ายขนาดนี้ แค่เติม
แล้วก็ toggle layouts ด้วย alt+shift, ใช้ LED ของ scroll lock เป็นตัว indicator (ไฟติด
คือใช้ layout ภาษาไทย)
ไฟล์ xorg.conf ทั้งหมด ก็เป็นดังข้างล่างนี้
---------------------------------------
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/X11R6/lib/X11/fonts/WindowsFonts/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
Section "Module"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "record"
Load "xtrap"
Load "freetype"
Load "type1"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
#### Thai Keyboard Switching config., Added by Chaiwat ####
# Option "XkbRules" "xorg"
Option "XkbLayout" "us,th"
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
EndSection
# VMware SVGA
Section "ServerFlags"
# Option NoTrapSignals
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "vmmouse"
Option "Protocol" "SysMouse"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5"
# Option "Emulate3Buttons"
# Option "Emulate3Timeout" "50"
# Option "ChordMiddle"
EndSection
Section "Monitor"
Identifier "vmware"
VendorName "VMware, Inc"
HorizSync 1-10000
VertRefresh 1-10000
ModeLine "640x480" 100 640 700 800 900 480 500 600 700
ModeLine "800x600" 100 800 900 1000 1100 600 700 800 900
ModeLine "1024x768" 100 1024 1100 1200 1300 768 800 900 1000
ModeLine "1152x864" 100 1152 1200 1300 1400 864 900 1000 1100
ModeLine "1152x900" 100 1152 1200 1300 1400 900 1000 1100 1200
ModeLine "1280x1024" 100 1280 1300 1400 1500 1024 1100 1200 1300
ModeLine "1376x1032" 100 1376 1400 1500 1600 1032 1100 1200 1300
ModeLine "1400x1050" 100 1400 1500 1600 1700 1050 1100 1200 1300
ModeLine "1600x1200" 100 1600 1700 1800 1900 1200 1300 1400 1500
ModeLine "2364x1773" 100 2364 2400 2500 2600 1773 1800 1900 2000
EndSection
Section "Device"
Identifier "VMware SVGA"
Driver "vmware"
EndSection
Section "Screen"
Identifier "Screen 1"
Device "VMware SVGA"
Monitor "vmware"
# Don't specify DefaultColorDepth unless you know what you're
# doing. It will override the driver's preferences which can
# cause the X server not to run if the host doesn't support the
# depth.
Subsection "Display"
# VGA mode: better left untouched
Depth 4
Modes "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 8
Modes "1376x1032"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 15
Modes "1376x1032"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1400x1050"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1400x1050"
ViewPort 0 0
EndSubsection
EndSection
Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen 1"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
GNOME มันเดี้ยงๆ มาตั้งหลายวันแล้ว ไม่รู้ทำไม ก็เลยคิดจะลองเปลี่ยนมาใช้ WindowMaker ดู
แต่ว่ามีปัญหาเล็กน้อย คือติดเรื่อง การเปลี่ยนคีย์บอร์ดเลย์เอาท์ ภาษาไทย แต่วันนี้แก้ปัญหาได้แล้ว
พึ่งรู้ว่ามันง่ายขนาดนี้ แค่เติม
Option "XkbLayout" "us,th"ลงไปก็เรียบร้อย ราบรื่น. รายละเอียดก็คือ บอกว่าจะใช้ keyboard layout แบบ us กับ th,
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
แล้วก็ toggle layouts ด้วย alt+shift, ใช้ LED ของ scroll lock เป็นตัว indicator (ไฟติด
คือใช้ layout ภาษาไทย)
ไฟล์ xorg.conf ทั้งหมด ก็เป็นดังข้างล่างนี้
---------------------------------------
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/X11R6/lib/X11/fonts/WindowsFonts/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/TTF/"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
Section "Module"
Load "dbe"
Load "dri"
Load "extmod"
Load "glx"
Load "record"
Load "xtrap"
Load "freetype"
Load "type1"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
#### Thai Keyboard Switching config., Added by Chaiwat ####
# Option "XkbRules" "xorg"
Option "XkbLayout" "us,th"
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
EndSection
# VMware SVGA
Section "ServerFlags"
# Option NoTrapSignals
EndSection
Section "InputDevice"
Identifier "Mouse1"
Driver "vmmouse"
Option "Protocol" "SysMouse"
Option "Device" "/dev/sysmouse"
Option "ZAxisMapping" "4 5"
# Option "Emulate3Buttons"
# Option "Emulate3Timeout" "50"
# Option "ChordMiddle"
EndSection
Section "Monitor"
Identifier "vmware"
VendorName "VMware, Inc"
HorizSync 1-10000
VertRefresh 1-10000
ModeLine "640x480" 100 640 700 800 900 480 500 600 700
ModeLine "800x600" 100 800 900 1000 1100 600 700 800 900
ModeLine "1024x768" 100 1024 1100 1200 1300 768 800 900 1000
ModeLine "1152x864" 100 1152 1200 1300 1400 864 900 1000 1100
ModeLine "1152x900" 100 1152 1200 1300 1400 900 1000 1100 1200
ModeLine "1280x1024" 100 1280 1300 1400 1500 1024 1100 1200 1300
ModeLine "1376x1032" 100 1376 1400 1500 1600 1032 1100 1200 1300
ModeLine "1400x1050" 100 1400 1500 1600 1700 1050 1100 1200 1300
ModeLine "1600x1200" 100 1600 1700 1800 1900 1200 1300 1400 1500
ModeLine "2364x1773" 100 2364 2400 2500 2600 1773 1800 1900 2000
EndSection
Section "Device"
Identifier "VMware SVGA"
Driver "vmware"
EndSection
Section "Screen"
Identifier "Screen 1"
Device "VMware SVGA"
Monitor "vmware"
# Don't specify DefaultColorDepth unless you know what you're
# doing. It will override the driver's preferences which can
# cause the X server not to run if the host doesn't support the
# depth.
Subsection "Display"
# VGA mode: better left untouched
Depth 4
Modes "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 8
Modes "1376x1032"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 15
Modes "1376x1032"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1400x1050"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1400x1050"
ViewPort 0 0
EndSubsection
EndSection
Section "ServerLayout"
Identifier "Simple Layout"
Screen "Screen 1"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
วันอังคาร, สิงหาคม 30, 2548
เวลา startx เข้า GNOME แล้วมี error message No volume control elements and/or devices found
Refer from--> https://listman.redhat.com/archives/k12osn/2005-July/msg00646.html
Les Mikesell wrote:
Les Mikesell wrote:
On Thu, 2005-07-28 at 14:23, Eric Harrison wrote:
The only way I can consistently eliminate this problem is by removing
the mixer from the panel by default:rm -rf /etc/gconf/gconf.xml.defaults/apps/panel/applets/mixerAfter sleeping on it... "rm -rf" is a bit harsh, removing the
read/write/execute permissions is much less destructive:
chmod a-wrx /etc/gconf/gconf.xml.defaults/apps/panel/applets/mixer
Is there any way to turn it into what you really want instead: either
a window belonging to a local app running on the terminal or better
yet a proxy that hooks to one when needed?
วันจันทร์, สิงหาคม 29, 2548
Enable DMA mode ใน FreeBSD
เพิ่มส่วนนี้ลงไปใน /boot/loader.conf
hw.ata.atapi_dma="1"
hw.ata.ata_dma="1"
วันอาทิตย์, สิงหาคม 28, 2548
mount_smbfs จาก FreeBSD ไปยัง Win2000 ไฟล์เซิร์ฟเวอร์
mount_smbfs: can not setup kernel iconv table (default:tolower): syserr = Operation not permitted
อ้างอิงได้จาก web นี้:
http://www.onlamp.com/pub/a/bsd/2001/11/15/Big_Scary_Daemons.html
ไปเจอกระทู้นึง มันบอกว่า
which options did you include ?
อ้างอิงได้จาก web นี้:
http://www.onlamp.com/pub/a/bsd/2001/11/15/Big_Scary_Daemons.html
ไปเจอกระทู้นึง มันบอกว่า
which options did you include ?
I think you need
options LIBMCHAIN
options LIBICONV
as well as
options NETSMB #SMB/CIFS requester
and possibly
options NETSMBCRYPTO #encrypted password support for SMB
Someone please correct me if i'm wrong though, as i'm still pretty much a
FreeBSD noob.
> -----Original Message-----
> From: Jan Karabas [mailto:karabas at savbb.sk]
> Sent: 21 August 2003 11:41
> To: freebsd-questions at freebsd.org
> Subject: Samba & Iconv
>
>
> Hi, I have one small problem with mounting drives of computers
> with Winxxx.
> If I want to mount some shared drive, mount_smbfs fails with this
> message:
>
> bash-2.05b$ mount_smbfs //janci at NEDELA/TEMP ~/mnt/NEDELA/D
> mount_smbfs: can not setup kernel iconv table
> (default:tolower): syserr =
> Operation not permitted
>
> How can I set up "kernel iconv table?". Maybe I forgot
> something, when I
> compiled my kernel...
>
> Help me please. Thanks
>
วันเสาร์, สิงหาคม 13, 2548
FreeBSD printing
อ้างอิงจาก http://www.engr.colostate.edu/~reinholz/freebsd/cups.htm
http://www.linuxprinting.org/cups-doc.html
1. แก้ไฟล์ /etc/make.conf
2. install cups
3. install gimp or gimp-print ด้วยการ make install clean จาก ports ไม่งั้นมันไม่มี driver มาให้
5. start cupsd
7. เลือก Manage Printers
8. ใส่ชื่อ แล้วเลือก LPD/LPR
9. ใส่ชื่อ เป็น lpd://ps-printer-name เลือก driver ให้เหมาะสม
10. Config printer ให้เหมาะสม เวลาสั่งพิมพ์ใช้คำสั่ง lpr -P
* หมายเหตุ application ที่มันเบสบน Linux นั้นมันจะใช้ binary ที่ /compat/linux/usr/local/bin
ซึ่งจะหา lp กับ lpr ไม่เจอ. ต้องทำลิ้งเอง
http://www.linuxprinting.org/cups-doc.html
1. แก้ไฟล์ /etc/make.conf
- เพิ่ม สามบรรทัดนี้
CUPS_OVERWRITE_BASE=yesเพื่อเซตเกี่ยวกับการ build package ต่างๆ ที่เกี่ยวกับ CUPS ในภายภาคหน้า
NO_LPR=yes
WITH_CUPS=yes
2. install cups
3. install gimp or gimp-print ด้วยการ make install clean จาก ports ไม่งั้นมันไม่มี driver มาให้
$ sudo cp RIIC8103.PPD /usr/local/share/cups/model/4. ไม่ต้องแก้ BrowseAddress ใน /usr/local/etc/cups/cupsd.conf
ก๊อป Ricoh C8100 PPD driver จากของเครื่อง Mac OS X ไปไว้ใน cups driver directory
* เพิ่มเติม สำหรับ Tiger (10.4) นั้นสามารถก๊อปได้จาก /etc/cups/ppd/xxxxx.ppd
5. start cupsd
cd /usr/local/etc/rc.d6. ชี้ browser ไปที่ http://localhost:631/
cp cups.sh.sample cups.sh
./cups.sh start
7. เลือก Manage Printers
8. ใส่ชื่อ แล้วเลือก LPD/LPR
9. ใส่ชื่อ เป็น lpd://ps-printer-name เลือก driver ให้เหมาะสม
10. Config printer ให้เหมาะสม เวลาสั่งพิมพ์ใช้คำสั่ง lpr -P
* หมายเหตุ application ที่มันเบสบน Linux นั้นมันจะใช้ binary ที่ /compat/linux/usr/local/bin
ซึ่งจะหา lp กับ lpr ไม่เจอ. ต้องทำลิ้งเอง
FreeBSD: multilingual input ภาษาไทยและญี่ปุ่น
สำหรับภาษาไทย
แค่ไปเลือก Desktop > Preferences > Keyboard แล้ว เพิ่ม Keyboard layout ของ ภาษาไทยลงไป
แล้วไปแก้ ค่าให้เปลี่ยน layout โดยใช้ Alt+Shift แทน
สำหรับภาษาญี่ปุ่น
ซับซ้อนกว่า
1. Install anthy
2. Install uim อันนี้ควรลงจาก ports เพราะต้องเลือก Anthy support option.
3. ต้องไป enable Anthy โดย รัน uim-pref-gtk แล้วติ๊กเลือก Specific default IM แล้วเลือก
Default input method เป็น Anthy
สำหรับค่า ENVIRONMENT VARIABLE
ใน .xinitrc เพิ่ม
export GTK_IM_MODULE=uim-anthy
export XMODIFIERS="@im=uim-anthy"
uim-xim &
exec gnome-session
ใน .bashrc เพิ่ม
LC_CTYPE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
แค่ไปเลือก Desktop > Preferences > Keyboard แล้ว เพิ่ม Keyboard layout ของ ภาษาไทยลงไป
แล้วไปแก้ ค่าให้เปลี่ยน layout โดยใช้ Alt+Shift แทน
สำหรับภาษาญี่ปุ่น
ซับซ้อนกว่า
1. Install anthy
2. Install uim อันนี้ควรลงจาก ports เพราะต้องเลือก Anthy support option.
3. ต้องไป enable Anthy โดย รัน uim-pref-gtk แล้วติ๊กเลือก Specific default IM แล้วเลือก
Default input method เป็น Anthy
สำหรับค่า ENVIRONMENT VARIABLE
ใน .xinitrc เพิ่ม
export GTK_IM_MODULE=uim-anthy
export XMODIFIERS="@im=uim-anthy"
uim-xim &
exec gnome-session
ใน .bashrc เพิ่ม
LC_CTYPE=en_US.UTF-8
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
FreeBSD: Install และ upgrade อย่างง่ายๆ ด้วย package
เวลา make install จาก ports tree มันช้า เสียเวลาทำมาหากิน
วิธีที่รวดเร็วกว่านั้นคือการใช้ portupgrade และ portinstall แทน
แต่ถ้าไม่จำเป็นก็ลงเป็น package ไปจะง่ายกว่า
วิธีที่รวดเร็วกว่านั้นคือการใช้ portupgrade และ portinstall แทน
- Install package ใหม่
- $ portinstall -nPPvr
- Upgrade package ที่มีอยู่แล้ว
- $ portupgrade -nPPvr
- ก่อนลง ด้วย package ควรดูก่อนว่า โปรแกรมที่เราจะลงนั้นมี option อะไรให้เลือกหรือเปล่า โดย
แต่ถ้าไม่จำเป็นก็ลงเป็น package ไปจะง่ายกว่า
- การลง package ที่เป็น localization เช่นของ japanese ports อย่าลืม ja- นำหน้าด้วย เช่นจะลง uimของ japanese ports ก็ต้อง portupgrade -nPPvr ja-uim ถ้าใช้ uim เปล่าๆ จะหาไม่เจอ
วันอาทิตย์, สิงหาคม 07, 2548
Fonts Thai ทำอย่างไรให้ไม่อุบาทว์ ใน X11 FreeBSD 5.3
ติดตั้งฟอนต์ไทยลงไปลองหลายวิธี แรกๆ ดูจากเว็บ อ.ชัชวาล แต่ว่ามันน่าเกลี๊ยด น่าเกลียด
เลยเอาใหม่วะ ลองดู เคยทำได้นี่หว่า
ผลลัพธ์ ออกมา โอเคเว๊ย ไม่เลว
สรุปวิธีการดังนี้
1. ก๊อปปี้ TrueType ฟอนต์ จาก Windows มา ที่ /usr/X11R6/lib/X11/fonts/WindowsFonts
*หมายเหตุ ลองดูพวก user/group และก็ permission ให้ดีๆ ด้วยว่ามันโอมั้ย! จะให้ดี
ควร run คำสั่งด้วย root จะไม่มีปัญหา
2. cd เข้าไปที่ WindowsFonts สร้างไฟล์ scalable fonts "fonts.scale" ใช้คำสั่ง
# ttmkfdir -o fonts.scale
3. สร้างไฟล์ "encoding.dir" และ "fonts.dir" ใช้คำสั่ง
# mkfontdir -e /usr/X11R6/lib/X11/fonts/encodings
4. เพิ่ม FontPath ลงไป ใน /usr/X11R6/lib/X11/xorg.conf
FontPath "/usr/X11R6/lib/X11/fonts/WindowsFonts"
5. ดูให้แน่ๆว่าตรง Module มี Load "freetype" โหลดอยู่อ๊ะป่าว?
6. startx เท่านี้ก็เรียบร้อย ได้ font สวยงาม มาใช้ แล้ว
เลยเอาใหม่วะ ลองดู เคยทำได้นี่หว่า
ผลลัพธ์ ออกมา โอเคเว๊ย ไม่เลว
สรุปวิธีการดังนี้
1. ก๊อปปี้ TrueType ฟอนต์ จาก Windows มา ที่ /usr/X11R6/lib/X11/fonts/WindowsFonts
*หมายเหตุ ลองดูพวก user/group และก็ permission ให้ดีๆ ด้วยว่ามันโอมั้ย! จะให้ดี
ควร run คำสั่งด้วย root จะไม่มีปัญหา
2. cd เข้าไปที่ WindowsFonts สร้างไฟล์ scalable fonts "fonts.scale" ใช้คำสั่ง
# ttmkfdir -o fonts.scale
3. สร้างไฟล์ "encoding.dir" และ "fonts.dir" ใช้คำสั่ง
# mkfontdir -e /usr/X11R6/lib/X11/fonts/encodings
4. เพิ่ม FontPath ลงไป ใน /usr/X11R6/lib/X11/xorg.conf
FontPath "/usr/X11R6/lib/X11/fonts/WindowsFonts"
5. ดูให้แน่ๆว่าตรง Module มี Load "freetype" โหลดอยู่อ๊ะป่าว?
6. startx เท่านี้ก็เรียบร้อย ได้ font สวยงาม มาใช้ แล้ว
วันพุธ, สิงหาคม 03, 2548
Line Tracer Car H8 JAIST team
ไว้เขียนเปเปอร์เสร็จแล้ว จะทำ
- เพิ่ม sensor เป็น 2 จุุด.
- Decompose and rewrite MAIN_TASK to multi tasks.
- Use interrupt if possible.
- เขียน blog และอัพรูปขึ้นมาเก็บไว้เตือนค.จำ
วันจันทร์, สิงหาคม 01, 2548
วันนี้เกิดไอเดีย กระจายเสียงแบบ wireless IEEE 802.11a/b/g
เพราะคอมเจ๊งเนี่ยแหละ ไอ่เครื่องที่ปกติเอาไว้เปิดเพลงก็เลยใช้ไม่ได้
อืม ลง iTunes ที่เครื่อง Fujitsu ไว้ แต่มันก็เคลื่อนย้ายลำบาก เลยคิดว่า
น่าจะมี อะไรที่ทำให้มันไปออกลำโพงได้เป็น wireless นะ
ค้นดูที่ apple's site อ่าว มันก็มีผลิตภัณฑ์ คือ AirPort Express เป็น
อย่างที่เราต้องการเดี๊ยะเลยนี่หว่า ราคา ประมาณ 14,000 เยน
อืม ไว้ wireless station ที่ใช้เจ๊งเมื่อไหร่จะเปลี่ยนเป็นอันนี้ละกันนะ
แต่จริงๆก็อยากได้ ถ้าไอ่ T-Engine ที่ตั้งทิ้งไว้อยู่นั่น เอามาพัฒนา
เป็น AirTunes ได้ก็เยี่ยมเลยเพราะมันมี PC-Card slot เสียบ wireless
card ของ Buffalo ได้พอดี แล้วมันก็เหมือนจะมี mp3 decoder เป็น
hardware อยู่ด้วย adapter แปลง หัวเสียบ jack ก็ซื้อมาแล้ว
มีเวลาเมื่อไหร่จะลองทำดู
อืม ลง iTunes ที่เครื่อง Fujitsu ไว้ แต่มันก็เคลื่อนย้ายลำบาก เลยคิดว่า
น่าจะมี อะไรที่ทำให้มันไปออกลำโพงได้เป็น wireless นะ
ค้นดูที่ apple's site อ่าว มันก็มีผลิตภัณฑ์ คือ AirPort Express เป็น
อย่างที่เราต้องการเดี๊ยะเลยนี่หว่า ราคา ประมาณ 14,000 เยน
อืม ไว้ wireless station ที่ใช้เจ๊งเมื่อไหร่จะเปลี่ยนเป็นอันนี้ละกันนะ
แต่จริงๆก็อยากได้ ถ้าไอ่ T-Engine ที่ตั้งทิ้งไว้อยู่นั่น เอามาพัฒนา
เป็น AirTunes ได้ก็เยี่ยมเลยเพราะมันมี PC-Card slot เสียบ wireless
card ของ Buffalo ได้พอดี แล้วมันก็เหมือนจะมี mp3 decoder เป็น
hardware อยู่ด้วย adapter แปลง หัวเสียบ jack ก็ซื้อมาแล้ว
มีเวลาเมื่อไหร่จะลองทำดู
วันศุกร์, กรกฎาคม 29, 2548
FireFox Extensions ที่น่าสนใจ
ขาดไม่ได้เลยอันนี้
- Mouse Gestures
- Tab Mix ถ้าเป็น Mac OS X ก็ให้ใช้ Tab Mix Plus
- FlashGot
- Down Them All
สลับปุ่ม Ctrl กับ Caps Lock
เพิ่มส่วนนี้เข้าไปใน registry
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
Config TeXlipse
หมายเหตุ MikTeX เป็นอีก Implementation หนึ่งของ LaTeX ที่น่าสนใจ
ถ้าไม่คิดเรื่องภาษาญี่ปุ่น
options และค่าต่างๆ ที่ต้องตั้งเวลาลง TeXlipse
ถ้าไม่คิดเรื่องภาษาญี่ปุ่น
options และค่าต่างๆ ที่ต้องตั้งเวลาลง TeXlipse
- Builder Settings: หากเราเซต PATH environment variable ของ user ให้มี TeX/bin และ อื่นๆซึ่งหาดูได้จาก อ้างอิง แล้วล่ะก็ TeXlipse จะหาค่าต่างๆ ได้เอง ยกเว้น ps2pdf ซึ่งเป็นของ Ghostscript
- Ps2pdf program () ให้ใส่ค่า $GHOSTSCRIPT_PATH\lib\ps2pdf.bat
- Arguments ใส่ค่า -dPDFsettings=/prepress %input
- Viewer Settings: ต้องตั้งค่าบางอย่างสำหรับพวก viewer ตามนี้
- acroread (C:\Program Files\...\AcroRd32.exe) ตั้ง path ของ Acrobat Reader
- gv (C:\Program Files\Ghostgum\gsview\gsview32.exe) ตั้ง path ของ Ghostview
- dviout (D:\bin\dviout\dviout.exe) แล้วเลือก file type เป็น dvi [อันนี้ต้องเพิ่มเอาเอง เพราะมันไม่ได้มีอยู่ใน default list]
- เกี่ยวกับ Ghostscript
- เกี่ยวกับ TeX
วันพฤหัสบดี, กรกฎาคม 28, 2548
XP Home to XP Pro
C'T writes in its latest print issue (in German only) that you need to copy the root directory and the i386 directory of the WindowsXP CD to your harddisk, extract the Bootsector of your WindowsXP CD and change only 2 bytes in i386Setupreg.hiv by using Regedit. In fact all you have to do is edit the binary key "default" and change "01" to "00" and "02" to "00" in HKEY_LOCAL_MACHINEHomekeyControlSet001Servicessetupdd, C'T claims.
There is one big drawback, though. Users won't be able to install Service Pack 2, unless they integrate SP2 in the installation CD. And that's probably too much trouble for most users, who of course are better off buying a legal version anyway. It is expected that Microsoft will change the setup files soon to prevent this hack. "
There is one big drawback, though. Users won't be able to install Service Pack 2, unless they integrate SP2 in the installation CD. And that's probably too much trouble for most users, who of course are better off buying a legal version anyway. It is expected that Microsoft will change the setup files soon to prevent this hack. "
วันอังคาร, กรกฎาคม 26, 2548
Mac OS X Login Hook and Logout Hook
เวลาต้องการรัน startup สคริปต์ตอนล็อกอิน หรือ ล็อกเอาท์ใน
MacOS X มี ระบบซึ่งเรียกว่า Login Hook และ Logout Hook
อ้างอิงจากอันนี้ดีที่สุด หน้านี้ และ หน้านี้
วิธีใหม่
sudo defaults write com.apple.loginwindow LoginHook /path/to/script
(where /path/to/script is the full path to the script that you want to execute when a user logs in—it doesn't have to be in the user's Home directory).
This modifies the /var/root/Library/Preferences/com.apple.loginwindow file.
วิธีเก่า
หลักๆแล้วก็คือ แก้ /private/etc/ttys โดยเพิ่ม
เพิ่มระหว่าง console "/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow
-LoginHook /private/mydir/myLoginHookScript -LogoutHook /private/mydir/myLogoutHookScript vt100 on secure windows=...
MacOS X มี ระบบซึ่งเรียกว่า Login Hook และ Logout Hook
อ้างอิงจากอันนี้ดีที่สุด หน้านี้ และ หน้านี้
วิธีใหม่
sudo defaults write com.apple.loginwindow LoginHook /path/to/script
(where /path/to/script is the full path to the script that you want to execute when a user logs in—it doesn't have to be in the user's Home directory).
This modifies the /var/root/Library/Preferences/com.apple.loginwindow file.
วิธีเก่า
หลักๆแล้วก็คือ แก้ /private/etc/ttys โดยเพิ่ม
-LoginHook /private/mydir/myLoginHookScript -LogoutHook /private/mydir/myLogoutHookScript
เพิ่มระหว่าง console "/System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow
-LoginHook /private/mydir/myLoginHookScript -LogoutHook /private/mydir/myLogoutHookScript vt100 on secure windows=...
วันจันทร์, กรกฎาคม 25, 2548
LaTeX กับ Mac OS X
วันเสาร์, กรกฎาคม 16, 2548
แสดงภาษาไทยและญี่ปุ่นใน xterm ของ Mac OS X แบบ そのまま
จริงๆ แล้วไม่ต้องใช้ iTerm ก็ สามารถ แสดงภาษาไทยบน xterm ของ Mac OS X ได้
เวลาเรียก ให้เรียก uxterm แทน มันเป็น wrapper เอาไว้ห่อ xterm -u8 ซึ่งสำหรับ
รองรับ UTF-8.
เวลา ls ให้ใช้ ls -v แทน หรือจะทำเป็น alias ไว้ก็จะดี จะสามารถแสดงภาษาไทยและ
ญี่ปุ่นได้เลย ไม่ต้องยุ่งยาก. ส่วนการ input ที่ terminal นั้นก็สามารถ input ภาษาไทย
ได้เลย เนื่องจากว่า input method สำหรับภาษาไทยของ Mac นั้นเป็น Unicode อยู่แล้ว
แต่สำหรับภาษาญี่ปุ่นนั้นมันเป็น IM เฉพาะของมัน และ(คาดว่า) ไม่เป็น Unicode เพราะ
เวลาใส่อินพุตภาษาญี่ปุ่น ลงไปแล้วมันเป็นขยะไป
คาดว่าวิธีแก้สำหรับภาษาญี่ปุ่นนันน่าจะเป็นการใช้ input method สำหรับ unix เช่น kanna2
หรือว่า anthy เป็นต้น. ขี้เกียจลอง
เวลาเรียก ให้เรียก uxterm แทน มันเป็น wrapper เอาไว้ห่อ xterm -u8 ซึ่งสำหรับ
รองรับ UTF-8.
เวลา ls ให้ใช้ ls -v แทน หรือจะทำเป็น alias ไว้ก็จะดี จะสามารถแสดงภาษาไทยและ
ญี่ปุ่นได้เลย ไม่ต้องยุ่งยาก. ส่วนการ input ที่ terminal นั้นก็สามารถ input ภาษาไทย
ได้เลย เนื่องจากว่า input method สำหรับภาษาไทยของ Mac นั้นเป็น Unicode อยู่แล้ว
แต่สำหรับภาษาญี่ปุ่นนั้นมันเป็น IM เฉพาะของมัน และ(คาดว่า) ไม่เป็น Unicode เพราะ
เวลาใส่อินพุตภาษาญี่ปุ่น ลงไปแล้วมันเป็นขยะไป
คาดว่าวิธีแก้สำหรับภาษาญี่ปุ่นนันน่าจะเป็นการใช้ input method สำหรับ unix เช่น kanna2
หรือว่า anthy เป็นต้น. ขี้เกียจลอง
วันศุกร์, กรกฎาคม 15, 2548
iTerm กับ terminal ที่เป็น Unicode
วันนี้ลองใช้ iTerm อีกครั้ง หลังจากคราวที่แล้วใช้งานแล้วมันไม่เวิร์ค
เหตุที่ทำให้กลับมาใช้อีกครั้งก็เพราะ 7-zip ฉบับ Mac OS X มันออกมาเฉพาะ
command-line version เท่านั้น ก็เลยต้องใช้กับ Terminal แต่ทีเด็ดของเจ้า
7-zip เนี่ยมันอยู่ตรงที่มัน fully support unicode filename ก็เลยทำให้เราสามารถ
บีบอัดทั้งไฟล์ทั้งโฟลเดอร์ที่ตั้งชื่อเป็นภาษาไทย (ซึ่งส่วนมากก็คือไอ่เพลงที่อยู่ใน
auditorium ของเรานั่นเอง) และภาษาญี่ปุ่นได้
โอ้ัโฮ ไอ่เราอยากได้มาันานแล้วไอ่โปรแกรมอย่างงี้
มีเรื่องปวดหัวหลายๆ ทีแล้ว ไอ่เรื่องชื่อไฟล์แบบ อินเตอร์แนชั่นแนล เนี่ย
เข้าพ้อยท์สำคัญเลยดีกว่า ที่มันแสดงชื่อไฟล์ภาษาไทยและญี่ปุ่นไม่ได้เวลาสั่ง ls เนี่ย
เพราะเราไม่ได้ set environment variable ที่สำคัญไปตัวหนึ่งซึ่งก็คือเจ้า LANG
$ export LANG=en_US.UTF-8 ปุ๊บก็จะแสดงได้ทันที
เหตุที่ทำให้กลับมาใช้อีกครั้งก็เพราะ 7-zip ฉบับ Mac OS X มันออกมาเฉพาะ
command-line version เท่านั้น ก็เลยต้องใช้กับ Terminal แต่ทีเด็ดของเจ้า
7-zip เนี่ยมันอยู่ตรงที่มัน fully support unicode filename ก็เลยทำให้เราสามารถ
บีบอัดทั้งไฟล์ทั้งโฟลเดอร์ที่ตั้งชื่อเป็นภาษาไทย (ซึ่งส่วนมากก็คือไอ่เพลงที่อยู่ใน
auditorium ของเรานั่นเอง) และภาษาญี่ปุ่นได้
โอ้ัโฮ ไอ่เราอยากได้มาันานแล้วไอ่โปรแกรมอย่างงี้
มีเรื่องปวดหัวหลายๆ ทีแล้ว ไอ่เรื่องชื่อไฟล์แบบ อินเตอร์แนชั่นแนล เนี่ย
เข้าพ้อยท์สำคัญเลยดีกว่า ที่มันแสดงชื่อไฟล์ภาษาไทยและญี่ปุ่นไม่ได้เวลาสั่ง ls เนี่ย
เพราะเราไม่ได้ set environment variable ที่สำคัญไปตัวหนึ่งซึ่งก็คือเจ้า LANG
$ export LANG=en_US.UTF-8 ปุ๊บก็จะแสดงได้ทันที
สมัครสมาชิก:
บทความ (Atom)