Archive for December, 2008

我的聲明

我 allen 一生一世只愛fiona ~

No Comments

維港夜景

p.s. 原來影夜景要

  • 縮光圈去最細 [大光圈影燈會變左圓點 , 細會清D]
  • ISO 都係越細越好 , 用緊 ISO 80, 試過用iso 400 好多noise
  • -1 EV [因為要影發光既野]

thanks nwc!

No Comments

新相機 – 聖誕 – Fiona

No Comments

陳冠希的聲明

Today I have come back to Hong Kong to stand before you and account for myself. I have never escaped from my responsibility. During the past few weeks, I have been with my mother and my family and my loved ones to show support and care and at the same time to have them support and care for me.

I admit that most of the photos being circulated on the Internet were taken by me. But these photos are very private and have not been shown to people and are never intended to be shown to anyone. These photos were stolen from me illegally and distributed without my consent.

There is no doubt whoever obtained these photos have them uploaded on the Internet with malicious and deliberate intent. This matter has deteriorated to the extent that society as a whole has been affected by this. In this regard, I am deeply saddened. I would like now to apologize to all the people for all the suffering that has been caused and the problems that have arisen from this. I would like to apologize to all the ladies and to all their families for any harm or hurt that they have been feeling. I am sorry. I would like to also apologize to my mother and my father for the pain and suffering I have caused them during the past few weeks. Most importantly, I would like to say sorry to all the people of Hong Kong. I give my apology sincerely to you all, unreservedly and with my heart.

I know young people in Hong Kong look up to many figures in our society. And in this regard, I have failed. I failed as a role model. However, I wish this matter will teach everyone a lesson. To all the young people in our community, let this be a lesson for you all. This is not an example to be set for you.

During my time away, I have made an important decision. I will whole-heartedly fulfill all commitments that I have to date. But after that, I decided to step away from the Hong Kong entertainment industry. I have decided to do this to give myself an opportunity to heal myself and to search my soul. I will dedicate my time to charity and community work within the next few months. I will be away from Hong Kong entertainment industry indefinitely. There is no time frame.

I have been assisting the police since the first day the photos were published and I will continue to assist them. After this press con., I have obligation to help them with their investigation and hope that this case can end soon as everyone I think has the same wish.

I would like to use this opportunity to thank the police for their hard work on this case. Thank you. I believe everyone’s priority now (and) my priority now is to stop the suffering and pain, for not letting this…we do not want to let this situation become more out of control. We need to protect all the innocents and all the young from matters like this. In this regard, I have instructed my lawyers to do everything possible within the law to protect all the innocents, victims of this case. I believe that a press statement is being issued as we speak on what my lawyers have advised me to do.

Lastly, I would like to thank everyone for coming here today and listening to what I have to say. I would like to also apologize once again to all the ladies and their families, my family and to everyone in Hong Kong and everyone in our society. I am deeply saddened by this. And I apologize to everyone (who) has to go through this. I would like to also thank you for giving me this opportunity to say what I have wanted to say all along in my heart.

I hope, after today, I can have your forgiveness. With regard to this case, with everything, everything that has happened, I am deeply sorry. I hope you all accept my apology and give me a chance.

Thank you.

No Comments

王維基的聲明

各位朋友:

過了這十二天,我上了人生寶貴的一課:堅持直率,用辭謹慎。

亞洲電視是一個具有使命和社會責任的機構,無論從香港人的立場還是其他因素來考慮,亞視始終是一個香港人的電視台,我認為這個方向至今依然正確。香港的人均本地生產總值是內地十多倍,中國是我們的國家,有能力時,我們應該想想有甚麼貢獻,而不是過份依賴。

亞視始終是一間商營機稱,他的希望在於自己,不可以長期依靠賑助。亞視從新定位,讓創作有更大的空間、讓觀眾有更多選擇,令亞視成為香港有公信力的媒體,這是我們三人的共同夢想。直至今天,我依然擁抱這個熱切期待。

從接受這份工作的第一天起,我已經知道這是一項艱鉅的任務。聽張永霖先生所言:「出任執行主席一職,百感交集,戰戰兢兢,如履薄冰。」,我就想起康有為先生廢除八股文,一段可歌可泣的歷史。

沒有膽識,就幹不了大事。

要改革,我沒有想過得到全部人的認同;改革的過程中,我們要面對固有利益者的強大阻力;要改革成功,就一定要迅速、全面和徹底,更重要的是,要有後備計劃。以上種種,我已經有充足準備。過往四年,我在城市電訊亦在進行過類似改革工作,公司由幾年前虧損數億元到今天賺一億二千多萬。我認為這種全面改革,對亞視來說是必需的;改革的目的,是要令員工對自己的公司、工作和人生重投信心,感到驕傲。

