วันพฤหัสบดี, กันยายน 20, 2550

บิตทอเร้น ทอร์ และ ไพรวอกซี่

วันนี้ลองใช้ไมโครทอเร้น(ซึ่งถูกห้ามใช้)ดู โหลดไฟล์ที่มีซีดเดอร์คนเดียว ดังนั้นมันจึงไม่ได้อัพโหลดให้ใคร คิดว่าไม่น่าจะมีปัญหาอะไร? แต่เพื่อความชัวร์ เลยลองทำแอนโนนิไมซ์มันซะหน่อย (ไม่รู้มีผลอะไรป่าว?) ก็เลยลง ทอร์แพค ซึ่งรวม ทอร์ กับไพร์วอกซี่ แล้วก็วิลาเดียมา แต่เนื่องจากว่าใช้บราวเซอร์ของซีโร่แบงค์อยู่แล้ว จึงไม่จำเป็นที่จะต้องสตาร์ททอร์ด้วยวิลาเดีย เปิดเบราเซอร์ไว้มันก็สตาร์ททอร์ให้อยู่แล้ว

การเซตค่าในไมโครทอเร้นก็เซตให้มันดาวน์โหลดไฟล์ผ่านพรอกซี่ โดยใช้ Socks5 และ 127.0.0.1 ที่พอร์ท 9050 (การเซตค่าตามนี้ฟอร์เวิร์ดไปที่ทอร์โดยไม่ผ่านไพรวอกซี่)

ถ้าจะเซตให้ผ่านไพรวอกซี่ให้เซต โดยใช้ HTTP, 127.0.0.1, พอร์ท 8118

วันศุกร์, กันยายน 14, 2550

ใช้ wget ดาวน์โหลดโดยไม่ต้องสนใจ robots.txt (wget ignore robots.txt)

ปกติเวลาใช้ wget ดาวน์โหลดไฟล์มันจะมองหา robots.txt ในรีโมทไซต์ก่อนว่ามี disallow อยู่รึเปล่า ซึ่งถ้ามีมันก็จะไม่ยอมโหลด

ซึ่งเราสามารถเพิกเฉย robots.txt ได้ โดยเพิ่มออพชั่น -e robots=off ลงไป
$ wget www.example.com/i_want_this/ -e robots=off

วันพุธ, กันยายน 12, 2550

ย้าย Subversion server ไปยังเครื่องใหม่ P4 แรม 1G

ขั้นตอนการย้ายคร่าวๆ
  1. ลง Apache HTTP server (httpd)
  2. ลง OpenSSL ให้ httpd
  3. ลง Subversion ของ windows บน module Apache
---- ลง Apache HTTP server (httpd) ----
1. ดาวน์โหลด installer MSI ไฟล์ จาก apache.org แล้วก็ Install ลงไป. กรอกข้อมูลเกี่ยวกับ servername แล้วก็ admin email แค่นี้
2. แก้ httpd.conf โดยดูจากของเก่า คร่าวๆ ก็เพิ่ม dav_svn_module กับ auuthz_svn_module ลงไป แล้วก็ ssl_module ด้วย
เติมล่างสุดของ config ไฟล์ เกี่ยวกับ Location /svn โดย ก๊อปของเก่ามาตรงๆ


---- ลง Open SSL ----
1. ดูประกอบได้ที่ http://tud.at/programm/apache-ssl-win32-howto.php3
2. ดาวน์โหลด Apache_X-mod_ssl_Y-openssl_Z-WIN32 ที่ http://hunter.campbus.com
3. ใน archive ของไฟล์ที่ดาวน์โหลดมาที่ Apache-modssl\bin\ ก๊อปไฟล์ ssleay32.dll และ libeay32.dll ไปที่ซิสเต็มไดเรคทอรี่ C:\WINDOWS\System32
4. ก๊อปปี้ openssl.exe ใน \bin ใน อาร์ไค๊บ ไปยัง \bin ใน Apache path, และ save/copy ssl.cnf จาก http://tud.at... ไปยัง \conf,
ก๊อปปี้ mod_ssl.so ไปที่ \module, save openssl.cnf ไปที่ conf อันนี้ใช้ generate certificates.
4.1 สร้าง certificate : ..\bin\openssl.exe req -config .\openssl.cnf -new -out my-server.csr
4.2 สร้าง RSA key : ..\bin\openssl.exe rsa -in privkey.pem -out my-server.key
4.3 สร้าง server X509 cert : ..\bin\openssl.exe x590 -in my-server.csr -out my-server.cert -req -signkey my-server.key -days 3654 [about 10 years]
4.5 ก๊อปปี้ certificate file และ passwd ไฟล์ (my-server.{cert|csr|der.crt|key}, privkey.pem, passwd)
5. สร้าง \conf\ssl.cert แล้วก๊อปปี้ my-server.cert และ my-server.key ไปไว้
6. แก้ httpd.conf SSLLog logs/SSL.log SSLLogLevel warn SSLmutex sem
เพิ่ม config file ใน ssl.conf ใน \conf แก้ค่าตามสมควร
ระวังเรื่อง ด้วยถ้ามี<-- ห่าไรวะเนี่ย ---- ลง Subversion บน Apache ---- 1.โหลด subversion สำหรับ Windows32 สามารถทำได้ 2 วิธี (แนะนำวิธี setup.exe)
วิธีแรก: โหลดไฟล์ที่เป็น setup.exe มาแล้ว ก็ดับเบิ้ลคลิ๊ก แก้ httpd.conf นิดหน่อย จบ
วิธีหลัง : ที่เป็น ZIP ไฟล์มา แล้วแตกไฟล์ออก 2. ก๊อปปี้ ไฟล์ mod_*svn*.so ไปที่ modules ใน Apache แก้ config apache ให้โหลด module เหล่านี้ด้วย (บางครั้งจำเป็นต้อง restart เครื่อง ไม่งั้นมันจะมองไม่เห็น module ใหม่)

note: ปัญหาที่เจอคือหลังจากก๊อป mod_ssl ไปแล้วมันสตาร์ท apache ไม่ติด มันจะ crash
แก้โดยเอาไฟล์ที่อยู่ใน apache-with-ssl.ZIP ไปแทนที่อินสตอลไว้ให้หมด

==== อพยพ repository ไดเรคทอรี่ เก่าไปสู่ที่ใหม่ด้วยการ dump ดังต่อไปนี้ ====
svnadmin dump /path/to/repo > reponame.dump
tar zcf reponame.tgz reponame.dump
scp reponame.tgz hostname:/path/to/new/repo

Then login to the new machine, and set up the new repo:

cd /path/to/new
svnadmin create reponame
tar zxf reponame.tgz
svnadmin load reponame

That’s all.

แก้ locale ใ้ห้เป็น US English โดยกำหนด user's environment variable อันใดอันหนึ่ง

LANGUAGE, LC_ALL, LC_MESSAGES
ให้เป็น en_US หรือ POSIX ซะ

== ประวัติการแก้ไข ==
1. 07/6/2548
2. 29/9/2549

การใช้คีย์เวิร์ดอัตโนมัติใน Subversion (keywords (tag) substitutions in Subversion)

ต่อจากบทความเก่า http://xoguy.blogspot.com/2007/05/tag-subversion.html ที่เคยแปะค้างๆไว้
ได้ลองใช้พวก tag (จริงๆในคู่มือเค้าเรียกว่า keyword) ต่างๆ ของ Subversion ดูแล้วเลยมาเมโม่เก็บไว้

ref: http://svnbook.red-bean.com/en/1.4/svn.advanced.props.special.keywords.html

คีย์เวิร์ด
คีย์เวิร์ดที่ใช้มี 5 อันคือ
  1. Date (alias = LastChangedDate)
  2. Revision (alias = LastChangedRevision, Rev)
  3. Author (alias = LastChangedBy)
  4. Id (no alias)
  5. HeadURL (alias = URL)

วิธีการใช้
1. เพิ่มคีย์เวิร์ดเหล่านี้ไว้ในไฟล์ อย่างเช่นในคอมเม้นท์ตรงหัวไฟล์
/* foo.txt initiated 2007/05/05
* $Revision$ last committed rev
* $Author$ last committed author
* $Date$ last committed date
* $Id$ last committed Id
* $URL$ head URL
*/
2.
เซต property svn:keywords ของไฟล์ foo.txt เพื่อเซตให้คีย์เวิร์ดเหล่านั้นถูกแทนค่าตอนคอมมิต, Subversion จะไม่แทนค่าคีย์เวิร์ดเหล่านี้ถ้าหากเราไม่เซต การเซตให้ LastChangedDate กับ Author ถูกแทนค่าทำได้โดย
$ svn propset svn:keywords "Date Author" foo.txt
property 'svn:keywords' set on 'foo.txt'
3. คอมมิตซะ! คีย์เวิร์ดเหล่านี้ก็จะถูกแทนค่าโดยอัตโนมัติตอนคอมมิต


