陳錫身

我中文不好, 但也想寫中文網誌 . . 因為我英文更不濟囉

2009年7月1日 星期三

Ruby on Rails

2009年6月26日 星期五

專名號失蹤了..

現在全球化趨世之下, 每日報章新聞就如天上繁星,
新聞入面當然少不了, 咁多外國人名嘅譯音,
有時真係唔識得咁多 , 閱讀起上來有時真係有點困難。

不知何時開始, 專名號自報章雜誌上消失了


到底是什麼時候開始消息呢?
點解報紙唔再落專名號?
小學課程仲有無教呢?

"舊酒新瓶"之Windows 7+Win 08 雙系統@VHD Dual Boot with winPE

舊酒係指DUAL BOOT 雙系統,
大家有用過Virtual PC, Virtual Server都可能覺得VHD(虛擬硬碟)唔係咩新鮮野,
但今次嘅新瓶就係將在無任何虛擬主機host PC( no PC virtualization)嘅情況下, mount VHD做logical disk 直BOOT

即係在Physical 硬碟中,建立多過以file 封裝起的VHD虛擬硬碟,
利用新的winPE 功能(原來BOOT 安裝碟時, 按SHIFT+F12便可進入)



The Screencast Video – 23 minutes – Win7 and R2 Dual Boot via VHDGet Microsoft Silverlight

The Command Sequence Used in the Video





  1. Boot your machine with a blank hard drive using the Windows 7 DVD.
  2. Click next on the language screen if English is appropriate.
  3. SHIFT+F10 to launch a WinPE command console. Although the commands below are in upper case, the commands are not case sensitive. I am only using upper case for readability here.
  4. Enter DISKPART to run the utility.
  5. LIST DISK to see the available disks in your system. I am assuming a single raw disk.
  6. SEL DISK 0
  7. CREATE PARTITION PRIMARY
  8. FORMAT FS=NTFS QUICK
  9. LIST VOL
  10. ASSIGN
  11. LIST VOL
  12. CREATE VDISK FILE=c:\windows7rc.vhd MAXIMUM=200000 TYPE=EXPANDABLE
  13. SELECT VDISK FILE=c:\windows7rc.vhd
  14. ATTACH VDISK
  15. CRE PART PRI
  16. FORMAT FS=NTFS QUICK
  17. ASSIGN LETTER=V:
  18. LIST VOL
  19. LIST VDISK
  20. exit DISPART
  21. exit WinPE command console
  22. Install to the newly created 200GB (fuzzy math) virtual hard disk which looks just like a partition to Windows Setup
  23. Repeat steps 11-18 for the Windows Server 2008 R2 VHD but with the obvious changes for the vdisk filename, size, etc.




Reference: http://blogs.technet.com/keithcombs/archive/2009/05/22/dual-boot-from-vhd-using-windows-7-and-windows-server-2008-r2.aspx

2009年6月12日 星期五

終於解決了SQL Server Express 2005一直不能更新 SP3的問題, update problem solved

原來係比呢個XML6 SP2 patch (KB954459) 阻住, 但想係 add/remove program 時想uninstall呢個patch.

Screen Shot - MS SQL Server 2005 Setup

 

多得呢個vendor: Maximizer 發掘左出黎, 仲有以下呢一邊article,

Cannot Install Microsoft SQL Express Server Error

教曉我先用Windows Installer CleanUp (KB290301) 公用程式將KB954459 剷掉, 之後就可以順利更新

2009年5月27日 星期三

Coding Convention: Java,PHP,Javascript

因為同一個program, 無乜可能永遠由一個人負責, 再者open source, contribute ,CVS 咁盛行,
往往都由多過一個人去做。 如果個個coding style都唔同, 確實係幾難睇嘅

所以係應該有個convention 比大家跟, 最少同team 要合作嘅人都好應該溝通好,
set Policy 有邊幾樣要跟足(strictly follow)

其實每種程式 blocking 排位、放comment/documentation 嘅方法係大致上一樣
只係programming syntax上有少少分別, 以下有幾個 link(盡量official) 方便大家參考:
  1. Java (offered by SUN for sure)
  2. Javascript Modified from Java
  3. PHP Zend Framework

