編譯時 vi 偵測文件類型,可用下列指令讓vi 認為這份文件使用c,讓開發者方便編譯。(變彩色囉)

:set syntax=c


文章標籤

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

big endian 與 little endian 分別為兩種不同架構,用以處理記憶體存放區的方式。

小試身手小範例

此範例以整數數值4652,分別使用big endian與little endian方式,存放在記憶體位置所做的說明。

文章標籤

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

.tar (僅打包,無壓縮)

打包指令
$ tar cvf FileName.tar DirName

文章標籤

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

使用此軟體之目的 : 在Windows作業系統平台上實現X Window System,藉由遠端操縱Linux圖形視窗介面,控制X Client以實現。

step1. 下載Xming軟體

http://sourceforge.net/projects/xming/

文章標籤

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

有時會遇到下載的PDF檔案無法印列、複製等問題,此時可以使用一個免費的線上工具「FreeMyPDF」進行破解。

step1. 進入FreeMyPDF 網站

http://freemypdf.com/

文章標籤

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

scp 遠端檔案傳輸指令,目的為利用scp指令將檔案在本機端(local)及遠端(serve)主機傳輸。

本機複製到遠端主機 

指令:scp File.c s-lai@TSVR-001:/home/src

文章標籤

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

工具 -> 編輯器選項

0000  

將「 智慧型tab 」取消打勾,「 使用Tab字元 」打勾,下方「 Tab長度 」可自行設定空白數目。

文章標籤

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

指令 : 

yum -y install gcc-gfortran.x86_64

--------------------------------------------------------------------------

文章標籤

S 發表在 痞客邦 留言(1) 人氣()

 

[victoria@001 ~/ddonet]$ svn update
Conflict discovered in 'data/param/Rw.csv'.
Select: (p) postpone, (df) diff-full, (e) edit,
        (mc) mine-conflict, (tc) theirs-conflict,
        (s) show all options:

 

 (e)  edit             - change merged file in an editor
 (df) diff-full        - show all changes made to merged file
 (r)  resolved         - accept merged version of file

 (dc) display-conflict - show all conflicts (ignoring merged version)
 (mc) mine-conflict    - accept my version for all conflicts (same)
 (tc) theirs-conflict  - accept their version for all conflicts (same)

 (mf) mine-full        - accept my version of entire file (even non-conflicts)
 (tf) theirs-full      - accept their version of entire file (same)

 (p)  postpone         - mark the conflict to be resolved later
 (l)  launch           - launch external tool to resolve conflict
 (s)  show all         - show this list

 

文章標籤

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

使用fgets()常會遇到一個問題,輸入的字元數目超過Buffer給定的,就會出現下列的狀況。

狀況:當程式為 fgets( cName, 30, stdin ); 時,輸入超過30 個字元,程式就會每次輸出30個字元直到全部資料被輸出。下列為此種現象程式碼及狀況示意圖 :

#include <stdio.h>
#include <string.h>
int main()
{
    char cName[30];
    FILE *pFile;

    pFile = fopen( "write.csv", "a" );
    if( pFile == NULL )
    {
        printf("open failure");
        return 1;
    }
    while(1)
    {
        printf("please enter your name: \n");
        fgets( cName, 30, stdin );
        if( 'E' == cName[0] && ('\n' == cName[1] || '\0' == cName[1] ))
        {
            break;
        }

        fwrite(cName, 1, strlen( cName ) , pFile);
        memset( cName, 0x00, sizeof( cName ) );

    }
    fclose(pFile);
    return 0;
}
                                                                                           

 

文章標籤

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