นอกจากนี้แล้วการแสดงผลแบบกำหนดความกว้างตายตัวเพื่อความสวยงามสามารถทำได้โดยเพิ่มโคล่อนสองอันไว้หลังคีย์เวิร์ดซะ ใช้รูปแบบ อย่างนี้
$Rev::               $:  Revision of last commit
$Author:: $: Author of last commit
$Date:: $: Date of last commit

--
Date

This keyword describes the last time the file was known to have been changed in the repository, and is of the form $Date: 2006-07-22 21:42:37 -0700 (Sat, 22 Jul 2006) $. It may also be specified as LastChangedDate.

Revision

This keyword describes the last known revision in which this file changed in the repository, and looks something like $Revision: 144 $. It may also be specified as LastChangedRevision or Rev.

Author

This keyword describes the last known user to change this file in the repository, and looks something like $Author: harry $. It may also be specified as LastChangedBy.

HeadURL

This keyword describes the full URL to the latest version of the file in the repository, and looks something like $HeadURL: http://svn.collab.net/repos/trunk/README $. It may be abbreviated as URL.

Id

This keyword is a compressed combination of the other keywords. Its substitution looks something like $Id: calc.c 148 2006-07-28 21:30:43Z sally $, and is interpreted to mean that the file calc.c was last changed in revision 148 on the evening of July 28, 2006 by the user sally.

วันอาทิตย์, สิงหาคม 26, 2550

Eclipse workspace management

read some good tips --> http://www.ibm.com/developerworks/opensource/library/os-ecl-manage/



ดูเหมือนว่าเราจะสามารถใช้ binary ของ eclipse เดียวรันหลายๆ workspace ได้
ตัวอย่างเช่นเราอาจจะแบ่งเป็น workspace สำหรับ Java, workspace สำหรับเขียนเปเปอร์ด้วย LaTeX หรือ อาจจะเป็น workspace สำหรับพัฒนาโปรแกรมเล่นๆ ที่ไม่ใช่โปรดัค ก็แค่แยกใช้ workspace สำหรับวัตถุประสงค์ต่างๆเหล่านั้น ก็จะทำให้จัดการโปรเจคได้ง่ายขึ้น

ข้อควรรู้
  1. รันด้วย eclipse.exe -showlocation เพื่อให้มันแสดง location ของ workspace ที่ Title bar
  2. ค่า preferences ถูกเก็บในแต่ละ workspace ดังนั้นจึงไม่เกี่ยวข้องกัน
  3. File -> Export -> Preferences เก็บ preferences เป็นไฟล์ XML เอาไว้ใช้กับ workspace อื่น
  4. สำหรับ plug-in ต่างๆนั้น ถูกเก็บอยู่ใน installation ของ eclipse binary ที่เราเรียกใช้ ดังนั้นหากเราโหลด eclipse เวอร์ชั่นใหม่กว่ามาลง พวก plug-in ที่เคยใช้ก็จะต้องลงใหม่

วันศุกร์, สิงหาคม 24, 2550

ข้อแตกต่างระหว่าง WAIT and AWAIT

wait แตกต่างจาก await อย่างไร?
อ้างอิงจาก ที่นี่: http://www.bbc.co.uk/worldservice/learningenglish/radio/specials/1535_questionanswer/page15.shtml

AWAIT and WAIT: to sum up, there are two kinds of difference
  • grammartical difference
    • the verb `await’ must have an object
      • ex. I am awaiting for your answer.
      • the object of 'await' is normally inanimate, not a person, and often abstract.
      • »So you can't say, 'John was awaiting me'.
    • the verb `wait’ can come in different structures.
      • »Use `wait on its own à ex. We have been waiting and waiting and nobody has come to talk to us.
      • »Use `wait with another verb à ex. I waited in line to go into the theatre.
      • »Use `wait with the length of time à ex. I have been waiting here for at least half an hour.
      • »Use `wait to mention what or who the speaker have been waiting for à ex. I have been waiting for Joe for two hours!.
  • Formality difference
    • `await’ is more formal than `wait’ , so it would be used in formal writing.

Granting privileges to Java RTS Users on Solaris 10

