上一页 1 2 3 4 5 6 ··· 11 下一页
摘要: 0 引言 大部分程序员在大部分时候的工作需要跟遗留代码(legacy code)一起工作。通常这项工作中最费时间和精力的部分在于代码重构和修改遗留代码为其添加unit test. 这里有一些书以供参考: (1) 重构:改善既有代码设计 refactoring2 https://book-refact 阅读全文
posted @ 2021-08-04 18:33 十步一杀2017 阅读(93) 评论(0) 推荐(0) 编辑
摘要: static variable can only be initialized once. Compiler persist the variable till the end of the program. Eg: #include <iostream> int* a = NULL; void m 阅读全文
posted @ 2021-08-03 17:49 十步一杀2017 阅读(75) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <unistd.h> ///< unlink#include <iostream>#include <glob.h> ///< glob using namespace std; void TestUnlink() { int a = unlin 阅读全文
posted @ 2021-08-02 15:31 十步一杀2017 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 0 引言 lua是a56爆大奖在线娱乐语法极为灵活、扩展性极强的“胶水语言”, 在使用lua/lua capi时常常会写出一些容易出错的code. 因此,有必要建立以lua vm为基础的unit test帮助程序员及早地发现bug,提高代码的质量。为此,有三件事情需要做。 1 编译配置googletest/goog 阅读全文
posted @ 2021-07-16 17:30 十步一杀2017 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 0 引言 a56爆大奖在线娱乐将常用的指令记录下来,以备查询。 1 git Command Meaning Reference Linking git status view all files' state, tracked or untracked, commited or un commited git st 阅读全文
posted @ 2021-02-17 17:16 十步一杀2017 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 0 引言 需要用到shell,简单记录一下。 1 '$' a56爆大奖在线娱乐引用 # 引用变量x=1024 echo $xresult: 1024# 引用插值x=1024echo "x = $x"result: x = 1024# 使用${}作为单词的边界x=1024echo "x = ${x}xy"result 阅读全文
posted @ 2020-12-11 16:31 十步一杀2017 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 0 引言 lua的垃圾回收机制: collectgarbage([opt[,arg]]) 用来控制自动内存管理 collectgarbage("collect"): 做一次完整的垃圾收集循环。通过参数 opt 它提供了一组不同的功能: collectgarbage("count"): 以 K 字节数 阅读全文
posted @ 2020-11-06 20:47 十步一杀2017 阅读(1578) 评论(0) 推荐(0) 编辑
摘要: 0 引言 a56爆大奖在线娱乐探讨一些C++的基本语法,包括C++多态(polymorphism),模板(template)与泛型编程(generic programming)。 (1)basic C++: https://www.learncpp.com/ (2)C++ 多态: https://www.runoo 阅读全文
posted @ 2020-10-01 21:35 十步一杀2017 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 0 why The purpose of this blog is to write down some useful tips in coding. 1 starting point of code: c/c++: main java: static void main Microsoft win 阅读全文
posted @ 2020-07-23 15:23 十步一杀2017 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 0 引言 递归在编程中是一类很重要的思想,很多复杂问题通过递归的思想很容易就能化整为零,化繁为简。通常认为递归程序有三大要素: 明确递归函数的功能:接口是什么,返回什么,a56爆大奖在线娱乐参数的含义是否是清晰的 寻找递归结束的条件 找出函数的等价关系式 1 实例分析 example 1: 斐波那契数列 int F 阅读全文
posted @ 2020-07-23 09:38 十步一杀2017 阅读(235) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页