如果直接将vim编辑的文字复制粘贴到一些blog的编辑器中,这些代码将会是死板的白纸黑字。如果能加入关键字高亮功能就好了,这样代码阅读起来会很方便。一些blog的编辑器提供了这项功能,一些没有,一些支持的语言不够全面。好在vim的syntax支持的语言够多,绝大部分流行的语言都可以直接找到支持。如果...
分类:
Web程序 时间:
2014-07-10 10:23:27
阅读次数:
287
A method is similar to a function – it takes arguments and returns a value – but the syntax is different. For example, the method upper takes a string...
分类:
其他好文 时间:
2014-07-07 15:42:12
阅读次数:
217
Apart from syntax, there are some differences when writing scripts in C# or Boo. Most notable are:除了句法规则, 使用C#或Boo编写脚本还有一些不同,当.需要特别注意的是:1. Inherit fro...
分类:
其他好文 时间:
2014-07-02 23:22:00
阅读次数:
307
#!/usr/bin/python# Filename: for.pyfor i in range(1, 5): print ielse: print 'The for loop is over'for循环在这个范围内递归——for i in range(1,5)等价于for i in ...
分类:
编程语言 时间:
2014-07-02 19:12:24
阅读次数:
288
a=Nonefor i in a: print('zheli de i shi %d' % i)报错:TypeError: 'NoneType' object is not iterable除非你提供你自己的return语句,每个函数都在结尾暗含有return None语句。关于DocStri...
分类:
编程语言 时间:
2014-07-02 17:31:36
阅读次数:
189
syntax:contained in:description:Requests a permission that the application must be granted inorder for it to operate correctly. Permissions are grant....
分类:
移动开发 时间:
2014-07-02 09:59:26
阅读次数:
203
Accessors
存取方法
All instance variables are private in Objective-C by default, so you should use accessors to get and set values in most cases. There are two syntaxes. This is the traditional 1.x syntax:
OC中所有的实例变量默认是私有的,所以多数情况下你应该使用访问器来获得和设置实例变量的值。访问器有...
分类:
其他好文 时间:
2014-07-02 08:39:04
阅读次数:
231
6.6 Referring to a Type withtypeofAnother way to refer to the type of an expression is withtypeof. The syntax of using of this keyword looks likesizeo...
分类:
其他好文 时间:
2014-07-01 17:37:49
阅读次数:
248
1. 先介绍下alias(别名)的用法
alias la='ls -a' alias b='cd ..' 等等
alias 是个好东西,可以在用shell省很多时间
2. 但有一天我发现执行shell脚本的时候,if 语句不能用了,会报一下错误:
bash: build/envsetup.sh: line 30: syntax error near une...
分类:
其他好文 时间:
2014-07-01 07:26:00
阅读次数:
214
There are idiosyncrasies in the GCC inline assembly syntax.in the line,__asm__ __volatile__("stw%U0%X0 %1,%0" : "=m"(v->counter) : "r"(i));the stw ass...
分类:
其他好文 时间:
2014-06-24 14:34:54
阅读次数:
309