2018年11月14日

go语言学习之可变参数函数

摘要: 1 // 遍历可变参数列表——获取每一个参数的值 2 package main 3 4 import( 5 "fmt" 6 "bytes" 7 ) 8 9 func joinString(stringList ...string) string{ 10 var buffer bytes.Buffer 11 for _, s:= ... 阅读全文

posted @ 2018-11-14 09:55 奔跑吧,蜗牛! 阅读(864) 评论(0) 推荐(0) 编辑

2018年11月13日

go语言学习之闭包函数

摘要: package main import ( "fmt" ) // 匿名函数1 func intSeq() func() int{ var arrInt = [10]int{1,2,3,4,5,6,7,8,9,10} i := -1 return func() int{ i += 1 return arrInt[i] ... 阅读全文

posted @ 2018-11-13 13:06 奔跑吧,蜗牛! 阅读(282) 评论(0) 推荐(0) 编辑

2018年11月12日

Ubuntu下go语言开发环境搭建(GoEclipse配置)

摘要: 下载go语言包 1、 下载 https://golang.google.cn/dl/ go1.4.linux-amd64.tar.gz 2、 将下载的二进制包解压至 /usr/local目录。 3、 将 /usr/local/go/bin 目录添加至PATH环境变量: 1、 下载地址 https:/ 阅读全文

posted @ 2018-11-12 17:48 奔跑吧,蜗牛! 阅读(883) 评论(0) 推荐(0) 编辑

go语言学习笔记

摘要: go 语言学习笔记 逻辑语句、循环语句和函数 阅读全文

posted @ 2018-11-12 13:20 奔跑吧,蜗牛! 阅读(132) 评论(0) 推荐(0) 编辑

2018年8月29日

linux launch failed.binary not found Linux

摘要: Linux 不需要装MinGW,需要设置两个地方 1 Project->Properties->C\C++ Build->Settings->在右边选择Binary Parsers->勾选GUN ELF Parser然后右下角点Apply and Close; 2 Project->Properti 阅读全文

posted @ 2018-08-29 13:09 奔跑吧,蜗牛! 阅读(751) 评论(0) 推荐(0) 编辑

2018年8月20日

C++11 占位符placeholders和函数bind用法

摘要: #include #include #include using namespace std; using namespace std::placeholders; void test(int i, double d, const string &s) { cout fp; string s = "foo"; int a = 3; double b =... 阅读全文

posted @ 2018-08-20 13:45 奔跑吧,蜗牛! 阅读(6137) 评论(0) 推荐(0) 编辑

C++11 function函数用法

摘要: // C++11 function #include void print_num(int i) { std::cout getSum = [&](const int &nI1, const int &nI2) { int nSum = nI1 + nI2; std::cout f_display_42 = []() { print_num(42); }; f_displa... 阅读全文

posted @ 2018-08-20 13:25 奔跑吧,蜗牛! 阅读(10179) 评论(0) 推荐(1) 编辑

placement new的用法及用途

摘要: 什么是placement new?所谓placement new就是在用户指定的内存位置上构建新的对象,这个构建过程不需要额外分配内存,只需要调用对象的构造函数即可。举例来说:class foo{};foo* pfoo = new foo;pfoo指向的对象的地址你是不能决定的,因为new已经为你做 阅读全文

posted @ 2018-08-20 12:03 奔跑吧,蜗牛! 阅读(6872) 评论(0) 推荐(2) 编辑

2018年7月12日

Numpy基础教程之概念介绍

摘要: https://blog.csdn.net/chaipp0607/article/details/74566340 Numpy是应用Python进行科学计算时的基础模块。它是一个提供多维数组对象的Python库,除此之外,还包含了多种衍生的对象(比如掩码式数组(masked arrays)或矩阵)以 阅读全文

posted @ 2018-07-12 21:49 奔跑吧,蜗牛! 阅读(228) 评论(0) 推荐(0) 编辑

Numpy基础教程之数组中的冒号用法

摘要: 用法1 arr[:, 1] 表示所有行的第二列的值的集合 arr[:,::-1] 表示所有行的列从后向前翻转,逆序输出 用法2 arr[::2, 1] 表示从第0行开始,步长为2,所有行的第二列的集合 用法3 arr = np.arange(100)[5:100:10] 表示从5开始到100,步长为 阅读全文

posted @ 2018-07-12 21:20 奔跑吧,蜗牛! 阅读(1544) 评论(0) 推荐(0) 编辑

导航