Note that you (may) need to logout and login again for the new priviledges to take effect. The preferred approach might be to create a new administrative role, `rtsj_role', then assign `Java Real-Time System User' right to `rtsj_role', and make the user who want to use Java RTS assumes the rtsj_role.

The following procedures are quoted from /opt/SUNWrtjv/doc/JavaRTSInstallation.html#privileges



Granting Privileges to Java RTS Users

The Java Real-Time System uses a number of Solaris resources, such as the real-time scheduling class, whose usage is restricted to privileged processes. Therefore, the Java RTS Virtual Machine must be run as the superuser (root) or must be explicitly granted additional rights by the system administrator in order to ensure predictable timing of operations.

Solaris supports role-based access control (RBAC), which enforces security policy at a more fine-grained level than the conventional superuser security model. This enables a user to be assigned the precise level of privilege that is necessary to execute the Java RTS.

This is typically achieved by means of a specific rights profile, that is, a collection of commands with security attributes. Rights profiles are usually included in an administrative role, and the role is then assigned to a user. Direct assignment of rights profiles to a user is also possible. In that latter case, this user must use a profile shell such as pfsh(1) or pfcsh(1) for the commands with security attributes to succeed.

Rights profiles can be managed using the Solaris Management Console, smc(1), a graphical user interface that provides access to Solaris system administration tools.

To invoke the Solaris Management Console, type the following command:

    # /usr/sbin/smc

The 'Java Real-Time System User' rights profile can also be assigned to an administrative role using the following command:

    # /usr/sbin/rolemod -P "Java Real-Time System User" 

where is an existing role account.

This rights profile can also be directly assigned to a Solaris user by using:

    # /usr/sbin/usermod -P "Java Real-Time System User" 

where is an existing, local user name.

Alternatively, you can decide not to use the Java RTS profile and assign additional rights directly to the Java RTS users. In that later case, be aware that all the processes created by such Java RTS users (that is, not only the Java RTS Virtual Machine) will be granted these additional rights.

Rights management is implemented on Solaris through privileges, that is, discrete rights required to perform particular operations. Privileges decrease the security risk that is associated with one user or one process having full superuser capabilities on a system.

If you decide to bypass the Java RTS rights profile, then the Java RTS users must be granted at least the following privileges, for them to be able to run properly the Java RTS Virtual Machine:

  • sys_res_config: allows a process to create and delete processor sets, assign CPUs to processor sets, and change the operational status of CPUs in the system.
  • proc_priocntl: allows a process to elevate its priority above its current level and change its scheduling class to any scheduling class, including the RT class.
  • proc_lock_memory: allows a process to lock pages in physical memory.
  • proc_clock_highres: allows a process to use high resolution timers.

To assign the above set of privileges directly to a Java RTS user, use the Solaris Management Console, smc(1), or type the following command:

    # /usr/sbin/usermod -K \
defaultpriv=basic,sys_res_config,proc_priocntl,proc_lock_memory,proc_clock_highres

where is an existing, local user name.

Note that the usermod(1M) command does not allow privileges to be assigned to non-local users (that is, to users who do not appear in the local /etc/passwd file). To assign privileges to a non-local user, add the following line to the /etc/user_attr file:

::::type=normal;profiles=Basic Solaris User;defaultpriv=basic,
sys_res_config,proc_priocntl,proc_lock_memory,proc_clock_highres

where is an existing, non-local user name.

Java PathFinder where to start?

When I started writing my tool, I realized it is a good idea to read the code of the great tool that several great people(?) have contributed---the Java PathFinder (JPF).
The entry point for reading Java PathFinder may be at
  • gov.nasa.jpf.tools.JavaJPF : main() is here.
  • gov.nasa.jpf.JPF : main class for JPF verification framework. It reads config, instantiates the Search and VM objects, and starts the Search.
  • gov.nasa.jpf.jvm.JVM : the class for virtual machine that can move forward / backward one transition at a time.
  • Besides, ThreadInfo, MethodInfo in gov.nasa.jpf.jvm are also worth looking.

Eclipse preferences: using multiple instances of Eclipse

เวลาใช้ Eclipse หลายอินสแตนซ์แล้ว มันมีเรื่องเล็กน้อยคือต้องคอยปรับค่า preferences ให้มันเป็นตามที่เราคุ้นเคย

