diff --git a/.github/workflows/publish-example.yml b/.github/workflows/publish-example.yml new file mode 100644 index 0000000..682f0c9 --- /dev/null +++ b/.github/workflows/publish-example.yml @@ -0,0 +1,23 @@ +name: Generate static org-roam-ui page + +on: + push: + branches: + - master + +permissions: + contents: read + pages: write + id-token: write + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + uses: ikoamu/org-roam-ui-hosting@main + with: + org-roam-directory: org-roam + org-roam-db-filename: org-roam.db + site-title: pearls + deploy-to-pages: true diff --git a/org-roam/20241009150944-emacs.org b/org-roam/20241009150944-emacs.org new file mode 100644 index 0000000..e3f6d5c --- /dev/null +++ b/org-roam/20241009150944-emacs.org @@ -0,0 +1,83 @@ +:PROPERTIES: +:ID: 162980C1-C418-4FF9-8C39-337B648EFE79 +:END: +#+title: Emacs + +* Emacs install + +** MacBook +[[[https://github.com/d12frosted/homebrew-emacs-plus?tab=readme-ov-file#install]]] +#+begin_src shell + brew tap d12frosted/emacs-plus + brew install emacs-plus@30 --with-native-comp --with-modern-purple-flat-icon +#+end_src + +** Windows + +sharp key + +* learning + +** meaning + +mode line + +mini buffer + +** key + +C-x C-e: execute lisp previous one line + +C-h t: tutorials +C-h v: describe variable +C-h f: describe function +C-h k: describe key + +(server-mode 1) + +;; (setq tab-always-indent 'complete) give completion buffer +;; (icomplete-mode t) give M-x options + +(global-set-key (kbd "") 'func) + +bind key func need add (interactive) + +lispy s-expression + +C-h m: mode + +REPL: read eval print loop + +C-x C-h 看 C-x 的快捷键 + +C-c C-h + +C-x 是系统的,C-c 为用户保留的 + +eval-buffer + +(global-set-key (kbd "C-h C-f") 'find-function) + + +(global-company-mode 1) +(define-key company-mode-map (kbd "C-n") 'company-select-next) +(define-key company-active-map (kbd "C-n") 'company-select-next) + + +(global-set-key (kbd "C-h C-f") 'find-function) +(global-set-key (kbd "C-h C-v") 'find-variable) +(global-set-key (kbd "C-h C-f") 'find-function-on-key) + +* lisp + +#+begin_src lisp + (+ 2 (* 3 4)) + + (setq name "xp") + (message name) + + (defun func() + (message "hello, %s" name)) + + (func) +#+end_src diff --git a/org-roam/20241009151356-binutils.org b/org-roam/20241009151356-binutils.org new file mode 100644 index 0000000..70806a4 --- /dev/null +++ b/org-roam/20241009151356-binutils.org @@ -0,0 +1,6 @@ +:PROPERTIES: +:ID: C4183F82-0DE1-4FA5-A6C1-E69F11917F93 +:END: +#+title: Binutils + +[https://www.gnu.org/software/binutils/] diff --git a/org-roam/20241009152151-terminology.org b/org-roam/20241009152151-terminology.org new file mode 100644 index 0000000..0c72cea --- /dev/null +++ b/org-roam/20241009152151-terminology.org @@ -0,0 +1,10 @@ +:PROPERTIES: +:ID: 3B324BC8-723C-4E73-BF45-34928D0DD13C +:END: +#+title: terminology + +| English | meaning | Chinese | +|---------+------------------------------------------------------------+---------| +| vanilla | having no special or extra features; ordinary or standard. | 香草 | +| | | | +|---------+------------------------------------------------------------+---------| diff --git a/org-roam/20241009152415-abbreviation.org b/org-roam/20241009152415-abbreviation.org new file mode 100644 index 0000000..ceef963 --- /dev/null +++ b/org-roam/20241009152415-abbreviation.org @@ -0,0 +1,74 @@ +:PROPERTIES: +:ID: AAAF1B5D-D157-492C-BF78-56C33925E91D +:END: +#+title: abbreviation + +* work + + | GTD | Getting Things Done | + +* AI (Artificial Intelligence) + + | ML | Machine Learning | + +* AD (Autonomous Driving) + + | SLAM | Simultaneous Localization and Mapping | | + | | | | + | TOR | Take OveR | | + | ADAS | Autonomous Driving Assistance System | | + | | | | + | SWA | Side Warning Assist | 变道辅助,在变道时检测车辆侧面或后面的盲区 | + | LCA | Lane Change Assist | 类似 SWA | + | | | | + | USS | Ultrasonic Sensor System | 超声波雷达 | + | | | | + | scooter | | 踏板摩托车 | + +* mail + + | CC | Carbon Copy | | + | BCC | Blind Carbon Copy | BCC don't know other BCC. to and CC don't know BCC. be caution to use it | + | BRs | Best Regards | | + | AL | Annual Leave | | + | OoO | Out of Office | | + +* meeting + + | NTD | Need To Drop | + | BRB | Be Right Back | + | B | Back | + +* communication + + | abbr. | abbreviation | + | AKA | Also Known As | + | TBH | To Be Honest | + | WIP | Work In Progress | + +* life + + | Sun. | Sunday | + | Mon. | Monday | + | Tues. | Tuesday | + | Wed. | Wednesday | + | Thur. | Thursday | + | Fri. | Friday | + | Sat. | Saturday | + | | | + | CW. | Calendar Week | + | | | + | Jan. | January | + | Feb. | February | + | Mar. | March | + | Apr. | April | + | May. | May | + | Jun. | June | + | Jul. | July | + | Aug. | August | + | Sept. | September | + | Oct. | October | + | Nov. | November | + | Dec. | December | + | | | + | RIP. | Rest In Peace | diff --git a/org-roam/20241009154548-c.org b/org-roam/20241009154548-c.org new file mode 100644 index 0000000..c23a393 --- /dev/null +++ b/org-roam/20241009154548-c.org @@ -0,0 +1,6 @@ +:PROPERTIES: +:ID: 38F97C08-3471-456B-A1EE-F1A6FEBF440F +:END: +#+title: C++ + +[https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines] diff --git a/org-roam/20241009155459-interview.org b/org-roam/20241009155459-interview.org new file mode 100644 index 0000000..11dc4fd --- /dev/null +++ b/org-roam/20241009155459-interview.org @@ -0,0 +1,81 @@ +:PROPERTIES: +:ID: 33B0FF9E-3C76-4090-98EF-6A8270D8379D +:END: +#+title: interview + +* interview + +** language (C++) + +*** const 修饰符有什么用? + +1. 修饰变量为不可更改 +2. 修饰类函数,常成员函数 + +*** decltype 和 auto 的区别? + +1. auto类型说明符用编译器**计算变量的初始值**来推断其类型,而decltype虽然也让编译器分析表达式并得到它的类型,但是**不实际计算表达式的值** +2. 编译器推断出来的**auto类型有时候和初始值的类型并不完全一样**,编译器会适当地改变结果类型使其更符合初始化规则。例如,auto一般会忽略掉顶层const,而把底层const保留下来。与之相反,decltype会保留变量的顶层const。 +3. 与auto不同,decltype的结果类型与**表达式形式密切相关**,如果变量名加上了一对括号,则得到的类型与不加括号时会有不同。如果decltype使用的是一个不加括号的变量,则得到的结果就是该变量的类型;如果给变量加上了一层或多层括号,则编译器将推断得到引用类型 + +*** static_cast,const_cast,reinterpret_cast 的区别? + +1. statci_cast 只要不包含底层 const,明确定义的类型转换 +2. const_cast 只能改变对象的底层 const,无法改变类型 +3. reinterpret_cast 运算对象的位模式提供重新解释 + +*** 指针和引用的区别? + +引用一般指左值引用 + +1. 引用不是一个对象,无法令引用重新绑定到另外一个对象,是起别名。必须初始化(无法定义引用的引用;引用必须绑定到对象上,无法绑定到右值上) +2. 指针本身是一个对象,允许对指针赋值和拷贝,可以在生命周期里指向多个对象。无须初始化。 +3. 指针拷贝语意,可能放到多态的容器里 +3. 引用必不为空,但是垂悬指针解应用会出现问题 + +*** RAII 的认识? + +资源分配的手法,在构造函数中获取资源,在析构函数中释放。在多线程环境,异常环境中,保证资源被正确获取释放 + +*** new,placement new,operator new 的区别? + +*** 内存布局 + +**int* 占用多少字节?** + +1. int * 在 64 位机器中占 8 字节,32 位 4 字节 +2. 64 位机器中有 2^64 内存地址空间,8 字节地址总线,8 字节指针可以覆盖全部地址空间 + +--- + +**int char 共存在一个 class 中,占用多少字节?** + +64 位机器中 8 字节,因为数据总线是 8 字节,所以需要 8 字节内存对齐,char 会扩展到 4 字节 + +--- + +**gcc 编译器 __attribute__ ((packed)) 有什么用** + +取消默认的内存对齐,紧凑排列类成员变量,所以包含 int char 的类此时在 64 位机器中为 5 字节 + + +**C++ 多态是如何实现的?** + +虚指针 vptr 和虚表 vtable,每个类如果定义了 virtual 修饰的函数,该对象就会生成一个虚指针指向类的虚表(虚表**编译时候确定,执行期无法修改**,不可修改,包含了重写函数调用地址),运行时查找虚表来确定调用函数地址 + +dynamic_cast 的使用?typeinfo 的实现? + +C++ 多继承子类的内存分布? + + +## 可执行程序执行 + +**一个程序编译完之后从 shell 运行到调用 main 函数之前发生了什么?** + +需要将该文件从磁盘加载到内存中,读入可执行文件的 section。经过 fork 创建子进程,分配虚存,地址重定位。调用 execve 读入命令行参数,通过动态库初始化全局变量,最后调用 main + +*** RVO,NRVO 是干嘛的? + +** algorithm + +*** 如何判断一个链表是否有环? diff --git a/org-roam/20241009161429-slam.org b/org-roam/20241009161429-slam.org new file mode 100644 index 0000000..17c2ec4 --- /dev/null +++ b/org-roam/20241009161429-slam.org @@ -0,0 +1,30 @@ +:PROPERTIES: +:ID: 94769B0B-0BE6-4372-B797-4B4A41D87173 +:END: +#+title: SLAM + +* books + +1. 视觉 SLAM 十四讲:从理论到实现 +2. 机器人学中的状态估计 +3. 机器人感知:因子图在 SLAM 中的应用 讲 GTSAM 的 +4. 第一本无人驾驶技术书(第二版) +5. 概率机器人 Probabilistic Robotics +6. 计算机视觉中的多视图几何 Multiple View Geometry in Computer Vision +7. 机器人学中的状态估计 State Estimation for Robotics: A Matrix-Lie-Group Approach + +* key notes + +1. RAS +2. Auto Robotics +3. IROS + +* knowledge + +四元数,李代数,卡尔曼滤波,Bundle Adjustment,位姿图 + +2003 MonoSLAM, 2016 ORB-SLAM + +数学理论:三维空间的刚体运动,非线性优化。计算机视觉的算法实现:多视图几何,回环检测 + +摄影几何,计算机视觉,状态估计理论,李群和李代数 diff --git a/org-roam/20241009162411-methodology.org b/org-roam/20241009162411-methodology.org new file mode 100644 index 0000000..e389c7b --- /dev/null +++ b/org-roam/20241009162411-methodology.org @@ -0,0 +1,22 @@ +:PROPERTIES: +:ID: BF000F4D-9E59-4E29-BA5C-C7FBCE6A0E43 +:END: +#+title: Methodology + +* Worldview + +** 空杯心态 + + [https://wiki.mbalib.com/wiki/%E7%A9%BA%E6%9D%AF%E5%BF%83%E6%80%81] + +* methodology + +** first principle thinking: 第一性原理 + + [https://wiki.mbalib.com/wiki/%E7%AC%AC%E4%B8%80%E6%80%A7%E5%8E%9F%E7%90%86] + + 回归事物最基本的条件,将其拆分为各要素进行解构分析,从而找到实现目标最优路径的方法。来源于古希腊哲学家亚里士多德提出的一个哲学观点:“每个系统中存在一个最基本的命题,它不能被违背或删除”。 + +** Zettelkasten: 卡片盒笔记法 + +* dialectics, Philosophy, Psychology diff --git a/org-roam/20241009183332-algorithm.org b/org-roam/20241009183332-algorithm.org new file mode 100644 index 0000000..8459112 --- /dev/null +++ b/org-roam/20241009183332-algorithm.org @@ -0,0 +1,26 @@ +:PROPERTIES: +:ID: 373231FE-02EF-416D-91DD-99F3D1191FFD +:END: +#+title: algorithm + +* 袖珍计算器算法 + +#+begin_export latex +\[ +e^{i\pi} = -1 +\] +#+end_export + +x ^ 1/2 = (e lnx) ^ 1/2 = e lnx/2 + +* Newtons's method + +[https://en.wikipedia.org/wiki/Newton%27s_method] + +* sort + +** select sort + +** fish sort + +I've bisected the regression to . diff --git a/org-roam/20241009184929-thinker.org b/org-roam/20241009184929-thinker.org new file mode 100644 index 0000000..0530a89 --- /dev/null +++ b/org-roam/20241009184929-thinker.org @@ -0,0 +1,18 @@ +:PROPERTIES: +:ID: CB309915-1104-4430-9F80-F338CC6EF660 +:END: +#+title: thinker + +* compter science + +** atomic 相比 thread benefits? + +1. atomic 是由汇编语言保证的,更底层。thread 是由操作系统软件保证的。 + +** CISC 与 RISC,文言文与白话文 + +计算机中内存尤为重要,CISC 可以有效减少程序占用内存。古代造纸昂贵,所以类似 + +* humanity + +** Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday diff --git a/org-roam/20241010145810-gtd.org b/org-roam/20241010145810-gtd.org new file mode 100644 index 0000000..249a503 --- /dev/null +++ b/org-roam/20241010145810-gtd.org @@ -0,0 +1,65 @@ +:PROPERTIES: +:ID: EE8447BB-44C1-48B4-94B3-4B4CF6C27FBE +:END: +#+title: gtd + +* GTD + +** TODO Daily routine [0%] +SCHEDULED: <2024-10-10 Fri 06:00 +1d> + + - [ ] leetcode + - [ ] English learning + +** TODO SLAM book and video [0%] [https://space.bilibili.com/342754700/video?tid=188&special_type=&pn=1&keyword=&order=pubdate] +DEADLINE: <2024-10-17 Thu 20:00> SCHEDULED: <2024-10-10 Thu 20:00> + + - [ ] CH1 + - [ ] CH2 + - [ ] CH3 + - [ ] CH4 + - [ ] CH5 + - [ ] CH6 + - [ ] CH7 + - [ ] CH8 + +** TODO Algorithm [8%] +DEADLINE: <2024-10-17 Thu 20:00> SCHEDULED: <2024-10-10 Thu 20:00> + + - [X] CH1 + - [ ] CH2 + - [ ] CH3 + - [ ] CH4 + - [ ] CH5 + - [ ] CH6 + - [ ] CH7 + - [ ] CH8 + - [ ] CH9 + - [ ] CH10 + - [ ] CH11 + - [ ] CH12 + +** TODO Emacs learning [19%] [https://book.emacs-china.org/] +DEADLINE: <2024-10-17 Thu 17:00> SCHEDULED: <2024-10-10 Thu 09:00> + + - [X] 1 + - [X] 2 + - [X] 3 + - [X] 4 + - [ ] 5 + - [ ] 6 + - [ ] 7 + - [ ] 8 + - [ ] 9 + - [ ] 10 + - [ ] 11 + - [ ] 12 + - [ ] 13 + - [ ] 14 + - [ ] 15 + - [ ] 16 + - [ ] 17 + - [ ] 18 + - [ ] 19 + - [ ] 20 + - [ ] 21 diff --git a/org-roam/20241010160725-adas_function.org b/org-roam/20241010160725-adas_function.org new file mode 100644 index 0000000..8e9d435 --- /dev/null +++ b/org-roam/20241010160725-adas_function.org @@ -0,0 +1,8 @@ +:PROPERTIES: +:ID: 749BE094-5F15-4F78-B49C-36B225AA2AB8 +:END: +#+title: ADAS function + +* L2 + +[[id:0F430A45-EEBE-46EB-AE9C-E4B60D88A92F][ACC]] diff --git a/org-roam/20241010160811-acc.org b/org-roam/20241010160811-acc.org new file mode 100644 index 0000000..861b6be --- /dev/null +++ b/org-roam/20241010160811-acc.org @@ -0,0 +1,10 @@ +:PROPERTIES: +:ID: 0F430A45-EEBE-46EB-AE9C-E4B60D88A92F +:END: +#+title: ACC + +[https://blog.csdn.net/u013889591/article/details/140408732] + +cut in + +cut out diff --git a/org-roam/20241011155035-settings.org b/org-roam/20241011155035-settings.org new file mode 100644 index 0000000..8dc5cc7 --- /dev/null +++ b/org-roam/20241011155035-settings.org @@ -0,0 +1,18 @@ +:PROPERTIES: +:ID: 6477D0E3-056F-41F0-95AD-412A5D4D6966 +:END: +#+title: settings + +* OS X + +** fonts + +#+begin_src shell + brew install font-jetbrains-mono-nerd-font +#+end_src + +** tools + +#+begin_src shell + brew install ripgrep fd +#+end_src diff --git a/org-roam/org-roam.db b/org-roam/org-roam.db new file mode 100644 index 0000000..9638906 Binary files /dev/null and b/org-roam/org-roam.db differ