Friday, December 31, 2010

[C#] 利用Keep-alive來保持Socket長連接,並偵測網路異常

http://jiunway.spaces.live.com/Blog/cns!2C2EF66DB941A005!656.entry?wa=wsignin1.0&sa=853565730

http://www.west263.com/www/info/67860-1.htm

Friday, December 24, 2010

九個成語解釋的糾正

九個成語解釋的糾正

一.知書達禮:僅知道書本知識是不夠的,還要學會送禮。

二.度日如年:特指當公務員的日子,非常好過,每天都像過年一樣。

三.杯水車薪:形容公務員的工作,每天辦公室喝杯茶,月底可以拿到可以買一輛車的工資。

四.知足常樂:知道有人請自己洗腳,心裡就感到快樂。

五.見異思遷:看見漂亮的異性就想搬到她那裡去住。

六.語重心長:別人話講的重了,心裡懷恨很長時間。

七.有機可乘:出門考察有飛機可以乘坐。

八.不學無術:不要白費工夫學那些不實用的東西。

九.夫唱婦隨:丈夫進了歌廳唱歌,妻子跟著尾隨。


仲有「父慈子孝」

好多人以為「子」就一定要孝

但其實後面仲有講假如「父不慈」, 「子」係不需要「孝」

被中國人誤傳了數千年的七句話

在中國,很多幾千年流傳下來的名言,被人刻意或無知地曲解,背離了原來的意旨。

一:以德報怨

以德報怨,是我們經常聽到的一句話。我們理解為:孔夫子教我們,受別人欺負,要忍,要對他更好,要用愛心去感化他。這情操令人肅然起敬。

但事實上,這是曲解了孔子的原意,原句出於《論語.憲問》:「或曰:『以德報怨,何如?』子曰:『何以報德?以直報怨,以德報德。』」當時的情況 是孔子的一個弟子問他說:「別人打我了,我反而要對他好,用我的德行來感化他,好不好?」孔子說:「你對對你不起的人,報以優厚的待遇;對你有恩的人,你 可以拿什麼來報答呢?別人以德來待你的時候,你才需要以德來回報別人。可是現在別人對你不好,你就應該以直報怨!」「直」是指公平、正確的態度。別人打了 你,你應該避開或報警。

二:民可使由之,不可使知之

「民可使由之,不可使知之。」被後世的統治者解讀為:指使人民去做事就行了,不要讓他們明白他們在做什麼。這是曲解了孔子的原意,原句出於《論語.秦伯》:「子曰:興於詩,立於禮,成於樂。民可,使由之;不可,使知之。」

把句子讀成「民可使由之,不可使知之。」是後人別有用心地斷章取義。從前文來看,孔子是在討論詩禮樂這三種東西的教育問題。結合上下文的語境,孔 子的本意是:詩、禮、樂這三樣東西是教育的基礎,如果人民掌握了詩禮樂,好,讓他們自由發揮,如果人民不理解詩禮樂,就要去教化他們,讓他們知道和明白這 些東西。

三:無毒不丈夫

民間諺語「無毒不丈夫」,好像是說大丈夫必然是惡毒陰損的人。其實這是以訛傳訛,原話是「量小非君子,無度不丈夫。」比如有人頂撞了我,朋友用原 版的好話相勸:「老話說,量小非君子,無度不丈夫,你是大丈夫,就別跟他計較了。」我於是不去計較這種小事;但如果這個朋友說:「這老話怎麼說的?無毒不 丈夫!你是男人,不能退啊!給你刀,去做了他!」效果便大大不同了。

四:唯女子與小人難養也

這段說話被後人誤會孔子歧視婦女。為什麼孔子要說出這樣的話?這話又是對誰說的?在《史記.孔子世家》裡,提到孔子「居衛月餘,靈公與夫人同車, 宦者雍渠參乘出,使孔子為次乘,招搖市過之。孔子曰:『吾未見好德如好色者也。』於是醜之,去衛。」這段話是說,孔子受衛國國君的邀請,來到了衛國,但孔 子其後發現衛靈公和衛夫人是拿他的身份來炫耀自己,並不是真正支持他來教化衛國民眾的。孔夫子感嘆,衛靈公到底是喜歡德才多些,還是喜歡女色多些?孔子就 離開了衛國,離開之後,想起衛夫人和拍馬小人那種仗著得寵,驕橫跋扈的樣子,就感慨:「唯女子與小人難養也!近之則不遜,遠之則怨。」《論語.陽貨》

孔子罵的是那些「被養」的女人和小人,不是泛指一般婦女。就是說一個君主,對那些後宮的女人和沒什麼本事的拍馬小人太親近了,她們就會得意忘形,忘了自己的身份,開始用君主的權力來胡作非為,而疏遠她們吧,她們又會埋怨。

五:吾生也有涯,而知也無涯

這是莊子說的,現代人理解為,這是學習勵志類的明言警句,鼓勵人要以有限的生命,去追求無限的知識。

原句出於《莊子.養生主》:「吾生也有涯,而知也無涯,以有涯隨無涯,殆已。」莊子的原意是:「生命是有限的,而知識是無限的,要以有限的生命,去追求那無限的知識,不是養生之道。」和現代人的理解正好相反。

六:相濡以沫

《莊子.大宗師》講了一個小故事:「泉涸,魚相與處於陸,相呴以濕,相濡以沫,不如相忘於江湖。」他說有一天,泉水乾了,兩條小魚被困在一個小水 窪,為了生存下去,牠們彼此從嘴中吐出泡泡,用自己的濕氣來濕潤對方的身體,互相扶持,互相依賴。現代人通常用「相濡以沫」來表揚那些在困苦中互相扶持的 朋友和夫妻,但忽略了最後一句「不如相忘於江湖。」莊子的原意是:「與其需要相濡以沫才能支撐,為什麼不干脆灑脫地放手,找一條水路,大家開開心心地回到 廣闊的江河湖海,彼此相忘。」套用在性格各異的夫妻身上,就是應把對方放開去,尋找各自的幸福。

七:天地不仁,以萬物為芻狗

《老子.道德經》說:「天地不仁,以萬物為芻狗,聖人不仁,以百姓為芻狗。」憤青說這話的意思是:「天地殘暴不仁,把萬物都當成低賤的豬狗來看 待,而那些高高在上的所謂聖人也是一樣,把老百姓當成豬狗不如的東西!」其實這句話的真正意思是說:「天地不情感用事,對萬物一視同仁,聖人不情感用事, 對百姓一視同仁。」它說的是一個公平的道理,我們所有的人,所有的眾生在天地的眼中,都是平等的。

人不为己,天诛地灭”的哲学内涵就是:万事万物(包括人)都是以“自我”为价值中心,它是一切社会秩序得以形成和发展的前提与基础;相反,如果万事万物不 坚持以“自我”为价值中心,那么一切社会秩序将不复存在。我们应该辩证地理解这个形式简单而内涵深刻的哲学命题,探索其内在的价值机理,而不能简单地、机 械地用“是”或“非”来进行判断。
“人不为己,天诛地灭” 的哲学内涵是说万事万物(包括人)坚持自我是一切秩序的基础。杨子以反命题的形式进行阐释,即如果万事万物不坚持自我,一切秩序将不复存在。这里的秩序包 括自然秩序和社会秩序。我们之所以看到天地有别,多彩绚丽的自然景观、自然秩序,是万事万物“为我”即坚持自己的结果:石头在拚命地“为我”而做石头,大 山在拚命地“为我”而做大山,树木在拚命地“为我”而做树木,小鸟在拚命地“为我”而做小鸟,大像在拚命地“为我”而做大象,泥土在拚命地“为我”而做泥 土,白云在拚命地“为我”而做白云。

十、知己知彼,百戰百勝

原句為「知己知彼,百戰不殆」

知道彼此的強弱點,只能令戰鬥時不會處於危險,但不代表可以勝利。

句錯既版本聽聞係毛澤東開始講起既

Sunday, December 19, 2010

.Net Datagridview datasource = datable multi-threading update problem

GUI's Component:
1. datagridview

Controller's Component:
1. Datatable


When GUI's datagridview.datasource = datatable, if you are using another thread to add data into datatable (e.g. dt.rows.Add(datarow), the gui will still try to re-drawn the datagridview even you are not interacting with it.

So, a correct way to insert data into datatable is to make use of delegate and invoke.
 1. Declare a delegate first
Private Delegate Sub DatagridViewNewRowDelegate(ByVal sender As Object, ByVal al As String)

2.  Check if datagridview needs invoke or not.

If datagridview.InvokeRequired then
Dim DeleDatagridRefresh As DatagridViewNewRowDelegate = New DatagridViewNewRowDelegate(AddressOf your function)
            dg.Invoke(DeleDatagridRefresh, sender, "parameter to send")

end if

So, the invoke method will be called in the UI thread that creates the control and the UI won't hang.

This is not the problem of .Net, it is the problem of Win32 API since .Net is just the wrapper of win32 API.

Saturday, December 04, 2010

2010 年 AO/EO 考試 (JRE) 問題

1. 丁屋冇地起, 同政府要係新界發展, 致出現conflict
2. 香港應否開賭

Sunday, October 10, 2010

Jailbreak iPhone 4 iOS 4.1 必裝Apps

Autolock SBSettings (配合 SBSettings 可使iPhone永久長開, 導航時用)
20 Second Lock Screen(將lockscreen光亮延長20秒)
3G Unrestrictor (以3G模擬Wifi連線, 能打Skype電話, 看高清youtube, etc)
5-Row QWERTY (5行的keyboard, 快捷方便, 有多個快捷鍵 )
Appsync 3.X (iTunes安裝破解 ipa)
AttachmentSaver (for Mail)
Backgrounder(exit app後依然可以背景運行, 例如聽收音機)
BiteSMS(可以Forward SMS 及單獨刪除SMS)
Categories(將app 擺入folder減少桌面icon)
Cycorder(iPhone 3G 專用, 拍片)
CyDelete(Springboard直接長按可以Del Package )
Cyntact (Contact list 顯示人像圖片)
Emoji(開啟繪圖文字)
Extended Preferences(增加setting的設定 )
Five/Six icon dock(將dock增至五個或六個)
Flashlight(可以當電筒用 )
FontSwap(轉換字型)
HK Carrier Firmware (顯示台logo)
iacces (中文輸入法包括速成, 倉頡, 筆劃等)
iBlacklist(可以阻擋某些人的sms, phone)
iBlank (可以製造隱形icon, 其實sbsettings已經可以)
iBluetooth (可以透過bluetooh 傳送相, mp3等到其他手機)
iFile (檔案總管, 約選擇 sinfuliphone那個crack版email輸入 ifile@ifile.com 可以破解)
iHome (類似快捷鍵, 可以少用home button )
iMobileCinema(可以在safari看flash影片)
Installous (可以不經iTunes直接下載並安裝 ipa)
iSteamy (18禁... 不要問)
jPhone(能個別刪除電話紀錄分組功能)
Live Time (令時鐘圖案的時針同秒針轉動)
Lock down(裝app上鎖)
Logome(將 boot logo 轉做自己喜歡的圖案)
MemTool( 釋放內存, 讓iphone運行快一點)
MPlayer (可直接播放RMVB/H264/MPEG4/WMV player)
MySMS(可以FW SMS 及單獨刪除SMS)
Offline Map(離線地圖)
Openssh (用winscp必要的程式)
Orbit (1頁過顯示9頁Springboard, 再直接跳到某頁)
Quick Unlock(快速進入homescreen)
Rename(更改apps的名稱)
Rotation Inhibitor(強行設定safari橫屏或直屏)
Safari Download Manager (Safari專用, 配合 iFile 使你完全掌握控制 iPhone 檔案)
SBsettings (必裝, 多個快捷鍵(快速開啟wifi, 3g 等), 隱藏icon)
Sources (加source可以有更多軟件可以下載)
SpringsJumps (跳至springb

Thursday, August 26, 2010

用C#在 WinCE 5.0 上新增、修改、刪除、搜尋MySQL上的資料

mySQL Connector for .NET Compact Framework has many bugs. But I found that the following combination can work on WinCE 5.0 with .NET Framework 2.0.


Requirement
1. mySQL Server: 5.1.41
2. mySQL .NET Connector 6.0.6.0  - mysql.data.cf.dll
3. .NET Compact Framework 2.0
4. WinCE 5.0

    public class mySQLConnectClass
    {
        #region Member
            private string _pw = "";
            private string _user = "user";
            private string _database = "";
            private string _host = "remotehost";
            private string _provider = "";
            private MySql.Data.MySqlClient.MySqlConnection myConn = null;
        #endregion

        #region Properties
            public string Password
            {
                get { return _pw; }
                set { _pw = value; }
            }
            public string User
            {
                get { return _user; }
                set { _user = value; }
            }
            public string Database
            {
                get { return _database; }
                set { _database = value; }
            }
            public string Host
            {
                get { return _host; }
                set { _host = value; }
            }
            public string Provider
            {
                get { return _provider; }
                set { _provider = value; }
            }
        #endregion

        #region Public
            public mySQLConnectClass() 
            {
               
            }
            public void Connect()
            {
                _provider = "Data Source=" + _host + ";Database=" + _database + ";User ID=" + _user + ";Password=" + _pw;
                myConn = new MySqlConnection(_provider);
                try
                {
                    myConn.Open();


                }
                catch (Exception ex)
                {
                   
                    throw new Exception(ex.Message.ToString());
                }

            }
            public void Disconnect()
            {
                string sql = "SELECT name, age FROM table1";

                MySqlCommand cmd = new MySqlCommand(sql, myConn);
                MySqlDataReader rdr = cmd.ExecuteReader();

                while (rdr.Read())
                {
                    Debug.WriteLine(rdr[0] + " -- " + rdr[1]);
                }

                rdr.Close();
                Debug.WriteLine("Close Reader.");
                myConn.Close();
                myConn.Dispose();
                Debug.WriteLine("Close DB.");

                //myConn.Close();
            }
            public bool Ping()
            {
                return myConn.Ping();
            }
        #endregion

        #region Private

        #endregion

        #region Event
        #endregion

    }

Saturday, August 21, 2010

人民幣兌港元網站 rmb vs hkd

人民幣兌港元網站  rmb vs hkd / CNY vs HKD

1 HKD = 0.8759 CNY  轉了900 元-----> Rate@0.8711,

http://hkd.cer24.com/cny/chart/?q=30

Wednesday, July 07, 2010

氣質女當眾更衣變辣妹

內地論壇近日出現一名大膽的「黑絲女」,她在營業中的書店當眾更衣,迅速從身着白長裙的純情氣質女變身黑絲襪、短裙辣妹(圖),速度之快令人咋舌。短片在 網上迅速傳播,有人認為該女子是「校雞」,這是「變裝接客」。
短片開始時拍到書店環境,之後畫面定格在一長髮女子身上,她身穿純白長裙及米色無袖 上衣,低頭專心看書,看起來相當有氣質。不過,書看到一半,她接了一通電話後,把書放回書架上,下一秒,她竟然在書店中換起衣服來。只見她先是將一黑色連 身洋裝穿到白色長裙內,後來脫掉上衣,將洋裝的上半身穿上,露出美背,接着穿上長及大腿的絲襪,換上黑色高跟鞋,背上手袋離開。
鳳凰網

http://hk.apple.nextmedia.com/template/apple/art_main.php?iss_id=20100707&sec_id=15335&art_id=14212671&av_id=14213379

Microsoft Word 2007 Equation/PDF Bug

Bug Description:
If Word 2007 installed with Office 2007 Service Pack 2(SP2) and when you insert equation into word document and save the file as PDF, then you will receive unhandled exception occurred message.


Solution:
1. Save the file to Word 2003 file format
2. Convert the equation to image

Tuesday, April 27, 2010

How to write callbacks (delegate) in C# and .NET

Copy from:
http://www.myelin.co.nz/notes/callbacks/cs-delegates.html

http://msdn.microsoft.com/en-us/library/Bb985784

http://msdn.microsoft.com/en-us/magazine/cc301810.aspx

If you're used to function pointers in C, a delegate is basically a pair of pointers rolled into one:
  • A pointer to an object (optional)
  • A pointer to a method of that object
That means a single delegate passes all the information needed to locate a function in your program, whether it's a static method or associated with an object.
You define them like this in C#:
public delegate void FooCallbackType( int a, int b, int c );
When you want to use them, you make delegate out of the function you want to call:
class CMyClass
{
 public void FunctionToCall( int a, int b, int c )
 {
  // This is the callback
 }

 public static void Foo()
 {
  FooCallbackType myDelegate = new FooCallbackType(
   this.FunctionToCall );
  // Now you can pass that to the function
  // that needs to call you back.
 }
}
If you want to make a delegate to point to a static method, it just looks the same:
class CMyClassWithStaticCallback
{
 public static void StaticFunctionToCall( int a, int b, int c )
 {
  // This is the callback
 }

 public static void Foo()
 {
  FooCallbackType myDelegate = new FooCallbackType(
   CMyClass.StaticFunctionToCall );
 }
}
All in all, they do the same thing as interface-based callbacks in C++, but cause a bit less trouble because you don't need to worry about naming your functions or making helper objects, and you can make delegates out of any method. They're more flexible.

Monday, April 26, 2010

Solution for WinCE Emulator 5.0 Save State Bug

Solution for WinCE Emulator 5.0 Save State Bug

WinCE 5.0 has a bug that it can't load the saved state.

Solution from http://wincetips.blogspot.com/ :


Connecting the CE 5.0 emulator to VS2005

Title: Connecting the CE 5.0 emulator to VS2005

From: Lewis Williams

Email (Optional): lewisw#tesco.net

Added: 3/10/2007 5:32:12 AM

Message: Connecting the CE 5.0 Emulator to VS2005

1. This uses the network method and saves the emulator state. It does not use activesync, communications ports or a null modem cable.

Start the emulator using a shortcut command that is something like this:

"C:\Program Files\Windows CE 5.0 Emulator\Emulator_500.exe" nk.cem
/video 640x480x16
/Ethernet virtualswitch
/sharedfolder "C:\CE5SharedFolder"

The shared folder appears on the emulator as \My Device\Storage Card. Using the shared folder, copy the following files to the \My Device\Windows\ folder on the emulator. These files are located on the host at \Program Files\Common Files\Microsoft Shared\CoreCon\1.0\Target\wce400\x86, or similar

Clientshutdown.exe
ConmanClient2.exe
CMaccept.exe
eDbgTL.dll
TcpConnectionA.dll

2. Select Emulator -> Start Menu -> run -> \Windows\conmanclient2.exe.

3. Get the IP address of the emulator by double-clicking on the T networking symbol bottom left. If it has no ip address try installing Microsoft Loopback Adapter on the host, check for Virtual Machine Network Services, or other host networking hacks. (This is the difficult bit).

4. To check that the emulator is responding, on the host type Ping at a DOS prompt.

5. To get "Save State" working on the emulator, shut down the emulator using the "Save State" option. Then navigate to Host -> My Documents -> My Virtual Machines

6. The saved state is in the folder that is named with a curly brackets string similar to {06A8A448-EB8B-4E0B-8A88-451412A10C66} say, and known as a GUID. Attempt to rename this folder so that you can highlight and copy the GUID string itself (not the folder).

7. Then add an option, which is similar to /vmid {06A8A448-EB8B-4E0B-8A88-451412A10C66}, to the emulator shortcut command above.

8. The shortcut should now start the emulator from its saved state. It is a good idea to back up the saved state folder.

9. On the host select Visual Studio 2005 -> Tools -> Options -> Device Tools -> Devices

10. Then select Windows CE 5.0 Device -> Properties -> Configure

11. In the "Configure TCP/IP Transport" dialog box, select "Use specific IP address", and then type the emulator IP address you found above.

12. Close the dialog boxes.

13. Select Emulator -> Start -> run -> \Windows\cMaccept.exe and connect to the emulator from VS2005 within three minutes.

14. Run your application from Start Debugging in VS2005 and VS2005 should deploy the two cab files nectcfv2.wce5.x86.cab and system_SR_enu.cab first (this may take some time), and then your application.

15. Close your application in the emulator (I've had trouble using the Stop button on the host).

16. Shut down the emulator using the "Save State" option.

17. You may need to re-run cMaccept each time you restart the emulator or VS2005, but the cab files should not need to deploy again, and the emulator ip address should remain the same.

18. To avoid cMaccept navigate host -> programs -> Microsoft Visual Studio 2005 -> Visual Studio Remote Tools -> Remote Registry Editor

19. In the "Select a Windows Device" dialog box that appears highlight the "Windows CE 5.0 Device" option

20. In the emulator run cMaccept and then immediately click OK in the Remote Registry Editor

21. Highlight Windows CE 5.0 -> HKLM -> System

22. Right click in the right hand pane and select New DWORD value.

23. In the name field type (exactly and without the quotes) "CoreConOverrideSecurity" and set its value to 1

24. Close the editor. Shut down the emulator with Save State.

Monday, April 12, 2010

Microsoft NumericUpDown Control Bug - It does not validate max/min/decimal value

Detail:

If you define:
1. max = 10000
2. min = 0
3. decimalplaces=4

If user input 99.00004 and leave focus, the GUI will update the displayed value to 99.0000.

However, if you use numericUpDown.Value property to get the user typed value, you will get 99.00004 instead of 99.0000.

If your program prompts the message saying that user input was wrong, then the user will be confused as the GUI value was correct!!!

The bug was recorded by MS in 2007:

http://support.microsoft.com/?scid=kb%3Ben-us%3B814347&x=7&y=2


The bug was still not fixed in .NET Framework 3.5 (2009):
http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/f45c16a5-8ddd-41e5-a0b8-5bec938ba8d7/

Monday, April 05, 2010

微軟的免費午餐 - Microsoft Chart Control for .NET framework 3.5

Sample and Tutorials
http://terudio.blogspot.com/2009/02/microsoft-chart-control-for-not-net.html

http://www.dotblogs.com.tw/chou/archive/2009/10/03/10902.aspx

http://www.dotblogs.com.tw/jeff-yeh/archive/2009/09/24/10760.aspx

Download:
Microsoft Chart Controls Add-on for Microsoft Visual Studio 2008
http://www.microsoft.com/downloads/details.aspx?FamilyId=1D69CE13-E1E5-4315-825C-F14D33A303E9&displaylang=en

Microsoft Chart Controls for Microsoft .NET Framework 3.5
http://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&FamilyID=130f7986-bf49-4fe5-9ca8-910ae6ea442c

Microsoft Chart Controls for Microsoft .NET Framework 3.5 語言套件
http://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&FamilyID=581ff4e3-749f-4454-a5e3-de4c463143bd

*Note: Microsoft Chart Controls will be included in .NET Framework 4.0 and Visual Studio 2010

Monday, March 29, 2010

Visual Studio .NET 2008 Copy file to Windows CE / Windows Mobile 5.0

1. Use Remote File Viewer

2. Use Share Foler

http://www.dotblogs.com.tw/chou/archive/2009/10/26/11286.aspx

3. How to write program for Windows CE under VS.Net 2008:
3.1 Must install Windows CE 5.0/6.0 emulator

Tuesday, March 23, 2010

Google 先撤回香港,再反攻大陸、光復偉大祖國網絡自由?

http://www.google.com/prc/report.html

Google 先撤回香港,再反攻大陸、光復偉大祖國網絡自由?

三月 23, 2010 in 生活點滴, 背後.政治

「欢迎您来到谷歌搜索在中国的新家」,Google.hk成了谷歌的「新家」

Google 終於退出了偉大祖國,不過,嚴格來說,並非退出中國市場,因為Google只是將Google.cn傳駁到 Google.hk,所以,我想,除非偉大祖國共黨官僚夠膽說:「香港不是中國一部份」,否則,谷歌只是撤出了偉大祖國境外,而非撤出中國。

不論相信也好,不相信也好,Google 在博客中,那篇正式宣布撤出偉大祖國文章“A new approach to China: an update” ,開宗明意地再強調,他選擇撤出偉大祖國,就是不滿內限制網絡自由,所以把Google.cn傳駁到 Google.hk,為偉大祖國網民,提供更自由網絡資訊,童工又留意到,網誌其中一段,提及Google與中共談判時,中共表明網絡自我審查,那是不能 談判的法律要求,Google只好以現時方式,也是他們相信合符內地法規方式,為內地網民,提供不受審查的資訊:

“Figuring out how to make good on our promise to stop censoring search on Google.cn has been hard. We want as many people in the world as possible to have access to our services, including users in mainland China, yet the Chinese government has been crystal clear throughout our discussions that self-censorship is a non-negotiable legal requirement. We believe this new approach of providing uncensored search in simplified Chinese from Google.com.hk is a sensible solution to the challenges we’ve faced—it’s entirely legal and will meaningfully increase access to information for people in China. We very much hope that the Chinese government respects our decision, though we are well aware that it could at any time block access to our services.”

當然,正如A說,Google.hk也遭內地局審查,所以一向習慣「玩野」的Google,今次也不例外,特別開設一個China service availability網頁,每天更新Google在內地服務,還有多少可用,有多少已被封殺,這,倒有點黑色幽默感,由Goggle自制他們在偉大祖 國服務的「死亡倒數」網頁,相信,只有Google才會如此「玩野」。

B說,對中共來說,Google退回行「一國兩制」的香港,他們會否高調宣布,我們其實早已封掉了Google.hk?當然,這可沒有甚麼大不了,反正在 「一國兩制」下,連按偉大祖國憲法授權的《基本法》產生的立法會議員,偉大祖國一樣可以剝奪他們回國權,河蟹掉小小一個Google.hk,又有甚麼大不 了!

童工與C則感嘆,滿清年代,孫文反清,革命黨人每受清庭追捕,往往以香港為藏身之處;中共反國民政府,當年中共要 員,每過國民黨追殺,又多是逃來香港躲藏:八九年六四事件後,黃雀行動協助民運人士逃難,第一站又是香港!滿以為回歸之後,恐怕不會再有遭中共「追殺」的 人逃港!怎知,仍然有,只是並非「人」,而是一個國際知名網站、Google!

C笑稱,香港,命中注定要做革命基地,今次Google逃港,香港會否變成中共網絡自由革命的基地?

转贴自: http://goo.gl/f9Gq

Sunday, March 21, 2010

蘋果日報 - 國泰空姐

蘋果日報 - 國泰空姐

政府 OGCIO Analyst/Programmer II (AP2) Exam 試問題加答案

http://www28.discuss.com.hk/viewthread.php?tid=11691077&extra=page%3D1&page=15

100 MC:
1.    最白痴問題,Social Network 唔好做邊樣野:Post your privacy Information!!!!!!!!
2.    e-government
3.    拒收廣告訊息既條例唔收邊幾樣野?Fax/SMS 果啲…
4.    OGCIO 屬於政府邊個部門﹖
5.    政府Outsource contract 睇乜﹖
6.    發生事故incident 既priority? 睇urgency, level/….,我揀左跟程序去做
7.    Digital21 果五個objectives? 全部都係
8.    全港有幾多個wifi access point? 4001-8000/8001-12000/12001-16000/More than 16000
Answer: 8001-12000, Ref: http://www.ofta.gov.hk/en/datastat/wifi_statistics.pdf
9.    放係身份證既digital Cert 可以係邊幾樣﹖Personal, Server,...,...
Answer: Personal Only. Ref: You may store in the card a personal e-Cert issued by the Hongkong Post Certification Authority for conducting electronic transactions.
10.    Clean PC Day? Improve information security awareness
11.    六大產業邊樣係? IT/ICT/Innovation and technology,應該係Innovation and technology
12.    果間野叫乜名﹖Create Hong Kong, Creative Hong Kong, Innovative Hong Kong, Discover Hong Kong
Answer: Create Hong Kong
13.    原來間野既名係Office  of the Privacy Commissioner for Personal Data
14.    Panel for ICT/Panel for ?????
15.    有Programmer 叫你update 野,你係system admin 要點做﹖緊係叫佢跟procedure.
16.    HKCert (Hong Kong Computer Emergency Response Team)? Security 野
17.    Electronic Transaction Ordinance Q1 - OGCIO 整左乜野配合呢樣野﹖
18.    Electronic Transaction Ordinance Q2
19.    Recognized certification authority(CA)
20.    E-procurement pilot programme
21.    Wardriving is the act of searching for Wi-Fi wireless networks by a person in a moving vehicle, using a portable computer or PDA
22.    整access point 果個係乜野project? uUbiquitous City –HK Project?Government's Wi-Fi Programme?

Technical and project management
1.    邊幾隻係programming language? Java,Perl, Algol,...,答案係四樣都係,係ALGOL 比較fake人
2.    以下邊樣係OS? UNIX, LINUX, MIMIX, ...,我答左unix+linux
3.    以下邊樣唔係two-form factor identification? password and person's secret, fingerprint and password, smart card and password, smart card and person's secret, Answer:password and person's secret
4.    Security 係睇邊三樣野? Confidentiality/Integrity/Availability
5.    RFID 用咩frequency?125/134 kHz (LF) or 13.56 MHz (HF)
6.    有乜野wireless 去到50 km? Wi-fi/bluetooth/wimax/none of the above, Answer:WiMax
7.    WPA2? 802.1x,原來係802.11i
8.    54MBps, 100m = 802.11g
9.    Web Services is ?
10.    Wireless Security 有乜野整﹖認Mac address,(有個選擇係話用WEP 唔用WPA2,梗係唔岩)
11.    AJAX Stands for? Asynchronous Javascript and XML
12.    SaaS = ? Software as a Service
13.    Digital Right Management 係乜﹖版權野
14.    Cloud Computing?
15.    Black Box Testing = ?
16.    ISO/IEC 10646? Universal Character Set
17.    Web Server to Web Browser Protocol? HTTP
18.    Sending Mail Protocol? SMTP
19.    Translate IP address? DNS
20.    Security 個 Protocol? SOAP/…,  Answer: Transport Layer Security Protocol
21.    OO Model
22.    Python? OO Language
23.    邊樣唔係network device? Switch/Router/Modem/Autoloader,擺明係autoloader
24.    Incident Analysis 有邊樣係?
25.    Incident Analysis deliverable?
26.    Use Case Model, business process model
27.    Function Point Analysis
28.    VPN = ? 應該係does not support public service
29.    PRINCE (PRoject In ???)
30.    有個Business process Analysis/ Function Analysis 排序。
31.    有一條有四個management揀?cost management/risk management/time management/ 仲有一個,我答左果個
32.    Quality management =? 唔肯定係咪ISO9000
33.    Project Stakeholder?User, project manager, supplier, computer operator??
34.    system Analysis & Design Q1
35.    system Analysis & Design Q2
36.    user test, system test and unit test
37.    Entity 係relational database 用乜野代表? Table/Column/Row
38.    1 個diagram,1 個department own one or more software
39.    Rapid Application Development Tool?
40.    有一條least relevant 我揀左IPv6
41.    Duration, Total float
42.    Testing 排次序答案為:
Unit Testing, Function Testing, System Testing, Acceptance Testing
43.    以下邊樣唔會initiate 一個新system? Top management 話要改野/一個desktop app 轉做 web interface/……
44.    以下邊樣係non-functional requirement? 我答左response within 10 seconds

Task Q:
English: IT 人應有特質,你點develop
中文:作為政府官員,給出解決數碼共融問題的建議

Edit:
原來個web有晒...=.=
http://www.ogcio.gov.hk/eng/prodev/eprodev.htm

Sunday, March 14, 2010

淺談本世紀最有可能被淘汰的職務

根據Harment Management的資料中,淺談本世紀最有可能被淘汰的職務,花點時間看完,相信對各位會有收獲的。

【首先,將遭淘汰的是技術含量偏 低的高薪職位者。】
如:人事經理、行政經理、高級秘書等。這類職務的工作內涵不太豐富,其高薪水準是前些年泡沫經濟的產物,也是前些年人才總量偏 少的緣故造成的。

【其次,是重複性較高的工作。】
一些工作看似複雜,但其實只需學上幾年,就能靠老本進行簡單的重複勞動。譬如某 銀行裡從事結匯,存放款等辦事的人員,實際上這類工作十年經驗與三年經驗幾乎是差不多的,後七年完全是重複勞動。

【第三,是僅掌握單一技 能的高薪者。】
只有一專多能者(一個主要專長+很多副專長)方能追逐高薪,而僅有一技之長者如電腦程式師、翻譯等職位的高薪者,要保持其高薪收入 已是岌岌可危,除非他們緊跟時代步伐,抓準時代脈動,不斷強化自身技能。

【第四,是電腦化後,複雜性、風險度、工作難度和大大降低的高薪 職位。】
如某些財務經理、生產經理、倉儲經理、品保經理等職位原本很複雜的一道道工作成現在開始被電腦的一個個模塊過程所逐步替代。

【第 五,是技術含量較高的新技術領域中掌握落後技術的高薪人員。】
舉例說,靠PC成為電腦人才的高薪收入者,未來若無法進入實力雄厚的大企業領域 IBM、AS400或P9000等大型機的新穎技術,最後只能在激烈的市場競爭中被淘汰。

【新定義的薪酬價值觀】
傳統的學歷、背 景、努力、能力等薪酬榜準,已逐漸被職能專才及智慧資產所替代,誰能改變市場生態,贏得勝利,他就是價值的代表。人力資源主管常常在召募新人時,會碰到一 個實際又矛盾的問題-要以什麼價值標準來用人呢?在候選名單中,往往有些人能力就是強,潛力就是好,可惜,薪水太貴,年資又太淺,找進來準會「壓死」現職 的同仁。在許多的考慮與妥協下,用人又回歸過去傳統的價值標準:高一點的學歷,久一點的專業背景,只為了維持眼睛看得見的公平,只為了在部門內,讓現職員 工能心服口服。這樣重重的考慮與妥協下,往往我們放棄了最好的人選,因為,價碼太貴,內部無法建立所謂「公平原則」;因為,資歷太淺,擔心新人壓過老人, 打擊士氣。

【你真正的價值在哪裡?】
圓山大飯店前總經理嚴長壽被工會公投罷免下台,其中一個原因是:工會不滿他削減員工福利,卻 高薪聘請兩位副總或執行副總進駐公司。從員工的眼光看來,這些領高薪的,或許只會打打高爾夫球,只會交際、應酬,而真正替顧客提供服務的是他們這群實際的 執行者,而不是那些坐領高薪的人,在薪資的分配上,是不公平的。這話說來,似有幾分道理,但從薪酬的角度來看,卻是錯誤的,因為薪酬的標準應該建立在真正 的價值上。

一個侍者為飯店服務役勞,假設他盡忠職守,作好每個侍者應有的職務動作與提供相對滿意的服務,為飯店帶來的實際價值是每月六萬 元,為了犒賞他,飯店每月給予侍者五萬五千元薪酬。而被認為坐領高薪的副總成執行副總,或許打高爾夫球,或許交際應酬,但他帶來的市場與價值,可能是每月 一千萬、兩千萬,那你覺得公司要怎麼犒賞他們呢?也是五萬五千元嗎?從甚麼價值觀點上,才是真正的公平呢?

【職能專才決定你的薪酬 】
吃 大鍋飯?或每人分一瓢羹的薪酬觀念?這些在現今的環境裡,已漸漸離我們遠去。舉一個有趣的例子來看。假設名節目主持人A與B,就主持能力來講,或許相當, 就長相來講,也算相當;但兩個人的主持價碼,卻相差懸殊,可能A一集主持費一百萬,而B卻只有六萬。其實他們的差異,就影視版的說法是知名度及卡司價碼不 同;就薪酬觀念是職能專才基(Competence-Based)不同。

經濟學的觀點說:「有一隻看不見的手在操縱著市場。」若你的薪酬 價碼是五萬元,只要有公司也願意用五萬元聘請你,你們就銀貨兩訖-成交;若你覺得你有五萬元的價碼,但沒有公司願意以此價碼延聘你,你就會在一次、兩次、 三次的面談中,把自己的價值妥協別人可以接受的價位,直到成交為止。若員工的價值已超過公司能給予的價碼,自然地,他會找到符合他薪資期望的公司,然後跳 槽。

【智慧資產取代學歷背景】
有一個薪資的觀念叫薪酬公平論(EquityTheory),每個人在市場的價值,好似一個銅板的 兩面,一面是你的學歷、背景、努力、能力等;另一面則是你的薪資價值。若銅板的一面重於另一面,市場就會藉著自然淘汰或自然流失,來改變這兩造差異。薪酬 公平論在環境的變遷與市場競爭下,傳統一面的學歷、背景、努力、能力等等,可能要被職能專才(Competence)及智慧資產 (Intellectual Capital)所代替。誰能改變市場生態,贏得勝利,他就是價值的代表。

許多人覺得他在公司的價值是「從 年輕到現在,這麼多年來,我把青春都奉獻在此,所以公司應該犒賞我」。就情感上來說,是的;但若員工二十年前的工作價值和二十年後的工作價值是一樣的,為 什麼公司要付兩倍的成本去養一個只要一倍薪水的員工?只因為這個員工沒有成長?個人的薪資標準應該建立在自由市場的價值上。若你在某公司得十萬元薪水,但 你辭職後,只能找到四萬元的工作,這差額代表你用你的年資與忠誠度換來的。公司經營狀況好的時候,你或許能生存;公司一旦遇到危機,你將是優先被考慮資遣 的對象。那時,你怨天尤人,覺得時不我予,可能都為時已晚。你對公司的價值,是否是可攜帶的價值(PortableValue)?這是每個現代員工應仔細 去思量的;再被僱用的能力 Employability),考驗著職場的芸芸眾生。

【懂得運用知識才是真正贏家】
聖經裡有一個絕 妙比喻:主人要往外國去,就叫僕人來,把家業「按個人才幹」給他們銀子,一個人五千,一個人兩千,一個人一千。領五千的僕人隨即拿錢去作買賣,另外賺了五 千;領兩千的僕人,也照樣賺了兩千;領一千的僕人則把銀子埋藏在地裡。過了些時日,主人回來和他們算帳。領五千、兩千的僕人,因為為主人增加了財富,受到 主人的款待又加派任務。那領一千的僕人則遭主人責罵:「你這又惡又懶的僕人!就是把銀子放給兌換銀兩的人,亦可連本帶利收回。」主子便把一千兩銀子奪回, 給了那原先五千兩銀子的僕人。每個人的價值,有如此例中的五千、兩千、一千,你是哪一種呢?

【你的附加價值(Value Added)在哪裡呢?】
工業時代,創造機器大量生產,擁有資金、設備,是有形的財富;在資訊網際網路化、組織扁平化的今天,資訊和知識成為競爭 利器。誰能改變現有的工作流程,不斷地創新,發明更具爆發力的產品,才能為組織帶來競爭力,帶來利潤。或許你從某大學或研究所畢業就非常地自滿,但今天所 有的學歷、背景僅是謀職的敲門磚,猶如五千、兩千、一千的才幹,真正的職場贏家,是那些學習能力絕佳,知道如何取得知識、儲存知識、善用知識並創造奇蹟的 人。

Wednesday, March 03, 2010

30個突破防火牆封鎖用的Web Proxy(陸續更新中)

30個突破防火牆封鎖用的Web Proxy(陸續更新中)


  • Web Proxy 網址:https://proxify.com/

  • Web Proxy 網址:http://www.gursimran6.info/

  • Web Proxy 網址:http://www.totalnetprivacy.com/

  • Web Proxy 網址:http://un-hider.com/

  • Web Proxy 網址:http://yfzo.com/

  • Web Proxy 網址:https://proxyplace.net/

  • Web Proxy 網址:http://hidingnow.com/

  • Web Proxy 網址:http://localbypass.com/

  • Web Proxy 網址:http://free-proxy.nl/

  • Web Proxy 網址:http://www.slyuser.com/

  • Web Proxy 網址:http://www.hide-me.org/

  • Web Proxy 網址:http://www.anonysurf.be/

  • Web Proxy 網址:http://hidemyip.eu/

  • Web Proxy 網址:http://2fastsurfer.com/

  • Web Proxy 網址:https://www.dtunnel.com/

  • Web Proxy 網址:http://www.proxeasy.com/

  • Web Proxy 網址:https://sslunblock.com/

  • Web Proxy 網址:https://freesslproxy.com/

  • Web Proxy 網址:http://www.twitterproxy.org/

  • Web Proxy 網址:http://www.heeky.com/

  • Web Proxy 網址:http://www.excellentunblock.info/

  • Web Proxy 網址:http://www.uraniumsource.com/

  • Web Proxy 網址:http://bluetun.info/

  • Web Proxy 網址:http://neot.info/

  • Web Proxy 網址:https://www.libertybell.biz/

  • Web Proxy 網址:http://www.secretlysurfing.info/

  • Web Proxy 網址:http://www.surfproxy10.info/

  • Web Proxy 網址:http://www.starter10.com/

  • Web Proxy 網址:http://www.blockthem.info/

  • Web Proxy 網址:http://www.shieldmagic.com/


  • Monday, March 01, 2010

    Windows XP - Copy list of filenames, folders to editable text, files

    Click Start -> Run -> Type cmd -> Hit Enter

    Run the Command cd {path.to.dir}


    When at the dir type the following command;

    dir /B > c:\output.txt 

    and hit enter.  This will create a file output.txt in the root 'c' dir with all the files names in the text file.

    Friday, February 26, 2010

    The Apache Cassandra Project - say goodbyte to Relational Database

    What is Cassandra?

    http://incubator.apache.org/cassandra/

    The Apache Cassandra Project develops a highly scalable second-generation distributed database, bringing together Dynamo's fully distributed design and Bigtable's ColumnFamily-based data model.

    • Proven Cassandra is in use at Rackspace, Digg, Facebook, Twitter, Cisco, Mahalo, Ooyala, and more companies that have large, active data sets. The largest production cluster has over 100 TB of data in over 150 machines.


    • Rich Data Model Allows efficient use for many applications beyond simple key/value.

    • Fault Tolerant Data is automatically replicated to multiple nodes for fault-tolerance. Replication across multiple data centers is supported. Failed nodes can be replaced with no downtime.


    • Highly Availabile Writes and reads offer a tunable ConsistencyLevel, all the way from "writes never fail" to "block for all replicas to be readable," with the quorum level in the middle.


    • Elastic Read and write throughput both increase linearly as new machines are added, with no downtime or interruption to applications.

    • Decentralized Every node in the cluster is identical. There are no network bottlenecks. There are no single points of failure.



    Why Git is Better than SVN

    from: http://zh-tw.whygitisbetterthanx.com/#cheap-local-branching

    使 Git 從幾乎所有其他 SCM 中脫穎而出,最受矚目的特色,恐怕非它的分支模型莫屬。 它完全不同於我在此一起比較的其他模型,大部分它們推薦的最佳分支方法僅僅只是複製倉儲 (repository) 到新的目錄而已。
    Git 可不這麼做。 Git 讓你可以擁有多個本地的分支,它們可能是完全獨立的,而且建立、合併和刪除這些開發的支線只需要幾秒鐘的時間。
    這表示你可以這樣做:
    • 建立一個分支來試試新點子,提交 (commit) 個幾次然後切回你原本的分支,加上一個 patch 然後再切回剛剛實驗用的分支,把它合併進來。
    • 有一個分支只用來放要釋出的版本,另一個用來合併開發中的部份供測試,其他幾 個小分支用來放每天的開發工作。
    • 替每一個你正在實做的新功能建立新的分支,然後你就可以平順的在它們之中切 換,最後刪除掉每一個新功能已經合併回主線的分支。
    • 建立一個新的分支做實驗,結果發現這樣行不通就刪掉這個分支;放棄一個分支, 甚至沒有任何人知道它曾經存在 (同時你還可以把其他的分支公佈出去)
    最重要的是,當你要發布到一個遠端的倉儲,你不需要把你所有的分支都推出去。 你可以只分享你的分支的其中一個而不是全部。這讓大家可以嘗試新的點子而不需要擔心要計劃要如何、何時合併或與其他人分享。
    你在其他系統上可以找到方法做同樣的事,但是會比較困難且 容易出錯。 Git 讓這個過程變得非常簡單,而且當開發人員開始學習,它常常會改變他們工作的方法。 
    這基本上對所有分散式 SCM 來說都是一樣的,但是在我的經驗中 Git 把這個特性發揮的更好。 除了 'fetch', 'pull' 和 'push' 這些命令外,幾乎沒有其他命令會需要硬碟之外的東西。
    這不只讓大部分操作變得比你可能習慣的還要快得多,它還讓你可以離線工作。 這聽起來也許沒有什麼,但是我總是驚訝於我有多麼常離線工作。 當你在飛機上或火車上,你還可以建立分支、合併和提交工作、瀏覽專案的歷史,這是多麼的有生產力。
     任何分散式 SCM,當然包括 Git,最酷的功能之一就是它是分散式的。 這表示你不是只 "checkout" 目前最新版的原始碼,而是 "clone" 整個倉儲。
    這表示甚至你是使用中央集中式的工作流程,每一位使用者都有會一份主伺服器的備份,每一份都可以在主伺服器當機或損壞時推上去取代主伺服器。 基本上使用 Git 不會因為遺失單一的點而造成災難,除非就只有那一個點。
    而且這不會使得操作變慢太多。平均來說,一次 SVN 的 checkout 只比其他 DSCM 快一點。 當然在我測試過的 DSCM 中,Git 是最快的。

    Some additional data:
    http://git-scm.com/tools


    Free/Paid source control hosting that using Git / SVN
    http://unfuddle.com/
    http://www.codebasehq.com/
    http://github.com/
    http://codaset.com/

    Thursday, February 25, 2010

    對 SQL 說不! NoSQL 的資料庫技術革命

    就像當年波士頓的愛國者為反抗英國重稅的行動一樣, NoSQL 的支持者們從各地湧來,分享他們如何推翻緩慢而昂貴的關聯式資料庫的暴政,怎樣使用更有效和更便宜的方法來管理資料,他們開始對 SQL 說不! NoSQL 組織上個月在三藩市的行動讓人聞到了資料庫革命的味道,好像一個現代 IT 業版的波士頓傾茶事件正在策劃之中。
    新聞來源: IT168
    對 SQL 說不! NoSQL 的資料庫技術革命

    新 聞來源: IT168

    就像當年波士頓的愛國者為反抗英國重稅的行動一樣, NoSQL 的支持者們從各地湧來,分享他們如何推翻緩慢而昂貴的關聯式資料庫的暴政,怎樣使用更有效和更便宜的方法來管理資料,他們開始對 SQL 說不! NoSQL 組織上個月在三藩市的行動讓人聞到了資料庫革命的味道,好像一個現代 IT 業版的波士頓傾茶事件正在策劃之中。

    NoSQL 運動的最新一次聚會中,來自世界各地的 150 人擠滿了 CBS Interactive 的一間會議室。

    就像當年波士頓的愛國者為反抗英國重稅的行動一樣, NoSQL 的支持者們從各地湧來,分享他們如何推翻緩慢而昂貴的關聯式資料庫的暴政,怎樣使用更有效和更便宜的方法來管理資料。雲計算可能會為資料庫技術的發展帶來 新的契機,如果想在雲中獲得豐富而隨需應變的可伸縮性,你需要一個非關聯式資料庫。

    「關聯式資料庫給你強加了太多東西。它們要你強行修改 物件資料,以滿足 RDBMS (Relational Database Management System,關聯式資料庫管理系統)的需要,」Java 工具提供商 SpringSource 公司的首席工程師 Jon Travis 說,他是本次集會的 10 位發言人之一,在他看來,基於 NoSQL 的替代方案「只是給你所需要的」。

    開源的興起

    反 SQL 運動的主要宣導者都是 Web 和 Java 開發者,他們中許多人都在創業的初期歷經了資金短缺並因此與 Oracle 說再見,然後效仿 Google 和 Amazon 的道路建設起自己的資料存儲解決方案,並隨後將自己的成果開源發佈。現在,他們的開來源資料商店管理著成百 TB 甚至 PB 的資料,由於 Web 2.0 和雲計算的興起,無論從技術上還是從經濟上他們都無需再返回從前,甚至連想也不用想。

    「Web 2.0 的企業應該抓住機會,他們需要可擴展性,」總部設在倫敦的 NoSQL 會議組織者 Johan Oskarsson 說,他任職於著名的音樂網站 Last.fm ,其他的大多數與會者也都是網路開發者。

    Oskarsson 說,許多人甚至拋棄了 MySQL 資料庫這個長期以來 Web 2.0 的寵兒,而改由 NoSQL 的方案來替代,因為優勢實在是引人注目。 51CTO.com 之前曾報導過 MySQL 創始人宣佈創建開放源碼資料庫聯盟的消息,過度的商業化是 MySQL 失去原來的優勢。

    例如 Facebook 建立了自己的 Cassandra 資料商店並且在其網站上重點推出一項新的搜索功能,沒有使用到現有的 MySQL 資料庫。據 Facebook 的工程師 Avinash Lakshma 介紹, Cassandra 僅用 0.12 毫秒就可以寫入 50GB 的資料,比 MySQL 快了超過 2500 倍。 Google 也開始公測他們的雲資料庫 Fusion Tables ,這是一個和傳統資料庫完全不同的資料庫,主要優勢能夠簡單的解決關係型數據庫中管理不同類型資料麻煩,以及排序整合的常見操作的性能問題等。

    什 麼是 NoSQL (從技術上說)?

    從這些 NoSQL 項目的名字上看不出什麼相同之處: Hadoop 、 Voldemort 、 Dynomite ,還有其它很多。

    但是,它們通常在某些方面相同:

    不要叫它們資料庫。 Amazon.com 的首席技術官 Werner Vogels 將他們的重要的 Dynamo 系統稱作「高可用性的鍵值商店」。 Google 將自己的 BigTable 稱作「管理結構化資料的分散式存儲系統」,在 51CTO.com 之前的外電《雲服務顛覆開發傳統觀念》中曾提到, Google 的 BigTable 不是 SQL 資料庫,原因是 SQL 資料庫支援的一些功能實在難以進行分割,這與我們跨機器存儲資料的想法無法結合。它們都是許多 NoSQL 追隨者的效仿模式。

    它們可以處理超大量的資 料。比如 Zvents 公司以 BigTable 模式搭建的開來源資料庫 Hypertable ,據 Zvents 工程師 Doug Judd 介紹,它可以每天在搜尋引擎中寫入 10 億單中繼資料。

    另外, BigTable 與其姊妹技術 MapReduce 相結合,每天可以處理多達 20PB 的資料。

    「毫無疑問,資料量越來越巨大也讓人們尋找其他的資料庫替代技術,」 SpringSource 的 Travis 說。

    它們運行在便宜的 PC 伺服器集群上。 PC 集群擴充起來非常方便並且成本很低,避免了「sharding」操作的複雜性和成本。

    Google 曾表示一個 BigTable 的大集群可以管理數千台伺服器上多達 6PB 的資料。

    「Oracle 會告訴你需要購買一些硬體然後正確配置 Oracle RAC ,然而用其他的神奇軟體你也可以達到相同的可擴展性。但是兩者的開銷可是天差地別。」 SpringSource 首席技術官 Javier Soltero 說。

    它們擊碎了性能瓶頸。 NoSQL 的支持者稱,通過 NoSQL 架構可以省去將 Web 或 Java 應用和資料轉換成 SQL 友好格式的時間,執行速度變得更快。

    「SQL 並非適用於所有的程式碼,」資料庫分析師 Curt Monash 說。對於那些繁重的重複操作的資料, SQL 值得花錢。但是當資料庫結構非常簡單時, SQL 可能沒有太大用處。

    Adobe 公司資深電腦科學家 Raffaele Sena 說,當一年半前 Adobe 準備重新更新 ConnectNow 網路協作服務時,正是由於上面的理由,他們決定不採用關係型數據庫。

    Adobe 決定使用 Terracotta 提供的 Java 集群軟體,管理 Java 格式的資料, Sena 說,這使 ConnectNow 的性能提高到前一版本的 2 至 3 倍。

    沒有過 多的操作。雖然 NoSQL 的支持者也承認關聯式資料庫提供了無可比擬的功能集合,而且在資料完整性上也發揮絕對穩定,他們同時也表示,企業的具體需求可能沒有那麼多。

    以 Adobe 的 ConnectNow 為例, Sena 說,當用戶線上時它會不通過資料庫而製作三份會話資料,在離線後刪除。「因此我們並不需要資料庫,因為具體所需要的資料是在記憶體中的,」他說。

    Bootstrap 支持

    因為 NoSQL 項目都是開源的,因此它們缺乏供應商提供的正式支援。這一點它們與大多數開源項目一樣,不得不從社區中尋求支持。

    但是一些人承認,沒有正 式的官方支持,萬一出了差錯會是可怕的,至少很多管理人員是這樣看。

    「我們確實需要做一些說服工作,」 Adobe的Sena 承認,「但基本在他們看到我們的第一個原型運行良好之後,我們就能夠說服他們,這是條正確的道路。」

    「大多數大型企業已經習慣於使用關係 型數據庫管理系統。因此他們會想為什麼要改變呢?」 Monash 說。比如 MapReduce 和類似的項目「對企業有意。但是在具體使用時,它很可能會和一個分析 DBMS (資料庫管理系統)相集成。」

    即使 NoSQL 的組織者 Oskarsson 也承認,就算是他自己的公司 Last.fm 也還沒有做好轉為 NoSQL 替代者的準備,現在依然在使用開放源碼資料庫。

    他認為這場革命目前仍然需要等待。
    http://www.computerworld.com/s/article/9135086/No_to_SQL_Anti_database_movement_gains_steam_

    No to SQL? Anti-database movement gains steam

    But can enterprises take open-source alternatives Hadoop, Voldemort seriously?

    Sunday, February 07, 2010

    黎明 指泰利女友需負責

    黎明(Leon)昨晚到灣仔會展演出新城《情人節 iDO音樂會》,大談近日熱爆球壇的車路士隊長泰利被揭發搭上國家隊隊友前女友的醜聞。

    Leon 在台上說:「度門應有人守住,但係又畀泰利入去,冇撬門撞門,自動開門畀佢入去,泰利係第一個錯,但第二個係咪開門,佢都有少少唔啱,兩個都唔啱。」

     http://hk.apple.nextmedia.com/realtime/art_main.php?iss_id=20100207&sec_id=7018882&art_id=13707177

    Saturday, February 06, 2010

    ACM国际大学生程序设计大赛总决赛2010结果公布

    ACM国际大学生程序设计大赛总决赛2010结果公布

    The ACM-ICPC International Collegiate Programming Contest 2010 Final Results
     
    http://cm.baylor.edu/ICPCWiki/Wiki.jsp?page=Results%20World%20Finals%202010 

     

    PlaceNameSolvedTime
    1Shanghai Jiaotong University7778
    2Moscow State University7940
    3National Taiwan University6779
    4Taras Shevchenko Kiev National University6928
    5Petrozavodsk State University6985
    6Tsinghua University6998
    7Saratov State University61010
    8University of Warsaw61042
    9St. Petersburg State University61042
    10Zhongshan (Sun Yat-sen) University61049
    11Fudan University61114
    12KTH - Royal Institute of Technology61265
    13Ural State University61312
    14Beijing University of Posts and Telecommunications5 
    14Belarusian State University5 
    14Carnegie Mellon University5 
    14Cornell University5 
    14Instituto de Matemática e Estatística da Universidade de São Paulo5 
    14Kyoto University5 
    14Massachusetts Institute of Technology5 
    14National Technical University "Kharkiv Polytechnic Institute"5 
    14Novosibirsk State University5 
    14Peking University5 
    14Samara State Aerospace University5 
    14Seoul National University5 
    14St. Petersburg State University of IT, Mechanics and Optics5 
    14Stanford University5 
    14State University - Higher School of Economics5 
    14Universidade Federal de Pernambuco5 
    14University of British Columbia5 
    14University of Maryland5 
    14University of Michigan at Ann Arbor5 
    14University of Tokyo5 
    14University of Waterloo5 
    14University of Wroclaw5 
    36Amirkabir University of Technology4 
    36Bangladesh University of Engineering and Technology4 
    36Beijing Jiaotong University4 
    36Chinese University of Hong Kong4 
    36Columbia University4 
    36Facultad de Matemática - Astronomía y Física (UNC)4 
    36Friedrich-Alexander-University Erlangen-Nuremberg4 
    36Institute of Computing - University of Campinas4 
    36Instituto Tecnológico de Aeronautica4 
    36International Institute of Information Technology - Hyderabad4 
    36Izhevsk State Technical University4 
    36National Institute of Technology, Trichy4 
    36National University of Defense Technology4 
    36Sharif University of Technology4 
    36Sogang University4 
    36Southeast University4 
    36Ufa State Technical University of Aviation4 
    36Universidad Nacional de La Plata4 
    36Universitat Politècnica de Catalunya4 
    36University of Electronic Science and Technology of China4 
    36University of Helsinki4 
    36University of the Philippines - Diliman4 
    36Wuhan University4 
    36Xidian University4 
    36Zhejiang University4 
    36École Normale Supérieure ULM4 
    Honorable Mention
    American University of Beirut DJ Sanghvi College of Engineering
    Duke University Faculty of Computers and Information, Cairo University
    Florida Institute of Technology Fuzhou University
    Guangdong University of Technology Hangzhou Dianzi University
    Harbin Engineering University Harbin Institute of Technology
    Harvey Mudd College Ho Chi Minh City University of Science
    ITESM Campus Queretaro Korea Advanced Institute of Science and Technology
    National Chiao Tung University National University of Singapore
    Northwestern College Pontificia Universidade Catolica do Rio de Janeiro
    South China Agricultural University The British University in Egypt
    The University of Texas at Austin The University of Western Australia
    Universidad Central Marta Abreu de las Villas Universidad Simón Bolívar
    Universidad de Buenos Aires - FCEN Universidad de Guanajuato
    Universidad de los Andes Universidade Federal de Santa Catarina
    Universidade Federal de Sergipe University of Alberta
    University of Canterbury University of Cape Town
    University of Central Florida University of Chicago
    University of Illinois at Urbana-Champaign University of Kentucky
    University of Nebraska - Lincoln University of North Texas
    University of Rochester University of Virginia
    University of Wisconsin - Madison Zhejiang University of Technology
    RegionChampion
    Africa and the Middle EastThe British University in Egypt
    AsiaShanghai Jiaotong University
    EuropeMoscow State University
    Latin AmericaUniversidade Federal de Pernambuco
    North AmericaStanford University
    South PacificThe University of Western Australia

    Friday, February 05, 2010

    Microsoft Visual Studio 2008 Professional Docking Bugs

    Microsoft Visual Studio 2008 Professional Docking Bugs


    When the control using property "Docking", the control's size will be automatically changed by Visual Studio during design time.



    This will make the programmer confusing as there will be a star indicating that the source code was changed.....

    Bug!

    Monday, January 25, 2010

    The Open Source Development Environment for .NET

    The Open Source Development Environment for .NET

    A free replacement of Microsoft Visual Studio  .NET

    #develop (short for SharpDevelop) is a free IDE for C#, VB.NET and Boo projects on Microsoft's .NET platform. It is open-source, and you can download both sourcecode and executables from this site. In addition, you can find the latest information and changes on #develop, as well as get in touch with the team in the forum.

    URL:
    http://www.icsharpcode.net/OpenSource/SD/

    Web Converter : Convert C# to VB.NET or Convert VB.NET to C# on the fly!!

    http://www.developerfusion.com/tools/



    http://www.developerfusion.com/tools/convert/csharp-to-vb/



    http://www.developerfusion.com/tools/convert/vb-to-csharp/

    Sunday, January 24, 2010

    [MSN] 找出Windows Live Messenger 2009 (MSN 9.0)存放顯示圖片資料位置!

    剛剛在找Windows Live Messenger 2009 (MSN 9.0)中存放顯示圖片的位置,
    因為2009新增了使用視訊 webcam拍攝立刻當顯示圖片的功能,
    所以我想找到剛剛拍的圖片位置, 卻google老半天而且上批踢踢也查不到。
    正所謂靠人人跑, 靠山山倒,
    於是我自力救濟找到了存放的位置。

    Saturday, January 09, 2010

    陈巧文:日后就算入狱,还有千千万万个陈巧文





    即时港闻
    陈巧文:
    拘捕事件实属阴谋
    2010年01月09日 (04:04 pm)

    陈巧文强调今次事件不会击倒她,日后就算入狱,还有千千万万个陈巧文。
    资料图片

    陈巧文形容今次被捕事件实属阴谋,质疑警方於敏感时间採取拘捕行动,有意借此阻嚇参与示威的公眾。

    陈补充,警方至今未有提供指控她袭警的证据,强调今次事件不会击倒她,日后就算入狱,还有千千万万个陈巧文。

    http://hk.apple.nextmedia.com/realtime/art_main.php?iss_id=20100109&sec_id=6996647&art_id=13609548