จริงๆมันก็สามารถ File > Export > preferences ได้ แต่ทีนี้พอไม่ได้ทำนานๆแล้วมันก็ลืม
จดไว้ตรงนี้กันลืมว่า เวลาสร้างอินสแตนซ์ของ Eclipse ขึ้นมาใหม่เมื่อไหร่ก็ Export / Import preferences จากอันเก่าที่ใช้ประจำมา.

วันพฤหัสบดี, สิงหาคม 16, 2550

การย้ายรูปที่เก็บด้วย Picasa ไปยังคอมเครื่องใหม่, migrating picasa photo library to a new computer

ลองค้นหาในเฮ้ลป์ของ Picasa help & support เค้าบอกให้ใช้ Tools > Backup Pictures แต่ผมคิดว่าไม่จำเป็น เราสามารถก๊อปปี้โฟลเดอร์ที่เก็บรูปไว้ (ซึ่งเป็นโฟลเดอร์ ที่ให้ Picasa คอยดูแลให้เราอยู่) หรือ ย้ายมาได้ตรงๆ แล้วพอลง Picasa ที่คอมเครื่องใหม่ก็ให้มัน watch! โฟลเดอร์นั้นให้ก็เรียบร้อย

อย่างไรก็ดี อัลบั้มที่เราสร้างไว้ใน Picasa มันไม่ได้เก็บเป็นโฟลเดอร์ต่างหาก แต่เก็บเป็น XML แต่ใช้นามสกุล .pal (Picasa ALbum) อยู่ที่ $USER\Local Settings\Application Data\Google\Picasa2Albums
ซึ่งในไดเรคทอรี่นี้ จะมี
  1. watchedfolders.txt เป็นเท็กส์ไฟล์ ที่เก็บว่า Picasa มัน watch ไดเรคทอรี่ไหนอยู่ และ
  2. ซับไดเรคทอรี่ที่มีชื่อเป็น HEX ยาวๆ ex. b8ce842...2d2 ซึ่งในไดเรคทอรี่นี้จะมีไฟล์ .pal ที่เก็บ Picasa Album อยู่

ให้เราก๊อปไฟล์นั้นไปไว้แล้วเปิด Picasa ขึ้นมาใหม่ก็น่าจะเรียบร้อย

ถ้าเปลี่ยนโลเคชั่นของโฟโต้ไลบรารี่ก็แก้ไขไฟล์ .pal ให้เป็นที่ใหม่ซะด้วย เช่นใน
 
[D]\Photos\20000229\PIC001.JPG


[D] คือ drive D: [E] ก็คือ drive E:

+ เพิ่มเติม +
หากเราเคยอัพอัลบั้มนั้นขึ้นใน Picasa Web โดยใช้ ,2 มันจะมีเอ็นทรี่ คล้ายๆอย่างงี้
>_lh" type="num64" value="0"/>
>_lh" type="num64" value="0"/>

<< >> เป็น place holder

ในไฟล์ .pal ทำให้ก๊อปไปแล้วกลับไม่ปรากฎอัลบั้มนั้นขึ้นใน Picasa
การแก้ไขก็ทำได้โดยลบสองบรรทัดนั้นออกไป ลบแล้วพอก๊อปไปก็จะได้ดังเดิม

ติดตั้ง Webmin ใน Solaris 10 เพื่อความสะดวกในการคอนฟิก Samba

วันนี้คุยกับเด็กรุ่นน้องที่ำทำงานด้วยกัน เรื่องการลงแซมบ้าใน Solaris 10 ซึ่งใน Solaris 10 นั้นมันมี Samba มาให้อยู่แล้ว เพียงแต่คอนฟิกยากเล็กน้อยเพราะยังไม่ได้ศึกษา SMF เท่าไหร่
สรุปก็คือใช้ Webmin ง่ายดี ใช้แอ๊ดมินได้หลายๆอย่างด้วย

บันทึกการติดตั้ง
ref: http://www.webmin.com/solaris.html

  1. ดาวน์โหลดแพคเกจของ Solaris มาซะ
  2. # pkgadd -d webmin-1.360.pkg
  3. แล้วก็คอนฟิกอีกเล็กน้อย โดยเพิ่ม user หรือ sync มันมาจาก unix account ซะ
  4. แล้วก็เพิ่มไดเรคทอรี่ที่จะแชร์ลงไป
  5. คอนฟิก อื่นๆ ตามสมควร อาจดูที่ smb.conf เพื่อความชัวร์
  6. คลิก รีสตาร์ท Samba server

