PythonPoint

http://www.reportlab.com/docs/pythonpoint.pdf python2.4-reportlab-accel C interface to acceleration python2.4-reportlab

 

Xfig Tutorial

xfig繪出向量圖形,而非是點陣圖,一直都不會,所以將過程記錄起來。

Mouse usage

滑鼠3鍵分屬不同的功能,左鍵(鍵1),中鍵(鍵2),右鍵(鍵3)。

繪製Box

按鍵1(corner point)移到要的位置,再按鍵1(final point),如果在Fill Style有設定,則此Box會填入色彩。但這樣的Box並不能轉角度,如果要作出轉角度的Box,就要用POLYGON

選定作出的box後,Update可將Fill Style中所設定的顏色,填入box中。

Click mouse button 1 (`corner point') at any corner of the rectangular box, and click mouse button 1 (`final point') again at the opposite corner.If area fill is specified by FILL STYLE, the box will be filled according to the setting.

A box created with this function can't be rotated by an arbitrary angle, only by multiples of 90 degrees. To create an arbitrarily rotatable rectangular box, you should use POLYGON (it may be easier to create non-rotated rectangle first and then rotate it by ROTATE). You may also use REGULAR POLYGON to create a rotated square.

Compound Objects

鍵1(tag object)選定物件,鍵2(tag region)拉出一個涵蓋所要物件的Box,鍵3(compound tag)完成

Glue selected objects and make them a COMPOUND object.

This is useful to move or copy some objects together at the same time. It is also possible to scale part of a figure by scaling a COMPOUND object after making part of the figure COMPOUND.

Clicking on an object with mouse button 1 (`tag object') will tag the object. Clicking one corner of a rectangular region with mouse button 2 (`tag region') and then clicking mouse button 2 (`final corner') again at the opposite corner of the rectangular region will tag all objects inside the region. After tagging all objects to be glued into a COMPOUND object, clicking mouse button 3 (`compound tagged') will glue those objects and make them a COMPOUND object.

If an already tagged object is selected by mouse button 1 or mouse button 2, that object will be untagged. If you want to remove all tags, change the mode temporarily to any other mode (e.g. "move object") except BREAK COMPOUND. The COMPOUND object may be separated into component objects by BREAK COMPOUND.

Copy object

鍵1(copy object)選擇要複製的物件,移動到適當的地方,再按鍵1(place object)系統會自動貼上物件,完成複製。

Select the object to be copied by clicking the object with mouse button 1 (`copy object'), and finish the copy operation by clicking mouse button 1 (`place object') again at the position to place the copy. If you want to restrict the movement to horizontal or vertical, use mouse button 2 (`horiz/vert copy') instead of mouse button 1. The operation may be canceled by clicking mouse button 3 (`cancel') in either case.

If you want to copy several objects at the same time, you may put them a COMPOUND object using GLUE COMPOUND.

By setting SMART-LINKS MODE, it is possible to copy the lines which touch the object as you move the object itself. This only works with POLYLINES (not splines) touching a BOX or ARC-BOX. It is also possible to make many copies in this mode, using ARRAY PLACEMENT. To do this, first set the number of copies to be created by setting NUMBER OF X COPIES and NUMBER OF Y COPIES. Then select the object to be copied by clicking the object with mouse button 1 (`copy object') or 2 (`constrained copy'), and specify the direction and distance to place the copies by clicking mouse button 2 (`array placement') after moving the mouse. Normally, objects will be placed on the array of NUMBER OF X COPIES and NUMBER OF Y COPIES, but when either of them is set 0 or 1, copies of specified number will be generated and they can be placed obliquely. For example, if the number of X copies is 3 and the number of Y copies is 0 or 1, the copied objects will be placed along the X direction at the same Y position as the original object.

Clicking an object with mouse button 3 (`copy to cut buf') will copy the object to the xfig cut buffer. The object copied into the xfig cut buffer may be inserted into the figure on the canvas using Paste Objects. This allows you to copy part of a figure to another figure. Any object in the xfig cut buffer will be overwritten when the new object is copied into the xfig cut buffer. To copy multiple objects into the xfig cut buffer, you must first put them into a COMPOUND object using GLUE COMPOUND.

Resources

  1. Xfig tutorials
  2. Drawing Box

 

jabber Howto

http://www.jabber.org/user/userguide/
http://status.jabber.org/

Jabber: steven@darwin.nchc.org.tw
ICQ: 143458524
M$N: jhshiau@yahoo.com

請大家同時開jabber & M$N,這樣,一個掛了,馬上可以用另外一個接手..因為有時候M$N掛了,你並不知道...別人要找你,卻沒辦法透過M$N找你..呵呵...人工的failover。為何要請各位有jabber帳號,就是要方便聯絡。如何方便?為何指定jabber ?

0. 就是不管Linux/M$ Windows都可以有client
1. 因為它是開放與分散式的架構,每個人都可以自己架server,然後各個server又可以互相連通。
不會掛一個站,幾千萬人跳腳...這也符合grid的精神...呵呵
2. 一個比較重要的,client可以跨平台,而且很多IM程式都可以支援。

3. Jabber另外一個好處是可以支援SSL/RSS,所以了,呵呵,如果開起來了,你講的咚咚,別人很難監控...M$N messenger沒有加密的機制,也不能外掛,sniffer這個程式可以輕易的監控別人的悄悄話,但是用gaim可以解決這個問題。

gaim下如何加密(適用M$N messenger, Jabber, ICQ, Yahoo...):
1.先安裝 gaim (download from http://gaim.sf.net)
2.再安裝這個 http://gaim-encryption.sourceforge.net/
3.然後開啟gaim->工具->偏好設定->模組清單->gaim-encryption勾起來
4.然後在對話的時候,右下角有一個鎖,本來是開的,你可以把他鎖上

如 http://gaim-encryption.sourceforge.net/conversation.html How do I use the same key on multiple machines? In Windows, "C:\Documents and Settings\username\Application Data\.gaim\"

三個檔案
1. private keys id.priv. 
2. Your public keys id. 
3. The public keys that you have "accepted" are in known_keys.

Each key is on its own line, and starts with the account name. Cut and paste the keys you want to copy (in both id.priv and id). Or, copy those entire files (but make sure to get the permissions right on them! Gaim-Encryption won't use key files that are world-writable, or private key files that are world-readable).

4. 有一台jabber server在中心,連線速度快。

M$N不是一個好東西,M$壟斷一切。哪天M$N獨大之後,要收錢了,你就要轉換一堆朋友的帳號,然後,可能為了怕麻煩,就付錢而不想轉換到其他的,呵呵講了這麼多,就是麻煩各位,同時開啟Jabber & M$N...其實,好不好用在於習慣。

jabber用戶端程式其中一個是gaim,可以在這裡下載http://gaim.sourceforge.net/downloads.php

然後用gaim這個程式到這裡註冊:

帳號清單->新增->通訊協定選Jabber ->伺服器選jabber
通訊協定:jabber
帳號: 你的帳號,例如JohnAdams

伺服器: jabber.org
Resource: Gaim
然後就按註冊,應該就會跳出"註冊新的Jabber帳戶"

伺服器的話,還有其他地方可以選,你可以查看這裡:
http://www.jabber.org/network,中心也有一台,darwin.nchc.org.tw

5. google talk也使用jabber了
http://www.google.com/support/talk/bin/answer.py?answer=24073

 

Linux平台 先打中文基礎

資策會二年前受工業局委託進行自由軟體計畫的推廣,初期投入中文輸入及整個中文參考平台的研發,負責該專案的資策會網路多媒體研究所也開始導入Linux平台,目前郵件伺服器已經替換成Linux平台產品,未來資策會也會逐步導入各項Linux的應用。

自由軟體相關業者及官方代表,日前參與今年度阿里山日出會議時,對於資策會推動自由軟體的成效有諸多批評。資策會網路多媒體研究所所長董建成表示,推動及扶植產業,必須要有策略性及步驟,過去二年多來,資策會所努力的項目,著重在基礎技術和平台的建置,像是中文輸入,Linux作業系統中文化參考平台以及建置中介平台。

董建成強調,要扶植一個產業,如果沒有基礎建設,很容易功虧一匱。「中文化」是Linux作業系統能夠普及和運作最重要的工程。至於中介平台,也是Linux應用軟體廠商可以運作重要基礎平台。

面對業者頻頻抱怨資策會在自由軟體計畫推動不力,沒有嘉惠到整體產業,董建成回應表示,一旦有了正確的策略和步驟,成效自然就會慢慢浮現出來,業者不必太心急。

參與會議的相關業者在阿里山日出會議中一再強調要創造需求面,人才也非常缺乏,對於這些困境資策會表示非常認同,未來會密切與相關業者保持溝通並改進;在工業局的牽線下,自由軟體業者今天將與M台灣計畫主持人舉行會議,以期爭取部份M台灣的子計畫可以採用Linux平台和技術。

因為投入自由軟體的研發和推廣,資策會也開始採用Linux平台,率先替換的是郵件伺服器,目前該研究所內七、八十位人員的郵件伺服器,全數改採Linux平台的伺服器。董建成表示,以往每年要付給微軟的軟體升級費用,大約有上百萬新台幣,改採自由軟體平台後,每年的維護費用僅需要十幾、二十萬台幣。由於網多所採用 Linux平台的成效不錯,資策會的郵件伺服器近來也會替換成自由軟體平台>。


 

封閉格式的M$ -- 兼談有效的資訊學習

最近看了一下Microsoft Office Open XML,想起自己在使用和學習資訊的過程,一直都無法擺脫.doc格式的糾纏。

直到學習了程式語言python,學習了遵循開放格式xml, pdf, csv,也寫作了wiki, docutils等等,presentation是用一些其它的方法來實作,如PythonPoint, pyslite,加上OpenOffice(OOo)的支援,總算擺脫了M$的控制。

可是這個過程是多麼的辛苦,又要學很多其它的技能,如果當初在學習的過程中,開始就是學習開放且標準的格式,就不需要重複學習了,浪費學習的時間。從這個現象也反應出在台灣學習資訊的現象,那就是學校的資訊學習過程,並沒有導引正確的學習方式,一直讓學生資訊的學習過程,反複學習,而且學的都是封閉的文件格式,這樣無助於更長遠的資訊發展。


 

No Smoking

http://member.ettoday.com/events/101/index-2c.php

 

MP3 Lyrics

歌曲:da da da 歌手:王心凌 专辑:闪耀2005新歌+节奏精 yoyoyoyo让开心先过 转弯小巷搜寻好结果 向前向后转身再向左 脱掉烦恼谁的份最多 dadada dododolululu dadada dadada换上快乐舞步dadada heyheyheyhey有话要直说 别让机会又擦肩而走 遇见honey勇敢say~hello 心心相应电流在穿梭哦 yoyoyoyo为自己加油 伤心放假幸福等等我 恋爱节奏要天长地久 onetwothreefour脚步别落后哦 heyheyheyhey和未来交手 抛开忧愁世界照亮我哦 abcd答案是什么 跟着感觉不用又想太多 歌曲:好久不见 歌手:5566 专辑:好久不见 hu hu ah i 你的样子越来越美越来越可爱 走到哪里都会有人偷偷望着你 你的歌声越唱越美越唱越动人 唱到哪里都会有人偷偷流着泪 好久不见的你是否别来无恙 是否心里有时还在偷偷想着他 年复一年岁月无声改变了我们 得到什么失去什么又有谁知道 好久没到这个地方来唉咿~ 这里的人每个每个变了样 是否记得当初我为你们唱的歌 是否记得一路花儿为我们盛开 是否记得当初我们讨论的女孩 是否她已越来越美越来越可爱 歌曲:暧昧 歌手:杨丞琳 专辑:暧昧 杨丞琳-暧昧 暧昧让人受尽委屈 找不到相爱的证据 何时该前进 何时该放弃 连拥抱都没有勇气 只能陪你到这里 毕竟有些事不可以 超过了友情 还不到爱情 远方就要下雨的风景 到底该不该哭泣 想太多是我还是你 我很不服气 也开始怀疑 眼前的人 是不是同一个 真实的你 暧昧让人变得贪心 直到等待失去意义 无奈我和你 写不出结局 放遗憾的美丽 停在这里 wo…… hu…wo…

 

CD Ripper@Ubuntu-5.10

如果想要從audio CD取出(Ripped/Extracted),在Ubuntu可以安裝Goobox,或是參考Debian Desktop Survival中,也有提及的Sound Juicer或是Grip,都可以幫我們取出音軌。

ogg vs lame有精彩的文章,讓我們對於音樂有更深的認識。


 

nvidia driver@ubuntu-5.10

現在的nvidia有最新的driver -- NVIDIA-Linux-x86-1.0-8174-pkg1.run,但是要在ubuntu-5.10中安裝設定成功,那 也要費一般功夫,以下就是過程。

首先要安裝下列套件:

linux-source-2.6.12(手動將linux-source-2.6.12.tar.bz2解開到/usr/src)
linux-headers-2.6.12-10
gcc-3.4-base
cpp-3.4
g++-3.4
gcc-3.4

因為NVIDIA-Linux-x86-1.0-8174-pkg1.run本身是shell script,同時也是個tarball檔(很奇特的檔案,不知如何作出來的?!),所以可以將之解開後(使用--extract-only選項,會出現一個目錄夾NVIDIA-Linux-x86-1.0-8174-pkg1),然後執行

samuel@pika046:NVIDIA-Linux-x86-1.0-8174-pkg1$ sudo env CC=gcc-3.4 ./nvidia-installer

意思是將CC的環境變數,指定為gcc-3.4,而不是用gcc-4.0,因為kernel本身是以gcc-3.4版本的compiler,編譯而得的,所以必須用gcc-3.4來編譯作出nvidia的module。

編譯完成之後,nvidia很聰明地會作post-install,將xorg.conf設好,重新啟動X,即可享有最新版本的nvidia driver。


 

Firefox 1.5.3

最近的firefox所release出的Firefox 1.5 RC 3使用起來的狀態非常地好,覺得啟動及使用都很快,proportional/monospace字型也不會怪怪的,官網也宣稱不會有memory leak的問題,值得來嚐鮮看看。


 

Skill expertise@python

這裡有一篇關於python的徵人啟示,可以作為將來程式skill寫作的參考。

Python Guru Needed Fast

j-rock jordan at talkingpanda.com

Talking Panda LLC is looking for a programmer to take over building applications for the iPod.

Required skills below. Please email me personally.

Jordan at talkingpanda.com

- Expertise in text parsing and formatting.  Specifically,
developing parsers to extract meaningful information from freeform
text, XML, HTML, SGML, spreadsheets and translate it to other
formats.
- Experience with and ideally preference for Python
- The creativity required to come up with solutions that work
within the constraints of the iPod Note Reader (up to 1000 notes
at 4kb each, limited formatting options, etc.).

The following skills are also a bonus:
- Tkinter and/or Win32 API programming
- COM
- Apple Events
- PyObjC / Cocoa
- Web development

 

apache2+tomcat+eXist@Ubuntu

首先在Ubuntu-5.10中安裝了(apache2+tomcat),只要確認下列套件有安裝:

apache2 apache2-common apache2-mpm-worker apache2-utils libapache2-mod-jk2

修改/etc/apache2/sites-available/default的設定檔,讓系統預設的ServerRoot從 "DocumentRoot /var/www/"變成"DocumentRoot /var/www/apache2-default",這樣browser連上http://localhost,就會看到預設的網頁,並將apache所提供的index.html.zh-tw.big5,用iconv成utf8的文字。

請不要用Ubuntu-5.10內設的gcj/gij 這樣執行jar會有問題,請從java.sun.com下載jdk,並且執行自動解壓縮檔jdk-1_5_0_06-linux-i586.bin,如此一來,JAVA_HOME就會設在$HOME/jdk1.5.0_06,依http://exist.sourceforge.net/quickstart.html步驟來安裝。

  1. wget http://nchc.dl.sourceforge.net/sourceforge/exist/exist-20051203.war
  2. wget http://nchc.dl.sourceforge.net/sourceforge/exist/eXist-snapshot-20051203.jar
  3. java -jar eXist-{version}.jar
  4. mkdir exist;cd exist;jar xfv ../exist.war
  5. bin/startup.sh -- 來啟動eXist

其實startup.sh就是執行以下的命令列:

/home/samuel/jdk1.5.0_06/jre/bin/java -Xms16000k -Xmx128000k -Dfile.encoding=UTF-8 
-Djetty.home=/home/samuel/eXist/tools/jetty -Dexist.home=/home/samuel/eXist 
-Djava.endorsed.dirs=/home/samuel/eXist/lib/endorsed -jar /home/samuel/eXist/start.jar jetty

從以下的連結,來看狀態

  1. 首頁
  2. Status

現在只剩Cxdb的設定了。


 

wxWidgets Installation

wxWidgets簡介

wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms. Link with the appropriate library for your platform (Windows/Unix/Mac, others coming shortly) and compiler (almost any popular C++ compiler), and your application will adopt the look and feel appropriate to that platform. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much much more.

所以為了發展跨平台的GUI界面,使用wxWidgets是很不錯的選擇,不同於Java的SWING,wxWidgets是使用C++來作為軟體發展的母語。但是如果你不會這些傳統語言,而只會些script language,如perl、python,那也沒關係,因為可以用wxPython, wxPerl,將你的程式包起來(Wrapper),執行的結果也是和wxWidgets是一樣的。

有些商用程式或是Open Source社群,所開發出來的IDE環境,可以幫助我們快速發展GUI的應用程式,如XRCed, wxGlade,所以的發展工具,都在官方的Tools to use with wxWidgets網站。

而在Ubuntu-5.10中,只要安裝wx-common, wx2.6-doc, wx2.6-examples, wx2.6-headers, wx2.6-i18n即可。


 

source list@ubuntu

從RedHat到Ubuntu,其實也不太難,而且台灣的同好己經作出非常好的Mirror,將下列加入到/etc/apt/source.lists,就非常容易將套件升級了。

2005/12/30 sources.list
sudo wget http://apt.ubuntu.org.tw/sources.list
deb http://apt.ubuntu.org.tw ubtw/
deb http://apt.ubuntu.org.tw/ubuntu breezy-updates main restricted universe multiverse
deb-src http://apt.ubuntu.org.tw/ubuntu breezy-updates main restricted universe multiverse
deb http://apt.ubuntu.org.tw/ubuntu breezy main universe multiverse restricted
deb-src http://apt.ubuntu.org.tw/ubuntu breezy main universe multiverse restricted
deb http://apt.ubuntu.org.tw/ubuntu breezy-security main restricted universe multiverse
deb-src http://apt.ubuntu.org.tw/ubuntu breezy-security main restricted universe multiverse

如gpdf, rcconf...,只需一行指令,就可以安裝成功。


 

分散式運算

http://www.equn.com/ http://blog.linuxeden.com/99966

 

WMA/MP3 Converter in Linux

為了替朋友考慮作音樂檔的轉換,在這裡找了一回(http://www.share2.com/mp3-converter)還是沒有比較適合的轉換器,所以就在linux下找看看有沒有方法,可以來解決。 http://blog.linuxeden.com/ 巴蛮子的新破茅屋

 

gpg key

http://wiki.ubuntu.org.tw/index.php/DebPackaging pub 1024D/F04CCC33 2005-11-16 Samuel Lu (Software Developer) Key fingerprint = B144 49AA BC80 5007 0A2D 8642 EEE0 49D2 F04C CC33 sub 1024g/6B2E95E9 2005-11-16 Keyphrase: DaoIsEverything
gpg --output revoke.asc --gen-revoke (您的金鑰 ID)

可以下列方式進行

gpg --output demo.gpg --export (您的金鑰 ID)  這是二元檔格式

或 gpg --armor --export (您的金鑰 ID)  這會輸出文字格式
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.2.5 (GNU/Linux)

...
-----END PGP PUBLIC KEY BLOCK-----

把這段文字複製起來,就可以用純文字檔釋出了

 

就是愛Ubuntu

http://wiki.ubuntu.org.tw/index.php/UbuntuL10n sudo apt-get install scim scim-chinese scim-config-socket scim-gtk2-immodule scim-tables-zh http://ftp.cse.yzu.edu.tw/ftp/Linux/Ubuntu/ubuntu-cd/5.10/ubuntu-5.10-install-i386.iso # Ubuntu@TW DebTeam deb http://apt.ubuntu.org.tw ubtw/ # Official Ubuntu@TW APT mirror source deb http://apt.ubuntu.org.tw/ubuntu breezy-updates main restricted universe multiverse deb-src http://apt.ubuntu.org.tw/ubuntu breezy-updates main restricted universe multiverse deb http://apt.ubuntu.org.tw/ubuntu breezy main universe multiverse restricted deb-src http://apt.ubuntu.org.tw/ubuntu breezy main universe multiverse restricted deb http://apt.ubuntu.org.tw/ubuntu breezy-security main restricted universe multiverse deb-src http://apt.ubuntu.org.tw/ubuntu breezy-security main restricted universe multiverse # security update deb http://security.ubuntu.com/ubuntu breezy-security main restricted universe multiverse deb-src http://security.ubuntu.com/ubuntu breezy-security main restricted universe multivers

 

Extract Text, Images from pdf

想要在linux下將pdf檔中的文字取出來,使用xpdf中的pdftotext,它是放在xpdf-utils: /usr/bin/pdftotext

/usr/bin/pdftops
/usr/bin/pdftotext
/usr/bin/pdfinfo
/usr/bin/pdffonts
/usr/bin/pdfimages

如果想要取出其中的image檔,可用pdfimages來實作。

詳情可看Extract Images from pdf

 

"podcast vs netlogo"教育的應用工具

最近經由人的介紹,瞭解了一些關於podcast的機制,它是種線上有聲書學習的一種方式,也是種XML的應用,採用rdf的xml標籤,對於教育是非常有用且有效的學習方式,可以在路上的時候, 將所下載的教育內容mp3檔,放在自己的mp3 player中來播放。

podcast

BBC英國國家廣播電台

或是進入bbc英國國家廣播電台,搜尋podcast,就會出現很多有趣的資訊內容。

Netlogo看似乎是應用在教育上的應用工具,還不是很確定,不過連結如下:

Netlogo


 

個人在Party中的社會行為

Netlogo是個讓我們可以模擬個人在社會群體行為的工具,打開Files|Models Library|Social Science|Party,然後就會出現如圖的畫面。

當載入完畢時,會出現如圖:

會發現一些有趣的現象,隨著party的進行,一群群男女個數很平均的群體,最後都變成了男、女各別獨佔的情形,也就是,最後都變成一堆男、或是一堆女所組成的情形,而且男、女獨佔的數量都是很大。

為什麼會產生這種現象?你可以試著來解釋這種行為嗎?

    setup: 內有tolerance參數,來調整
       go: 反覆按下go,可以開始/停止,分群的狀態
step-once: 一開始分為幾組

藉由調整tolerance的參數值,來提供解釋這種行為的原因?tolerance是指在群組中,同性可以容忍異性的範圍,如果值為.25,則表示當10個人的群體,其異性個數中超過3人,就會造成同性的"un-comfortable",就表示同性中有人會離開原群組,而另往它組尋求發展了。

To make sure all groups of 10 have both sexes, at what level should we set the tolerance? Test your predictions on the model. Can you see any other factors or variables that might affect the male to female ratio within each group? Make predictions and test your ideas within this model. Feel free to manipulate more than one variable at a time.

As you are testing your hypotheses, you will notice that patterns are emerging from the data. For example, if you keep the number of people at the party constant but gradually increase the tolerance level, more mixed groups appear.

How high does the tolerance value have to be before you get mixed groups? What percent tolerance tends to produce what percentage of mixing?


 

"rcconf vs ntsysv"

samuel@FPG:~$ update-rc.d 
usage: update-rc.d [-n] [-f]  remove
       update-rc.d [-n]  defaults [NN | sNN kNN]
       update-rc.d [-n]  start|stop NN runlvl [runlvl] [...] .
                -n: not really
                -f: force

samuel@FPG:~$ sudo update-rc.d hplip remove
將服務移除

在RedHat linux中,有一個utility叫作ntsysv,可以很方便地啟動/停止系統的服務。但是現在轉到ubuntu 5.10,有沒有相對應的程式,可以來作同樣的工作呢? 有的,就叫作rcconf。

就會出現類似ntsysv的畫面,然後選取要啟動/停止的服務,非常方便。如果要手動啟動/停止服務,那該如何去作呢?用update-rc.d,其指令為:

usage: update-rc.d [-n] [-f]  remove
     update-rc.d [-n]  defaults [NN | sNN kNN]
     update-rc.d [-n]  start|stop NN runlvl [runlvl] [...] .
              -n: not really
              -f: force

只是沒有類似chkconfig --list,將所有的服務列舉出來的功能,還待研究。


 

Algotutor -- 學習資料結構的好工具

What is Algotutor? algotutor is an interactive program for observing the intermediate steps of algorithms ("algorithm animation"). The target audience is computer science students and/or anyone who studies algorithms and/or data structures. One can create data files in plain text format (actually perl anonymous hashes, but one need not care) and let algotutor runs through some predefined algorithm. Then one can step backward and forward through the execution sequence of the algorithm at different levels of details.

可將下列2筆加入source.lists中

deb http://debian.ofset.org/ sarge main
deb-src http://debian.ofset.org/ sarge main

安裝: apt-get -y --force-yes install algotutor

執行: samuel@pika047:~$ algotutor -a bst /usr/share/algotutor/data/countries.gr

相關連結: 阿貴老師的介紹


 

如何將鯨魚輸入法放在gcin

如果不離開X-window,而要gcin重新啟動又不會當機,總算是試出來了:
samuel@pika046:Amara$ sudo killall -HUP gcin
1. 先編修/usr/share/gcin/table/gtab.list
  加入一行WM 1 wm2.tab
2. 將對應的whale.cin檔,轉成tab
  gcin2tab wm2.cin wm2.gtab
3. 放置在/usr/share/gcin/table/wm2.gtab
4. 重新啟動
Ctrl - Space 無法叫出 gcin 的檢查事項

安裝完之後,在 ~/.gnomerc 中加以設定:

export GTK_IM_MODULE=gcin
export XMODIFIERS="@im=gcin"
gcin &

因為在/etc/X11/Xsession.d/55gnome-session_gnomerc,使用 Xsession 登入時,如果用 Gnome 會去 source ~/.gnomerc。

而 gtk2 軟體會看 GTK_IM_MODULE 環境變數選擇 input module,所有 X 應用程式都會看 XMODIFIERS 的 @im=xxx 來找到輸入法,然後重新登入,就可以使用 gcin 了。


 

ByteOrder vs Big(Little)Endian

You configure ByteOrder to be littleEndian or bigEndian. If ByteOrder is littleEndian, then the instrument stores the first byte in the first memory address. If ByteOrder is bigEndian, then the instrument stores the last byte in the first memory address.

For example, suppose the hexadecimal value 4F52 is to be stored in instrument memory. Because this value consists of two bytes, 4F and 52, two memory locations are used. Using big-endian format, 4F is stored first in the lower storage address. Using little-endian format, 52 is stored first in the lower storage address.

You should configure ByteOrder to the appropriate value for your instrument before performing a read or write operation. Refer to your instrument documentation for information about the order in which it stores bytes.

A computer architecture in which, within a given multi-byte numeric representation, the most significant byte, ie., the leftmost byte in a string of bytes, has the lowest address (the word is stored "big-end-first").


This page is powered by Blogger. Isn't yours?