微軟有一套FxCop code analyser 嘅程式去確保C# naming 同 convention 跟返defined policy/ rules

P.S. 如果大家有其他建意, 歡迎留言交流及補充。

coding convention A.K.A. coding standards ,coding style

2009年5月13日 星期三

.net 十分常用的gridview 出excel

其實呢個method 開於點將 hyperlink , dropdown box既現值 , 按鍵label
就最值得注意啦




/// <summary>

/// Replace any of the contained controls with literals

    /// </summary>

    /// <param name="control"></param>

    privatestatic voidPrepareControlForExport(Control control)

    {

        for (int i = 0; i < control.Controls.Count; i++)

        {

            Control current = control.Controls[i];

            if (current is LinkButton)

            {

                control.Controls.Remove(current);

                control.Controls.AddAt(i, new LiteralControl((current as LinkButton).Text));

            }

            else if (current is ImageButton)

            {

                control.Controls.Remove(current);

                control.Controls.AddAt(i, new LiteralControl((current as ImageButton).AlternateText));

            }

            else if (current is HyperLink)

            {

                control.Controls.Remove(current);

                control.Controls.AddAt(i, new LiteralControl((current as HyperLink).Text));

            }

            else if (current is DropDownList)

            {

                control.Controls.Remove(current);

                control.Controls.AddAt(i, new LiteralControl((current as DropDownList).SelectedItem.Text));

            }

            else if (current is CheckBox)

            {

                control.Controls.Remove(current);

                control.Controls.AddAt(i, new LiteralControl((current as CheckBox).Checked ? "True" : "False"));

            }

 

            if (current.HasControls())

            {

                GridViewExportUtil.PrepareControlForExport(current);

            }

        }

    }



http://www.cnblogs.com/DotNetNuke/archive/2009/01/15/1376300.html

2009年5月8日 星期五

AMS/3 係自動定手動對盤呢?

今日整理下harddisk入面嘅檔案, 找到呢個陳年capture


已下係2004年一個網上證券落盤經驗,唔知你地有無試過落左, 價升埋都仲放唔到
( 有另一個升過左出貨價都做唔到, 但無capture低喇....)

開市前已經入左呢個order

到10:00開市了,市場上仲未見到我15.7 嘅order

10:03嘅queue , 有一單15.7做左, 但唔係我


參考下 交易所參與者及聯交所交易權持有人名錄
亦都唔見呢間恒X 證券嘅落盤


到左10:06仲係原封不動"pending dealing"




網上又漏做, 電話又唔通, 收咁貴買D 咁嘅服務??


亦自此之後, 對呢D 食水深嘅銀行更加反感

2009年4月24日 星期五

Amazon EC2 到 google App 再到 Microsoft Azure








Azure, 是微軟視窗外的一片藍天白雲 Cloud Computing




Software as a Service, Storage as a Service, Platform as s Service










從前 , 我工作上用的各種科技, 由於規模有限, 要達到什麼Load balancing, Clustering, High Availability, Business Continuity Planning , 所費實在不非, 有限資源下很難做得完善





但雲運算(cloud computing)打著的旗號, 就是要把infrastructure 交給cloud平台提供者, 讓developer 開發自己有niche 有potential,最value-added的部份, 創制出專業應用的同時, 又提供了enterprise grade 服務水平 (SLA). 若需要了這3個平台, 以下一篇好文章會有簡單的介紹。









So looking at these three players, you see each of them playing to their
strengths. Amazon was early in the market, and has leveraged Internet standards
and open source platforms to create a very flexible platform. Google is
leveraging the work it has done with big databases and its internal development
methods to create a powerful but more restrictive environment. And Microsoft is
leveraging its traditional strength with developers and the breadth of its tools
to create perhaps the largest array of services. Over time, my guess is that
we'll see all of them start to converge - presaged perhaps by Amazon's
introduction of Windows Server instances.


source: http://blogs.pcmag.com/miller/2008/11/cloud_thinking_amazon_microsof.php