2011年12月13日 星期二

[轉貼] Oracle SQL Developer Tutorial ((Useful~

Vincent Wang已在Google+和你分享訊息。 Google+ 讓你在網路上體驗有如現實生活般的分享樂趣。 瞭解詳情
加入 Google+
這是系統通知訊息:Vincent Wang與uniquesky1.annie@blogger.com分享了這個項目。 取消訂閱這些電子郵件。

2011年9月16日 星期五

SIP Intro --- Subscription (待補充)

Subscription

這牽涉到了Subscriber與Notifier的概念(定義在RFC3265),而會講到這個是因為REFER的這份而另外跳脫出來說明這個部分,以下將介紹這個觀念與例子。


Subscriber Notifier
|--SUBSCRIBE->| Request state subscription
|<----200-----| Acknowledge subscription
|<---NOTIFY---| Return current state information
|------200--->|
|<---NOTIFY---| Return current state information
|-----200---->|


主要概念是Subscriber要向Notifier要求回報某一個resource的狀態,當Notifier接受要求後,就開始對Subscriber定期回報此resource的狀態,直到subscription到期為止或者Subscriber要求停止或者此資源已消失為止。

這裡的Subscriber與Notifier只是方便說明而設立的角色名稱,並沒有限制要什麼樣的UA。

這部分有點多,仍在study中...待補充...

2011年7月28日 星期四

How to add lib to your MSVS

Add library to visual studio 2008 project

設置的地方在此

Project Properties / Configuration Properties / Linker / Input / Additional Dependencies
(專案>屬性>組態屬性>連結器>輸入>其它相依性)





加入所要加入的lib,如下
"c:\visa\visa32.lib"
及可!

2011年7月21日 星期四

2011年5月16日 星期一

[轉貼]Emesene 2於Ubuntu上安裝方式

原文網址Install Emesene 2 (2.11.4) in Ubuntu

由於使用Ubuntu內建的Ubuntu軟體中心安裝的是舊版的Emesene,所以上網找了一下方法來安裝Emesene 2。

我使用的環境是Ubuntu 10.04 32-bit

方式簡略如下
(若已安裝舊版的Emesene,請先移除)
1. 打開terminal

2. 依序輸入下列指令
   sudo add-apt-repository ppa:webupd8team/unstable
   sudo apt-get update
   sudo apt-get install emesene
(若已是root權限,以上指令可不用加sudo)

3. 當提示詢問是否安裝時,請輸入Y即可

2011年4月8日 星期五

BCB TStringGrid之ScrollBar自動捲動方式

在BCB中若要使TStringGrid程式控制上下捲動,我在網路上找了很久,可用下列function來達成

SendMessage(TStringGrid->Handle, WM_VSCROLL, SB_LINEDOWN, 0);

主要可變動的參數式SB_LINEDOWN,有以下選擇



SB_BOTTOM 
  Scrolls   to   the   lower   right. 
SB_ENDSCROLL 
  Ends   scroll. 
SB_LINEDOWN 
  Scrolls   one   line   down. 
SB_LINEUP 
  Scrolls   one   line   up. 
SB_PAGEDOWN 
  Scrolls   one   page   down. 
SB_PAGEUP 
  Scrolls   one   page   up. 
SB_THUMBPOSITION 
  The   user   has   dragged   the   scroll   box   (thumb)   and   released   the   mouse   button.   The   high-order   word   indicates   the   position   of   the   scroll   box   at   the   end   of   the   drag   operation. 
SB_THUMBTRACK 
  The   user   is   dragging   the   scroll   box.   This   message   is   sent   repeatedly   until   the   user   releases   the   mouse   button.   The   high-order   word   indicates   the   position   that   the   scroll   box   has   been   dragged   to. 
SB_TOP 
  Scrolls   to   the   upper   left.

2011年4月6日 星期三

在BCB中之ComPort 設定

來源網址 

找了很久才找到的解法~

在BCB 6.0中,若使用ComPort 4.11,設定Port時所遇到的問題。
錯誤訊息大致如下

unresolved external ...fastcall SetPortA...

而錯誤的程式碼如下

ComPort->Port = "COM8";

解決方式就是修改
C:\Program Files\Borland\CBuilder6\Include\winspool.h

在此檔案找到下面內容


BOOL

WINAPI

SetPortA(

IN LPSTR     pName,

IN LPSTR     pPortName,

IN DWORD       dwLevel,

IN LPBYTE      pPortInfo

);

BOOL

WINAPI

SetPortW(

IN LPWSTR     pName,

IN LPWSTR     pPortName,

IN DWORD       dwLevel,

IN LPBYTE      pPortInfo

);

#ifdef UNICODE

#define SetPort  SetPortW

#else

#define SetPort  SetPortA

#endif // !UNICODE

然後在頭尾分別加上

#ifdef DONT_USE_WINSPOOL_SETPORTA


#endif //!DONT_USE_WINSPOOL_SETPORTA
成為

#ifdef DONT_USE_WINSPOOL_SETPORTA
SetPortA(
...
...
#endif // !UNICODE
#endif //!DONT_USE_WINSPOOL_SETPORTA
存檔後,重新compile即可。

2011年2月12日 星期六

在Ubuntu上安裝Qt之基本lib pkg


在configure Qt之前最好先安裝以下pkg


sudo apt-get install libX11-dev libXext-dev libXtst-dev libxrender-dev

2011年2月8日 星期二

[轉貼]How to set timer in mfc dialog?



原文網址

重點
1. 主程式 .cpp 裡要有ON_WM_TIMER()
// Message Map
BEGIN_MESSAGE_MAP(CDlgDlg, CDialog)
    ...
    ON_WM_TIMER()
END_MESSAGE_MAP()
2.  要在.h 裡宣告OnTimer( UINT nIDEvent),此為Default callback function
// Timer Handler.
void CDlgDlg::OnTimer( UINT nIDEvent )

3. 設定timer可指定ID (即此timer的event ID),藉以在收到多個timers時區分
// Timer Handler.
    SetTimer( ID_TIMER_MINUTE, 60 * 1000, 0 );
    SetTimer( ID_TIMER_SECONDS, 1000, 0 );)
4. timer單位mini sec

2011年1月27日 星期四

Enable Ctrl-Alt-Del log-in window in Windows 7

Go to the old Start button, now just a Windows logo. In the search box, type netplwiz and press enter or click on the result.

2011年1月20日 星期四

[轉貼] Ubuntu 安裝 黑屏問題


在HP TouchSmart tm2 機器上嘗試安裝Ubuntu,安裝過程中出現黑屏之解決方式 


黑屏情況
用CD開機(or USB)的時候,進入選單安裝時即黑屏 或 載入安裝資料後即黑屏

以下是我的情況(參照原文網址的解法)


ubuntu安裝
1.開機後,一出現畫面時按鍵盤任一鍵,使ubuntu的安裝選單畫面出來
2.選完語言後再用上下鍵移動光條選到安裝的選項, 然後按下F6鍵, 勾選nomodeset,再按esc跳出來.
3.這個時候螢幕下方會有一行"開機選項",後面跟著一串能編輯的文字, 請找到"quite splash --",
並在splash這個字之後空一格, 輸入xforcevesa
4.按enter繼續執行試用或安裝.



安裝完系統,重開機,進入選單時
按e編輯選單
一樣找到"quite splash " 在後面加上 nomodeset xforcevesa 
然後按ctrl+x開機


進入系統後
打開Terminal
輸入sudo su,切換到root權限
cd /boot/grub
cp grub.cfg grub.cfg.bk
vi grub.cfg.bk
使用vi搜尋 quiet splash
一樣在後面加入 nomodeset xforcevesa
存檔後離開vi
最後把剛剛編輯的grub.cfg.bk覆蓋掉系統的grub.cfg檔
cp grub.cfg.bk grub.cfg
reboot
即可!

搜尋此網誌