Soldier Blog

「每一天 就是人生」

c++ fuction

std::cerr std::cerr(console error)是ISO C++标准错误输出流,与std::cout不同,ISO C++要求当cerr被初始化后,cerr.flags() & unitbuf非零(保证流在每次输出操作后被刷新),且cerr.tie()返回&cout。cout对应于标准输出流,默认情况下是显示器。这是一个被缓冲的输出,可以被重定向。cerr对...

c++ II

Chapter 2 type conversions assign float to integral,it will truncate.e.g. 3.8->3 assign an out-of-range value to unsigned type,the result is the modulo. assign an out-of-range value to...

Dot

编写 运行出图 进入graph目录,vim test.gv dot -Tpng -O test.gv 语法 有向图 1 2 3 4 5 digraph simple { a -> b -> c; b -> d; } note:有向图关键词 digraph;simple图片...

Numpy notes

introduce 标准安装的Python中用列表(list)保存一组值,可以用来当作数组使用,不过由于 列表的元素可以是任何对象,因此列表中所保存的是 对象的指针。这样为了保存一个简单的[1,2,3],需要有3个指针和三个整数对象。对于数值运算来说这种结构显然比较 **浪费内存和CPU计算**时间. 此外Python还提供了一个array模块,array对象和列表不同,它直接保存数值,和C...

Welcome to Jekyll!

You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run je...