我不是一個輕言放棄的人,我已盡我的最大努力。我依然深信我所做的大部份事,對亞視和員工都是正確和有利的,只是,大家的步伐並不一致。

我也曾經說過,我已經愛上這家公司,因為那裏充滿希望和優秀的前線員工,這種想法至今不變。我一直以堅持直率,真心待人,所做的一切,都從亞視和員工的利益為出發點。

最後,我想提提張永霖先生,因為我在他身上學到很多。正如Linus說過,我們是背對背的,無其他人可以離間我們。雖然在短暫的未來,我不能再和他一起為亞視服務,但我會繼續默默的支持他。

可能我倆實在太用心去做事,根本不單止當這是一份工作,更將亞視當成自己的公司。若我們之間任何一個出現差錯,都只因為太過用心、太過投入。由始至終,我沒有考慮過自己個人的成敗和利益,我們只有一個焦點:怎樣才可以令亞視走上成功之路。可惜,事情發展就像很多愛情故事一樣,你最愛的,不一定是和你結婚和生活的那位。

我們擁有一個共同目標,只可惜,在日常運作上出現不同看法。就好像爸爸媽媽照顧他們的嬰孩一樣,孩子過了晚上的飲奶時間,仍然熟睡。到底應該由他安睡,還是叫醒他喝奶呢?雖然觀點不同,大家都只是希望用最好的方法去照顧孩子,愛心卻是共通的。

大家都同意,要為亞視建立新文化和新路向。我選擇在這時退下來,應該是最恰當的做法。

無論如何,在過往的十二天,我倆一直緊密合作,所做的每一件事、每一個決定都有我們的共同意見和討論。藉此,我衷心感謝他帶領我走過這一段路。

工作完結了,兄弟情仍在。

最後,是關於亞洲小姐面試的。我用錯字眼,但我絕無半點不尊重之意,失言亦是無心之失。無論如何,我必須承認這是一個錯誤。對此我深感歉疚,衷心希望得到佳麗和大眾的原諒。

王維基

二○○八年十二月十七日

No Comments

倪震的聲明

最近滿城風雨,矛頭都是我作為一個男朋友怎樣失敗。我多謝大家的意見和抨擊,事發後也承諾過深切反省和負責。想了一星期,我再為我的錯誤向慧敏道歉,也多謝她再一次肯包容我的過失。但感情由兩個人的事,變成了所有人的事,性質已起了改變。雨過天青不難,但可以保證暴風雨不再來嗎?我問了自己這個問題很久,意識到我這次的錯誤並非如一些損友說是技術上不小心,而是結構上出現了明顯的中年危機。我會正視問題,完善自我,不排除尋求專業輔助。在有信心改善之前,我明白到我在大家的心目中,不再是個稱職的男朋友,更不配做慧敏的男朋友。

為了令公眾安心,為了顯示我的後悔和承擔,我決定「引疚分手」,和慧敏結束情侶關係,做回知心的朋友。這無疑是極大的損失,但我相信傳媒界,和慧敏的fans,都會歡迎我這個痛苦的決定。我不是個稱職的男朋友,但做個稱職的好朋友,我很有信心。我和慧敏相識近二十年,一向互相支持和瞭解。今日因我的不撿點分手,也不會影響我們繼續來往,處理合作的日常事務,和照顧愛貓。我做錯事,認了錯,向慧敏交待了,也得到慧敏的原諒。基於問責,分手已是極刑。以前種種,我和慧敏不會再作回應。以後種種,請大家尊重我和慧敏只是朋友的關係,不要再訂出情侶的標準。

我已搬離跑馬地寓所,再一次多謝慧敏多年來的包容,和傳媒多年來的鞭撻。人頭落地了,退一步海闊天空,希望事情可以告一段落。

No Comments

Use Remote Assistant to Replace VNC

Disable User Kick-off Remote Assistance Requirement

Locate the Solicite Remote Assistance policy by expanding the tree to:
Local Computer Policy\Computer Configuration\Administrative Templates\System\Remote Assistance
Double-click Solicited Remote Assistance.
On the Solicited Remote Assistance Properties dialog box, click Disable, click Apply, and then click OK.
Close the Group Policy snap-in.

Call Remote Assistance

On the expert computer, click Start, click Help and Support, and then click Use Tools to view your computer information and diagnose problems.
On the Tools menu, click Offer Remote Assistance.

On the Offer Remote Assistance page, type the computer name or the IP address of the computer to which you are trying to offer remote assistance, and then click Connect. You will be prompted to choose which user you want to assist from a drop down menu. After you choose the user you want to assist, click Start Remote Assistance.

No Comments

Creating A Bootable WinPE 2.0 USB Key

