work tips

 # 語言大全:http://oop.rosweb.ru/Other/

# C#:imeMode:爲一個獨立的控件指定InputMethodEditor(IME)窗口設置。設計和運行時可用。
http://www.delphibbs.com/keylife/iblog_show.asp?xid=22214

# C#:TabControl對象是所需的標籤切換對話框

# C++:有頭文件、實現文件、主程序文件時注意先編譯實現文件~~其實是要給初已聲明的析構函數一個實現!

# C#:實現函數就在類聲明裏,而不像C++那樣實現與聲明分爲.h和.cpp兩個

# C#:域名空間的使用必須先添加“引用”,再使用using或域名去引用類。

#ERROR c:/windows/system32/Macromed/Flash/flash6.ocx

# C#:
It declares an integer array named zArray. The array is then assigned an array of 10 integers
that initializes the references. However, the array elements of 10 integers are not initialized.
Array elements default to zero or null: zero for value types and null for reference type elements.
In this code, the array elements are set to zeroes:
     int [] zArray;
     zArray=new int[10];
注意:自定義類型的數組在new之後,如 myclass [] cArray = new myclass[200]; 只生成了一個引用數組(reference),而沒有對象。

# C#: 序列化類的關鍵字   
[Serializable]
public class insert2TB  { }

# C#: 限制textBox僅能輸入數字
      1,在form.designer.cs中加入
        this.textBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox2_KeyPress);
      2,在Form.cs中加入私有函數
        private void textBox2_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
        {
            if ((e.KeyChar < 48 || e.KeyChar > 57) && e.KeyChar != 8 && e.KeyChar != 46)
                e.Handled = true;
        }

# C#: 將字符串轉換爲數字,使用Convert.ToInt32(*)

 

# tinyOS:
An interface declares a set of functions called "commands" that the interface provider must implement and another set of

functions called "events" that the interface user must implement.

1,在配置文件Blink.nc中,可以確定模塊BlinkM需要提供StdControl接口(在箭頭右端)並使用Timer和Leds接口(在箭頭左端)。

2,在接口定義文件StdControl.nc中,可以確定此接口有三個command,沒有event,command需要提供接口者實現。

3,在模塊定義文件BlinkM.nc中,可以再次確定模塊BlinkM提供StdControl接口並使用Timer和Leds接口。

4,在接口定義文件Timer.nc中,可以確定接口Timer有兩個command,需要接口提供者實現;有一個event,需要接口使用者(BlinkM)處理。

5,在模塊定義文件BlinkM.nc中,可看到Blink提供了StdControl接口的三個command(init,start,stop)的實現,以及Timer接口的event(fired)

處理。

uisp,mote,MIB,tos
1.component(provide/use interface)
    ->module(implement interface)
    ->configuration(connect interfaces)
2.concurrent
    ->task
    ->hardware event handler
configuration:
1,connect interfaces used by components to interfaces provided by others
2,user(event handler) ------interface------> provider(command implement)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章