drows·y Pronunciation Key (drouz) แย่ลงเพราะความง่วง
adj. drows·i·er, drows·i·est
1. Dull with sleepiness; sluggish.
2. Produced or characterized by sleepiness.
3. Inducing sleepiness; soporific.
----------
prose Pronunciation Key (prz) บทความ,ประโยค(การเขียนอย่างไม่ค่อยเป็นทางการ)
n.
1. Ordinary speech or writing, without metrical structure.
2. Commonplace expression or quality.
3. Roman Catholic Church. A hymn of irregular meter sung before the Gospel.
intr.v. prosed, pros·ing, pros·es
1. To write prose.
2. To speak or write in a dull, tiresome style.
----------
pro·cras·ti·nate (pr-krst-nt, pr-)
v. pro·cras·ti·nat·ed, pro·cras·ti·nat·ing, pro·cras·ti·nates
v. intr.
To put off doing something, especially out of habitual carelessness or laziness.
v. tr.
To postpone or delay needlessly.
วันพุธ, เมษายน 20, 2548
วันศุกร์, เมษายน 15, 2548
const Pointer
-POINTER TO A CONSTANT-
const char *thing_ptr = "Seven";
THEN
thing_ptr = "Forty" /* Legal */
*thing_ptr = 'X' /* Illegal */
BECAUSE
What's thing_ptr? A pointer.
Can it be changed? Of course, it's just a pointer.
What does it point to? A const char array.
Can the data pointed to by thing_ptr be changed? No, it's a constant.
-CONSTANT POINTER-
char *const name_ptr = "Test"
name_ptr = "New"; /* Illegal */
*name_ptr = 'Q'; /* Legal */
What's name_ptr? It's a constant pointer.
Can it be changed? No, it's a constant.
What does it point to? A char.
Can the data being pointed by name_ptr be changed? Yes.
Finally, we can put const in both places.
const char *const title_ptr = "Title".
is a pointer that can't be changed and it points to a data item that can't be changed also.
const char *thing_ptr = "Seven";
THEN
thing_ptr = "Forty" /* Legal */
*thing_ptr = 'X' /* Illegal */
BECAUSE
What's thing_ptr? A pointer.
Can it be changed? Of course, it's just a pointer.
What does it point to? A const char array.
Can the data pointed to by thing_ptr be changed? No, it's a constant.
-CONSTANT POINTER-
char *const name_ptr = "Test"
name_ptr = "New"; /* Illegal */
*name_ptr = 'Q'; /* Legal */
What's name_ptr? It's a constant pointer.
Can it be changed? No, it's a constant.
What does it point to? A char.
Can the data being pointed by name_ptr be changed? Yes.
Finally, we can put const in both places.
const char *const title_ptr = "Title".
is a pointer that can't be changed and it points to a data item that can't be changed also.
Applying a command through all files in a directory recursively.
คำสั่งข้างล่างนี้ใช้ แปลงรหัสอักขระจาก EUC-jp ไปเป็น jis-2022-jp สำหรับทุกไฟล์ที่มีนามสกุล .html
% find ./html/ | grep "\.html" | awk '{print "nkf -j -E "$1" > "$1""}' | sh
* An equivalent result can be achieved by using xargs. man xargs for more detail.
% find ./html/ | grep "\.html" | awk '{print "nkf -j -E "$1" > "$1""}' | sh
* An equivalent result can be achieved by using xargs. man xargs for more detail.
วันอังคาร, เมษายน 12, 2548
Creating Developing Environment for H8
1. ดาวน์โหลดไฟล์ต่างๆตามนี้
* binutils-2.11.2
* gcc-2.95.3
* newlib-1.9.0
* gdb-5.2.1
* make
* perl
$ mkdir ~/toppers_env && cd toppers_env
$ mkdir ~/build && cd build
2. Compile and Install binutil
$ tar zxvf binutils-2.11.2.tar.gz && binutils-2.11.2
$ mkdir work && cd work
$ ../configure --target=h8300-hms --disable-nls --prefix=/opt/toppers_jsp
$ make
$ make install
$ ~/toppers_env/bin/h3800-hms-as -v
3. Compile and Install gcc
$ tar zxvf GCC.tar.gz && cd GCC
$ patch -p1 < ../gcc-2.95.3_01.patch
$ mkdir work && cd work
$ ../configure --target=h8300-hms --disable-nls --prefix=/opt/toppers_jsp \ --with-gnu-as --with-gnu-ld --with-newlib --enable-languages=c,c++ \ --with-headers=../../newlib-1.9.0/newlib/libc/include
$ make
$ make install
* binutils-2.11.2
* gcc-2.95.3
* newlib-1.9.0
* gdb-5.2.1
* make
* perl
$ mkdir ~/toppers_env && cd toppers_env
$ mkdir ~/build && cd build
2. Compile and Install binutil
$ tar zxvf binutils-2.11.2.tar.gz && binutils-2.11.2
$ mkdir work && cd work
$ ../configure --target=h8300-hms --disable-nls --prefix=/opt/toppers_jsp
$ make
$ make install
$ ~/toppers_env/bin/h3800-hms-as -v
3. Compile and Install gcc
$ tar zxvf GCC.tar.gz && cd GCC
$ patch -p1 < ../gcc-2.95.3_01.patch
$ mkdir work && cd work
$ ../configure --target=h8300-hms --disable-nls --prefix=/opt/toppers_jsp \ --with-gnu-as --with-gnu-ld --with-newlib --enable-languages=c,c++ \ --with-headers=../../newlib-1.9.0/newlib/libc/include
$ make
$ make install
วันศุกร์, เมษายน 08, 2548
Input ภาษาญี่ปุ่น โดย Anthy & UIM
ดูจากเว็บนี้เลย
http://www.engr.colostate.edu/~reinholz/freebsd/japanese.htm
http://www.engr.colostate.edu/~reinholz/freebsd/japanese.htm
วันพฤหัสบดี, เมษายน 07, 2548
Mac OS X แชร์ไฟล์กับ Windows โดย SMB
1. smbclient
smbclient //150.65.???.???/sharename -W domainname -U username
smbclient //150.65.???.???/sharename -W domainname -U username
Fonts Thai ทำอย่างไรให้ไม่อุบาทว์ ใน X11 FreeBSD 5.3
ติดตั้งฟอนต์ไทยลงไปลองหลายวิธี แรกๆ ดูจากเว็บ อ.ชัชวาล แต่ว่ามันน่าเกลี๊ยด น่าเกลียด
เลยเอาใหม่วะ ลองดู เคยทำได้นี่หว่า
ผลลัพธ์ ออกมา โอเคเว๊ย ไม่เลว
สรุปวิธีการดังนี้
1. ก๊อปปี้ TrueType ฟอนต์ จาก Windows มา ที่ /usr/X11R6/lib/X11/fonts/jojoTrueType
*หมายเหตุ ลองดูพวก user/group และก็ permission ให้ดีๆ ด้วยว่ามันโอมั้ย!
2. สร้างไฟล์ scalable fonts "fonts.scale" ใช้คำสั่ง
# ttmkfdir > fonts.scale
3. สร้างไฟล์ encoding.dir และ fonts.dir ใช้คำสั่ง
# mkfontdir -e /usr/X11R6/lib/X11/fonts/encodings
4. เพิ่ม FontPath ลงไป ใน /etc/X11/xorg.conf
FontPath "/usr/share/fonts/TIS-620/TrueType"
5. ดูให้แน่ๆว่าตรง Module มี Load "freetype" โหลดอยู่อ๊ะป่าว?
6. startx จบ
เลยเอาใหม่วะ ลองดู เคยทำได้นี่หว่า
ผลลัพธ์ ออกมา โอเคเว๊ย ไม่เลว
สรุปวิธีการดังนี้
1. ก๊อปปี้ TrueType ฟอนต์ จาก Windows มา ที่ /usr/X11R6/lib/X11/fonts/jojoTrueType
*หมายเหตุ ลองดูพวก user/group และก็ permission ให้ดีๆ ด้วยว่ามันโอมั้ย!
2. สร้างไฟล์ scalable fonts "fonts.scale" ใช้คำสั่ง
# ttmkfdir > fonts.scale
3. สร้างไฟล์ encoding.dir และ fonts.dir ใช้คำสั่ง
# mkfontdir -e /usr/X11R6/lib/X11/fonts/encodings
4. เพิ่ม FontPath ลงไป ใน /etc/X11/xorg.conf
FontPath "/usr/share/fonts/TIS-620/TrueType"
5. ดูให้แน่ๆว่าตรง Module มี Load "freetype" โหลดอยู่อ๊ะป่าว?
6. startx จบ
VMware 4.5.2 กับ FreeBSD 5.3
วันนี้ลองลง VMware 4.5.2 ในเครื่อง Let's Note ดู เพราะว่า เคยลงแบบ
Physical แล้วมันไม่เวิร์ค วันนี้ลองลงแบบ Virtual ว่าเป็นไง
>>> ผล ก็โอเลยทีเดียว
แต่ที่ติดปัญหานิดหน่อยคือตอนลง VMware Tools แล้ว Vmware Tools มันอนุมาน
เอาว่าเราใช้ XFree86 ซึ่งจริงๆ แล้วใน FreeBSD 5.3 มันเป็น X.org ไปแล้ว.
ดังนั้นจึงต้องมีการแก้ สคริปต์ของ VMware Tools สักเล็กน้อย
ขั้นตอนการแก้ไข
1. ถ้าลง VMware Tools ไปก่อนแล้วก็ต้อง uninstall กันก่อน
# /usr/local/bin/vmware-uninstall-tools.pl
2. เข้าไปแก้สคริปต์ของ VMware Tools ที่เราแตกไว้แล้ว สมมติว่าอยู่ที่ /tmp
# cd /tmp/vmware-tools-distrib
ณ บรรทัดที่ 2852
แก้จาก return xserver_bin (). ' /XFree86'
เป็น return xserver_bin (). ' /Xorg'
Physical แล้วมันไม่เวิร์ค วันนี้ลองลงแบบ Virtual ว่าเป็นไง
>>> ผล ก็โอเลยทีเดียว
แต่ที่ติดปัญหานิดหน่อยคือตอนลง VMware Tools แล้ว Vmware Tools มันอนุมาน
เอาว่าเราใช้ XFree86 ซึ่งจริงๆ แล้วใน FreeBSD 5.3 มันเป็น X.org ไปแล้ว.
ดังนั้นจึงต้องมีการแก้ สคริปต์ของ VMware Tools สักเล็กน้อย
ขั้นตอนการแก้ไข
1. ถ้าลง VMware Tools ไปก่อนแล้วก็ต้อง uninstall กันก่อน
# /usr/local/bin/vmware-uninstall-tools.pl
2. เข้าไปแก้สคริปต์ของ VMware Tools ที่เราแตกไว้แล้ว สมมติว่าอยู่ที่ /tmp
# cd /tmp/vmware-tools-distrib
ณ บรรทัดที่ 2852
แก้จาก return xserver_bin (). ' /XFree86'
เป็น return xserver_bin (). ' /Xorg'
ณบรรทัดที่ 3055
แก้จาก /X.org Foundation/? ' 4.4.0' ' 0.0.0'
ไปเป็น /Release 6.7/? ' 4.3.0' ' 0.0.0'
แล้วก็เพิ่มบรรทัดสองบรรทัดข้างล้างนี้ ลงไปหลังจากบรรทัดที่ 3065
} elsif (file_name_exist ($xconfig_path. ' /xorg.conf')) {
$xconfig_file_name = ' xorg.conf' ;
3. ลง VMware Tools ด้วย สคริปต์ใหม่ที่ผ่านการแก้ไขเรียบร้อยแล้ว
4. แก้ /etc/X11/xorg.conf เป็นดังนี้
วันพุธ, มีนาคม 30, 2548
วันนี้ลง FreeBSD 5.3 ในเครื่อง Fujitsu BIBLO NB75G/T.
X ไม่มีปัญหา(ไม่ต้อง recompile kernel เอา agp ออกเหมือนที่ทำบนเครื่อง CF-Y2) โชคดีไป.
ลงจาก Installation CD เรียบร้อยก็ config X นิดหน่อยตาม Handbook ที่อยู่บนเว็บ
แล้วก็ Install URW ฟอนต์ กับ
TrueType ฟอนต์ (ก๊อปมาจาก C:\WINDOWS\Fonts)
แล้วก็รันคำสั่ง
#ttmkfdir > fonts.dir
X ไม่มีปัญหา(ไม่ต้อง recompile kernel เอา agp ออกเหมือนที่ทำบนเครื่อง CF-Y2) โชคดีไป.
ลงจาก Installation CD เรียบร้อยก็ config X นิดหน่อยตาม Handbook ที่อยู่บนเว็บ
แล้วก็ Install URW ฟอนต์ กับ
TrueType ฟอนต์ (ก๊อปมาจาก C:\WINDOWS\Fonts)
แล้วก็รันคำสั่ง
#ttmkfdir > fonts.dir
วันจันทร์, มีนาคม 28, 2548
บูต FreeBSD ด้วย NTLoader ของ Windows XP
ลง FreeBSD ไว้ใน Let's Note CF-Y2 ตั้งนานแล้ว
แต่ว่า boot manager มันโดนลบไป
วันนี้เลยลองแก้ให้ Boot Loader ของ Windows XP
เป็นตัวบูตให้กับ FreeBSD ดู
วิธีการก็ ตามนี้
แต่ว่า boot manager มันโดนลบไป
วันนี้เลยลองแก้ให้ Boot Loader ของ Windows XP
เป็นตัวบูตให้กับ FreeBSD ดู
วิธีการก็ ตามนี้
สมัครสมาชิก:
บทความ (Atom)