>>>>>>>>>>>>>>>>>>>>>>> Sep 11 2012 <<<<<<<<<<<<<<<<<<<<<<<<<
1. 有關隨機出現的記憶體錯誤:多執行緒、多C庫交叉呼叫、堆溢位/越界
2. Is it legal (and moral) for a member function to say delete this?
Here's how I define "careful":
- You must be absolutely 100% positively sure that this object was allocated via new (not by new[], nor by placement new, nor a local object on the stack, nor a global, nor a member of another object; but by plain ordinary new).
- You must be absolutely 100% positively sure that your member function will be the last member function invoked on this object.
- You must be absolutely 100% positively sure that the rest of your member function (after the delete this line) doesn't touch any piece of this object (including calling any other member functions or touching any data members).
- You must be absolutely 100% positively sure that no one even touches the this pointer itself after the delete this line. In other words, you must not examine it, compare it with another pointer, compare it with NULL, print it, cast it, do anything with it.
>>>>>>>>>>>>>>>>>>>>>>> Sep 11 2012 <<<<<<<<<<<<<<<<<<<<<<<<<
1. windows 中可以使用nul實現/dev/null的效果,nul是windows保留的裝置名稱,不可作為檔名,開啟該檔案語義為開啟該裝置檔案
>>>>>>>>>>>>>>>>>>>>>>> Sep 28 2012 <<<<<<<<<<<<<<<<<<<<<<<<<
1. 編輯距離:讓兩個字串相等所需要的最小步數
>>>>>>>>>>>>>>>>>>>>>>> Sep 29 2012 <<<<<<<<<<<<<<<<<<<<<<<<<
1. 讓vs丟擲浮點數除0異常方法:
#include <float.h>
int cw = _controlfp(0,0);
cw &= ~(EM_OVERFLOW | EM_UNDERFLOW | EM_INEXACT | EM_ZERODIVIDE | EM_DENORMAL | EM_INVALID);
_controlfp(cw,MCW_EM);
>>>>>>>>>>>>>>>>>>>>>>> Sep 30 2012 <<<<<<<<<<<<<<<<<<<<<<<<<
1. 什麼是縱向擴充套件、橫向擴充套件。擴充套件現有系統的兩種策略,舉個例子,現有的機器處理不了我目前的問題(不夠快,儲存不夠)
>> 縱向擴充套件/Scale up/ Scale Vertically: 擴充套件現有機器,更多的CPU、記憶體
>> 橫向擴充套件/Scale out/Scale Horizonally: 新增新的機器