在 bbs 看到的,順手寄回家,然後又順手貼上來~~
作者: westing (MoonLight) 看板: C_and_CPP
標題: Re: 該怎麼控制Input & Output
時間: Tue Dec 11 22:00:57 2001
※ 引述《pjacky.bbs@ptt.csie.ntu.edu.tw (飄浮)》之銘言:
: ※ 引述《taibian (以台灣人為榮)》之銘言:
: : acmt程式設計題目上常常有連續的input(應該是指每題都有)
: : 要怎麼做到讓使用者的Input可以一行一行地輸入…並且程式也可以一行一行地處理呢?
: : (ps.還是其實ACM並沒有要求要這樣子輸入?..@@…..(偶在幻想))
: 幾乎很多題都這樣要求 => infinite loop
: while(scanf(“%d”,take) != EOF ){
^^^^
&take
: /* block */
: }
ACPI 速記
閱讀 Linux Center 的兩篇有關電源管理 ACPI 文章時的速記.
這兩篇文章的網址如下:
電源管理在Linux系統上的應用
電源管理在Linux系統上的應用 II
ACPI
– 偵測 MB 溫度,fan轉速,電壓,電池用量
– 2.0 須週邊配合!! MB, Power, 顯示卡,網路卡,周邊…
Linux ACPI driver 有維護 bad BIOS List
APM -> check /proc/apm or “dmesg | grep apm”
apmd daemon
apm 控制用及顯示
xapm 給 XWindow 用的
redhat 9 基本上沒有支援 ACPI
Suse 有,開機參數可以指定
acpi=off 不用
acpi=oldboot 只支援部份
pci=acpi
pci=noacpi
acpi=force 強制啟動
check /proc/acpi
acpid daemon
acpictl 控制
pmtools package
xset -dpms 關閉 energy star 並修改 XF86Config-4 中的 dpms
css 速記
基本語法格式: element { property: value }
如:
p { color: #ff000000; font-size: 10pt }
body { background: #ff0000; font-size: 10pt }
也可以 body,p { …. }
<head>
<style>
<!–
// css
–>
</style>
</head>
或
<head><style>
<!–
@import URL(./xxx.css);
–>
</style></head>
或
<link rel=stylesheet type="text/css" href="xxx.css">
或
<p style="….">aaa</p>
A:link {}
A:active {}
A:visited {}
A:hover {}
屬性: text-decoration, none, underline, overline, line-through, bilnk
屬性 cursor 可填的值: auto/crosshair/default/heand/move/e-resize/ne-resize/nw-resize/n-resize
/se-resize/sw-resize/s-resize/w-resize/text/wait/help
.layer1 {
position: absolute/relative/static;
top: 20px;
left: 30px;
z-index: 1;
}
前面加上 '.' 是配合 class 使用
這一段除文字可用外,圖片也可以用
Debian 2.2r6 設定
雖說是 Debian 2.2r6 設定,但我想 Debian 的設定應該就是這樣了吧~~
1.網路
主機名稱:/etc/hostname
網路卡為 dhcp 或 static : /etc/network/interfaces
iface eth0 inet dhcp
or
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
2.initscript
在 /etc/init.d 下建立 script
再使用 update-rc.d xxxx defaults 99 99 > /dev/nul
也有 update-inetd –add 針對 inetd 增加服務