摘要: 目录1. 普通替换命令:s///作用范围:替换标志2. 查找替换命令:substitute()3. 使用寄存器进行替换 1. 普通替换命令:s/// 在Vim中,最常用的替换命令是s///,其中s表示替换,三个斜杠代表分隔符。分隔符可以是任意字符,如s@@@、s###等,只要保证三个分隔符相同即可。 阅读全文
posted @ 2024-04-01 11:07 flxx 阅读(34) 评论(0) 推荐(0) 编辑
摘要: vim搜索比较高效快捷 指令 '/':光标位置向下搜索,如'/hello'搜索光标前的包含hello的目标,如hello, ahellob '?':光标位置向上搜索,如'?hello'搜索光标后的包含hello的目标,如hello, ahellob 增加限定 增加'\c'大小写不敏感,vim默认大小 阅读全文
posted @ 2024-03-27 10:58 flxx 阅读(2) 评论(0) 推荐(0) 编辑
摘要: C++标准库提供了多种容器,每种容器都有其自身的特点和适用场景。以下是C++标准库中常用的容器以及它们的特点: std::vector:动态数组,支持随机访问,适用于需要快速随机访问元素的场景。 push_back():在数组末尾添加一个元素。 pop_back():删除数组末尾的元素。 size( 阅读全文
posted @ 2024-03-21 10:57 flxx 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 用户代码 #include <iostream> int main(){ int a = 11, b = 3, c = 5; a -= b + c; return 0; } 计算机代码 main: push rbp mov rbp, rsp mov DWORD PTR [rbp-4], 11 mov 阅读全文
posted @ 2024-03-12 14:02 flxx 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 目录举例说明工作原理更优方法 举例说明 assert(("hello world!", false)); 这段C++代码的目的是为了演示assert断言。assert断言用于检查一个条件是否为真,如果条件为假,则抛出一个异常,并显示一条错误消息。 在这个例子中,我们使用了assert宏,它接受两个参 阅读全文
posted @ 2024-03-12 11:33 flxx 阅读(2) 评论(0) 推荐(0) 编辑
摘要: /** * Convert valid timing fields (timestamps / durations) in a packet from one * timebase to another. Timestamps with unknown values (AV_NOPTS_VALUE) 阅读全文
posted @ 2024-03-01 14:43 flxx 阅读(45) 评论(0) 推荐(0) 编辑
摘要: /** * @defgroup opt_set_funcs Option setting functions * @{ * Those functions set the field of obj with the given name to value. * * @param[in] obj A 阅读全文
posted @ 2024-03-01 10:24 flxx 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 代码演示: int64_t d = 123; printf("test printf:%5" PRId64 "\n", d); printf("test printf:%-*d", 5, d); printf("test printf:%*d", 5, d); // output test prin 阅读全文
posted @ 2024-02-26 15:29 flxx 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 在C语言中,char *const、const char* 以及 char const* 确实存在区别,虽然有时这些区别可能微妙但非常重要。让我们逐一分析: char *const(常量指针): 这意味着指针本身是常量,即一旦被初始化,它的地址就不能再改变。然而,它指向的值是可以改变的。也就是说,你 阅读全文
posted @ 2024-02-26 14:11 flxx 阅读(9) 评论(0) 推荐(0) 编辑
摘要: linesize说明 #define AV_NUM_DATA_POINTERS 8 /** * For video, size in bytes of each picture line. * For audio, size in bytes of each plane. * * For audio 阅读全文
posted @ 2024-02-21 17:57 flxx 阅读(4) 评论(0) 推荐(0) 编辑