上一页 1 2 3 4 5 6 7 8 ··· 22 下一页

2013年9月29日

arch Failed to load module "intel"

摘要: arch启动x的时候出现问题困扰我一天了,终于解决掉了。错误如下:[ 61.086] (II) LoadModule: "intel"[ 61.087] (WW) Warning, couldn't open module intel[ 61.087] (II) UnloadModule: "intel"[ 61.087] (II) Unloading intel[ 61.087] (EE) Failed to load module "intel" (module does not exist, 0)[ 61.087] (I 阅读全文

posted @ 2013-09-29 09:23 wangbokun 阅读(1428) 评论(0) 推荐(0) 编辑

2013年9月26日

go 冒泡排序

摘要: package mainimport ( "fmt")func main() { a := [...]int{12, 32, 434, 765, 34, 8, 94, 12, 34, 53} num := len(a) fmt.Println(a) for i := 0; i < num; i++ { for j := i + 1; j < num; j++ { if a[i] < a[j] { temp := a[i] a[i] = a[j] ... 阅读全文

posted @ 2013-09-26 16:54 wangbokun 阅读(227) 评论(1) 推荐(0) 编辑

go (break goto continue)

摘要: package mainimport ( "fmt")func main() {LABEL1: for { for i := 0; i 3 { break LABEL1 } } } fmt.Println("ok")}package mainimport ( "fmt")func main() { for { for i := 0; i 3 { goto LABEL1 } } }LABEL1... 阅读全文

posted @ 2013-09-26 14:08 wangbokun 阅读(280) 评论(0) 推荐(0) 编辑

2013年9月25日

VirtualBox,Kernel driver not installed (rc=-1908)

摘要: http://hi.baidu.com/spt_form/item/316d6207b47b8ee03499020aVirtualBox,Kernel driver not installed (rc=-1908)Fedora安装Virtualbox后无法运行,要求执行/etc/init.d/vboxdrvsetup在Fedora下安装了Virtualbox,发现运行时出现以下问题:12Kerneldrivernotinstalled(rc=-1908)TheVirtualBoxLinuxkerneldriver(vboxdrv)iseithernotloadedorthereisapermi 阅读全文

posted @ 2013-09-25 16:50 wangbokun 阅读(1393) 评论(0) 推荐(0) 编辑

go运算符

摘要: package mainimport ( "fmt")func main() { fmt.Println(^2)}-3package mainimport ( "fmt")func main() { fmt.Println(1 << 10)}[ `go run test1.go` | done: 193.264246ms ] 1024/*6 : 011011: 1011----------------------& 0010 = 2 // 逻辑与| 1111 = 15 // 逻辑或^ 1101 = 13 //两个都是1的话不成立&am 阅读全文

posted @ 2013-09-25 15:14 wangbokun 阅读(396) 评论(0) 推荐(0) 编辑

go iota

摘要: package mainimport ( "fmt")const ( a = 'A' b c = iota d)func main() { fmt.Println(a) fmt.Println(b) fmt.Println(c) fmt.Println(d)}[ /dinglicom/gowork/project/test/ ] # go run test1.go[ `go run test1.go` | done: 641.241905ms ] 65 65 2 3以定义常量的顺序次数有关系,递增加1,再每个常量表达式组会初始化重新计数 阅读全文

posted @ 2013-09-25 14:42 wangbokun 阅读(228) 评论(0) 推荐(0) 编辑

go之匿名字段

摘要: struct,定义的时候是字段名与其类型一一对应,实际上Go支持只提供类型,而不写字段名的方式,也就是匿名字段,也称为嵌入字段。当匿名字段是一个struct的时候,那么这个struct所拥有的全部字段都被隐式地引入了当前定义的这个struct。package mainimport ( "fmt")type Human struct { name string age int weight int}type Student struct { Human speciality string}func main() { mark := Studen... 阅读全文

posted @ 2013-09-25 00:06 wangbokun 阅读(310) 评论(0) 推荐(0) 编辑

2013年9月23日

go编程基础

摘要: 可见性规则;go语言,根据函数名首字母大小写区分private,和pulic。函数名首字母小写为private函数名首字母大写为public 阅读全文

posted @ 2013-09-23 14:08 wangbokun 阅读(209) 评论(0) 推荐(1) 编辑

2013年9月22日

go(一)变量

摘要: package mainimport ( "fmt")func main() { var a int a = 1 var a1 string a1 = "my is a1" b := 2 b1 := "my is b1" fmt.Println(a, "^^^^", a1) fmt.Println(b, "^^^^", b1)}[ `go run test.go` | done: 208.870174ms ] 1 ^^^^ my is a1 2 ^^^^ my is b1接下来是件很有趣的,有了 阅读全文

posted @ 2013-09-22 13:43 wangbokun 阅读(240) 评论(0) 推荐(0) 编辑

2013年9月20日

go语言初体验

摘要: go下载地址: http://code.google.com/p/go/downloads/listgo官方安装地址:http://golang.org/doc/install另外收集一些关于go的地址:Go官方网站 http://golang.org/ Go中文官网 http://golang-china.org/中文论坛(测试中…) http://bbs.golang-china.org/中文用户讨论组(邮件) https://groups.google.com/group/golang-china/中文翻译(SVN) http://code.google.com/p/golang-chi 阅读全文

posted @ 2013-09-20 20:05 wangbokun 阅读(340) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 22 下一页

导航