Windows Preinstallation Environment (PE) 2.0 is a slimed down version of Windows (hence all the MiniNT references) that used to be the exclusive domain of OEM’s providers. Microsoft has wisely chosen to offer this to the masses as part of the Windows AIK. USB keys can be found just about anywhere these days for next to nothing. Combine the capabilities of WinPE with the portability of a USB key and you just made a very powerful troubleshooting, imaging, and data recovery tool. Here is a quick step by step on how to do just that:

Step 1. ) Get USB Key

You probably already have a few and if not you can purchase these just about anywhere, so I won’t tell you where to get one.  You should get a USB 2.0 device of at least 512mb in size, but if you plan on putting a lot into a custom PE install or plan on using it to transfer data too then you are better served getting a larger size (2.0-4.0GB)

Step 2.) Download and Install the Windows Automated Installation Kit (Windows AIK)

This deployment oriented tool set contains Windows PE 2.0.

Step 3.) Format the USB key

Note: This must be done from Windows Vista

Start a command prompt and run the following. This set of commands assumes your USB key is detected as disk 1, you should double check that by doing a list of the disks before cleaning it. If you have multiple hard drives you could end up wiping your second drive using this command. You have been warned.

  • Diskpart
  • select disk 1
  • clean
  • create partition primary
  • select partition 1
  • active
  • format fs=fat32
  • assign
  • exit

Step 4.) Setup Windows PE

  • In this step you will create and customize WinPE for your disk. From the machine that you installed the Windows AIK go to the start menu and select “Windows PE Tools Command Prompt” from under the Windows AIK program folder.
  • Run Copype.cmd x86 c:\winpe_x86
    • you can create an 64-bit version by changing the architecture from x86 to amd64
  • Add customizations to WinPE
    • copy any tools you want available to the C:\winpe_x86\iso folder such as imaging tools if you want to use this for capturing images (imagex, wimscript.ini)

Step 5 .) Copy Windows PE to USB Key

Insert the USB key into the machine that you have WinPE on and run the following command to copy the contents to the USB Key

xcopy c:\winpe_x86\iso\*.* /s /e /f e:\

change c: to reflect the drive your files on and e: to be your USB key.

There you have it…a quick way to make a handy USB version of WinPE that you can take with you anywhere.  These can be used in almost any modern computer that supports USB booting. More information on this and other great things you can do with Windows PE are located in the Windows AIK.

Ref:

http://technet.microsoft.com/en-us/library/cc709665.aspx

http://technet.microsoft.com/en-us/library/cc749311.aspx

No Comments

係大快活食飯^^

No Comments

Using Settings in C Sharp

Using Settings in C#

Matt Stoecker
Microsoft Corporation

August 2006

Applies to:
Microsoft Visual C# 2005
Microsoft .NET Framework 2.0

Summary: Learn how to use the new features in Visual C# 2005 to work with application and user settings. (5 printed pages)

Contents

Introduction
Application and User Settings
Creating a New Setting at Design Time
Using Settings at Run Time
Using Alternate Sets of Settings
Conclusion

Introduction

The .NET Framework 2.0 allows you to create and access values that are persisted between application execution sessions. These values are called settings. Settings can represent user preferences, or valuable information the application needs to use. For example, you might create a series of settings that store user preferences for the color scheme of an application. Or you might store the connection string that specifies a database that your application uses. Settings allow you to both persist information that is critical to the application outside of the code, and to create profiles that store the preferences of individual users.

While Visual Basic 2005 has provided an easily discoverable mechanism for accessing settings using the My namespace, there is no analogous namespace in Visual C# 2005, and thus settings are somewhat more difficult to access. Nonetheless, C# users can still use settings by accessing the Properties namespace. In the course of this article, you will learn the difference between application and user settings, how to create new settings at design time, how to access settings at run time, and even how to incorporate multiple sets of settings into your application.

Application and User Settings

Settings have four properties:

  • Name: The Name property of settings is the name that is used to access the value of the setting at run time.
  • Type: The Type of the setting is the .NET Framework type that the setting represents. A setting can be of any type. For example, a setting that holds a user preference of color would be a System.Color type.
  • Scope: The Scope property represents how a setting can be accessed at run time. There are two possible values for the Scope property: Application and User. These will be discussed more in this section.
  • Value: The Value property represents the value returned when the setting is accessed. The value will be of the type represented by the Type property.

Of these properties, most are fairly self-explanatory. Name, Type, and Value are all concepts that should be familiar to most programmers. The Scope property requires a little more explanation. Settings have two possible scopes: application scope and user scope. Settings with application scope represent settings that are used by the application regardless of user preferences, whereas settings with user scope are generally less important to the actual application and are more likely to be associated with preferences or other non-critical values.

