April 2008 Archives

Microsoft Silverlight

user-pic
Vote 0 Votes

最近 Windows Update 出現了一項 Silverlight 更新
這是微軟新推出的互動式網頁技術, 它的 slogan 是 "Light Up the Web",
從它的命名來看, 有迎戰 Flash 的味道, 銀光 vs. 閃光.
支援 IE, Firefox, Safari, 目前 Opera 不支援.
Silverlight Gallery 可以看到一些 Silverlight 的應用範例.

ref. silverlight.net

Pank's Diet Recipe

user-pic
Vote 0 Votes

由於被老婆嫌太肥, 一個月前, 開始了減肥計畫, 一個月過去, 成功甩掉 3KG.
減肥的方法不外乎是:
1. 增加熱量消耗
2. 減低熱量的攝取
平時沒有運動習慣的人, 減低熱量的攝取是唯一的方法, 各種減肥藥與食品也是要達到這個目的.
成人一天所需的熱量約為 2000 大卡, 吃多了會變成脂肪屯積起來, 吃少了自然就會漸漸瘦下來.
1KG 的體脂肪, 相當於 7700 大卡的熱量, 也就是要瘦 1KG 必需消秏 7700 大卡的熱量.
了解這個原理後, 就可以訂自己的減肥計畫, 要設法讓吃進去的熱量變少又有飽足感.
我的水果午餐:
2顆蘋果(或1顆蘋果搭配其他水果) + 1瓶愛之味寒天, 熱量約為 230 大卡.

早餐、晚餐都正常吃, 早晚餐都在家裡吃, 本來量就吃的不多, 所以要把中午高熱量的便當改掉,
一個便當熱量大概 600~1000 大卡, 平均算 800 大卡好了, 改吃水果午餐後, 一天就可以少掉 570 大卡,
照這個值推算一個月就可以減 570x30/7700=2.2KG, 而我實際減了 3KG, 可見平常吃的便當熱量超過 800 大卡.
剛開始吃水果餐會不太習慣, 大概一星期就會漸漸適應, 晚上也比較容易餓,
餓了可以喝一些牛奶 (光泉200小瓶鮮奶熱量127大卡)
其他要注意的是:
1. 不要吃零食
2. 不要喝飲料(包含酒類), 要喝的話請喝無糖的
2008-05-26 Update: 有一位同事用同樣方法, 經過一個月後體重沒減到, 所以這方法可能不適用每個人.
水果餐因為沒有蛋白質, 營養不均衡, 所以再加上一顆水煮蛋會比較好.

這算是舊聞了.
查 Photoimpact 卻出現 Corel 的網站, 才知道 Corel 在 2006 年底就買下 InterVideo,
而 InterVideo 又擁有多數的 Ulead 股票, 變成 Corel 間接買下 Ulead.

ref. Corel Completes InterVideo Acquisition, Advancing Its Digital Media Software Strategy


Windows Vista SP1 Released

user-pic
Vote 0 Votes

Vista SP1 x86 (繁體中文) 544MB
Vista SP1 x64 (繁體中文) 873MB
哇, 這年頭 Service Pack 都快要破 G 了

PHP short_open_tag

user-pic
Vote 0 Votes

一直以為 <? ... ?> 跟 <?php ... ?> 是一樣的, 省略 php 沒差,
原來當 short_open_tag=off 時是不能用前者的
php.ini-recommended 的預設值是 short_open_tag = Off

Lighttpd + PHP + XCache

user-pic
Vote 0 Votes

Lighttpd
wget http://www.lighttpd.net/download/lighttpd-1.4.19.tar.bz2
tar jxvf lighttpd-1.4.19.tar.bz2
cd lighttpd-1.4.19
./configure --prefix=/usr/local/lighttpd
make && make install
cd doc
mkdir /etc/lighttpd
cp lighttpd.conf /etc/lighttpd
cp sysconfig.lighttpd /etc/sysconfig/lighttpd
cp rc.lighttpd.redhat /etc/init.d/lighttpd
sed -i "s/sbin/local\/lighttpd\/sbin/" /etc/init.d/lighttpd
mkdir /var/run/lighttpd /var/log/lighttpd
chown apache.apache /var/run/lighttpd /var/log/lighttpd

server.modules = (
"mod_rewrite",
"mod_redirect",
"mod_alias",
"mod_access",
"mod_fastcgi",
"mod_cgi"
"mod_accesslog" )
cgi.assign = ( ".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl" )
server.document-root = "/var/www/html/"
server.username = "apache"
server.groupname = "apache"
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/local/php-fcgi/bin/php"
)
)
)