วันอังคาร, กรกฎาคม 17, 2550

vnc on Solaris 10

บันทึกการติดตั้งโปรแกรม vnc ใน Solaris 10 เมื่อวาน

ref:
  1. http://blogs.sun.com/timthomas/entry/update_on_vnc_and_solaris
  2. http://www.salixtraining.co.uk/index_files/vncsol10.htm
  3. http://www.softpanorama.org/Xwindows/VNC/vnc_on_solaris.shtml
ขั้นตอนที่ทำคือ
  1. โหลด CompanionDVD ของ Solaris 10 11/06 มา ในนั้นจะมี SFWvnc อยู่ เราใช้ package นี้ในการติดตั้ง
  2. โปรแกรมอื่นที่จำเป็น(prerequisite) ถูกลงไปก่อนแล้วนั้นหาได้จาก sunfreeware
  3. โหลดสคริปต์ติดตั้งจาก [2] (www.salixtraining.co.uk) เราใช้สคริปต์นี้ช่วยให้การติดตั้งสะดวกขึ้นมาก
  4. เอาแพคเกจของ SFWvnc จาก CompanionDVD แทนในแพคเกจที่มีอยู่ในสคริปต์จาก [2] ใช้คำสั่ง 
  5. pkgtrans . /mytemp/SFWvnc.pkg SFWvnc
  6. modify the script installsol10vnc.ksh in the initialise function remove the SFWgcc341.pkg away:
  7. packages="SFWgcmn.pkg SFWvnc.pkg"
  8. comment the line: fix_gnome_bug, it worked fine without doing this for me too.




วันพฤหัสบดี, กรกฎาคม 12, 2550

Solaris 10 : Changing password policy, root login policy

see /etc/default/passwd
The file specify password complexity and so on.

see /etc/default/login
When CONSOLE is set root can only login on the specified device.
Comment to unset the CONSOLE to allow remote root login.

The use of "BY" (method, agent) and "WITH" (tools, etc).

ทั้ง by และ with ใช้บอกเกี่ยวกับวิธีการ ในการกระทำของ somebody.

BY
ใช้ by เมื่อพูดถึงการกระทำว่าเราทำอย่างไร จึงได้ผลลัพธ์อย่างนั้น

WITH
ใช้ with เมื่อกล่าวถึง tool หรือ object ที่เราใช้เพื่อให้บรรลุเป้าหมาย

ex.
I killed the spider by hitting it.
I killed the spider with a shoe.
"I got where I am by hard work".
"No you didn't. You got there with your wife money."

WITH มักจะใช้กับการกล่าวถึง tool หรือ instrument used by somebody.
ex.
He was killed by a heavy stone. (This could mean 'A stone fell and killed him'.)
He was killed with a heavy stone. (This means 'Somebody used a stone to kill him.')

สรุป
การกระทำ killed ทำโดย a heavy stone ดังนั้นจะใช้ by.
การกระทำ killed ทำโดยคนอื่น ซึ่งใช้ a heavy stone เป็นเครื่องมือ ใช้ with

เครื่องเซิฟเวอร์ Sunfire 880 กับ StorEdge A1000

พึ่งรู้ว่าเครื่องเซิฟเวอร์ที่เปิดมากว่า 3 ปี และมีext hdd อย่างไฮโซนั้น มันไม่ได้ถูกใช้งานเลยแม้แต่น้อย อันนี้เป็นความดีความชอบของ admin ณ สมัยนั้น

ก็เลยได้โอกาสที่จะใช้ประโยชน์ให้เต็มที่
เริ่มจากการสร้างไฟล์ซิสเต็มซะก่อน บันทึกเล็กๆน้อย เปิดดูจาก Solaris Administration document ในเว๊บของ Sun น่ะแหละ

ใช้คำสั่ง format
และใน format ให้เลือก partition
แล้วเลือก modify
ใช้ All free hogs
แล้วก็ accept table ไปก่อน กำหนดพื้นที่ตามความเหมาะสม
แล้ว label เพื่อwrite change ลงไป
แล้วก็ newfs /dev/..../c4t0d0
แล้วก็ลอง mount ดู
ถ้าโอเคก็แก้ /ets/vfstab เพื่อให้มัน mount โดยอัตโตมัติ

ความละเอียดของเวลา ใน RTSJ implementation ต่างกัน (time resolution is different from implementations to implementations)

