วันเสาร์, ตุลาคม 13, 2550

เริ่มต้นกับ WALA เครื่องมือสำหรับการวิเคราะห์โปรแกรม (getting started with WALA)

สรุปขั้นตอนต่างๆ สำหรับการเริ่มต้นใช้เครื่องมือ WALA
  1. download Eclipse (the big one, version with RCP/plugin developer), as suggested by the WalaWiki the version for Java dev seems not sufficient.
  2. install EMF from eclipse software update. Europa update -> Model and Modeling Environment -> EMF runtime & End user.
  3. install Subclipse.
  4. edit ...wala.core/dat/wala.properties
    1. java_runtime_dir = c:/program files/Java/jre-1.6.0_03/lib
    2. output_dir = w:/WALA/WALA_output
  5. install graphviz (examples in wala.core.tests use dot.exe provided by graphviz)
  6. edit ...wala.core.tests/dat/wala.examples.properties
    1. provide absolute path for gsview32.exe
    2. and dot.exe
  7. run examples from launcher in Eclipse. Edit arguments, for examples, -appJar c:/lib/foo.jar or -sig method_a()V

วันพุธ, ตุลาคม 10, 2550

en-dash และ em-dash ใน XeLaTeX

เนื่องจาก TeX ประมวลผลอินพุตไฟล์ซึ่งเป็นASCII 8-bit codepage ที่ไม่มีตัวอักษรซึ่งตรงกับ en-dash และ em-dash ทำให้ใช้ไฮเฟ่น 2 หรือ 3 อัน (--, ---) แทน. แต่เนื่องจาก XeTeX นั้นประมวลผลอินพุตเท็กส์ที่เป็นยูนิโค้ด ซึ่งมีอักขระสำหรับ en-dash และ em-dash ทำให้การใช้ --/--- จึงไม่จำเป็น
วิธีการพิมพ์ en/em-dash นั้น สำหรับวินโด้เอ๊กพี ทำได้โดย
  • เปิด Num Lock
  • กด Alt ค้าง พิมพ์ 0150 / 0151 ที่แป้น Numeric Pad ถ้าพิมพ์ที่คีย์บอร์ดธรรมดา จะไม่ติด

บันทึกเกี่ยวกับการลง TeXLive 2007 แทน MiKTeX 2.7 beta3

หลังจากเขียนดีวีดีอิมเมจที่ดาวน์โหลดมาแล้ว ลองติดตั้งดูในเครื่องคัมปานา
อินสตอเลอร์มันไม่เข้าโหมดอินสตอลให้ เนื่องจากเรามี MiKTeX ติดตั้งไว้อยู่ก่อนแล้ว
เราต้องแก้ environment variables เพื่อให้อินสตอลเลอร์มันทำงานในโหมดอินสตอล
(จริงๆแล้วสามารถโอเวอไรด์ได้ด้วยออพชั่นของคอมมานไลน์ แต่มันจะไปเขียนทัพ env var บางตัว)

env var ที่แก้คือ
  1. System Variable: Path= C:\Program Files\MiKTeX 2.7\miktex\bin;c:\program files\imagemagick-6.3.4-q16;
มันจะถามเรื่องอินสตอล Perl กับ Ghostscript

พบว่าใช้ TeXLive ดีกว่า

วันอังคาร, ตุลาคม 09, 2550

บันทึกเรื่องฟอนต์ที่ใช้ใน XeTeX in MiKTeX (installing fonts for XeTeX in MiKTeX 2.7)

