shell脚本中echo显示内容带颜色显示,echo显示带颜色,需要使用参数-e 格式如下: echo -e "\033[字背景颜色;文字颜色m字符串\033[0m" 例如: echo -e "\033[41;36m something here \033[0m" 其中41的位置代表底色,...
分类:
其他好文 时间:
2014-09-23 13:18:44
阅读次数:
259
Don't give up when you still have something to give, becausenoting is really over until the moment you stop trying当你还能给予的时候别轻言放弃.只要你不放弃,一切皆有可能Don't gi...
分类:
其他好文 时间:
2014-09-23 11:19:24
阅读次数:
217
IntroductionEven Chris created his article ofUseful Reference Booksages ago I just bumped into it, and after adding my bit I thought to do something s...
分类:
其他好文 时间:
2014-09-22 23:30:33
阅读次数:
346
1、首先说一下canvas类: Class Overview The Canvas class holds the "draw" calls. To draw something, you need 4 basic components: A Bitmap to hold the pixels, a...
分类:
移动开发 时间:
2014-09-22 14:07:32
阅读次数:
317
函数在javascript中可以说是一等公民,也是最有意思的事情,javascript函数其实也是一个对象,是Function类型的实例。因此声明一个函数首先可以使用 Function构造函数:var saySomething = new Function("something","console....
分类:
编程语言 时间:
2014-09-21 01:18:29
阅读次数:
303
Problem Description
Corrupt governors always find ways to get dirty money. Paint something, then sell the worthless painting at a high price to someone who wants to bribe him/her on an auction, this ...
分类:
其他好文 时间:
2014-09-20 22:56:29
阅读次数:
258
Problem Description
Corrupt governors always find ways to get dirty money. Paint something, then sell the worthless painting at a high price to someone who wants to bribe him/her on an auction, this ...
分类:
其他好文 时间:
2014-09-20 20:23:09
阅读次数:
289
参考资料
__setattr__、__getattr__和__delattr__以及__getattribute__可以拦截对对象属性的访问;
>>> s = Something()
>>> s.age = 3
set 'age' = 3
>>> s.age
3
注意到,s.age并没有调用__getattr__,是因为...
分类:
编程语言 时间:
2014-09-20 10:05:47
阅读次数:
188
最近在开发jni时,需要返回多个参数给java。这个过程中,碰到了一些问题,值得探讨一下。具体是这样,jni方法jni_do_something作了底层处理后,得出两个int数据,需要将他们的值传递给java。在C语言中,直接用指针就可以了。Java中可以传递两个Integer的引用。用JNI怎么实...
分类:
其他好文 时间:
2014-09-19 11:25:05
阅读次数:
260
setTimeout经常被用于延迟执行某个函数,用法为
setTimeout(function(){
…
}, timeout);
有时为了进行异步处理,而使用setTimeout(function…,0);比如
function f(){
… // get ready
setTimeout(function(){
…. // do something
}, 0);...
分类:
编程语言 时间:
2014-09-18 22:21:34
阅读次数:
262