摘要: 算法原理:http://www.ruanyifeng.com/blog/2013/05/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm.html next数组还不是太理解,代码如下 阅读全文
posted @ 2017-12-06 15:25 fireflycmh 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 变量 变量声明 变量初始化 变量赋值 匿名变量 常量 常量定义 预定义常量 true, false, iota iota在const出现时重置为0,在下一个const出现之前,每出现iota,代表数字增加1 枚举 类型 布尔类型 整型、浮点型、复数类型、字符串、字符类型 数组 数组切片 数据结构:指 阅读全文
posted @ 2017-11-21 19:50 fireflycmh 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 第一步:新建分支 第二步:提交分支commit 第三步:与主干同步 第四步:合并commit 第五步:推送到远程仓库 第六步: 发出Pull Request 阅读全文
posted @ 2017-11-16 16:08 fireflycmh 阅读(205) 评论(0) 推荐(0) 编辑
摘要: ``` func BubbleSort(values []int) { for i := 0; i 阅读全文
posted @ 2017-10-27 16:59 fireflycmh 阅读(63) 评论(0) 推荐(0) 编辑
摘要: tofile() fromfile()>>a = np.arange(0,12)>>a.shape = 3,4>>aarray([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11]])>>a.tofile("a.bin... 阅读全文
posted @ 2015-02-07 20:48 fireflycmh 阅读(450) 评论(0) 推荐(0) 编辑
摘要: 1.创建数组import numpy as npa=np.array([1,2,3,4],[4,5,6,7],[7,8,9,10])查看:a.shape | (3,4)a.shape = 4,3 | 改变为4*3形状 a.shape = 2,-1 | -1代表自动计算长度a.dtype... 阅读全文
posted @ 2015-02-07 20:01 fireflycmh 阅读(290) 评论(0) 推荐(0) 编辑