我現在只有月供基金投資,近來很多人月供股票,今日打電适去幾家銀行查詢,覺得中銀的的計劃最化算。
想月供股票的原因不外乎減低風險,不論股市升跌都沒關係,因為不論價位高低也有買貨,只要長線平均有升值就可以了。股票的選擇我想會供匯豐,一來風險低,而且有 4% 以上的股息很吸引。
關於 PHP, Linux, Open Source 及個人生活記載的網誌。
我現在只有月供基金投資,近來很多人月供股票,今日打電适去幾家銀行查詢,覺得中銀的的計劃最化算。
想月供股票的原因不外乎減低風險,不論股市升跌都沒關係,因為不論價位高低也有買貨,只要長線平均有升值就可以了。股票的選擇我想會供匯豐,一來風險低,而且有 4% 以上的股息很吸引。
在 Linux 裡面記憶體的多少對效能有很大的影響,以下這篇在 IBM developerWorks 的文章介紹了準確計算 Linux 系統所使用的記憶體,裡面還有一些在 Ubuntu 減少記憶體需求的實例。看完後可以更加了解 Linux 如何使用及分配實體及虛擬 (swap) 記憶體。
A much-touted benefit of Linux is that it is more efficient than Microsoft® Windows®, and will therefore perform better on less than cutting-edge hardware. This performance makes Linux a very attractive upgrade for the many people who have old Windows 98-era boxes still sitting around that are no longer being treated to the latest and greatest software (particularly security patches).
The truth of the matter, however, is that while the Linux kernel can still be configured to be reasonably small and efficient, as new computers have increased in power, many Linux desktop environments (such as KDE and GNOME) have added lots of features. Consequently, the default install of most distributions offer a less than stellar level of performance when installed on older hardware. The same is true of many modern applications also — Web browsers such as Firefox and office suites such as OpenOffice are fully featured, but trying to run them on a machine with 128MB of RAM can be a painful experience!
So what is the answer? Throw away all of your old hardware and upgrade? Install a Linux distribution from circa 1995? (If you decide to go that route, I recall having a good experience with Linux-FT.)
Never fear: as those in the Linux community have known for years, a great strength (some would say the great strength) of the Linux kernel and Linux distributions in general lies in their ability to be customized. This article delves into how you can tailor your Linux systems for better performance on modest hardware.
本站另一篇文章 Ubuntu 掛載 Windows 分割區,介紹了在 Ubuntu 讀寫 NTFS 分割區,以下是 Fedora 掛載 NTFS 分割區的方法:
1. 在 terminal 輸換成 root 身份,並輸入以下指令安裝 FUSE 及 NTFS-3G:
yum install fuse ntfs-3g
2. 安裝好 FUSE 及 NTFS-3G 後,便可以掛載 NTFS 分割區:
mkdir /media/windows
ntfsmount /dev/hda1 /media/windows
以上的 /dev/hda1 是分割區的位置,請根據實際情況進行修改。而卸載就不可以用 unmount,要用以下指令:
fusermount -u /media/windows
每天也有很多由 spambot 發出的 comment spam,以下是 10 個 WordPress 的 Anti Spam Plugins:
– Akismet
– Challenge
– Referrer Bouncer
– WPBayes
– Comment Timeout
– Email Immunizer
– ImgProtectr
– Did You Pass Math?
– AuthImage
– ImgProtectr
這幾個星期股市十分反覆,很多人因此賠了不少錢,或者是錢給股票綁住了。我對跌市則不是太反感,因為股票市場當然是有升有跌,跌市反而是趁低吸納的機會,我也入了一些優質股作為長線投資。
股票的賺錢方法就是低買高賣,這個人人皆知,但要做到則不是那麼容易,我覺得很多時賠錢的原因不是因為跌市,而是自己的心理質素。試想想,天天看著股價的變動,股價升了一點點會怕會跌,將賺的化為烏有,所以設下止賺;當跌的時後就怕會繼續往下跌,便急急賣出股票。
要克股這種恐懼的心態,我沒有股神巴菲特那種定力及意志力,我就採用忽略市場的做法,實行手中有股票,心中無股票。不要天天看著股價的走勢,將精力集中在工作上。如果認定自己買的是價質股,散戶唯有靠長線持有才增加勝算,這不但省下了買入賣出的交易費,每年還有股息收。
以下是一些常程式設計及 Unix/Linux 常用的 Cheat Sheet:
Command Line
Databases
Programming
Unix/Linux
Web Development
Miscellaneous Topics
Red Hat Enterprise Linux 5 經已釋出,新版本有多項新功能特性:
=> Virtualization support officially included
=> Based upon XEN
=> GUI tools for management
=> Para-virtualized RHEL 5 and RHEL 4 update 5
=> Full virtualized for 3rd party oses
=> Linux kernel v2.6.18
=> Includes support for Intel Network Accelerator Technology
=> SELinux with SEtroubleshooter GUI tool
=> Compare and see all kernel features here
=> IPSEC enhancements
=> ExecShield enhancements, such as a call frame Canary word, strengthen hacker defenses
=> New Audit features provide powerful new search/reporting and real-time monitoring
=> LAMP (Apache 2.x, PHP 5.x, MySQL 5.x etc)
有時我們需要將不同欄位的資料連接,或者在現在的資料後面加入內容,當然可以先從 MySQL 匯出資料,再把連接好的字串更新到 MySQL,但這未免太麻煩,另一個較方便的方法是借助 CONCAT() 實現,CONCAT() 語法為:
CONCAT(string_1, string_2, string_3, …)
MySQL 的 CONCAT() 支援多個字串連接,但在 Oracle 裡面只可以有兩個參數,要實現多個字串連接可以用 '||' 來實現。以下是 CONCAT() 的使用實例:
update `table_name` set `email`=CONCAT(`email`, ':me@email.com') where id='1';
以上 SQL 語法會更新 table_name 資料表的 email 欄位,在原本的資料後面加入 ':me@email.com'
同樣是開源的 Perl 及 PHP 很多時會給人們作比較,而實際上它們各自有自己的優勢及存在價值。Perl 在系統管理及字串處理上較有優勢,而且有十分豐富的函式庫 -- CPAN,很多複雜的功能也可以簡單地完成。
而 PHP 的優勢就是在動態網頁及連接資料庫上面,資料庫的支援上,市面上大部份流行的付費及開源資料庫也支援,這也是近年在網路上 PHP 越來越流行的原因。
如果可以在一個專案上用上兩種語言的長處就很方便。在 PHP 程式內可以透過 PHP::Interpreter 呼叫 CPAN 模組以擴展 PHP 應用,例如 IO ports 操作這類工作也可以在 PHP 內完成。現在需要先安裝 PHP::Interpreter:
1. 前往 search.cpan.org/dist/PHP-Interpreter 下載 PHP::Interpreter。
2. 執行以下指令安裝:
make
make install
這樣就完成 PHP::Interpreter 的安裝,以下舉出兩個在 PHP 程式內使用 Perl 的簡單例子:
以上會的第二行會建立 $perl 物件,而第二行會透過 $perl 物件執行 Perl。而以下的 $perl->call() 方法就可以傳入及回傳變數:
上面的第三行是執行 perl 的 ucfirst 函式,並傳入參 "hello"。而 PHP::Interpreter 也可以讓 Perl 執行 PHP 的能力,詳細可以參閱 PHP::Interpreter 使用手冊。
在過年時休息了個多星期,在這個星期可以用災難來形容,忙得透不過氣來,已經很久未試過在晚間工作。就連近日股市大跌也沒有什麼時間看,可能因為上個月已經出貨,現在無股一身輕。
今年的計劃也很多,但不知有多少可以完成,我想最實際的方便就是迫自己行動,不要老是想著有空才做。