減肥人的福音~~ skinnyr 每天記錄你的體重~並且顯示線型圖

如果你跟我一樣~~是個為了體重而困擾的人

(不過~ 我那麼胖~~ 可能罪惡感比較少~~)

http://www.skinnyr.com/ 就是個相當好的一個網站~~

它提供了一個簡單但是對於減肥的人非常重要的功能~~

每天提供線型圖~~ 告訴你~~ 你的體重~~ 是在增加~~還是在減少~~

並且也可以放在BLOG上面~~ 大家就去參考一下吧~~~~

Write a simple Windows SideShow program

筆記型電腦上的 Windows SideShow

Windows SideShow is a new technology in Windows Vista that supports a secondary screen on your mobile PC. With this additional display you can view important information whether your laptop is on, off, or in sleep mode. Windows SideShow is available in Windows Vista Home Premium, Windows Vista Business, Windows Vista Enterprise, and Windows Vista Ultimate. For more detail, please refer http://www.microsoft.com/windows/products/windowsvista/features/details/sideshow.mspx

For Engineer to development a simple SideShow program:

  1. Make sure you using Vista RTM
  2. Download SideShow emulator: http://www.microsoft.com/downloads/details.aspx?FamilyID=bba99eb2-aa6d-4133-b433-933a2c4d41dc&displaylang=en
  3. Install VS2005.
  4. Install Windows Vista SDK and .NET (http://www.microsoft.com/downloads/details.aspx?FamilyId=C2B1E300-F358-4523-B479-F53D234CDCCF&displaylang=en)
  5. Open solution: C:Program FilesMicrosoft SDKsWindowsv6.0SampleswinuisideshowHelloWorldHelloWorld.sln
  6. Build it
  7. Run registery “HelloWorld.reg”
  8. Run bin file in C:Program FilesMicrosoft SDKsWindowsv6.0SampleswinuisideshowHelloWorldDebugWindowsSideShowHelloWorld.exe
  9. Start Emulator, you should show “Hello World” here.~~~

Windows SideShow 頁面

Write simple WMI program


(Diagram: 淺談CIM與WMI-名詞介紹)

WMI (Windows Management Instrumentation) provide a kind of easy way to let you query data from your system (Ex: OS version, share folder name … etc).

It is easy to understand, using WMI to query information is the same with query data from database. You can just using “SELECT * from Win32_Process” to find out all exist process in your computer.

There are some examples which describe how to create it using C# or C++ code.

  1. Example: Creating a WMI Application(C++)

  2. WMI Sample  (using C#)

There are serveral extension reading..

Here is sample code of C#

using System.Management; //This is equivalent to "SELECT * FROM Win32_Service" SelectQuery sysSQL = new SelectQuery("Win32_bios"); > > MnagementObjectSearcher sysRet =    new ManagementObjectSearcher(sysSQL); > > // Display each entry for Win32_bios foreach (ManagementObject sysInfo in sysRet.Get()) {   this.textBox1.Text = "Bios version: " + sysInfo["version"].ToString(); } > >

用網球打開你的車子

Blondie Unlocks Car - The funniest videos are a click away

這部影片有點小嚇人~~ 嚇人的不是那個拿著網球的美少女會把網球吃掉~~ 而是~~ 他要表演一個很特別的表演~~

(高雄十八招??) ㄟ~~~ 你的眼神色色的

他要表演的是~ 一個防護再好的車子~~~ 只要用一顆網球就可以打開~~ 不過~~ 應該是只有舊的車子才會吧??

Komica 是個搞笑的成句大集合

1173017335499.jpg

或許你可以不知道”丁丁是個人才” 這個笑點是從何而來的~~~ 但是Komica這個網站你卻不可不去~~~ 裡面真的有太多好笑的東西了~  這裡舉幾個例子好了

  • 人中出呂布,馬中出赤兔_:
    _光看可能看不懂~ 但是 想低級一點~ 就會覺得 怎麼那麼好笑 。 是一個糟糕斷句,斷法如下:「人,中出呂布;馬,中出赤兔。」

  • 龍五的手上只要有槍,誰都殺不了他
    語出:出自電影《賭俠》中的台詞。
    用法:當某人在特定條件下可以達到某種境界的時候可以用。

剩下的~~大家自己去看吧~~~~~~

說好~~ 不提261的~~~~~~~  XD

 

How to debug COM DLL registeration

DebugSetting1

I know many people feel confuse if your COM DLL failed during registeration (using RegSvr32 to register it). I spent a little time, and find out how to debug it. It can help you to find out what is the root cause. OK! let get start.

How can we do if register COM dll failed? > >

Firstable, you can use “dumpbin /dependents YOURDLL.DLL” to find out if you lost some dependency DLL.

Ok! ~~ let go to debug DLL registeration.

  1. Right click you DLL project –> Open “Properties”.
  2. Go to “Configuration Properties” –> “Debugging” .
  3. In “Command”, fill it “C:WINDOWSsystem32regsvr32.exe”
  4. In “Command Arguments”, fill it “$(TargetPath)”
  5. Just press F5 to run it.

Please note, you should setting break point as follows:

  • DllMain
  • DllRegisterServer
  • DllUnregisterServer (if unregister failed).

That’s it~~~