2013-01-14 Klaus Ma
ACE provides lots of wrapper classes to hide the difference between OS. ACE_Process is one of them to give us an unified operation interface to fork/kill/wait a process. And ACE_Process is also a good example code to show useful function, such as how to check whether a process is alive. 继续阅读 »
2013-01-10 Klaus Ma
Code slice #define debug(fmt,...) do { \ fprintf(stderr,"[ DEBUG ] : [ %s, %d ] ",__FILE__,__LINE__); \ fprintf(stderr,fmt,##__VA_ARGS__); \ fprintf(stderr,"\n"); \ } while(0) 继续阅读 »
2013-01-03 Klaus Ma
Selenium a powerful suite of tools for web testing, but it’s dependent on browser (Firefox, IE, Chrome); and those browser need a displayer. As a console/command geek, it’s intolerable. After several days investigation, I’d like to introduce PyVirtualDisplay to run Selenium in a console with Python. 继续阅读 »
2012-12-30 Klaus Ma
In a large cluster, some un-expected long running task hold back the job’s runtime sometimes. And those long running tasks are hard to locate in such a large cluster. Some ideas are shown here to help to locate those long running tasks. One of them will be implemented in the coming released of OGL. 继续阅读 »
2012-12-16 Klaus Ma
在编写Java程序时,Exception类的printStacktrace()可以打印异常堆栈,这个小工具极大的提高了调试效率;虽然不是一个好习惯,却很实用。习惯了Java编程,很希望 C/C++里也有这样的小工具可以帮助调试程序. 经过几天查找,发现其实每个系统都提供了打印调用堆栈的函数;这些函数是系统相关,这里仅以Linux下的函数作说明. Linux中共提供了三个函数用于打印调用堆栈: 继续阅读 »
2009-09-02 Klaus Ma
各个语言的正则表达式使用,在这些记录一下: Javascript Javascript的正则函数好像是最简单的了,也可能是因为本身就是一种弱类型的语言:看一下使用吧: var pattern = /test$/; pattern.match("test"); // 这个会匹配全串,返回true or false; pattern.exec("test"); //这个呢则会查找每个匹配的部分,返回值是匹配的字符串 继续阅读 »
2008-03-17 Klaus Ma
主要想法: 将作业与插件分离,通过定义新的作业融合各个插件。 实现细节: 客户端: 1.提供服务配置查询命令。 2.由客户端指定作业类型。 例如 csf-job-run -t workflow myjobs.xml 继续阅读 »