Dom4j

http://baike.baidu.com/link?url=2XOnr06saKUd-9By1GyPxIolXMQhf_C-CnMFll_yhtR4m00i27zphbkI5-dGpwEVjuKbkdosTYmNMXc4OA31ba

1

 package ec.export.checksheet;

 import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map; import net.sf.jasperreports.engine.JREmptyDataSource;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRPrintPage;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.util.JRLoader; import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader; import ec.export.ECReportHelper;
import ec.utils.Dom4jXml; public class AddCheckSheet { public Dom4jXml dj = new Dom4jXml();
String TEMPLATES_PATH = "ec/export/resources/"; public JasperPrint FormTotalPage(JasperPrint jp,org.w3c.dom.Document document,Map mSelectCheckSheet,Map mCheckSheetAutoFill){
List l=new ArrayList();
try {
l=CheckSheetReadXml(document,mCheckSheetAutoFill);
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} // String jasperpatha=getClass().getResource("")+"checksheeta.jasper";
// jasperpatha=jasperpatha.replaceAll("file:/", "");
// String jasperpathb=getClass().getResource("")+"checksheetb.jasper";
// jasperpathb=jasperpathb.replaceAll("file:/", ""); //ECReportHelper.locateResource(""); String jasperpatha=TEMPLATES_PATH+"checksheeta.jasper"; String jasperpathb=TEMPLATES_PATH+"checksheetb.jasper"; for(int i=;i<l.size();i++){ // String ec.export.ECJobReporter.buildStylesFile(); // ========for checksheeta.jasper=======
JasperPrint jasperprint = new JasperPrint();
try {
//JasperPrint jasperPrint = JasperFillManager.fillReport(getClass().getResourceAsStream("periodo.jasper"), parameters, con);
//jasperprint = JasperFillManager.fillReport(JRLoader.getResourceInputStream(jasperpathb), (Map)l.get(i));
jasperprint = JasperFillManager.fillReport(JRLoader.getResourceInputStream(jasperpatha), (Map)l.get(i), new JREmptyDataSource());
//jasperprint = JasperFillManager.fillReport(ClassLoader.getSystemResourceAsStream(jasperpathb), (Map)l.get(i), new JREmptyDataSource());
//jasperprint = JasperFillManager.fillReport(getClass().getResourceAsStream(jasperpathb), (Map)l.get(i), new JREmptyDataSource());
//jasperprint = JasperFillManager.fillReport(jasperpathb, (Map)l.get(i), new JREmptyDataSource()); } catch (Exception e) {
e.printStackTrace();
}
//System.out.println(" before jp: "+jp.getPages().size());
multipageLinking(jp,jasperprint);
//System.out.println(" after jp: "+jp.getPages().size()); // =======for checksheetb.jasper=======
jasperprint = new JasperPrint();
try {
//jasperprint = JasperFillManager.fillReport(JRLoader.getResourceInputStream(jasperpathb), (Map)l.get(i));
jasperprint = JasperFillManager.fillReport(JRLoader.getResourceInputStream(jasperpathb), (Map)l.get(i), new JREmptyDataSource());
//jasperprint = JasperFillManager.fillReport(ClassLoader.getSystemResourceAsStream(jasperpathb), (Map)l.get(i), new JREmptyDataSource());
//jasperprint = JasperFillManager.fillReport(getClass().getResourceAsStream(jasperpathb), (Map)l.get(i), new JREmptyDataSource());
//jasperprint = JasperFillManager.fillReport(jasperpathb, (Map)l.get(i), new JREmptyDataSource());
} catch (Exception e) {
e.printStackTrace();
}
//System.out.println(" before jp: "+jp.getPages().size());
multipageLinking(jp,jasperprint);
//System.out.println(" after jp: "+jp.getPages().size()); // JasperPrint result = JasperFillManager.fillReport(
// ECReportHelper.locateResource(JOB_TEMPLATE),
// params
// );
/*
// ========for checksheeta.jasper=======
JasperPrint jasperprint = new JasperPrint();
try {
jasperprint = JasperFillManager.fillReport(jasperpatha, (Map)l.get(i), new JREmptyDataSource());
} catch (Exception e) {
e.printStackTrace();
}
//System.out.println(" before jp: "+jp.getPages().size());
multipageLinking(jp,jasperprint);
//System.out.println(" after jp: "+jp.getPages().size()); // =======for checksheetb.jasper=======
jasperprint = new JasperPrint();
try {
jasperprint = JasperFillManager.fillReport(jasperpathb, (Map)l.get(i), new JREmptyDataSource());
} catch (Exception e) {
e.printStackTrace();
}
//System.out.println(" before jp: "+jp.getPages().size());
multipageLinking(jp,jasperprint);
//System.out.println(" after jp: "+jp.getPages().size());
*/
}
return jp;
} private JasperPrint multipageLinking(JasperPrint page1, JasperPrint page2) {
List pages = page2.getPages();
for (int count = ; count <pages.size(); count++) {
page1.addPage((JRPrintPage) pages.get(count));
}
return page1;
} // for checkSheet Print
public List CheckSheetReadXml(org.w3c.dom.Document doc,Map mCheckSheetAutoFill) throws Exception{
Document document=dj.parse(doc);
List pl=new ArrayList(); //count product num
List list = document.selectNodes("/report/job/product");
int num = list.size(); for(int i=;i<=num;i++)
{
Map mproduct=new HashMap();
//0 select_date
String xpathstr="/report/job/@select_date";
if(!dj.getContentString(document,xpathstr).equals("")){
mproduct.put("cs_Date", dj.getContentString(document,xpathstr));
} xpathstr="/report/job/createdDt";
if(!dj.getContentString(document,xpathstr).equals("")){
mproduct.put("cs_Date", dj.getContentString(document,xpathstr));
} //model 1 AT3ARF1R AT5CRF4R
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Screw Compressor Air Cooled Package Chiller']/row/field[name='Model #']/value";
String s1=dj.getContentString(document,xpathstr);
//for acds in spec
if(s1.equals("")){
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Scroll Compressor Air Cooled Package Chiller']/row/field[name='Model #']/value";
s1=dj.getContentString(document,xpathstr);
} xpathstr="/report/job/product["+i+"]/performanceData/group[name='Screw Compressor Air Cooled Package Chiller']/row/field[name='Component code']/value";
String tmep=dj.getContentString(document,xpathstr);
if(tmep==""){}else{
tmep=tmep.substring();
String tempbefore=tmep.substring();
String tempafter=tmep.substring(,);
tmep=tempbefore+tempafter;
}
mproduct.put("cs_Model", s1+tmep); xpathstr="/report/job/product["+i+"]/qty";
mproduct.put("cs_Qty", dj.getContentString(document,xpathstr)); //evap 2
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator']/col1/field[contains(name,'Entering fluid temp')]/value";
mproduct.put("cs_Evap_Entering_fluid_temp", dj.getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator']/col1/field[contains(name,'Fluid flow rate')]/value";
mproduct.put("cs_Evap_Fluid_flow_rate", dj.getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator']/col2/field[contains(name,'Fouling factor')]/value";
mproduct.put("cs_Evap_Fouling_factor", dj.getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator']/col2/field[contains(name,'Leaving fluid temp')]/value";
mproduct.put("cs_Evap_Leaving_fluid_temp", dj.getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator']/col1/field[contains(name,'Fluid')]/value"; String fluidstr=dj.getContentString(document,xpathstr);
if(fluidstr!=""&& !fluidstr.equals("")&& fluidstr.contains("%")){
fluidstr=fluidstr.substring(fluidstr.indexOf("%")+)+" / "+fluidstr.substring(, fluidstr.indexOf("%")+);
}
mproduct.put("cs_Evap_Fluid",fluidstr ); //mproduct.put("cs_Evap_Fluid", dj.getContentString(document,xpathstr)); xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator']/col1/field[contains(name,'Number of passes')]/value";
mproduct.put("cs_Evap_Number_of_passes", dj.getContentString(document,xpathstr)); //cond 3 xpathstr="/report/job/product["+i+"]/performanceData/group[name='Condenser']/col1/field[contains(name,'Design ambient')]/value";
mproduct.put("cs_Cond_Design_ambient", dj.getContentString(document,xpathstr)); xpathstr="/report/job/product["+i+"]/performanceData/group[name='Condenser']/col2/field[contains(name,'Entering fluid temp')]/value";
mproduct.put("cs_Cond_Entering_fluid_temp", dj.getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Condenser']/col2/field[contains(name,'Fluid flow rate')]/value";
mproduct.put("cs_Cond_Fluid_flow_rate", dj.getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Condenser']/col2/field[contains(name,'Fouling factor')]/value";
mproduct.put("cs_Cond_Fouling_factor", dj.getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Condenser']/col2/field[contains(name,'Leaving fluid temp')]/value";
mproduct.put("cs_Cond_Leaving_fluid_temp", dj.getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Condenser']/col2/field[contains(name,'Fluid')]/value";
mproduct.put("cs_Cond_Fluid", dj.getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Condenser']/col2/field[contains(name,'Number of passes')]/value";
mproduct.put("cs_Cond_Number_of_passes", dj.getContentString(document,xpathstr)); //4 Cooling Conditions of service
//<name>Capacity (Tons)</name>
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Conditions of service']/col1/field[contains(name,'Capacity')]/value";
mproduct.put("cs_Capacity", dj.getContentString(document,xpathstr));
//<name>Energy efficiency (kW/Ton)</name>
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Conditions of service']/col2/field[contains(name,'Compressor power')]/value";
mproduct.put("cs_Energy_efficiency", dj.getContentString(document,xpathstr)); //5<name>Unit power supply</name>
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Electrical characteristics']/col1/field[contains(name,'Unit power supply')]/value";
mproduct.put("cs_Unit_power_supply", dj.getContentString(document,xpathstr)); //6<name>Refrigerant</name>//<value>R134a</value>
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Physical Specifications']/col2/field[contains(name,'Refrigerant')]/value";
mproduct.put("cs_Refrigerant", dj.getContentString(document,xpathstr)); //add pictureleftheader
String pic_left_header=TEMPLATES_PATH+"leftheader-cs.JPG";
//pic_left_header=pic_left_header.replaceAll("file:/", "");
mproduct.put("cs_pic_left_header", pic_left_header); mproduct.putAll((Map) mCheckSheetAutoFill.get(i));
pl.add(mproduct);
}
return pl;
} // public static void main(String[] args) throws Exception {
// Dom4jXml dj = new Dom4jXml();
// AddCheckSheet acs=new AddCheckSheet();
// SAXReader saxReader = new SAXReader();
// Document document;
// try {
// document = saxReader.read(new File("D:/Task/draw_cs3/20141218/wcfx36_more.xml"));
//
// acs.CheckSheetReadXml(dj.parse(document));
// } catch (DocumentException e) {
// // TODO Auto-generated catch block
// e.printStackTrace();
// }
// }
}

2

 package ec.utils;

 import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map; import org.dom4j.Attribute;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader; public class Dom4jXml { static boolean debugf=true; public static void main(String[] args) throws Exception {
Dom4jXml dj = new Dom4jXml();
SAXReader saxReader = new SAXReader();
Document document;
try {
document = saxReader.read(new File("D:/Task/draw_cs3/20141218/wcfx36_more.xml")); dj.ReadXml(parse(document));
} catch (DocumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} //for checkSheet Print
public List ReadXml(org.w3c.dom.Document doc) throws Exception{
Document document=parse(doc);
List pl=new ArrayList(); //count product num
List list = document.selectNodes("/report/job/product");
int num = list.size(); for(int i=;i<=num;i++)
{
Map mproduct=new HashMap();
//0 select_date
String xpathstr="/report/job/@select_date";
mproduct.put("cs_Date", getContentString(document,xpathstr));
//model 1 AT3ARF1R AT5CRF4R
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Screw Compressor Water Cooled Package Chiller']/row/field[name='Model #']/value";
String s1=getContentString(document,xpathstr);
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Screw Compressor Water Cooled Package Chiller']/row/field[name='Component code']/value";
mproduct.put("cs_Model", s1+getContentString(document,xpathstr)); //evap 2
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator_Condenser']/col1/field[contains(name,'Entering fluid temp')]/value";
mproduct.put("cs_Evap_Entering_fluid_temp", getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator_Condenser']/col1/field[contains(name,'Fluid flow rate')]/value";
mproduct.put("cs_Evap_Fluid_flow_rate", getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator_Condenser']/col1/field[contains(name,'Fouling factor')]/value";
mproduct.put("cs_Evap_Fouling_factor", getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator_Condenser']/col1/field[contains(name,'Leaving fluid temp')]/value";
mproduct.put("cs_Evap_Leaving_fluid_temp", getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator_Condenser']/col1/field[contains(name,'Fluid')]/value";
mproduct.put("cs_Evap_Fluid", getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator_Condenser']/col1/field[contains(name,'Number of passes')]/value";
mproduct.put("cs_Evap_Number_of_passes", getContentString(document,xpathstr)); //cond 3
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator_Condenser']/col2/field[contains(name,'Entering fluid temp')]/value";
mproduct.put("cs_Cond_Entering_fluid_temp", getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator_Condenser']/col2/field[contains(name,'Fluid flow rate')]/value";
mproduct.put("cs_Cond_Fluid_flow_rate", getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator_Condenser']/col2/field[contains(name,'Fouling factor')]/value";
mproduct.put("cs_Cond_Fouling_factor", getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator_Condenser']/col2/field[contains(name,'Leaving fluid temp')]/value";
mproduct.put("cs_Cond_Leaving_fluid_temp", getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator_Condenser']/col2/field[contains(name,'Fluid')]/value";
mproduct.put("cs_Cond_Fluid", getContentString(document,xpathstr));
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Evaporator_Condenser']/col2/field[contains(name,'Number of passes')]/value";
mproduct.put("cs_Cond_Number_of_passes", getContentString(document,xpathstr)); //4 Cooling Conditions of service
//<name>Capacity (Tons)</name>
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Cooling Conditions of service']/col1/field[contains(name,'Capacity')]/value";
mproduct.put("cs_Capacity", getContentString(document,xpathstr));
//<name>Energy efficiency (kW/Ton)</name>
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Cooling Conditions of service']/col2/field[contains(name,'Energy efficiency')]/value";
mproduct.put("cs_Energy_efficiency", getContentString(document,xpathstr)); //5<name>Unit power supply</name>
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Electrical characteristics']/col1/field[contains(name,'Unit power supply')]/value";
mproduct.put("cs_Unit_power_supply", getContentString(document,xpathstr)); //6<name>Refrigerant</name>//<value>R134a</value>
xpathstr="/report/job/product["+i+"]/performanceData/group[name='Physical Specifications']/col2/field[contains(name,'Refrigerant')]/value";
mproduct.put("cs_Refrigerant", getContentString(document,xpathstr)); //getContent(document,xpathstr); pl.add(mproduct);
}
return pl;
} public static Document parse(org.w3c.dom.Document doc) throws Exception {
if (doc == null) {
return (null);
}
org.dom4j.io.DOMReader xmlReader = new org.dom4j.io.DOMReader();
return (xmlReader.read(doc));
} public static org.w3c.dom.Document parse(Document doc) throws Exception {
if (doc == null) {
return (null);
}
java.io.StringReader reader = new java.io.StringReader(doc.asXML());
org.xml.sax.InputSource source = new org.xml.sax.InputSource(reader);
javax.xml.parsers.DocumentBuilderFactory documentBuilderFactory = javax.xml.parsers.DocumentBuilderFactory
.newInstance();
javax.xml.parsers.DocumentBuilder documentBuilder = documentBuilderFactory
.newDocumentBuilder();
return (documentBuilder.parse(source));
} public String getContentString(Document document,String xpathstr){ List list = document.selectNodes(xpathstr);
String result=""; Iterator iter = list.iterator();
iter = list.iterator();
if (iter.hasNext()) { Object o=iter.next();
if(o instanceof Attribute){
Attribute attribute = (Attribute) o;
//hm.put(attribute.getName(),attribute.getValue());
result=attribute.getValue();
if(debugf){
System.out.println(attribute.getName()+":"+attribute.getValue());
} }
if(o instanceof Element){
Element element = (Element) o;
String name = element.getName();
String value = element.getText();
//hm.put(name, value);
result=value;
if(debugf){
System.out.println(name+":"+value);
}
}
} else {
return result;
}
return result;
}
public Map<String,String> getContent(Document document,String xpathstr){ List list = document.selectNodes(xpathstr); Map<String,String> hm=new HashMap();
Iterator iter = list.iterator();
iter = list.iterator();
if (iter.hasNext()) { Object o=iter.next();
if(o instanceof Attribute){
Attribute attribute = (Attribute) o;
hm.put(attribute.getName(),attribute.getValue());
if(debugf){
System.out.println(attribute.getName()+":"+attribute.getValue());
} }
if(o instanceof Element){
Element element = (Element) o;
String name = element.getName();
String value = element.getText();
hm.put(name, value);
if(debugf){
System.out.println(name+":"+value);
}
}
} else { }
return hm;
} }

Dom4j的更多相关文章

  1. XML技术之DOM4J解析器

    由于DOM技术的解析,存在很多缺陷,比如内存溢出,解析速度慢等问题,所以就出现了DOM4J解析技术,DOM4J技术的出现大大改进了DOM解析技术的缺陷. 使用DOM4J技术解析XML文件的步骤? pu ...

  2. 四种解析和创建方式(DOM,SAX,DOM4J,JDOM)

    一.先导入jar包 DOM基于树形,SAX基于事件,DOM4J和JDOM基于底层API 二.代码如下 1 package com.sxt.test; import java.io.File; impo ...

  3. dom4j的小例子

    1.要解析的xml文件book.xml <?xml version="1.0" encoding="UTF-8"?> <books> & ...

  4. Dom4J解析技术

    前面的话  本文主要讲解有关Dom4j技术和xpath配合下的优化!   目录:    为什么需要Dom4J    DOM4J怎么用    xpath怎么配合DOM4J 一  为什么需要Dom4J 一 ...

  5. Dom4j解析xml文件

    dom4j是一个Java的XML API,类似于jdom,用来读取的XML文件,由于它是将文件解析完存放在内存当中的,所以不适合解析大的XML文件,但就方便性和性能方面,一定程度要优于JDK中Domc ...

  6. java dom4j封装和解析XML

    package org.scbit.lsbi.scp.utils; import java.util.ArrayList; import java.util.List; import org.dom4 ...

  7. xml之dom4j解析

    * 使用dom4j解析xml 实例在java520里面 TextDom4j * dom4j,是一个组织,针对xml解析,提供解析器dom4j * dom4j不是javase的一部分,想要使用第一步需要 ...

  8. 使用dom4j读取xml连接数据库与之单例模式

    使用dom4j读取xml ,加入jar包 dom4j-1.6.1.jar jaxen-1.1-beta-6.jar public class XmlConfigReader { //懒汉式,延迟加载 ...

  9. dom4j解析示例

    收藏信息.xml <?xml version="1.0" encoding="GB2312" standalone="no"?> ...

  10. java DOM4J 读取XML

    最近学习Java,在处理XML文档的时候,查阅相关资料,发现了DOM4J这个jre库,相对C#的XML处理来说,功能还算是跟得上 下面展示一篇我自己写的一个XML读取测试 import java.ut ...

随机推荐

  1. mysql忘记root密码

    skip-grant-tables:非常有用的mysql启动参数 介绍一个非常有用的mysql启动参数—— --skip-grant-tables.顾名思义,就是在启动mysql时不启动grant-t ...

  2. Xamarin Anroid开发教程之下载安装Xamarin

    Xamarin Anroid开发教程之下载安装Xamarin Xamarin在过去安装时都会检查系统中是否安装了前面所提供的内容.而后来,Xamarin安装时只提供安装步骤,其它内容都需要读者自己下载 ...

  3. Sprint第一个冲刺(第十一天)

    一.Sprint介绍 修改登录信息界面(修改用户名.密码.邮箱.电话.年龄),且同步到云端:修改Item布局:增添设置页. 实验截图: 任务进度: 二.Sprint周期 看板: 燃尽图:

  4. 简单几何(推公式) UVA 11646 Athletics Track

    题目传送门 题意:给了长宽比例,操场一圈400米,问原来长宽的长度 分析:推出公式 /************************************************ * Author ...

  5. POJ3694 Network(边双连通分量+缩点+LCA)

    题目大概是给一张图,动态加边动态求割边数. 本想着求出边双连通分量后缩点,然后构成的树用树链剖分+线段树去维护路径上的边数和..好像好难写.. 看了别人的解法,这题有更简单的算法: 在任意两点添边,那 ...

  6. eclipse 新建 java 文件时自动生成注释

    http://blog.csdn.net/kimsoft/article/details/5337910 Windows->Preference->Java->Code Style- ...

  7. html页面元素加载顺序

    一般来说,添加背景图片有三种办法: 直接写在标签的style里面,如: <div style="background-image:url('images/Css.JPG')" ...

  8. [转帖] VS集成Qt环境搭建

    http://blog.sina.com.cn/s/blog_a6fb6cc90101gynd.html 用了这么久的Qt,IDE一直都是VS与Creator并用(实际开发以VS为主),至于哪个更好这 ...

  9. Samba结合AD实现域帐号认证的文件服务器

    准备一台Windows域控制器, 在Samba服务器上安装Webmin图形化管理工具, samba, krb5-user, winbind. 修改/etc/krb5.conf. [logging] d ...

  10. java的Arrays工具类实战

    java.util.Arrays类能方便地操作数组,它提供的所有方法都是静态的.静态方法是属于类的,不是属于类的对象.所以可以直接使用类名加方法名进行调用.Arrays作为一个工具类,能很好的操作数组 ...