PIXNET Logo登入

questioner

跳到主文

部落格全站分類:不設分類

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 6月 21 週三 200601:52
  • Serialized object in C#

(1) [Serializable()] //Set this attribute to all the classes that you define to be serialized
    public class Serializeclass : ISerializable
(2)     Stream stream = File.Open("Serializeclass", FileMode.Create);
            BinaryFormatter bformatter = new BinaryFormatter();
            bformatter.Serialize(stream, sc);
            stream.Close();
(3) stream = File.Open("Serializeclass", FileMode.Open);
            bformatter = new BinaryFormatter();
 物件可以serialized自己,但是無法de-serialized自己(除非透過一個空殼子)
(繼續閱讀...)
文章標籤

questioner 發表在 痞客邦 留言(0) 人氣(18)

  • 個人分類:Jobs comments
▲top
  • 6月 15 週四 200607:49
  • List of Google services and tools

http://en.wikipedia.org/wiki/List_of_Google_services_and_tools
(繼續閱讀...)
文章標籤

questioner 發表在 痞客邦 留言(0) 人氣(7)

  • 個人分類:Jobs comments
▲top
  • 6月 09 週五 200601:22
  • How to install Higgins and Run the demo applications


Download the eclpise
Use eclpise CVS to import the plugin and app parts from higgins
Use eclpise software update to update the emf, ecf and emft plug-ins.
Modify the error message
  • make setup-method to become public


    1. use MANIFEST.MF to extend some methods need by emf.higgins


    (繼續閱讀...)
    文章標籤

    questioner 發表在 痞客邦 留言(0) 人氣(21)

    • 個人分類:Jobs comments
    ▲top
    • 5月 25 週四 200606:06
    • .NET or No.Net ?

    http://www.codinghorror.com/blog/archives/000542.html
    與系統核心(尤其是有硬體有關的或是與作業系統的程式)還是用native codeing比較好。
    但是如果要放在網路上的應用,還是考量一下系統架構跟程式維護的便利性吧。
    (繼續閱讀...)
    文章標籤

    questioner 發表在 痞客邦 留言(0) 人氣(14)

    • 個人分類:Jobs comments
    ▲top
    • 5月 23 週二 200607:28
    • Managed Or Unmanaged?

    比較 managed & unmanaged code的執行效能
    results shows that the optimization switches in managed C++ and C# have relatively small effects, and that there is only a 2% difference between managed and unmanaged code. Significantly, C# code is as good, or better than managed C++ or C++/CLI which means that your choice to use a managed version of C++ should be based on the language features rather than a perceived idea that C++ will produce 'more optimized code'.
    http://www.grimes.demon.co.uk/dotnet/man_unman.htm
    (繼續閱讀...)
    文章標籤

    questioner 發表在 痞客邦 留言(0) 人氣(55)

    • 個人分類:Jobs comments
    ▲top
    • 5月 23 週二 200607:23
    • share links

    http://www.shadows.com/
    Discover the web you've always wanted but could never find!
    Shadows is the link-sharing website for people. By people. With Shadows, you have the power to discover the web's most fascinating content – the most interesting pages saved, discussed, and rated by you, your friends, and the Shadows community.
    (繼續閱讀...)
    文章標籤

    questioner 發表在 痞客邦 留言(2) 人氣(32)

    • 個人分類:Jobs comments
    ▲top
    • 5月 17 週三 200609:33
    • pointer to function -> callback function

    http://www.newty.de/
    =======================
    動態指派函數去執行(這也是後來event hanlder都需要用此)
    You can use them to replace switch/if-statements, to realize your own late-binding or to implement callbacks.
    The calling convention tells the compiler things like how to pass the arguments or how to generate the name of
    a function. Some examples for other calling conventions are __stdcall, __pascal and __fastcall. The calling
    convention belongs to a function's signature: Thus functions and function pointers with different calling
    convention are incompatible with each other! For Borland and Microsoft compilers you specify a specific
    calling convention between the return type and the function's or function pointer's name.
    =======================
    結論就是
    Callback 是pointer to function一種實作(透過pointer to function,可以達到late binding),
    但是這個實在windows有用到event 發出時給系統處理,因此callback function位置與變數需要被全域化
    (也可以理解成被OS觸發執行,而非程式設計者),這樣系統才不會被整個callback function要處理的內容給hold住。
    Windows的event透過pointer to funtion實作的好處
    在message queue中,只要透過message 對應到的function名稱,就可以執行。
    而callback這個keywork,在windows程式設計中,如果用了這個keyword,系統會給函數一個全域的id(這是交給系統處理的),
    這樣可以方便系統管理(這也意味者,如果有其他介面要跟call back function溝通,就需要有好的架構設計)。
    (繼續閱讀...)
    文章標籤

    questioner 發表在 痞客邦 留言(0) 人氣(448)

    • 個人分類:Jobs comments
    ▲top
    • 5月 04 週四 200602:59
    • Bug again...

    Hmm..找到一段bug…在VC++可以過->離開後new_num就是39119,但在BCB離開後,這個會變成任意數字,不過也因為這樣剛好找到
    這個地方的new_num應該改成i
    //Find Bugs...
    for(i=0;i
    {
    if(gene[new_num].pix_inten_recor!=NULL)
    free(gene[new_num].pix_inten_recor);
    gene[new_num].pix_inten_recor=NULL;
    if(gene[new_num].periphery_x!=NULL)
    free(gene[new_num].periphery_x);
    gene[new_num].periphery_x=NULL;
    if(gene[new_num].periphery_y!=NULL)
    free(gene[new_num].periphery_y);
    gene[new_num].periphery_y=NULL;
    }
    (繼續閱讀...)
    文章標籤

    questioner 發表在 痞客邦 留言(0) 人氣(18)

    • 個人分類:Jobs comments
    ▲top
    • 4月 26 週三 200603:06
    • notes for VC++

    A:這次的版本,你到底找到什麼bug了?為什麼memory leak的問題都沒有了
    B:我也不知道,我只是每次把free之後,就把pointer設為NULL,每次calloc之前,都會先check是否為NULL
    <看來不同compiler之間還是有差異的>
    (繼續閱讀...)
    文章標籤

    questioner 發表在 痞客邦 留言(0) 人氣(13)

    • 個人分類:Jobs comments
    ▲top
    • 4月 21 週五 200609:08
    • debug考題1

    請問下面程式有幾處會出現問題!?
    ====================
     int i;
     double *dia;
     dia=(double *)calloc(gene[0].periphery_num,sizeof(double));
     for(i=0;i
     {
      dia[i]= (gene[0].center_x-gene[0].periphery_x[i])*(gene[0].center_x-gene[0].periphery_x[i])
                                         +
              (gene[0].center_y-gene[0].periphery_y[i])*(gene[0].center_y-gene[0].periphery_y[i]);
      dia[i]=pow(dia[i],0.5)*10;
      if(dia[i]>FC_parmeter.r_radius || dia[i]
                           return 0;
                  
     
     }
     return 1;
            free(dia);
    (繼續閱讀...)
    文章標籤

    questioner 發表在 痞客邦 留言(0) 人氣(21)

    • 個人分類:Jobs comments
    ▲top
    12...4»

    部落格文章搜尋

    書櫃

    我的噗滿

    最新迴響

    • [13/05/10] 訪客 於文章「講道大綱---基督徒的末世生活態度...」留言:
      請問我要追求除了追求愛和切慕屬靈的恩賜.聖靈怎樣求才能到醫病...
    • [10/06/21] max1217 於文章「使用windows wi-fi api作...」留言:
      你好, 我跟樓上那篇的問題一樣! 在大大你這篇文章提到的...
    • [09/12/14] 好玩唷 於文章「需要閉關一些時間.......」留言:
      歡迎u大家e來看看 ...
    • [09/09/29] Fox 於文章「SMK-15.4 Multi-Touch...」留言:
      Hey, I have strange situation ...
    • [09/06/23] 一個鄉民 於文章「Debug訓練EQ...」留言:
      嗯,最近也是陷入debug地獄中,不過C#功能實在很強大...
    • [09/04/05] liaommx 於文章「使用windows wi-fi api作...」留言:
      你好,請問一下,這篇文章提到的windows wi-fi A...
    • [09/03/16] questioner 於文章「demo streetimage 2.0...」發表了一則私密留言
    • [09/03/13] ian 於文章「demo streetimage 2.0...」留言:
      你好!!想請問你,你部落格上的向日葵彈吉他的圖是內建的樣本,...
    • [09/01/03] Billion Wan 於文章「使用windows wi-fi api作...」留言:
      I would like to konw more abou...
    • [08/11/27] hw20042562 於文章「SMK-15.4 Multi-Touch...」發表了一則私密留言

    誰來我家

    文章彙整

    個人頭像

    questioner
    暱稱:
    questioner
    分類:
    不設分類
    好友:
    累積中
    地區:

    文章分類

    toggle 舊家的東東 (16)
    • 胡思亂想 (17)
    • Jobs comments (32)
    • 過往 (20)
    • 信仰 (19)
    • 高中團契 (5)
    • 別人的文章 (9)
    • 東張西望 (2)
    • security (1)
    • 每日一句 (15)
    • 詩集 (4)
    • 短句&amp;Pray (5)
    • 電影與音樂 (3)
    • CMU trip (2)
    • 社青團契 (1)
    • 同事的名言... (3)
    • 雜文 (1)
    toggle 沒有MS的日子... (2)
    • 書蟲 (36)
    • ubuntu (8)
    • Mac (1)
    • Uncategorized Articles (30)
    • 未分類文章 (1)

    參觀人氣

    • 本日人氣:
    • 累積人氣: