上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
摘要: 1、代码结构2、运行实例1、代码结构$ tree.├── photoweb.go├── public│ ├── css│ ├── images│ └── js├── uploads└── views ├── list.html └── upload.html 1.1)photoweb.... 阅读全文
posted @ 2015-07-25 02:20 fengbohello 阅读(934) 评论(0) 推荐(0) 编辑
摘要: vim命令笔记a 插入insert 插入:%!xxd 以16进制方式进行编辑:%!xxd -r 从16进制还原 阅读全文
posted @ 2015-07-25 02:08 fengbohello 阅读(160) 评论(0) 推荐(0) 编辑
摘要: MAKE = g++ -g #MAKE = gcc -g FILES = tfall : $(FILES)#DYSRC = target.c #DYTGT = $(DYSRC:.c=.o) %.o : %.c $(MAKE) -c $^ -o $@%.o : %.cpp $(M... 阅读全文
posted @ 2015-07-24 11:10 fengbohello 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 1、linux下watch命令的基本用法# watch --helpUsage: watch [-dhntv] [--differences[=cumulative]] [--help] [--interval=] [--no-title] [--version] -d, --differenc... 阅读全文
posted @ 2015-07-22 17:56 fengbohello 阅读(635) 评论(0) 推荐(0) 编辑
摘要: 1、mysql 客户端 开发 链接库 1.1)CentOS yum install mysql-devel 阅读全文
posted @ 2015-07-22 15:18 fengbohello 阅读(350) 评论(0) 推荐(0) 编辑
摘要: top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器。下面详细介绍它的使用方法。top - 01:06:48 up1:22,1 user,load average: 0.06, 0.60,0.48 Tasks:29 total,... 阅读全文
posted @ 2015-07-22 10:30 fengbohello 阅读(513) 评论(0) 推荐(0) 编辑
摘要: 用Go语言实现一个最简单的http服务器端,主要用到了package io, log, net/http 这个3个库。用到的函数包括: http.Handle() http.HandlerFunc() http.ListenAndServe()目录:1、代码2、运行1、代码$ cat hell... 阅读全文
posted @ 2015-07-22 00:39 fengbohello 阅读(2466) 评论(0) 推荐(0) 编辑
摘要: 本文介绍如何使用Go语言自带的库把对象转换为JSON格式,并在channel中进行传输后,并把JSON格式的信息转换回对象。1、Go语言的JSON 库 Go语言自带的JSON转换库为encoding/json 1.1)其中把对象转换为JSON的方法(函数)为json.Marshal(),其函数原... 阅读全文
posted @ 2015-07-21 22:51 fengbohello 阅读(91526) 评论(4) 推荐(0) 编辑
摘要: 1、代码2、编译及运行1、网络编程 TCP 示例simplehttp.go 代码 1 package main 2 3 import ( 4 "net" 5 "os" 6 "io" 7 "bytes" 8 "fmt" 9 )10 11 func main()... 阅读全文
posted @ 2015-07-20 23:20 fengbohello 阅读(1045) 评论(0) 推荐(0) 编辑
摘要: 1、代码2、编译及运行1、Go语言网络编程:ICMP示例代码icmptest.go 1 package main 2 3 import ( 4 "fmt" 5 "net" 6 "os" 7 "io" 8 "bytes" 9 )10 11 func main(... 阅读全文
posted @ 2015-07-20 23:14 fengbohello 阅读(1545) 评论(1) 推荐(0) 编辑
摘要: 1、工程代码2、编译及运行1、工程目录结构$ tree cgsscgss├── cgss.go└── src ├── cg │ ├── centerclient.go │ ├── center.go │ └── player.go └── ipc ├── ... 阅读全文
posted @ 2015-07-19 22:38 fengbohello 阅读(1042) 评论(0) 推荐(0) 编辑
摘要: 1、代码2、运行3、解析1、代码 1 package main 2 3 import ( 4 "time" 5 "fmt" 6 ) 7 8 func waitFor(ch chan int) { 9 fmt.Println(time.Now(), "writing ...... 阅读全文
posted @ 2015-07-19 00:38 fengbohello 阅读(1232) 评论(0) 推荐(0) 编辑
摘要: 1、代码2、运行3、解析1、代码 buffer.go 1 package main 2 3 import ( 4 "fmt" 5 "time" 6 ) 7 8 func readThread(ch chan int) { 9 fmt.Println("read for r... 阅读全文
posted @ 2015-07-18 10:33 fengbohello 阅读(1936) 评论(5) 推荐(0) 编辑
摘要: 一、添加规则#/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT #/sbin/iptables -I INPUT -p tcp --dport 22 -j ACCEPT 然后保存: #/etc/rc.d/init.d/iptables sav... 阅读全文
posted @ 2015-07-15 00:17 fengbohello 阅读(844) 评论(0) 推荐(0) 编辑
摘要: 1、代码2、编译及运行1、目录结构 1.1) 1 $ tree 2 . 3 ├── mplayer.go 4 └── src 5 ├── mlib 6 │ ├── manager.go 7 │ └── manager_test.go 8 └── mp 9 ... 阅读全文
posted @ 2015-07-13 22:45 fengbohello 阅读(1029) 评论(0) 推荐(0) 编辑
摘要: 1、代码 1.1)test.l 1.2)test.y 1.3)Makefile (因为是在linux环境下,所以使用了Makefile)2、编译与运行 2.1)编译 2.2)运行1、代码(也可以在我的百度网盘下载:http://pan.baidu.com/s/1o65k7v8) 1.1... 阅读全文
posted @ 2015-07-09 19:43 fengbohello 阅读(1968) 评论(4) 推荐(1) 编辑
摘要: 1、制作补丁包 命令格式 diff -uNr oldfile.c newfile.c > x.patch2、打补丁 命令格式 patch -p0 to-file.patchpatch –p0 to-docu.patchpatch –p1 < to-docu.patchpatch –R –p1... 阅读全文
posted @ 2015-07-09 11:05 fengbohello 阅读(942) 评论(0) 推荐(0) 编辑
摘要: 1、代码2、运行 1 package main 2 3 import "fmt" 4 5 func testValue(){ 6 fmt.Println("for value") 7 var a = [3]int {1, 2, 3} 8 var b = a 9 ... 阅读全文
posted @ 2015-07-06 21:31 fengbohello 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 1、代码2、运行1、代码 1 package main 2 3 import "fmt" 4 5 type Base struct { 6 Name string 7 } 8 9 func (base * Base) Foo() {10 fmt.Println("Base Fo... 阅读全文
posted @ 2015-07-06 21:27 fengbohello 阅读(679) 评论(0) 推荐(0) 编辑
摘要: 1、代码2、运行1、代码 1 package main 2 3 import "fmt" 4 5 type Rect struct { 6 x, y float64 7 width, height float64 8 } 9 10 func (r * Rect) Area() f... 阅读全文
posted @ 2015-07-06 21:25 fengbohello 阅读(593) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 11 下一页
点击右上角即可分享
微信分享提示