生命線 life line
2010-01-18 \ In categorie Unknow \ No Comments當完成了這張生命線的時候, 有人問我:”如果現在拿走一些事情令這張圖可以完全滿分, 你會拿走甚麼呢?”
我最後答:”可不可以連一件都不拿走?”因為我發現左每件事都很重要, 欠缺了任何一件事人都不會成長, 我的生命中在其他人眼中可能會覺得很複雜, 而我正正就是在某個很短時間之內發生了很多事情, 多到可能我在這刻都不能接受.
但是當回頭一看的時候卻發現原來每一件事情都是重要的, 就是這些重要的事情令我望到些更深層的體會.
當晚上的時候你會望到甚麼?
我答:”星星”, 原來很多人在晚上望到的不是星星, 而是月亮, 你可以把不開心的事情望到月亮這麼大, 但是不要望記身邊還有很多很美麗的星星.
有些人可能很怕黑夜的來臨, 但是你可有留意過在日光之中還有星星呢?當黑夜來到的時候, 其實是讓你望清楚周圍很美麗的星星.
當人站得高就會望得遠, 不要只是望住步行時的那種辛苦, 你的眼光要望住更遠的事情, 或者有時這一刻的確望不到前面, 這些都只是暫時, 當你再回想的時候就會發覺, 多難的路都已經走過了, 或許沒有人會完全明白, 的確是真的, 這刻沒有人能完全明白你, 不過你可否記得黑夜裡還有很美麗的星星呢?

