| « | November 2025 | » | | 日 | 一 | 二 | 三 | 四 | 五 | 六 | | | | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | | | | | | | |
| 公告 |
|
| Blog信息 |
|
blog名称: 日志总数:22 评论数量:55 留言数量:0 访问次数:130263 建立时间:2006年3月13日 |

| |
|
[xml]应用JDOM处理xml(实践) 软件技术
jjs_love 发表于 2006/5/23 10:48:09 |
package com.jdom; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.net.URL; import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import org.jdom.Attribute; import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; import |
|
|
[java程序设计]日期js 软件技术
jjs_love 发表于 2006/4/18 13:10:08 |
Calendar.js
function Calendar(formatString) { var today = new Date(); this.currYear = today.getYear(); this.currMonth = today.getMonth(); this.currDate = today.getDate(); this.currHour = today.getHours(); this.currMinute = today.getMinutes(); this.currSecond = today.getSeconds(); this.currMeridiem = (this.currHour >= 12 ? 'PM' : 'AM'); var property = null;
var self = document. |
|
|
[Open Source]使用JDBC和Hibernate来写入Blob型数据到Oracle中(转载robbin) 软件技术
jjs_love 发表于 2006/4/11 13:16:36 |
Oracle的Blob字段比较特殊,他比long字段的性能要好很多,可以用来保存例如图片之类的二进制数据。
写入Blob字段和写入其它类型字段的方式非常不同,因为Blob自身有一个cursor,你必须使用cursor对blob进行操作,因而你在写入Blob之前,必须获得cursor才能进行写入,那么如何获得Blob的cursor呢?
这需要你先插入一个empty的blob,这将创建一个blob的cursor,然后你再把这个empty的blob的cursor用select查询出来,这样通过两步操作,你就获得了blob的cursor,可以真正的写入blob数据了。
看下面的JDBC的demo,把oraclejdbc.jar这个二进制文件写入数据库表javatest的content字段(这是一个blob型字段)
|
|
|
各种排序算法java实现(转) 软件技术
jjs_love 发表于 2006/4/6 13:43:26 |
插入排序:
package org.rut.util.algorithm.support;
import org.rut.util.algorithm.SortUtil; /** * @author treeroot * @since 2006-2-2 * @version 1.0 */ public class InsertSort implements SortUtil.Sort{
/* (non-Javadoc) * @see org.rut.util.algorithm.SortUtil.Sort#sort(int[]) */ public void sort(int[] data) {   |
|
|
用JS写联动 软件技术
jjs_love 发表于 2006/3/29 15:36:13 |
js如下
<%! public String getDeptUsers(Connection conn) { StringBuffer users = new StringBuffer(); String sql = "SELECT dept_CODE, dept_NAME, user_code, user_name " + "FROM SYS_DIC_dept, sys_dic_user " + "WHERE user_dept = dept_CODE(+) " + "ORDER BY dept_CODE"; Statement stmt = null; ResultSet rs = null; try { |
|
|
java文件操作大全 (转载) 软件技术
jjs_love 发表于 2006/3/23 13:12:25 |
作者:yesjoy 来源:www.javaresearch.org
java文件操作大全
文件的建立/检查与删除 <%@ page contentType="text/html;charset=gb2312"%> <%@ page import="java.io.*"%> <html> <head> <title>文件的建立、检查与删除</title> </head> <body> <% String path=request.getRealPath(""); //out.println(path); File f=new File(path,"File.txt"); //out.println(f);< |
|
|
[java程序设计]url中传中文 软件技术
jjs_love 发表于 2006/3/21 11:49:47 |
'> <%@ page language="java" contentType="text/html;charset=GBK"%> <%@ page import="java.sql.*, java.net.*,java.io.*,java.util.* " %>
<% request.getLocale().setDefault(Locale.CHINA); String s="中国人"; try { & |
|
|
[数据库]ORACLE 中ID自动增加字段 软件技术
jjs_love 发表于 2006/3/15 9:14:17 |
自动增加字 CREATE TABLE t_topic ( topicId NUMBER(18,0) NOT NULL , -- 主题ID topicTitle VARCHAR2(100) NOT NULL , -- 主题名 |
|
|
[数据库]MYSQL到ORACLE程序迁移的注意事项 软件技术
jjs_love 发表于 2006/3/13 14:04:09 |
MYSQL到ORACLE程序迁移的注意事项
有很多应用项目, 刚起步的时候用MYSQL数据库基本上能实现各种功能需求,随着应用用户的增多, 数据量的增加,MYSQL渐渐地出现不堪重负的情况:连接很慢甚至宕机,于是就有把数据从MYSQL迁到 ORACLE的需求,应用程序也要相应做一些修改。本人总结出以下几点注意事项,希望对大家有所帮助。
1. 自动增长的数据类型处理 MYSQL有自动增长的数据类型,插入记录时不用操作此字段,会自动获得数据值。 ORACLE没有自动增长的数据类型,需要建立一个自动增长的序列号,插入记录时要把序列号的下一个 值赋于此字段。 |
|
|
[java程序设计]取得程序的物理路径 随笔
jjs_love 发表于 2006/3/13 12:59:55 |
取得程序的物理路径
private String getClassPath() { String strClassName = getClass().getName(); String strPackageName = ""; if(getClass().getPackage() != null) { strPackageName = getClass().getPackage().getName(); }
String strClassFileName = ""; if(!"".equals(strPackageName)) &n |
|
|