随笔分类 -  C/C++

摘要:#if 0 #include "set.h" // github.com/Kronuz/cpp-btree using namespace btree; #else #include <set> // en.cppreference.com/w/cpp/container/multiset #end 阅读全文
posted @ 2023-01-15 22:32 Fun_with_Words 编辑
摘要:https://www.sqlite.org/testing.html 8.2. Valgrind Valgrind is perhaps the most amazing and useful developer tool in the world. Valgrind is a simulator 阅读全文
posted @ 2023-01-15 16:28 Fun_with_Words 编辑
摘要:百度百科【杨辉三角、刘徽、数学归纳法、排列组合】 在线运行C++ 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1 1 9 36 84 126 1 阅读全文
posted @ 2023-01-14 17:15 Fun_with_Words 编辑
摘要:sqlite3.c 8413KB 243617行,平均每行34.53个字节。行与行之间用\n (0x0a)分隔。 最后一行是: /************************** End of sqlite3.c ******************************/ 在一台很老的笔记本 阅读全文
posted @ 2023-01-13 09:29 Fun_with_Words 编辑
摘要:Range Queries: R-tree | Pedagogic Modules (nau.edu) An R-tree (Rectange-tree) stores objects in rectangles. The main idea of the R-tree is to construc 阅读全文
posted @ 2023-01-12 10:10 Fun_with_Words 编辑
摘要:Target Builtins - Using the GNU Compiler Collection (GCC) MIPS Loongson Built-in Functions x86 Built-in Functions t.cpp: #include <immintrin.h> gcc -E 阅读全文
posted @ 2023-01-10 13:03 Fun_with_Words 编辑
摘要:#include <math.h> #include <iostream> using namespace std; #define fn rint // https://gcc.gnu.org/onlinedocs/cpp/Stringizing.html #define xstr(s) str( 阅读全文
posted @ 2023-01-09 22:14 Fun_with_Words 编辑
摘要:“技多不压身”。内卷时代对编译和虚拟机技术有所了解是极好的。可是JVM太庞大了。 这个 虽然只有10KB,但它包含玩具级C编译器和x86虚拟机,阅读它可以快速入门,当然门楣很高:-)。 它是 基本能看懂的C编译器 的改进版,混合使用了自顶向下和自底向上(bison)分析。 ① 你可以为它增加do语句 阅读全文
posted @ 2023-01-07 00:08 Fun_with_Words 编辑
摘要:$ cat a.cpp #include <string> #include <iostream> using namespace std; inline void fn() { string s = "aaa\n"; cout << s; } void bbb(); int main() { fn 阅读全文
posted @ 2023-01-04 15:58 Fun_with_Words 编辑
摘要:Parsing | Detailed Pedia A Guide To Parsing: Algorithms And Terminology LR Parsing - Coding Ninjas CodeStudio The Lemon LALR(1) Parser Generator (sqli 阅读全文
posted @ 2023-01-03 17:41 Fun_with_Words 编辑
摘要:Fabrice Bellard is a French computer programmer known for writing FFmpeg, QEMU, and the Tiny C Compiler 和许许多多别的。 我修改了下他写的otccelfn.c,增加/删除了一点功能,提高了可读性。 阅读全文
posted @ 2023-01-02 22:24 Fun_with_Words 编辑
摘要:不想在vscode的Explorer里看见*.o,除了File-Preference-Settings, Search settings (File.Exclude),还可以改Makefile,把*.o放在某个目录(如o)下嘛。 一堆.d文件不如一个.dep文件高档。 array.o: array. 阅读全文
posted @ 2022-12-26 15:42 Fun_with_Words 编辑
摘要:我们先撕简单的。a ab a|b aa* a(a|b)* 先不管匹配任意字符的. 重复>=1次的+ [^0-9]除0-9外 \digit数字等。 正则表达式(regular expression, re)为啥叫表达式,不叫正则字符串之类?因为它是个表达式。3+5*2是个表达式;两个字符串可以有连接运 阅读全文
posted @ 2022-12-22 17:48 Fun_with_Words 编辑
摘要:https://cplusplus.com/reference/cstdio/printf A format specifier follows this prototype: %[flags][width][.precision][length]specifier p Pointer addres 阅读全文
posted @ 2022-12-19 23:32 Fun_with_Words 编辑
摘要:先说下微软的。有disable,但没有enable,有的是default: Reset warning behavior to its default value. BitBlt有SRCAND, 没有SRCOR, use SRCPAINT instead. warning pragma | Comp 阅读全文
posted @ 2022-12-19 23:18 Fun_with_Words 编辑
摘要:请先看输出: "go" "depth" "10" s=' go depth 10' "go" "depth" "10" s=' go' 学计算机的科班生知道:token - an individual instance of a continuous character sequence witho 阅读全文
posted @ 2022-12-19 22:13 Fun_with_Words 编辑
摘要:某程序用TDM-GCC 10.0编译。 把new改成calloc后,不再使用C++的库,.exe从191KB降到了80KB. TDM-GCC 10.0的库是静态链接的,好处是不会出找不到DLL的错误。 当然,boost, Qt等才叫大。 阅读全文
posted @ 2022-12-19 13:59 Fun_with_Words 编辑
摘要:https://blog.kowalczyk.info/article/j/guide-to-predefined-macros-in-c-compilers-gcc-clang-msvc-etc..html When writing portable C++ code you need to wr 阅读全文
posted @ 2022-12-18 15:25 Fun_with_Words 编辑
摘要:#include <stdio.h> #include <stdlib.h> #include <memory.h> #include <time.h> #include <algorithm> #include <functional> int n_cp, n_cmp, total_cp[2], 阅读全文
posted @ 2022-12-18 03:36 Fun_with_Words 编辑
摘要:Linux那些事——GTK+, Qt, Gnome, KDE, xWindow, xOrg区别 - devilyouwei - 博客园 (cnblogs.com) The 8 Best Ubuntu Desktop Environments (20.04 Focal Fossa Linux) - L 阅读全文
posted @ 2022-12-17 21:38 Fun_with_Words 编辑










 和5张牌。

点击右上角即可分享
微信分享提示