Run a Process in the Foreground or the Background
2010-01-06 \ In categorie Unknow \ No CommentsRun a Process in the Foreground or the Background
You can run a process in two ways: as a foreground process or as a background process. When you run a process in the foreground, you must wait for the process to complete before you can run another one (all the commands you have issued to this point have been foreground processes). In the background, however, you can run several processes without waiting for them to complete. The background is a very useful place to run a process that takes a long time to finish. When a process needs user input, it will interrupt you regardless of where it is running; therefore, you should avoid putting processes that require user interaction into the background.
To start a process in the background type an & after the command. Enter:
command &
This starts the process, from the command you specify, in the background.
To suspend a foreground process and place it in the background, use the following steps:
1. Press
2. Enter bg
To bring this background process to the foreground again, enter:
fg
Note: the fg command is useful to remember because occasionally you might type
想左幾日的/etc/exports/
2010-01-06 \ In categorie Unknow \ No Comments有關nfs
/etc/exports/沒有反應的原因是設定路徑不是實體路徑, 所以不可使用.
一擊即中
2010-01-06 \ In categorie Life log \ No Comments忙亂的生活原來不只是要簡化,而是要一擊即中。
簡單來說,當人忙到賣身的時候,就係時候思考是否有些事情根本不應去做,需要簡化程序,而再進一步要改善的是一擊即中,質比量好。你有一百粒子彈但是沒有一粒中,那麼有何用?
為何iphone這麼多人用?
2009-12-19 \ In categorie Unknow \ No Comments引用http://zh.wikipedia.org/wiki/IPhone
或者可能真的太好用了, 而且iPhone是結合照相手機、個人數位助理、媒體播放器以及無線通訊裝置的掌上裝置, 即是你不需要再帶MP3機, PMP, 電話, 相機(當然不能與專業相機比), 甚至手提電腦, 仲有PSP, NDS, GPS, 地圖, 電子書, 計數機………….等等
系統用UNIX like的簡化OS X, CPU 用ARM架構, 電容式觸控等等的硬件
軟件開發則用Objective-C
ipod touch or iphone
2009-12-12 \ In categorie Unknow \ No Comments顯示屏
* 3.5 吋對角線 Multi-Touch 觸控闊屏幕
* 480×320 像素解像度,每吋 163 像素
音訊
* 響應頻率範圍: 20Hz 至 20,000Hz
* 支援聲音檔案格式:AAC (8 至 320 Kbps)、Protected AAC (來自 iTunes Store)、MP3 (8 至 320 Kbps)、MP3 VBR、Audible (格式 2、3 與 4) 、Apple Lossless、AIFF 與 WAV
影片
* 支持 480p 與 576p component TV 視訊輸出
* H.264 視訊影片最高可達 1.5 Mbps,640 x 480,每秒 30 影格,Low-Complexity 版本的 H.264 Baseline Profile 採用 AAC-LC 聲音格式,最高 160 Kbps,48 KHz,立體聲為 .m4v, .mp4 與 .mov 檔案格式;H.264 視訊影片最高達 2.5 Mbps,640 x 480,每秒 30 影格,Baseline Profile 達 Level 3.0,採用 AAC-LC 聲音格式,最高 160 Kbps,48 KHz,立體聲為 .m4v, .mp4 與 .mov 檔案格式;MPEG-4 視訊影片最高可達 2.5 Mbps,640 x 480,每秒 30 影格,Simple Profile 採用 AAC-LC 聲音格式,最高 160 Kbps,48 KHz,立體聲為 .m4v、.mp4 與 .mov 檔案格式
PSP-3000
2009-12-12 \ In categorie Unknow \ No CommentsPSP® (PlayStation®Portable) 主機
顏色 青翠綠
新型PSP®配備全新的LCD螢幕及新增的內置麥克風
- 新型PSP®的4.3吋高解像度螢幕配備LCD螢幕中最高水準的對比度、反應時間及色域,在播放電影及相片時可帶出更自然亮麗的色彩
- 新加的內置麥克風則可讓玩者暢玩需要使用麥克風(*1)的遊戲,以及Skype™ (*2)和其他通訊工具
CPU PSP CPU (System clock frequency 1-333MHz)
液晶畫面 4.3英寸(16:9)全透明型TFT驅動約可顯示480×272像素1,677萬色
聲音 内置立體聲喇叭
內藏光碟機 唯讀UMD™光碟機
主要輸入/輸出 無線網絡 (IEEE 802.11b) (Wi-Fi)
高速USB (USB2.0) (mini-B)
Memory Stick PRO Duo™ / Analog影像輸出 / 麥克風
主要連接埠 DC IN 5V電源端子 / DC OUT端子
影像/耳機/麥克風連接端子
USB連接埠 / Memory Stick Duo™插槽
支援 Codecs (Memory Stick™)
影像: Memory Stick影像格式
- MPEG-4 Simple Profile (AAC LC)
- H.264/MPEG-4 AVC Main Profile (AAC LC)
MP4檔案格式
- MPEG-4 Simple Profile (AAC LC)
- H.264/MPEG-4 AVC Main Profile – CABAC only – (AAC LC) / Baseline profile (AAC LC)
AVI
- Motion JPEG (L in ear PCM or µ-Lau)
音樂: Memory Stick聲音格式
- ATRAC3™
- ATRAC3plus™
MP3 / MP3 (MPEG-1/2 Audio Layer3) / MP4 (MPEG-4 AAC) / WAVE (Linear PCM) / WMA (Windows Media Audio 9 Standard Only) (*3)
相片: JPEG / TIFF / BMP / GIF / PNG
支援Profile PSP® (PlayStation®Portable) Game / UMD™ Video
存取控制 區域碼、年齡視聽限制
無線通訊 Infrastructure 模式 / Ad hoc 模式(最多 16 台連線)
同機周邊配件 交流電轉換器 / 電池組 (1200mAh)
iSCSI
2009-12-05 \ In categorie Unix | Linux | BSD \ No Commentscopy from http://blog.ntut.idv.tw/2009/03/fbsd-freebsd-iscsi-setup.html
iSCSI, Internet SCSI(Small Computer System Interface) 應用越來越普遍,在 FreeBSD上裝來玩看看,環境為兩台主機,伺服器端 target 的 IP 為 192.168.1.9,用戶端 initiator 的 IP 則相同網段的任意 IP。
1. 安裝 FreeBSD iSCSI 的伺服器端 target
# cd /usr/ports/net/iscsi-target # 使用 ports 直接安裝
# make install clean; rehash
# vi /usr/local/etc/iscsi/targets
# extents file start length
extent0 /tmp/iscsi-target0 0 2GB
# target flags storage netmask
target0 rw extent0 192.168.1.0/26
# vi /etc/rc.conf # 開機自動啟動 iSCSI target
iscsi_target_enable=”YES”
# /usr/local/etc/rc.d/iscsi_target start # 手動啟動 iSCSI target
Starting iscsi_target.
Reading configuration from `/usr/local/etc/iscsi/targets’
target0:rw:192.168.1.0/26
extent0:/tmp/iscsi-target0:0:2147483648
DISK: 1 logical unit (4194304 blocks, 512 bytes/block), type iscsi fs
DISK: LUN 0: 2048 MB disk storage for “target0″
TARGET: TargetName is iqn.1994-04.org.netbsd.iscsi-target
# ls -l /tmp # 查看 tmp 目錄下是否多了個 2G 大小的 iscsi-target0 檔
-rw-r–r– 1 root wheel 2147483648 Mar 19 09:33 iscsi-target0
2. 設定 FreeBSD iSCSI 的用戶端 initiator
# vi /boot/loader.conf # 讓開機可以自動載入 iscsi_initiator 核心模組
iscsi_initiator_load=”YES”
# kldload iscsi_initiator # 手動載入 iscsi_initiator 核心模組
# kldstat # 查看有無載入 iscsi_initiator.ko
Id Refs Address Size Name
1 6 0xc0400000 97f830 kernel
2 1 0xc4c71000 f000 iscsi_initiator.ko
# iscontrol -d -t 192.168.1.9 # 測試 iSCSI 連線
TargetName=iqn.1994-04.org.netbsd.iscsi-target:target0
TargetAddress=192.168.1.9:3260,1
# iscontrol -c /etc/iscsi.conf -n target0 # 啟動 iSCSI session
iscontrol[2664]: running
iscontrol[2664]: (pass0:iscsi0:0:0:0): tagged openings now 0
iscontrol[2664]: cam_open_btl: no passthrough device found at 0:0:1
iscontrol[2664]: cam_open_btl: no passthrough device found at 0:0:2
iscontrol[2664]: cam_open_btl: no passthrough device found at 0:0:3
iscontrol: supervise starting main loop
#cat /var/log/messages # 會有下面兩行訊息表示 /dev/da0 介面已經被建立
Mar 19 09:45:11 ntut kernel: da0 at iscsi0 bus 0 target 0 lun 0
Mar 19 09:45:11 ntut kernel: da0: Fixed Direct Access SCSI-3 device
# newfs /dev/da0 # 格式化 /dev/da0 檔案系統
/dev/da0: 2048.0MB (4194304 sectors) block size 16384, fragment size 2048
using 12 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
super-block backups (for fsck -b #) at:
160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976, 3387328, 3763680, 4140032
# mkdir /mydata # 建立目錄
# mount /dev/da0 /mydata # 掛載檔案系統
# df
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/da0 2026030 4 1863944 0% /mydata
3. 用戶端 FreeBSD 如何開機自動掛載 iSCSI 硬碟?參考網路上前人所寫的 Shell Script 開機可以自動掛載啟動檔
# vi /etc/rc.d/iscsi
#!/bin/sh
# PROVIDE: iscsi
# REQUIRE: NETWORKING
# BEFORE: mountcritremote
# KEYWORD: shutdown
. /etc/rc.subr
name="iscsi"
start_cmd="iscsi_start"
stop_cmd="iscsi_stop"
rcvar="iscsi_enable"
required_modules="iscsi_initiator:iscsi"
iscsi_start()
{
${iscsi_command} -c ${iscsi_config} -n ${iscsi_nickname}
if [ -f ${iscsi_fstab} ]; then
devs=`sed -e '/^#/d' < ${iscsi_fstab} | cut -f 1`
for xdev in $devs
do
i=10
echo "Wait for $xdev"
while [ $i -ne 0 ]
do
[ -c $xdev ] && break
sleep 1
i=$(($i-1))
done
done
echo "mount -a -F ${iscsi_fstab}"
mount -a -F ${iscsi_fstab}
fi
}
iscsi_stop()
{
if [ -f ${iscsi_fstab} ]; then
echo "umount -a -F ${iscsi_fstab}"
umount -a -F ${iscsi_fstab}
fi
killall -HUP ${iscsi_command}
}
load_rc_config $name
: ${iscsi_enable="NO"}
: ${iscsi_command="iscontrol"}
: ${iscsi_nickname="target0"}
: ${iscsi_config="/etc/iscsi.conf"}
: ${iscsi_fstab="/etc/iscsi.fstab"}
run_rc_command "$1"
# chmod 555 /etc/rc.d/iscsi # 改變權限
# vi /etc/iscsi.fstab # 設定開機掛載 HD
/dev/da0 /mydata ufs rw 3 3
# vi /etc/rc.conf # 加入開機自動執行
iscsi_enable=”YES”
4. 如何使用 AES 加密檔案系統掛載 iSCSI
# kldload geom_eli.ko # 載入核心加密模組 GEOM_ELI
# kldstat # 查看載入的核心模組
Id Refs Address Size Name
1 9 0xc0400000 97f830 kernel
2 1 0xc4c71000 f000 iscsi_initiator.ko
3 1 0xc4f93000 10000 geom_eli.ko
4 1 0xc4fa3000 23000 crypto.ko
5 1 0xc4fc6000 a000 zlib.ko
# geli init /dev/da0 # 初始化 /dev/da0 需輸入密碼 , 這邊採用 AES 加密
Enter new passphrase:
Reenter new passphrase:
# geli attach /dev/da0 # 加密 /dev/da0 輸入剛剛加密密碼
Enter passphrase:
# cat /var/log/message # 查看核心 log
Mar 19 09:54:43 ntut kernel: cryptosoft0: on motherboard
Mar 19 09:59:48 ntut kernel: GEOM_ELI: Device da0.eli created.
Mar 19 09:59:48 ntut kernel: GEOM_ELI: Encryption: AES-CBC 128
Mar 19 09:59:48 ntut kernel: GEOM_ELI: Crypto: software
# /boot/loader.conf # 加入開機自動載入 GEOM_ELI 加密模組
geom_eli_load=”YES”
# newfs -U -L mydata /dev/da0.eli # 格式化加密檔案系統
/dev/da0.eli: 2048.0MB (4194300 sectors) block size 16384, fragment size 2048
using 12 cylinder groups of 183.77MB, 11761 blks, 23552 inodes.
with soft updates
super-block backups (for fsck -b #) at:
160, 376512, 752864, 1129216, 1505568, 1881920, 2258272, 2634624, 3010976, 3387328, 3763680, 4140032
# cat /var/log/message # 查看核心 log 可發現多了區塊標籤 ufs/mydata
Mar 19 10:04:58 ntut kernel: GEOM_LABEL: Label for provider da0.eli is ufs/mydata.
# mkdir /mydata # 建立檔案目錄
# mount /dev/ufs/mydata /mydata # 掛載檔案目錄
# df # 查看檔案目錄
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ufs/mydata 2026028 4 1863942 0% /mydata
Add.
如何在 Windows 運行 Initiator 用戶端 ?
Vista/2K8 已經內建支援 iSCSI 用戶端軟體 XP/2K 則需到微軟官網下載軟體安裝方可運行 iSCSI
http://www.microsoft.com/downloads/details.aspx?familyid=12cb3c1a-15d6-4585-b385-befd1319f825&displaylang=en
Ref.
http://ivoras.sharanet.org/freebsd/iscsi-eli.html
http://www.cyberciti.biz/faq/freebsd-iscsi-initiator-howto/
http://shell.peach.ne.jp/aoyama/archives/45
SyntaxHighlighter Plus
2009-12-01 \ In categorie Unknow \ No Commentshttp://wordpress.org/extend/plugins/syntaxhighlighter-plus/
SyntaxHighlighter Plus is a Wordpress plugin for code syntax highlighting. It is an enhanced version of the original SyntaxHighlighter by Matt, Viper007Bond and mdawaffe. Please give them a big applause for making such a great plugin!
SyntaxHighlighter allows you to easily post syntax highlighted code all without loosing it’s formatting or making an manual changes.
It supports the following languages (the alias for use in the post is listed next to the name):
* Bash — bash, sh
* C++ — cpp, c, c++
* C# — c#, c-sharp, csharp
* CSS — css
* Delphi — delphi, pascal
* Diff — diff
* Groovy — groovy
* Java — java
* JavaScript — js, jscript, javascript
* Perl — perl, pl
* PHP — php
* Plain text — plain, text
* Python — py, python
* Ruby — rb, ruby, rails, ror
* Scala — scala
* SQL — sql
* VB — vb, vb.net
* XML/HTML — xml, html, xhtml, xslt
Format Factory格式工厂
2009-11-29 \ In categorie Download \ No Commentshttp://www.formatoz.com
Format Factory is a multifunctional media converter.
Provides functions below:
All to MP4/3GP/MPG/AVI/WMV/FLV/SWF.
All to MP3/WMA/AMR/OGG/AAC/WAV.
All to JPG/BMP/PNG/TIF/ICO/GIF/TGA.
Rip DVD to video file , Rip Music CD to audio file.
MP4 files support iPod/iPhone/PSP/BlackBerry format.
Supports RMVB,Watermark, AV Mux.
Format Factory’s Feature:
1 support converting all popular video,audio,picture formats to others.
2 Repair damaged video and audio file.
3 Reducing Multimedia file size.
4 Support iphone,ipod multimedia file formats.
5 Picture converting supports Zoom,Rotate/Flip,tags.
6 DVD Ripper.
7 Supports 50 languages
OS requirements: All 32 windows OS
格式工厂是套万能的多媒体格式转换软件.
提供以下功能:
所有类型视频转到MP4/3GP/MPG/AVI/WMV/FLV/SWF。
所有类型音频转到MP3/WMA/AMR/OGG/AAC/WAV。
所有类型图片转到JPG/BMP/PNG/TIF/ICO/GIF/TGA。
抓取DVD到视频文件,抓取音乐CD到音频文件。
MP4文件支持iPod/iPhone/PSP/黑霉等指定格式。
支持RMVB,水印,音视频混流。
格式工厂的特长:
1 支持几乎所有类型多媒体格式到常用的几种格式.
2 转换过程中可以修复某些损坏的视频文件.
3 多媒体文件减肥.
4 支持iPhone/iPod/PSP等多媒体指定格式.
5 转换图片文件支持缩放,旋转,水印等功能.
6 DVD视频抓取功能,轻松备份DVD到本地硬盘.
7 支持50种国家语言
配置需求: 32位windows
——————————–download Format Factory———————————-
Powered by WordPress with Pool theme design by Borja Fernandez. change by kwong
Entries and comments feeds.
Valid XHTML and CSS. ^Top^.
13 queries. 1.140 seconds.
