上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 18 下一页

2014年12月19日

前端代码

摘要: 工作中会遇到写前端页面的时候,此篇博客作为备份。test 阅读全文

posted @ 2014-12-19 21:32 awildfish 阅读(87) 评论(0) 推荐(0) 编辑

2014年12月11日

apache:添加cgi模式

摘要: 最终期望:通过配置apache的cgi能够使得apache能通过cgi方式连接go程序(因为我们的后端程序是用go语言写的)。 实验1: 期望:通过配置cgi使得应用程序能够跑起来。 go代码: Go编译:/usr/local/go/bin/go build -o /home/luwenwei/go 阅读全文

posted @ 2014-12-11 11:47 awildfish 阅读(198) 评论(0) 推荐(0) 编辑

2014年12月8日

初识golang

摘要: golang是一门编译型的语言。问题1:int和*int有啥区别?和c语言中有区别么? var a int = 32 var b *int = &a fmt.Println("type(a)=", reflect.TypeOf(a)) fmt.Println("type(b)=",... 阅读全文

posted @ 2014-12-08 18:51 awildfish 阅读(286) 评论(0) 推荐(0) 编辑

2014年12月5日

Golang: pprof

摘要: 压测的时候,如果在应用包里加入runtime包,会对压测产生非常严重的干扰。测试1:开启runtime包[luwenwei@test-weishi01v ~]$ siege -c 100 --time=15s -q -f /tmp/SafeBizEngine.siege.2Lifting the s... 阅读全文

posted @ 2014-12-05 16:45 awildfish 阅读(293) 评论(0) 推荐(0) 编辑

2014年11月27日

Golang:测试map是否存在

摘要: 请看这个url:http://www.du52.com/text.php?id=561 if v, ok := m1["a"]; ok { fmt.Println(v) } else { fmt.Println("Key Not Found") } 阅读全文

posted @ 2014-11-27 22:21 awildfish 阅读(2883) 评论(0) 推荐(0) 编辑

beego: 获取request参数

摘要: beego提供了一套web开发的框架。但我们在开发过程中遇到了一些问题,现汇总如下。测试1:测试只有keys数组的情况func (this *TestController) Index() {keys := make([]string, 0)this.Ctx.Input.Bind(&keys, "k... 阅读全文

posted @ 2014-11-27 21:42 awildfish 阅读(10949) 评论(0) 推荐(0) 编辑

shell:crontab

摘要: crontab*/1 * * * * (cd /home/q/system/project; /usr/bin/lockf -t 0 /tmp/discuz_bbs_audit.lock /usr/local/php/bin/php audit_cron.php) >> /home/q/system... 阅读全文

posted @ 2014-11-27 10:25 awildfish 阅读(130) 评论(0) 推荐(0) 编辑

2014年11月17日

初识Iaas,paas

摘要: Iaas(Infrastructure-as-a-service),直译为基础设备作为一种服务。Paas(Platform as a service),直译为平台作为一种服务。暂且忘掉这两个单词,想象两种场景。一、回忆下《目前公司内部的系统是如何在线上运行和调整的》dns,lvs,web机=====... 阅读全文

posted @ 2014-11-17 21:16 awildfish 阅读(242) 评论(0) 推荐(0) 编辑

初识golang

摘要: golang的变量和常量//函数外声明并初始化变量var test //错误var test = "test" //ok,不需要写分号,不需要写类型var test string = "test" //ok,写不写类型都OKtest := "test" //错误,在函数外部不可以用:=//解释:":... 阅读全文

posted @ 2014-11-17 16:42 awildfish 阅读(725) 评论(0) 推荐(0) 编辑

2014年11月16日

Go-new和make

摘要: new返回指向struct的指针,new仅分配内存,而不对对象的值进行初始化make返回到strcut的对象,而不是指针,只能创建map,slice,channel对象make([]string, 5, 10)new([]string)http://www.sharejs.com/codes/go/... 阅读全文

posted @ 2014-11-16 14:34 awildfish 阅读(183) 评论(0) 推荐(0) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 18 下一页

导航