http://blog.sina.com.cn/s/blog_a89e19440101fb28.htmlPython列表解析语法[]和生成器()语法类似[exprforiter_variniterable]或[exprforiter_variniterableifcond_expr]例子:[ifor...
分类:
编程语言 时间:
2014-09-19 15:14:25
阅读次数:
300
expr命令为Linux中的命令,一般用于整数值计算,但也可用于字符串操作。一:整数值计算expr argument operator argument 【注意有空格】expr 10 / 2二:字符串match String1 String2与 Expression1 : Expression2 相...
分类:
其他好文 时间:
2014-09-19 11:54:25
阅读次数:
185
ms-class是avalon用得最多的几个绑定之一,也正因为如此其功能一直在扩充中。根据时期的不同,分为旧风格与新风格两种。旧风格是指ms-class-xxx=”expr”,*ms-class-aaa-bbb=”expr”*。正如第三节《绑定属性与扫描机制》所讲,一个绑定属性分成三部分,第一部分是...
分类:
Web程序 时间:
2014-09-19 11:41:25
阅读次数:
408
Ubuntu监控load脚本:#viload.sh按a或i进入编辑模式#!/bin/bashName=`hostname`IP=`/sbin/ifconfigeth0|grep"inetaddr"|awk-F[:""]+‘{print$4}‘`Date=`date+%m%d%y`Load=`/usr/bin/uptime|grepload|awk-F[:""]+‘{print$14}‘|tr-d","`Load2=150if[$(echo"$Load>$Load2"|bc)-e..
分类:
其他好文 时间:
2014-09-17 18:51:43
阅读次数:
224
内联函数内联函数与带参数宏区别新的类型转换运算符const_cast(expr)static_cast(expr)reinterpret_cast(expr) dynamic_cast(expr)当程序执行函数调用时,系统要建立栈空间,保护现场,传递参数以及控制程序执行的转移等等,这些工作需要系统时...
分类:
编程语言 时间:
2014-09-17 16:44:52
阅读次数:
258
Color getRandColor(int fc,int bc){//给定范围获得随机颜色
Random random = new Random();
if(fc>255) fc=255;
if(bc>255) bc=255;
int r=fc+random.nextInt(bc-fc);
int g=fc...
分类:
其他好文 时间:
2014-09-16 23:45:31
阅读次数:
217
整理自?http://itindex.net/detail/44409-%E8%AE%A1%E7%AE%97-%E7%9B%B8%E4%BC%BC 说明: * 其中基准数据,可以来自外部,处理过程为: ? ? ?- 处理为词袋 ? ? ?- 经过数据集的tfidf结果 * 无法处理中文 ...
分类:
其他好文 时间:
2014-09-16 19:17:11
阅读次数:
246
[root@jbossshell]#catgetopts.sh#!/bin/bash#date=2014-09-16#istopracticethegetoptswhilegetopts"a:bc"arg(:前面的变量是一定要跟参数的)do case$argin a) echo"a‘sarg:$OPTARG" ;; b) echo"b" ;; c) echo"c" ;; ?) echo"unkownargument" exit1 ;; esacdone[root@j..
分类:
其他好文 时间:
2014-09-16 19:09:31
阅读次数:
205
aaabbbcccceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...
分类:
其他好文 时间:
2014-09-14 15:19:57
阅读次数:
189