2014年3月13日

摘要: 利用空闲时间写了一个使用lucene创建索引简单示例,1.使用maven创建的项目2.需要用到的jar如下:废话不多说,直接贴代码如下:1.创建索引的类(HelloLucene):package test.lucene;import org.apache.lucene.analysis.standard.StandardAnalyzer;import org.apache.lucene.document.Document;import org.apache.lucene.document.Field;import org.apache.lucene.document.StringField;i 阅读全文

posted @ 2014-03-13 15:32 关心 阅读(297) 评论(0) 推荐(0) 编辑

摘要: 1.Thinking in Java2.Head First Java3.Java in a Nutshell4.The elements of Java style5.Effective Java6.The Java language specification7.Design patterns: elements of reusableobject-oriented software8.The Pragmatic Programmer: From Journeyman to Master9.Patterns of Enterprise Application Architecture10. 阅读全文

posted @ 2014-03-13 14:50 关心 阅读(393) 评论(0) 推荐(0) 编辑


2013年1月21日

摘要: 1.需要引入的jar包:pinyin4j-2.5.0.jar2.code如下:import net.sourceforge.pinyin4j.PinyinHelper;import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;import net.sourceforge.pinyin4j.for 阅读全文

posted @ 2013-01-21 16:43 关心 阅读(280) 评论(0) 推荐(0) 编辑


2012年9月25日

摘要: java实现webservice实例2012-07-17 16:08:031.首先创建个WEB工程,然后:http://ws.Apache.org/axis/网站下载Axis安装包.当然还依赖其他包的。2.创建类以及需要对外提供的方法package com.cn.test;public class ServiceMehtod {public String getInfo(String str1,String str2,String str3){return "ServiceMehtod:getInfo() =====>str1="+str1+";str2=& 阅读全文

posted @ 2012-09-25 21:36 关心 阅读(216) 评论(0) 推荐(0) 编辑

摘要: 原因追踪及解决办法:1.查阅资料发现说在jdk1.5下要使用@Override这个annotation必须保证被标注的方法来源于class而不是interface.2.即使自己的jdk是1.6,还需要修改myeclipse里面的编译jdk版本,从1.5(5.0)改成1.6(6.0),否则还会出现上述错误。解放办法:在myeclipse下:Windows-Preferences-Java Compiler,在右边的Compiler Compliance Level 修改成1.6(6.0)版本。3.此时如果发现还是上述错误,原因是项目还没有吧jre变成1.6(6.0)。解决办法:项目右键-> 阅读全文

posted @ 2012-09-25 21:28 关心 阅读(130) 评论(0) 推荐(0) 编辑

摘要: 1、在开发环境中加载指定数据库的驱动程序。例如:mysql-connector-java-5.1.18-bin.jar2、在Java程序中加载驱动程序。例如:Class.forName("com.mysql.jdbc.Driver")。3、创建数据连接对象。通过DriverManager类创建数据库连接对象Connection.connection=DriverManager.getConnection("连接数据库的URL","用户名","密码")。例如:Connection con=DriverManager. 阅读全文

posted @ 2012-09-25 21:26 关心 阅读(454) 评论(0) 推荐(0) 编辑

摘要: 1.建立临时model类(由User类和Student类组成):public class UserTmp{private Integer userId;private String userName;private Integer userSex;private String userAddress;private String stuId;private String stuName;public void setUserId(Integer userId){this.userId=userId;}public Integer getUserId(){return userId;}//剩下的 阅读全文

posted @ 2012-09-25 21:24 关心 阅读(309) 评论(0) 推荐(0) 编辑

摘要: 1.在model包里创建StrObject.xsd文件:<?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"targetNamespace="http://www.w3school.com.cn" xmlns="http://www.w3school.com.cn"elementFormDefault="qualified"&g 阅读全文

posted @ 2012-09-25 21:23 关心 阅读(764) 评论(0) 推荐(0) 编辑

摘要: select 外键ID, ltrim(max(sys_connect_by_path(name,',')),',') temp_name from (select 外键ID,name,row_number() over(partition by 外键IDorder by 外键ID, name) rankfrom table) start with rank=1connect by rank - 1 = prior rankand 外键ID= prior 外键IDgroup by 外键ID合并之前数据如下:外键ID name001 AAA001 BBB001 CC 阅读全文

posted @ 2012-09-25 21:20 关心 阅读(309) 评论(0) 推荐(0) 编辑


2011年11月28日

摘要: SELECT * INTO temp FROM OPENROWSET('MICROSOFT.JET.OLEDB.4.0','Excel 5.0;HDR=YES;DATABASE=c:/人员信息.xls',sheet1$) 阅读全文

posted @ 2011-11-28 09:37 关心 阅读(318) 评论(1) 推荐(0) 编辑


Copyright © 2024 关心
Powered by .NET 8.0 on Kubernetes