life
» 奋斗!
就算全世界都在怀疑你, 你也要相信自己!
Toggle navigation
life
主页
leanote开发
javascript
golang
About Me
归档
标签
revel 模块静态化
? golang ?
? revel ?
? leanote ?
? life ?
2014-09-26 14:10:40
782
1
1
controller执行后
c.RenderArgs["tagsJson"] = c.Json(tagService.GetTags(c.GetUserId())) return c.RenderTemplate("note/note-dev.html") Controller:
type Controller struct { RenderArgs map[string]interface{} // Args passed to the template. } 返回 RenderTemplateResult 对象
golang exec 执行系统命令
? golang ?
2014-09-25 13:17:44
16621
0
0
exec.Command()
最简单的方法:
cmd := exec.Command( "/bin/sh/" , "-c" , "linux命令" ) 或复杂的, 各个参数都要单独写
cmd := exec.Command( "ls", "-l", "-a" )
package main import ( "bytes" "fmt" "os/exec" ) func main() { in := bytes.NewBuffer(nil) cmd := exe
golang struct调用方法问题
2014-09-22 19:13:21
1009
1
0
package main import ( "fmt" ) type A struct { C int } func (this *A) F() { // this.C = 10 fmt.Println("from a.F()") } func (this *A) F2() { // fmt.Println(this.C) } var a *A // a == nil func main() { a.F() // 输出from a.F() } a.F()竟然不报错, a == nil啊
但是如果这样再调用 a.F()就会报空指针问题, 因为传到F()里面的t
golange 模板
? golange 模板 ?
2014-09-19 21:00:39
833
1
0
if 这些存在吗? 1.1.2 不存在! 1.3存在.
eq Returns the boolean truth of arg1 == arg2 ne Returns the boolean truth of arg1 != arg2 lt Returns the boolean truth of arg1 < arg2 le Returns the boolean truth of arg1 <= arg2 gt Returns the boolean truth of arg1 > arg2 ge Returns the boolean tr
leanote功能列表
2014-09-17 22:21:59
1600
1
1
leanote支持多用户, 所以每个表都会有userId字段. 笔记本 支持 多级分类(无限级) 笔记本可共
line-height: 150% 和 line-height: 1.5 的差别
2014-09-17 22:07:12
696
0
0
line-height属性的细节 与大多数CSS属性不同,line-height支持属性值设置为无单位的数字。有无单位在子元素继承属性时有微妙的不同。 语法 line-height: normal | <number> | <length> | <percentage> normal 根据浏览器决定,一般为1.2。 number 仅指定数字时(无单位),实际行距为字号乘以该数字得出的结果。可以理解为一个系数,子元素仅继承该系数,子元素的真正行距是分别与自身元素字号相乘的计算结果。大多数情况下推荐使用,可以避免一些意外的继承问题。 length 具体的
leanote换新logo啦
? leanote logo ?
2014-09-15 20:27:02
689
0
2
感谢 https://github.com/jaguarWang 为leanote制作了新logo, 愿leanote能像小狗一样聪明, 灵活, 讨人喜欢!!
笔记内的leanote logo是通过字体来呈现的.
css省略号
2014-09-15 18:55:13
719
0
0
white-space: nowrap;text-overflow:ellipsis; overflow:hidden;
text-overflow : clip | ellipsis 取值: clip : 默认值。不显示省略标记(...),而是简单的裁切 ellipsis : 当对象内文本溢出时显示省略标记(...)
white-space : normal | pre | nowrap 取值: normal : 默认值。默认处理方式。文本自动处理换行。假如抵达容器边界内容会转到下一行 pre : 换行和
hive+python数据分析入门
? hive ?
? python ?
? 数据分析 ?
2014-08-17 10:48:47
11620
0
0
绝对原创, 转载请注明出处: http://leanote.com/blog/view/539276d41a91080a06000002 为什么要使用hive+python来分析数据 举个例子, 当年没有数据库的时候, 人们编程来操作文件系统, 这相当于 我们编写mapreduce来分析数据 后来有了数据库, 再没人操作文件系统了(除非有其它需求), 而是直
常用eclipse插件
2014-06-28 12:26:17
761
0
0
最近重装了eclipse, 记录下插件的安装方法, 避免以后重装还要搜.
PHP: install new software -> 输入 http://update.phpeclipse.com/update/stable/1.2.x svn: install new software -> 输入 http://subclipse.tigris.org/update_1.6.x golang: install new software -> http://goclipse.googlecode.com
上一页
3/5
下一页