PHP
wget http://tw.php.net/distributions/php-5.2.5.tar.bz2
tar jxvf php-5.2.5.tar.bz2
cd php-5.2.5
./configure --prefix=/usr/local/php-fcgi --with-mysql=/usr --with-mssql \
--with-config-file-path=/usr/local/php-fcgi/etc \
--enable-sockets --enable-pcntl --enable-mbstring --with-iconv \
--with-gd --with-curl --with-zlib --with-jpeg-dir --with-ttf \
--with-ldap --with-gettext --enable-soap --with-xmlrpc --with-openssl \
--enable-fastcgi --enable-discard-path --enable-force-cgi-redirect
make && make install
cp php.ini-recommended /usr/local/php-fcgi/etc/php.ini
echo cgi.fix_pathinfo=1 >> /usr/local/php-fcgi/etc/php.ini
ref. Setting up PHP with Lighttpd

XCache
wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.bz2
tar jxvf xcache-1.2.2.tar.bz2
cd xcache-1.2.2
/usr/local/php-fcgi/bin/phpize --clean
/usr/local/php-fcgi/bin/phpize
./configure --enable-xcache --with-php-config=/usr/local/php-fcgi/bin/php-config
make && make install
cat xcache.ini >> /usr/local/php-fcgi/lib/php.ini
edit /usr/local/php-fcgi/lib/php.ini
zend_extension = /usr/local/php-fcgi/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
xcache.size = 4M

Windows XP Home/Professional
主流支援終止日期 2009/4/14
延伸支援終止日期 2014/4/8

ref. Windows XP 產品技術支援週期

Nikon D80 1.10 Firmware

user-pic
Vote 0 Votes

Nikon D80 1.10 Firmware
解開有 A B 兩個 Firmware
把 Firmware A 放入 SD 卡根目錄, 選韌體版本, 就會有一個升級選項, 升級時間大概一分鐘左右, 再放入 Firmware B, 重複以上升級動作.
注意事項:
不能一次把兩個 Firmware 一起放到 SD, 相機只會找到其中一個(我試的結果總是找到B)
先升 A 或先升 B 均可

v1.10 更新內容

  • The product will be "Certified for Windows Vista" (通過 Windows Vista 認證)
  • Support for the new USB Media Transfer Protocol (MTP) has been added. The PTP option in the setup menu will be modified to MTP/PTP. The icon will also be modified. (支援新的 USB MTP 傳輸協定)
  • The effects of noise reduction processing performed at shutter speeds of 1 - 8s with shutter speed set to "bulb", when ON is selected for Long Exp. NR in the shooting menu, have been improved. (改善 1-8 秒長時間曝光所產生的雜訊)

ref. D80 Firmware A/B Update 1.10 - Windows

Nikon D80 支援 SHDC, 理論上可以支援到 32G,
有人試過 16G OK, 實際應用上, 我覺得 8G 就很夠用了.

OpenSSH 5.0 Released

user-pic
Vote 0 Votes

OpenSSH 5.0 Released
上一個版本 4.9 出沒多久, 因為發現安全性問題, 隨即出了 5.0

Google Adsense

user-pic
Vote 0 Votes


在用 Google Adsense 之前, 對這種在網頁上放廣告賺錢的模式持懷疑態度,
「真的有人會點廣告嗎?」
想知道放廣告, 能賺多少錢? 於是在上個月開始用 Adsense,
結果比我預期中還好, 幾乎每天都有人點廣告, 一個月大概有 10 美金的收益, 不無小補.
在初期 Google 會用實體的郵件寄「個人識別號碼」(PIN), 以確認您地址的正確性, 我大概兩週收到. 若沒輸入 PIN, 帳戶將會被停用, 也領不到錢.

2008-04-08 Update: 感謝 xwa 的建議, 放在內文下方果然點擊率提升很多.
2008-11-05 Update: 收到第一張支票, USD 106, 從開始用大概八個月時間.

Install HPADU on CentOS 5.1

user-pic
Vote 0 Votes

HPADU 是 HP Array Diagnostic Utility
原廠的 rpm 只支援 RHEL, SuSE, Debian, 其實它只有檢查 /etc/redhat-release,
只要把 CentOS 5.1 /etc/redhat-release 的內容改成
Red Hat Enterprise Linux Server release 5.1 (Tikanga)
就可以裝在 CentOS 5.1
依序裝 compat-libstdc++, hpsmh, hpadu
cp /opt/hp/hpadu/bld/libcpqhmmo.so /lib
hpadu 啟動後有 Web 介面可以監控 RAID 的狀態
https://host:2381/

原廠 rpm 網址:
ftp://ftp.hp.com/pub/softlib2/software1/pubsw-linux/p308170531/v42872/hpsmh-2.1.11-197.i386.rpm
ftp://ftp.hp.com/pub/softlib2/software1/pubsw-linux/p308169743/v43140/hpadu-8.0-14.noarch.rpm

Show Script in RPM

user-pic
Vote 0 Votes

rpm -qp --scripts file.rpm 可以秀出 RPM 在 install/uninstall 的 script

ref. 請問如何看RPM 包的內容及RPM所執行的過程?

About this Archive

This page is an archive of entries from April 2008 listed from newest to oldest.

March 2008 is the previous archive.

May 2008 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives