C_quicknotes
Takeaways from the book “Advanced C Programming” by Berry, John Thomas.
While it’s titled “advanced”, it is rather basic. Here is some quick notes on stuff that I’m not familar with/ don’t use often.
Read more ...__ _____ _ _ _____ _____ _ ______ __ || / ____| | | | __ \|_ _| |/ /___ \ || || | (___ | |__| | |__) | | | | ' / __) | || __||__ \___ \| __ | _ / | | | < |__ < __||__ --..-- ____) | | | | | \ \ _| |_| . \ ___) | --..-- || |_____/|_| |_|_| \_\_____|_|\_\____/ || ----------------------------------------------------- Die Zeitgeist ist Krankheit zu übertragen...........
Takeaways from the book “Advanced C Programming” by Berry, John Thomas.
While it’s titled “advanced”, it is rather basic. Here is some quick notes on stuff that I’m not familar with/ don’t use often.
Read more ...Concepts: Wait-free and Lock-free
An object impl. is wait-free if every thread completes a method in a finite number of steps:
An object impl. if lock-free if in an infinite execution infinitely often some method call finishes(in a finite number of steps)
Read more ...How is color space defined and what exactly is “color” from a machine’s point of view.
Read more ...tl;dr:
给自己的静态博客增加一个访问统计,效果如下:
https://shrik3.com/misc/report.html
前言:此为从零开始造轮子搭建操作系统的笔记,框架来自学校课程,编程语言主要为C++和汇编,涉及大量底层硬件相关。 本篇为CGA显示驱动和基础总线读写
Read more ...TIFU by letting pacman upgrade the postgresql a major version (13->14). Then the postgresql service failed to start.. Anyways here is the fix.
also a nice thing in the AUR: the postgresql-old-upgrade
package. It provides
the binary for the older version of psql under/opt/postgresql{VERSION}
NOTE: this is just copy-pasting from stackoverflow and some textbooks, see references below.
const
: meaning roughly “I promise not to change this value.” This is used primarily to specify interfaces so that data can be passed to functions using pointers and references without fear of it being modified. The compiler enforces the promise made by const
. The value of a const
can be calculated at runtime.
constexpr
: meaning roughly “to be evaluated at compile time.” This is used primarily to specify constants, to allow placement of data in read-only memory (where it is unlikely to be corrupted), and for performance. The value of a constexpr
must be calculated by the compiler.
You should read from right to left. This is refered to as clockwise/spiral rule
int *
pointer to intint const *
== const int *
pointer to const intint * const
const pointer to intint const * const
== const * const
const pointer to const intand …
int **
pointer to pointer to intint ** const
const pointer to pointer to intint * const *
pointer to const pointer to intint const **
pointer to pointer to const intint * const * const
const pointer to const pointer to int.过度的、纯粹的解构会脱离人的本能理解,以至于解构本身需要与一个解释捆绑在一起才能具有意义,于是,解构反而成为了一个新的构筑。
现代艺术从经验主义和形式主义的束缚(比如:你必须画得像,做得真),转向了一种新的束缚:符号是摆脱了细节的抽象,但他必须由环境,语言,历史,社会赋予意义。
Read more ...