Content Preview: rss
223 days ago
很长时间没有上MSN的博客了,建了一个又一个的blog,但又被我一个又一个的丢弃。。今天回头看自己以前写的文字,有种漠然回首的错觉,就像迟暮的老人看着年轻人,心里感叹我也曾经年轻过一样,而我的blog中年现在确是一片空白,不能连灌起来。。使我竟有一丝悔意,想去弥补一样,这才有了这篇文字。。 2008年对于中国来说,要被历史记录的东西太多,三一四,五一二,以及零八零八。。。(先去做事,回来再续)
749 days ago
需求:用JAVA语言实现WINDOW和LINUX系统下自动安装PERL组件的功能。 public void execNormalInstall(String modulename) { Runtime runTime = Runtime.getRuntime(); Process process = null; try { if (System.getProperty("os.name").toUpperCase().indexOf("WINDOWS") >= 0) { modulename = modulename.replaceAll("::", "-"); String path = CorePlugin.getDefault().getPreferenceStore().getString(ITalendCorePrefConstants.PERL_INTERPRETER);//安装PERL的目录 ex:E:\Perl\bin path = path.substring(0, path.lastIndexOf("\\")); process = runTime.exec("cmd /c start /D" + path + "\\" + " ppm install " + modulename); // process = runTime.exec("cmd /c start /D" + path + "\\" + " /B ppm install " + modulename);// "/B"不打开DOS窗口 } else if ...
863 days ago
因为要改一个关于正规检验的BUG,所以有幸学习了下正规表达式的语法。在网上看了很多资料,越看越糊涂,直到找到下面这个网址:http://www.blogjava.net/xuechen0721/archive/2007/01/01/91320.html 很不幸的是,虽然明白了正规表达式的语法,但是哪个BUG直到我写这个网志时,还被我设为“suspend”。具体情况如下:
867 days ago
两种方法,一种采用递归: 1. public class FileListExample { public static void main(String[] args) { String directory= "C:/TDDOWNLOAD"; firstMethod(directory); } public static void firstMethod(String dir) { String directory=dir; String filemask = "*.txt"+"$"; String currentFilePath=""; filemask = java.util.regex.Pattern.compile("[*]").matcher(filemask).replaceAll(".*"); boolean case_sensitive = true;//大小写敏感 java.util.regex.Pattern fileNamePattern = java.util.regex.Pattern.compile(filemask); if(!case_sensitive){ fileNamePattern = java.util.regex.Pattern.compile(filemask, java.util.regex.Pattern.CASE_INSENSITIVE); } java.io.File file=new java.io.File(directory); java.io.File[] files= file.listFiles(); for (int i = 0; i < files.length; i++){ if(files[i].isDirectory()) { currentFilePath = ...
871 days ago
前段时间接触了CentricCRM这个东西,是个Tomcat的project,但是我们要用的不多,只是http-xml api的部分。大部分资料来源于它的官方网站:http://www.centriccrm.com/ProjectManagement.do?command=ProjectCenter§ion=Wiki&pid=58&subject=Centric+CRM+Tools+Package 我自己觉得这个东西做的不是很好,别的功能我没用,但就http-xml api部分,应该还有很大的空间可以完善。(说这话,好像我很专业,其实嘛都不懂。。嘻!)也许是我还未更深入的研究透它的东西,就先将了解的部分写下来吧。 1.配置服务器 从http://www.centriccrm.com/ProjectManagement.do?command=ProjectCenter§ion=File_Library&pid=109&folderId=273网站down下cntricCRM 4.1.1.exe.(你可以根据OS来选择CRM的server,我嘛只会用windows,就down了个windows版的)。建议在安装CRM之前,最好装个数据库,常用的数据库就可以了。我自己安装了mysql. 2.配置CRM相关信息 安装完CRM后,记得开启tomcat,或点击CRM桌面图标,或打开IE直接输入http://127.0.0.1/centric进入centric配置页面了,就按要求填写。大体上分四步: Step 1: Setup the file library//我按默认了,直接点“继续” Step 2: Setup external servers (mail, fax)//这一步信息比较多,主要是Centric CRM Configuration Server Settings,其实也什么特别的,我就按自己的想法乱填写了,最后也没出啥错。 Step 3: Setup the ...



