fishincat

导航

2016年1月15日 #

Go Data Structures: Interfaces

摘要: refer:http://research.swtch.com/interfacesGo Data Structures: InterfacesPosted on Tuesday, December 1, 2009.Go's interfaces—static, checked at compile... 阅读全文

posted @ 2016-01-15 16:50 fishincat 阅读(116) 评论(0) 推荐(0) 编辑

2015年7月24日 #

secureCRT中文乱码问题

摘要: secureCRT中用vim查看文件中文乱码问题。首先使用的vim得支持编码转换,在vim下输入:set encoding即可查看是否支持。 如不支持,需要重新编译,./configure的时候要添加--enable-multitype选项。设置fileencodings, encoding, te... 阅读全文

posted @ 2015-07-24 10:34 fishincat 阅读(172) 评论(0) 推荐(0) 编辑

2014年12月7日 #

golang的channel使用

摘要: chan使用前必须用make来创建,可以有多个槽位 0个槽位相当于消息,1个槽位相当于锁,多个槽位就是读者-写者go func 阅读全文

posted @ 2014-12-07 23:04 fishincat 阅读(129) 评论(0) 推荐(0) 编辑

2014年12月3日 #

Linux下的tar压缩解压缩命令详解

摘要: 转载自http://www.cnblogs.com/qq78292959/archive/2011/07/06/2099427.htmltar-c: 建立压缩档案-x:解压-t:查看内容-r:向压缩归档文件末尾追加文件-u:更新原压缩包中的文件这五个是独立的命令,压缩解压都要用到其中一个,可以和别的... 阅读全文

posted @ 2014-12-03 11:15 fishincat 阅读(172) 评论(0) 推荐(0) 编辑

2014年12月2日 #

vim使用命令

摘要: * 向前搜索当前单词# 向后搜索当前单词n 和 shift n(N) 向后向前跳到所匹配的单词处C-f page down; C-b page upC-o 回到上次位置C-i "C-o"的对立操作多文档编辑:sp fileName 水平分割文档:vs fileName 垂直分割文档c-w 两次切换... 阅读全文

posted @ 2014-12-02 16:12 fishincat 阅读(123) 评论(0) 推荐(0) 编辑

2014年11月25日 #

终端显示问题

摘要: 终端输出太多行导致之前的行被覆盖了,可以用命令后面添加 |more,可以后翻。退出按q或者空格,enter键后翻。命令后面添加 |less,可以前后翻。退出按q,空格到最后一行,上下键前后翻。安装了debian 7的纯字符界面,但是遇到了分辨率问题,默认的分辨率为640x480,用起来极其得不方便。... 阅读全文

posted @ 2014-11-25 15:07 fishincat 阅读(152) 评论(0) 推荐(0) 编辑

vim的一些配置

摘要: 所有用户的共同配置位于 /etc/vimrc 或者 /ect/vim/vimrcz中,可能还会有其他的配置文件,例如vimrc.tiny,具体的应用场景文件内会有说明。某个特定用户的vim配置位于 ~/.vimrc之中vim缩进设置:设置制表符宽度 set tabstop=4 set softt... 阅读全文

posted @ 2014-11-25 10:21 fishincat 阅读(224) 评论(0) 推荐(0) 编辑

2014年11月23日 #

golang中string以及slice之间的一些问题

摘要: 好记性不如烂笔头o_O slice切片不会开辟新的空间a := []int{0,1,2,3}b := make([]int, 8)b = a[:]b[2] = 9fmt.Println(a)fmt.Println(b)输出:[0 1 9 3][0 1 9 3]string底层是用byte数组存的,并... 阅读全文

posted @ 2014-11-23 17:41 fishincat 阅读(264) 评论(0) 推荐(0) 编辑

Go Data Structures: Interfaces

摘要: 原文链接http://research.swtch.com/interfacesGo's interfaces—static, checked at compile time, dynamic when asked for—are, for me, the most exciting part of... 阅读全文

posted @ 2014-11-23 13:27 fishincat 阅读(142) 评论(0) 推荐(0) 编辑

go语言的selector

摘要: For aprimary expressionxthat is not apackage name, theselector expressionx.fdenotes the field or methodfof the valuex(or sometimes*x; see below). The ... 阅读全文

posted @ 2014-11-23 12:39 fishincat 阅读(649) 评论(0) 推荐(0) 编辑