在Notepad ++編輯器新增GNU ARM Assembly 語言格式
1)下載 ASM for ARM GNU語言包 user defined languages
2) 在[語言]->[定義程式語言] 然後, 匯入ASM for ARM GNU 語言包
3) 匯入後可以再去修改, 例如, 原本ASM單行註解為只有 ; @ , 可再加入// (GNU GCC 是看得懂//為註解語法)
(1) 用frozenset 才可以用集合當作Key
Example:
itemsets=[{'B','C'},{'D'}]
count[{'B','C'}]+=1 # Error : "unhashable type: 'set'"
in this case, we can use frozenset to make 'set' as a key
count[frozenset({'B','C'})]=1
(2) 用frozenset 才可以做集合包含集合
S=set()
e={'A','B','C'}
S.add (e) ==> 想要表示 S={{'A'},{'B'},{'C'}} --> TypeError: unhashable type: 'set'
S.add (frozenset(e)) -->OK S={frozenset({'A', 'B', 'C'})}
How to Check the Software and Hardware Version of a Raspberry Pi
1. 後面的-lxxxx 如果是linux他的位置在哪裡?
(base) ubuntu@ubuntu1804:/usr/lib$ cat /etc/ld.so.conf.d/x86_64-linux-gnu.conf
超好用的2個Jupyter notebook 延伸工具
Linux 系統程式設計
#include <signal.h>
int sigaction(int signum, const struct sigaction *restrict act,
struct sigaction *restrict oldact);The sigaction structure is defined as something like: struct sigaction { void (*sa_handler)(int); void (*sa_sigaction)(int, siginfo_t *, void *); sigset_t sa_mask; int sa_flags; void (*sa_restorer)(void); };
在sigaction結構中, 有一個 sa_flags 欄位可以設定為 SA_RESTART , 這代表什麼意思呢? 原文如下
SA_RESTART If a blocked call to one of the following interfaces is interrupted by a signal handler, then the call is automatically restarted after the signal handler returns if the SA_RESTART flag was used; otherwise the call fails with the error EINTR.