ก่อนอื่นต้องรันใน fc-cache ในคอมมานด์พรอมพ์ของวินโด้
พลาดไปรันใน bash shell ของ cygwin ซะ มันเลยไม่เวิร์ค
ผลลัพธ์การรัน fc-cache -f -v แสดงข้างล่างนี้
C:/WINDOWS/Fonts: caching, 162 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1: caching, 0 fonts, 6 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/adobe: caching, 0 fonts, 2 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/adobe/courier: caching, 6 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/adobe/utopia: caching, 4 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/bluesky: caching, 0 fonts, 3 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/bluesky/ams: caching, 34 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/bluesky/cm: caching, 75 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/bluesky/latex-fonts: caching, 14 fonts,
0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/groff: caching, 1 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/hoekwater: caching, 0 fonts, 4 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/hoekwater/mflogo: caching, 8 fonts, 0 di
rs
C:/Program Files/MiKTeX 2.7/fonts/type1/hoekwater/misc: caching, 1 fonts, 0 dirs

C:/Program Files/MiKTeX 2.7/fonts/type1/hoekwater/rsfs: caching, 3 fonts, 0 dirs

C:/Program Files/MiKTeX 2.7/fonts/type1/hoekwater/stmaryrd: caching, 6 fonts, 0
dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/public: caching, 0 fonts, 3 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/public/eurosym: caching, 12 fonts, 0 dir
s
C:/Program Files/MiKTeX 2.7/fonts/type1/public/lm: caching, 92 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/public/xypic: caching, 9 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/urw: caching, 0 fonts, 9 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/urw/avantgar: caching, 4 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/urw/bookman: caching, 4 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/urw/courier: caching, 4 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/urw/helvetic: caching, 14 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/urw/ncntrsbk: caching, 4 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/urw/palatino: caching, 4 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/urw/times: caching, 4 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/urw/zapfchan: caching, 1 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/type1/urw/zapfding: caching, 1 fonts, 0 dirs
C:/Program Files/MiKTeX 2.7/fonts/opentype: caching, 0 fonts, 1 dirs
C:/Program Files/MiKTeX 2.7/fonts/opentype/public: caching, 0 fonts, 1 dirs
C:/Program Files/MiKTeX 2.7/fonts/opentype/public/lm: caching, 72 fonts, 0 dirs
C:/Documents and Settings/All Users/Application Data/MiKTeX/2.7/fontconfig/cache
: cleaning cache directory
fc-cache: succeeded

วันศุกร์, ตุลาคม 05, 2550

ว่าด้วยการนับเรียงของส่วนพาดหัวใน LaTeX (Numbering Heading)

REF: The LaTeX Companion, pp. 25

Every counter in LaTeX has an associated command constructed by prefixing the counter name with `\the', which generates a typeset representation of the counter in question. In case of the sectioning commands this representation form is used to produce the full number associated with the commands, as in the following definitions:
  • \renewcommand\thechapter{\arabic{chapter}}
  • \renewcommand\thesection{\thechapter.\arabic{section}}
  • \renewcommand\thesubsection{thesection.\arabic{subsection}}
This kind of recursive definition facilitates modifications to the counter representations because changes do not need to be made in more than one place. If you want to number sections using capital letters, you can just redefine the command \thesection:
  • \renewcommand\thesection{\Alph{section}}

วันอังคาร, ตุลาคม 02, 2550

Google TechTalk video

ref: http://www.scottberkun.com/services/speakingsamples/

Today I watched some video of some presentations, presented by professionals, to be my guideline. I then dive down into Google Video site where I found a lot of interesting Google TechTalk video, though i have not so much time to view them till the end. Here are some of those videos:



This is one in the Advanced in Programming series by Google.

เลคเชอร์สุดท้ายของ แรนดี้ พอช CMU

วันจันทร์, ตุลาคม 01, 2550

จาก 華麗なる一族

ข้อความตอนจบในจดหมายของเท็ปเป
人間はちっぽけな存在だ。
自分を強く見せようとして
背伸びしては傷つき
その傷口を自分自身で広げてしまう。
愚かで弱い生き物だ。

だからこそ人間は夢を見るのかもしれない。
夢の実現には困難を伴い
時として夢は人を苦しめる。
それでも僕は未来を切り開くことができるのは
夢に情熱を注ぐ人間の力だと信じている。
しかし 志を忘れたとき栄光はすぐに終わりへ向かうだろう。