2019年10月25日 星期五

[Linxu] GCC編譯產生檔案說明

bss(Block Started by Symbol):
Read-Write initialized data,未給初始值或初始值為0的全域變數

data:
Read-Write zero initialized data,有初始值的全域變數

rodata(Read-Only Data):
const的全域變數

text:
Program code,程序執行代碼的一塊內存區域

2019年9月26日 星期四

[C] 特殊指標用法

空指標 void *a: 可放任何資料型態的地址

函式指標(function pointer):
void funA(int a) ;
void *b = funA ;

所以funA(c) = b(c)

2019年8月3日 星期六

[C#] TextBox or RichTextBox

TextBox和RichTextBox皆適用

1.Change text color in text box 


           




richTextBox1.SelectionColor = Color.Red;
richTextBox1.AppendText("0123456789");


3.修改字串中的字體顏色





            


richTextBox1.AppendText("0123456789");
richTextBox1.Select(3, 2);
richTextBox1.SelectionColor = Color.Red;


(3.測試中...)




richTextBox1.AppendText("0123456789");
            richTextBox1.Select(1, 2);          
            Font oldFont = richTextBox1.SelectionFont;
            richTextBox1.SelectionFont = new Font(oldFont, FontStyle.Bold);
            richTextBox1.AppendText("\r\naaa");



2.自動滾動到最下面(自動滾動到文字新增處)
/*Scroll to the bottom of the page*/
textBox1.SelectionStart = textBox1.Text.Length;
textBox1.ScrollToCaret();







參考資料:
https://zhidao.baidu.com/question/77745216.html







[C#] .bin檔存取及讀寫

●Read Bin file

2019年2月20日 星期三