const 最淺顯直白的意思就是: 只讀

如果要搞清楚定義, 先回答下面的聲明

const int a;

int const a;

const int *a;

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

IMG_5757

高鐵桃園站的一風堂拉麵( 最近疫情肆虐只好放些舊照 )

跟豬豬早上九點多才起來 在海德堡宿舍 外面又下滂沱大雨

然後豬豬就說: 今天是交往紀念日隔天ㄟ  能不能彈吉他給我聽~~~

好吧  這種時候確實最適合練吉他了

這首歌最近縈繞在我腦海裡太久了, 只能是這首歌

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

F31D3616-270B-45C3-BBE9-AD5B93E4D8C7.jpg

前幾天在youtube搜尋音樂的時候, 發現告五人樂團有新歌~  在這座城市遺失了你

https://www.youtube.com/watch?v=PlCbgZxonJs

很好聽,  發現他們有點走向之前 ECHO 樂團的 fu, 但是比較沒這麼gay XD

而且編曲跟歌詞又都蠻精緻的路線, 自然想到之前豬豬很喜歡的 "披星戴月的想你"

跟那時候的有一點學生氣息, 又比較純粹的編曲, 我覺得真是各有風味, 不過又很開心他們變厲害了

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

【摩羯座的人注意了】神就來自你們的守護星 | 老高與小茉 Mr & Mrs Gao

https://www.youtube.com/watch?v=EkELAx2Uk1w&t=195s

土星衛星                 https://zh.wikipedia.org/wiki/%E6%9C%A8%E6%98%9F%E7%9A%84%E5%8D%AB%E6%98%9F

泰坦(土衛六):           https://zh.wikipedia.org/wiki/%E5%9C%9F%E5%8D%AB%E5%85%AD

泰坦 (巨神族):          https://zh.wikipedia.org/wiki/%E6%8F%90%E5%9D%A6

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

const+放置位置的意義

有放在不同位置的講解和example

https://blog.xuite.net/tsai.oktomy/program/65131235-const+%E6%94%BE%E7%BD%AE%E4%BD%8D%E7%BD%AE%E7%9A%84%E6%84%8F%E7%BE%A9

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

https://stackoverflow.com/questions/9053658/correct-format-specifier-to-print-pointer-or-address

根據standard C99 和 C11 (差別在哪?)

The C99 standard (ISO/IEC 9899:1999) says in §7.19.6.1 ¶8:

pThe argument shall be a pointer tovoid. The value of the pointer is converted to a sequence of printing characters, in an implementation-defined manner.


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

因為換Build Server的緣故, 需要在gerrit server上面新增一個build server的SSH KEY

參考下面網誌

http://hamersun.blogspot.com/2012/12/ssh-key-for-gerritgit-server.html

不過如果直接用

>ssh-keygen -t rsa -C "your_email@youremail.com"

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

i6k0Z.png

https://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap

The stack is the memory set aside as scratch space for a thread of execution. When a function is called, a block is reserved on the top of the stack for local variables and some bookkeeping data. When that function returns, the block becomes unused and can be used the next time a function is called. The stack is always reserved in a LIFO (last in first out) order; the most recently reserved block is always the next block to be freed. This makes it really simple to keep track of the stack; freeing a block from the stack is nothing more than adjusting one pointer.

The heap is memory set aside for dynamic allocation. Unlike the stack, there's no enforced pattern to the allocation and deallocation of blocks from the heap; you can allocate a block at any time and free it at any time. This makes it much more complex to keep track of which parts of the heap are allocated or free at any given time; there are many custom heap allocators available to tune heap performance for different usage patterns.

Each thread gets a stack, while there's typically only one heap for the application (although it isn't uncommon to have multiple heaps for different types of allocation).

To answer your questions directly:

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


十年

作詞:嚴雲農
作曲:舒米恩.魯碧
第一個十年 我沒有陪妳 玩家家酒的遊戲
第二個十年 妳不曾參與 我彈吉他的練習

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

在專案K2 VIM中, 有分出一個middleware 為 sys_console

專門用來印debug message, 裡面會定義使用哪一個UART port(使用BSP UART)

用來替代一般程式內的printf

   1: va_list ap; // 宣告可變長度變數
   2: va_start(ap, before); // 開始使用並讓 ap 指向 before

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

create hash for patch.png

create hash for patch

Stack overflow (Git: How to create patches for a merge?)

由於不同功能或不同人開發的緣故, 會在HEAD上分出不同的branch

當要進行merge的時候, 要怎麼建立新的patch呢?

這位原po 做出兩個branch, 後來想要倒退原本的commit 

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

我定義了一個變數 uint8 TASK_MGR_NUM_PERIODIC_TASKS;

這個變數是從別的function extern出來的, 且是程式開始跑後才計算出來的

然後我想要用在某個struct 的array中

static per_task_status_t    per_task_status[ TASK_MGR_NUM_PERIODIC_TASKS ]; 此時compiler會跳出error

ERROR : expression must have a constant value

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

1 2 3 4
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。