NCE :listen and write,L 85-89,remember these lessons except L88;
BoBing Gramma:may be P330-390;
word:high school,about 120,with method named 'I';the words is a fatal place for me,must fight it.
can the CVS operate a non-text file?
for example:a image or sound or a sort of uml file?I knew the change of a text file can be recognized by the CVS and can be limited a change in some lines.
but,I think a non-text file should there is not return character and new-line character in it.
java 系?架??中
中期目?:java 系?架??
池连接碰到的一个问题
我用weblogic + jbuilder + mssqlsever2000 采用池联接。我们的JDBC联系数不断在增加(根我判断,是因为我用完一个方法以后,这个连接还是标识为忙。)。但是我已经对它作了释放处理了,不过还是没有用啊。
我从中抽出一部份代码如下
package com.csbook.documentsystem;
import javax.naming.*;
import javax.sql.*;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.*;
public class Vistit {
Context ctx = null;
DataSource ds = null;
SysLog log = null;
ChangeEncoding ce = null;
//构造函数
public Vistit() {
//从连接池中获取数据库连接
try {
ctx = new InitialContext();
ds = (DataSource) ctx.lookup("MyDataSource");
}
catch (NamingException e) {
e.printStackTrace();
}
// 建立一个日志类的实例
log = new SysLog();
}
public void addInFactoryReg(String no, String name, String company,
String people, String reason, String certif) {
Connection con = null;
PreparedStatement ps = null;
String temptime = "";
String intime = "";
//temptime = TimeString.getNowTime("HH:mm:ss");
//intime =temptime.substring(8);
//System.out.println("company"+company);
try {
StringTokenizer st = null;
ArrayList temp = getTemp();
Object data[] = temp.toArray();
String card_number = "";
System.out.println("data.length" + data.length);
for (int i = 0; i < data.length; i++) {
st = new StringTokenizer((String) data[i]);
card_number = ce.changeCharset(st.nextToken());
int card_no = getNoCount("card", "card_no");
card_no++;
addInFactoryReg(card_no, no, card_number);
changeState(card_number);
}
//String sqlInsert = "insert into visit(visit_no,visit_mark,visit_name,visit_company,visit_reason,visit_certif,visit_intime) values (" +no+ "," +mark+ "," +name+ "," +company+ "," +reason+ "," +certif+ "," +intime+ ")";
// String sqlInsert = "insert into visit(visit_no,visit_mark,visit_name,visit_company,visit_peopleCount,visit_reason,visit_certif,visit_intime) values (?,?,?,?,?,?,?,'" +intime+ "')";
String sqlInsert = "insert into visit(visit_no,visit_name,visit_company,visit_peopleCount,visit_reason,visit_certif) values (?,?,?,?,?,?)";
con = ds.getConnection();
ps = con.prepareStatement(sqlInsert);
ps.setString(1, no);
ps.setString(2, name);
ps.setString(3, ce.changeCharset(company));
ps.setString(4, people);
ps.setString(5, ce.changeCharset(reason));
ps.setString(6, certif);
//System.out.println("sqlInsert" + sqlInsert);
//System.out.println("no" + "visit_no");
ps.executeUpdate();
delData();
}
catch (Exception e) {
e.printStackTrace();
}
finally {
Close.connnectionClose(con);
Close.prepareStatementClose(ps);
}
}
package com.csbook.documentsystem;
import javax.sql.*;
import java.sql.*;
public class Close {
public void close(){
}
public static void connnectionClose(Connection con){
if (con != null)
try {
con.close();
}
catch (SQLException ignore) {}
}
public static void prepareStatementClose(PreparedStatement ps){
if(ps != null)
try{
ps.close();
}
catch(SQLException e) {}
}
public static void resultSetClose(ResultSet rs){
if(rs != null){
try{
rs.close();
}
catch(SQLException e){}
}
}
received repaired lengend Electric Dictionary
The old one which is LP5500 couldn't be repaired,after about 3 months,repairing man returned me another one which is LP5800 through my friend ZhangBing.But,I found the new one has no data transfering function.even so,I am happy for this,I didn't think I can get one again after so long time.
Unsubscribe three kinds of maillist of ArgoUML
I have recieved over 1300 letters from ArgoUML's maillist in this one month!So I unsubscribed three kinds of maillist of ArgoUML and only keep available for Annonce maillist of it.
When should daughter go to kinder garten?
MiMei has been catched cold about a week and has returned to normal today.Her mother and I took her go to play by the Big River this afternoon.
I found there are two things should be noticed concerning my daughter.One is when should she go to kinder garten and another is eating by herself beacause she is interesting with eating with little scoop now and we shouldn't hit her passion of eating by herself.
summary and plan about learning english
1.listened and wrote and remember text 73-84 of NCE2;
2.read page 263-293 of BoBing Garamma;
plan:
1.listen and write and remember text 85-92 of NCE2 before April 1;
2.finish reading BoBing Garamma before April 1;
3.do all the exercises of NCE2 May 1;
4.remember words after May 1;
attention:
1.although cancel the hearing ability test,I think I will use Study English Reverse Method to learn english;
make an analysis for File Sharing Module
Last month,Spring Festival,everyone was busy,include me.And,I have spent too many time to choose a UML tool but not the UML itself.a failure.
The only thing I have made is doing an analysis UML model for File Sharing Module.Detail information is in:http://www.learndiary.com/disDiaryContentAction.do?goalID=882
This will be the last diary I writing here.
如何删除日记
如题