2009/10/14

PS3 Card 哼哼

farlandx

終於在上星期五(2009/10/09)三機制霸了! 真開心~
這是我的玩家卡XD

2009/09/15

抓yam天空部落mp3的方法

將原網址 http://mymedia.yam.com/m/#####
改為 http://mymedia.yam.com/api/m/?pID=##### 就能看到mp3路徑了

2009/08/03

XP舊注音輸入法

載點

果然還是舊的輸入法好用,Windows 7和VISTA的注音10.0實在很難用

2009/08/02

生平第一台NB - SONY VAIO SR46TD/B入手


嗯...又敗家了XD
不過這台用起來還滿順手的,巧克力按鍵好棒喔!!

2009/07/24

MessageBoxTimeout

using System.Runtime.InteropServices;
using System.Threading;

class MessageBoxTimeout
{
[DllImport("kernel32.dll")]
private static extern uint GetCurrentThreadId();
private delegate int EnumWindowsProc(IntPtr hWnd, IntPtr lParam);

[DllImport("user32.dll")]
private static extern bool EnumWindows(EnumWindowsProc lpEnumFunc, IntPtr lParam);

[DllImport("user32.dll", SetLastError = true)]
private static extern uint GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId);

[DllImport("user32.dll")]
private static extern int GetClassName(IntPtr hWnd, [Out] StringBuilder lpClassName, int nMaxCount);

[DllImport("user32.dll")]
private static extern bool IsWindowEnabled(IntPtr hWnd);

[DllImport("user32.dll", SetLastError = true)]
[return: MarshalAs(UnmanagedType.Bool)]

private static extern bool PostMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);

private class TimerThread
{
private readonly DateTime timeoutTime;
private readonly uint currentThreadId;
private bool terminateFlag;
private readonly Thread thread;

public TimerThread(int timeoutMillisec)
{
timeoutTime = DateTime.Now.AddMilliseconds(timeoutMillisec);
currentThreadId = GetCurrentThreadId();
terminateFlag = false;
thread = new Thread(ThreadProc);
thread.Start();
}

private void ThreadProc()
{
while (!terminateFlag)
{
Thread.Sleep(100);
if (DateTime.Now > timeoutTime)
{
EnumWindows(EnumWindowsProc, new IntPtr(0));
return;
}
}
}

private int EnumWindowsProc(IntPtr hWnd, IntPtr lParam)
{
uint processId;
uint threadId;
threadId = GetWindowThreadProcessId(hWnd, out processId);
if (threadId == currentThreadId)
{
StringBuilder className = new StringBuilder("", 256);
GetClassName(hWnd, className, 256);
if (className.ToString() == "#32770" && IsWindowEnabled(hWnd))
{
const int WM_COMMAND = 0x111;
PostMessage(hWnd, WM_COMMAND, new IntPtr(2), new IntPtr(0));
return 0;
}
}
return 1;
}

public void Terminate()
{
terminateFlag = true;
thread.Join();
}
}

public static DialogResult Show(string text, int timeoutMillsec)
{
TimerThread tt = new TimerThread(timeoutMillsec);
try
{
return MessageBox.Show(text);
}
finally
{
tt.Terminate();
}
}

public static DialogResult Show(string text, string caption, int timeoutMillsec)
{

TimerThread tt = new TimerThread(timeoutMillsec);
try
{
return MessageBox.Show(text, caption);
}
finally
{
tt.Terminate();
}
}

public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, int timeoutMillsec)
{
TimerThread tt = new TimerThread(timeoutMillsec);
try
{
return MessageBox.Show(text, caption, buttons);
}
finally
{
tt.Terminate();
}
}

public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, int timeoutMillsec)
{
TimerThread tt = new TimerThread(timeoutMillsec);
try
{
return MessageBox.Show(text, caption, buttons, icon);
}
finally
{
tt.Terminate();
}
}

public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, int timeoutMillsec)
{
TimerThread tt = new TimerThread(timeoutMillsec);
try
{
return MessageBox.Show(text, caption, buttons, icon, defaultButton);
}
finally
{
tt.Terminate();
}
}

public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, int timeoutMillsec)
{
TimerThread tt = new TimerThread(timeoutMillsec);
try
{
return MessageBox.Show(text, caption, buttons, icon, defaultButton, options);
}
finally
{
tt.Terminate();
}
}
}

2009/07/05

今天終於實現我小小的夢想了

Photobucket
這顆樹上爬滿了松鼠,雖然拍到的不多,但上面確實有將近10隻哦!!

小時候每週日老媽都會帶我跟我弟到台北靈糧堂做禮拜
討厭基督教的我,總是會在兒童主日學開始的時候逃出去亂逛
但那附近只有一個地方能讓我逛,就是大安森林公園

當時的大安森林公園才剛開始建設,很多樹都是剛移過去
所以整遍地看起來一點也沒有森林的感覺
從那時我就在心中默默許下一個願望「將來等這些樹長大我一定要來做森林浴」
之前想到這個願望的時候總是沒辦法過來

直到今天......終於實現我小小的夢想了!
果然樹都長高的樣子很棒,在雨後的樹林中漫步也很浪漫
且身旁有一個很重要的人陪著,讓我洗了一個很棒的森林浴:D

2009/06/18

夢幻逸品 - N97 <我的第一篇超不專業開箱文>

※手邊沒有好的DC或任何好的拍照工具,只好以NOKIA 5310來拍了orz,傷眼請見諒

Photobucket
主角N97與moshi ipouch手機袋的袋子

Photobucket
N97的盒子非常普通,卻散發著獨特的魅力

Photobucket
IME code,一定要拍一下的啦...雖然不知道為什麼XD

接著,我的心跳以每秒20下的心跳緩緩地打開盒蓋,那種感覺就像剛做過一樣.....

Photobucket
瞎米!?竟然還有一層!再看著上面的NOKIA.COM.TW貼紙...
彷彿好不容易解開眼前女孩的薄衫,沒想到裡面還穿著一件只印有YG mark的阿嬤衣一樣

沒關係,再接再厲...

Photobucket
終於見到它了! N-9-7!! 我夢寐以求的手機啊!!!
旁邊是隨機附贈的觸控筆和電池,這觸控筆的造型還挺酷的,光看外表還真看不出來呢

Photobucket
壓在下面的配件們與說明書,還有papago的sn哦!(啊,有手震)

Photobucket
來一張大合照~

Photobucket
N97與未拆封的moshi ipouch

Photobucket
將N97穿上衣服,充滿魅力與神秘感的完全黑色正是我的style!


小小的把玩了一下N97,到目前為止果然沒讓我失望
沒有網路上看見的滑蓋軸組裝問題,沒有白畫面的斑馬紋,手機鎖解開背光不亮只是設定問題
手機重量也比離開不久的X1輕好多
剛從WM轉到S60更不會感覺到任何LAG,操作順暢度就如同我的眼淚...停不下來啊啊啊啊啊!!

不愧是讓我賣了一堆東西才得到的夢幻逸品 - N97