จากการทดลอง Sun Java RTS ให้ความละเอียดสูงที่ 1 ns
ส่วน RI ของ TimeSys ซึ่งรันบนLinuxนั้นให้ความละเอียดที่ 1000 ns หรือ 1 ms เท่านั้น

เป็นผลจากคำสั่ง clock.getResolution();

วันนี้ลองลง LyX

I installed the following programs:

MacTeX-2007 | http://www.tug.org/mactex/
MacTeX installs TeXlive and includes XeTeX which is a nice extension to support.

วันอาทิตย์, กรกฎาคม 01, 2550

สถานะของฟอนในแผนที่ฟอน Fon map status

ref: http://elfonblog.fondoo.net/?feedrss2&p=56


- orange: Foneros without registered routers (according to Martin, potential Aliens, but I think originally any Fonero was registered orange, including people that bought but didn’t register a router)

- light green: registered routers that didn’t show activity in the last hour

- dark green: registered routers that did show activity in the last hour

- dark green with white star: dark green AND personalized page.

That is information from the map site, check the config options.

The information given, is incorrect (of course…).
At my address, two routers are portrayed, one light green (a non-existing router), one darkgreen with whitestar.
The last is an existing FON router, where nobody logged on the last week. So active is apparently equal to the thinclient being active… and doesn’t depend on user activity.
And that combined, would lead to the conclusion that all light-green icons are not alive and kicking; if the thinclients would work, they should be dark green. (Or am I jumping to conclusions ?)

วันพุธ, มิถุนายน 27, 2550

การเปลี่ยนฟอนต์ใน LaTeX (Changing Fonts in LaTeX)

ref: http://web.image.ufl.edu/help/latex/fonts.shtml

Changing Fonts

If you use any packages that change the font, those packages will change the default of the same type. For instance, using the Bookman font (which is done by using this command in the preamble: \usepackage{bookman})makes the default Roman font Bookman, but leaves the sans-serif and monospace fonts alone. Similarly, using the Helvetica font (done with this command in the preamble: \usepackage{helvet}) changes the default sas-serif font to Helvetica, but leaves the Roman and Monospace fonts alone. When changing fonts, you can do so like this, using the command and calling the particular font, or you can change all of the default fonts at once with the following commands.

CommandChanges the defaults to
timesTimes, Helvetica, Courier
pslatexsame as Times, but uses a specially narrowed Courier. This is preferred over Times because of the way it handles Courier.
newcentNew Century Schoolbook, Avant Garde, Courier
palatinoPalatino, Helevetica, Courier
palatcmchanges the Roman to Palatino only, but uses CM mathematics

For more on the fonts available with a typical LaTeX installation, please see the documentation in the IMAGE Lab (page 75 in A Beginner's Guide to Typsetting with LaTeX). Also, please note that there are many more fonts available for download.

Changing Fonts Temporarily

To change the font temporarily, first group the text where you want the font changed in curly braces. Then, use the commands \fontencoding, \fontfamily, and \selectfont. These commands should be used immediately inside the opening curly braces, like:

{\fontfamily{phv}\selectfont Helvetica looks like this}
and {\fontencoding{OT1}\fontfamily{ppl} Palatino looks like this}.
}

The above commands would make a sentence where "Helvetica looks like this" would be in the Helvetica font (phv is the code for Helvetica) and "and" would be in the default font and "Palatino looks like this" would be in the Palatino font (denoted with the Palatino code, which is ppl). This example would be very rare, but it shows how the fonts can be changed in the most extreme circumstances.

วันพฤหัสบดี, มิถุนายน 07, 2550

ว่าด้วยเรื่องของการโทรศัพท์กลับบ้านโดยVoIP : voipbuster vs 12voip

ค่าบริการ ณ วันที่ 6 มิถุนายน 2550
โทรกลับประเทศไทย
voipbuster 0.01 euro (ทั้งโทรศัพท์บ้านและมือถือ)
12voip 0.02 euro สำหรับโทรศัพท์มือถือ และฟรีสำหรับโทรศัพท์บ้าน

ถ้าโทรเข้าืมือถือบ่อยกว่าก็ใช้ voipbuster ดีกว่า
แต่ถ้าโทรเข้าบ้านบ่อยกว่าก็ใช้ 12voip (จ่าย 10 euro ใช้โทรฟรีได้ 3 เดือน)
ทั้งสองเจ้าเป็นของ betamax บริษัททางด้านเทคโนโลยี Voip ของเยอรมัน
ิี