The crucial distinction between application-scope and user-scope settings is that user-scope settings are read/write at run time, and their values can be changed and saved in code. Application-scope settings are read only at run time. While they can be read, they cannot be written to. Settings with application scope can only be changed at design time, or by altering the settings file manually.

Creating a New Setting at Design Time

You can create a new setting at design time by using the Settings designer. The Settings designer is a familiar grid-style interface that allows you to create new settings and specify properties for those settings. You must specify Name, Type, Scope, and Value for each new setting. Once a setting is created, it can be assessed in code using the mechanisms described later in this article.

To Create a New Setting at Design Time

  1. In Solution Explorer, expand the Properties node of your project.
  2. In Solution Explorer, double-click the .settings file in which you want to add a new setting. The default name for this file is Settings.settings.
  3. In the Settings designer, set the Name, Type, Scope, and Value for your setting. Each row represents a single setting. Figure 1 shows an example of the Settings designer.

Figure 1. The Settings designer in Visual Studio 2005

Changing the Value of an Existing Setting at Design Time

You can also use the Settings designer to change the value of a pre-existing setting at design time, as described in the following steps:

To Change the Value of an Existing Setting at Design Time

  1. In Solution Explorer, expand the Properties node of your project.
  2. In Solution Explorer, double-click the .settings file in which you want to add a new setting. The default name for this file is Settings.settings.
  3. In the Settings designer, find the setting you want to change and type the new value in the Value column.

Changing the Value of a Setting Between Application Sessions

At times, you might want to change the value of a setting between application sessions after the application has been compiled and deployed. For example, you might want to change a connection string to point to the correct database location. Since design-time tools are not available after the application has been compiled and deployed, you must change the setting value manually in the file.

To Change the Value of a Setting Between Application Sessions

  1. Using Microsoft Notepad or some other text or XML editor, open the <AssemblyName>.exe.config file associated with your application.
  2. Locate the entry for the setting you want to change. It should look similar to the following example:
3.             <setting name="Setting" serializeAs="String">
4.                <value>This is the setting value</value>
5.             </setting>
  1. Type a new value for your setting and save the file.

Using Settings at Run Time

Settings are available to the application through code at run time. You can access the value of settings with application scope on a read-only basis, and you can read and write the values of user-scope settings. Settings are available in C# through the Properties namespace.

Reading Settings at Run Time

You can read both application-scope and user-scope settings at run time with the Properties namespace. The Properties namespace exposes all of the default settings for the project by using the Properties.Settings.Default object. When writing code that uses settings, all settings appear in IntelliSense and are strongly typed. Thus, if you have a setting that is of type System.Drawing.Color, for example, you can use it without having to cast it first, as shown in the following example:

this.BackColor = Properties.Settings.Default.myColor;

Saving User Settings at Run Time

Application-scope settings are read only, and can only be changed at design time or by altering the <AssemblyName>.exe.config file in between application sessions. User-scope settings, however, can be written at run time, just as you would change any property value. The new value persists for the duration of the application session. You can persist changes to user settings between application sessions by calling the Settings.Save method. These settings are saved in the User.config file.

To Write and Persist User Settings at Run Time

  1. Access the user setting and assign it a new value, as shown in the following example:
2.             Properties.Settings.Default.myColor = Color.AliceBlue;
  1. If you want to persist changes to user settings between application sessions, call the Save method, as shown in the following code:
4.             Properties.Settings.Default.Save();

Using Alternate Sets of Settings

In some cases, you might want to have multiple sets of settings in an application. For example, if you are developing an application in which a particular group of settings is expected to change frequently, it might be wise to separate them all into a single file so that the file can be replaced wholesale, leaving other settings unaffected. Visual Studio 2005 allows you to add multiple sets of settings to your project. Additional sets of settings can be accessed by using the generated settings object in their own node. For example, if you added a set of settings named SpecialSettings to your project, you would access the settings it contains in code through the Properties.SpecialSettings object.

To Add an Additional Set of Settings

  1. From the Project menu, choose Add New Item. The Add New Item dialog box opens.
  2. In the Add New Item dialog box, select Settings File.
  3. In the Name box, give the settings file a name, such as SpecialSettings.settings, and click Add to add the file to your solution.
  4. In Solution Explorer, drag the new settings file into the Properties folder. This allows your new settings to be available in code.
  5. Add and use settings in this file as you would any other settings file. You can access this group of settings through the Properties.SpecialSettings object.

Conclusion

In this paper, you have seen how you can use settings in your C# applications to store and manage settings that pertain both to the application and the user. You have learned how to add settings at design time, how to read and write settings at run time, and how to incorporate additional sets of settings into your application. For further information, consult the following resources:

Windows Forms on Microsoft .NET Framework Developer Center
WindowsForms.NET
Windows Forms Documentation Updates Blog

using-settings-in-c-sharp

No Comments