创建解析器: SAXReader reader = new SAXReader();利用解析器读入xml文档: Document document =reader.read(new File("input.xml"));获取文档的根节点:Element root =document.getRoot....
分类:
其他好文 时间:
2015-02-07 13:00:04
阅读次数:
207
我在使用VNC做远程桌面连接时,从XP到XP都一切正常,当我从XP连接至Server2003就出现了错误提示:read:Connectionresetbypeer(10054),请问哪位大虾能指导一下在下该如何设置Server下的VNC.注:版本VNC4.0(RealVNC)................-----------------------------------------解决办..
分类:
其他好文 时间:
2015-02-07 07:00:52
阅读次数:
1094
正式环境:
系统:Red Hat Enterprise Linux Server release 5.6 (Tikanga)
内核:2.6.18-238.31.1.el5
位数:64
测试环境:
系统:CentOS release 5.8 (Final)
内核:2.6.18-53.el5
位数: 32
相关软件版本及下载地址
1.apr: http://labs.mop.co...
分类:
Web程序 时间:
2015-02-06 16:43:03
阅读次数:
169
替换文件中字符(正则) #!/usr/bin/env python import re filename = 'source.c' text = open(filename).read() r = re.compile(r'/\*.*?\*/', re.DOTALL) cr= re.compile(...
分类:
其他好文 时间:
2015-02-06 16:30:25
阅读次数:
134
1、文件通过创建一个file类的对象来打开一个文件,分别使用file类的read、readline或write方法来恰当地读写文件。对文件的读写能力依赖于你在打开文件时指定的模式。最后,当你完成对文件的操作的时候,你调用close方法来告诉Python我们完成了对文件的使用。使用文件:#!/usr/b..
分类:
编程语言 时间:
2015-02-06 15:10:06
阅读次数:
165
Shell查看文件的最后5行,并对每行进行正则匹配,代码如下:#!/bin/shpattern="HeartBeat"tail -n 5 /home/test/log/log_20150205.log | while read linedo if [[ $line =~ $pattern ]]...
分类:
系统相关 时间:
2015-02-06 14:47:35
阅读次数:
258
def xx_pandas(duiying_path, input_path=None, output_path=None): data = pd.read_excel(duiying_path, sheetname='name') en_ch = {} # 英文字段到中文字段的映射 ...
分类:
其他好文 时间:
2015-02-06 14:33:40
阅读次数:
115
1 #!/bin/sh2 3 while read line4 do5 echo $line6 done < /home/jms/lab/input.txt
分类:
系统相关 时间:
2015-02-06 12:56:17
阅读次数:
137
由于使用for来读入文件里的行时,会自动把空格和换行符作为一样分隔符,因为当行里有空格的时候,输出的结果会很乱,所以……cat input.txt |while read line> do> echo $line> done或者:while read line> do> echo $line> do...
分类:
系统相关 时间:
2015-02-06 12:46:43
阅读次数:
209
Linux内核分析(六) 昨天我们对字符设备进行了初步的了解,并且实现了简单的字符设备驱动,今天我们继续对字符设备的某些方法进行完善。 今天我们会分析到以下内容: 1. 字符设备控制方法实现 2. 揭秘系统调用本质 在昨天我们实现的字符设备中有open、read、write等方法,由于这些方法我们在...
分类:
系统相关 时间:
2015-02-06 11:04:49
阅读次数:
295