`
maosheng
  • 浏览: 551414 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
<?xml version="1.0" encoding="GB2312" ?><!-- ======================================================================= hello-ant 项目 ,学习ant工具的build file. 参照ant的jakarta-ant-1.6alpha的build.xml =======================================================================--> &l ...
1 Software Architecture & Design 1.1 Definition: “The software architecture of a program or computing system is the structure or Structures of the system, which comprise software components, the externally visible properties of those components and the relationships among them” Software ap ...

Java File IO开发指导

    博客分类:
  • Java
 
01: Use BufferedReader rather than FileReader Example:…sourceBR =new BufferedReader(new FileReader(sourceFile));while((data = sourceBR.readLine()) != null) {System.out.println(data);}…Rationale:BufferedReader class is used to make low-level Reader classes like FileReader more efficient and easier t ...

Java JDBC开发指导

01: Always get connection from Connection poolExamplesimport java.io.*;public static void main(String[] arg){Context ctx = new InitialContext();DataSource ds = (DataSource)ctx.lookup("jdbc/eBBS");Connection con = ds.getConnection();}RationaleUse Connection pool to get connection instead o ...

PL SQL开发指导

    博客分类:
  • DB
1. Use the correct datatype so that implicit conversion will be avoided 2. Use bind variable to avoid unnecessary parsing 3. Use BULK COLLECT, % ATTRIBUTES wherever required 4. Use WHEN OTHERS exception as the last resort and handle exceptions 5. Use %TYPE and %ROWTYPE attributes. No code ch ...

Database SQL开发指导

    博客分类:
  • DB
1. Always define field names. Do not use SELECT * or INSERT INTO table VALUES. However, if it's important enough to save in a text file (ie, it's seed data or a migration script) then it gets explicit field names. 2. Always use the database server's timestamp. Web servers may have disparate times. ...
一、comment是oracle数据库系统的关键字,用于对表,字段添加注释,有利于用户对表结构以及数据库对象含义的理解。 语法如下:COMMENT ON  { TABLE [ schema. ]    { table | view }  | COLUMN [ schema. ]    { table. | view. | materialized_view. } column  | OPERATOR [ schema. ] operator  | INDEXTYPE [ schema. ] indextype  | MATERIALIZED VIEW materialized_view  ...
更新大量的数据时, 先Prepare一个SQL语句再多次的执行, 会导致很多次的网络连接. 要减少JDBC的调用次数改善性能, 你可以使用PreparedStatement的AddBatch()方法一次性发送多个查询给数据库.   例 1: 多次执行Prepared Statement PreparedStatement ps = conn.prepareStatement(    "INSERT into employees values (?, ?, ?)"); for (n = 0; n < 100; n++) {   ps.setString(nam ...
创建测试用表:CREATE TABLE USER(   I_ID   VARCHAR(50) NOT NULL,   I_NAME VARCHAR(50) NOT NULL); 一:无返回值的存储过程1,建立存储过程:CREATE OR REPLACEPROCEDURE TESTA(    PARA1 IN VARCHAR2,    PARA2 IN VARCHAR2)ASBEGIN  INSERT INTO USER    (I_ID,I_NAME    ) VALUES    (PARA1, PARA2    );END TESTA;   2,Java程序: package com. ...
将一个表中的数据导出生成一个文本文件,列与列之间以”| ”隔开 SET echo OFFSET feedback OFFSET newpage noneSET pagesize 5000SET linesize 500SET verify OFFSET pagesize 0SET term OFFSET trims ONSET linesize 600SET heading OFFSET timing OFFSET verify OFFSET numwidth 38SPOOL c:\drop_table.sqlSELECT DEPTNO || '|' || DNAME FROM DEPT;SP ...
SAX: SAX处理的优点非常类似于流媒体的优点。分析能够立即开始,而不是等待所有的数据被处理。而且,由于应用程序只是在读取数据时检查数据,因此不需要将数据存储在内存中。这对于大型文档来说是个巨大的优点。事实上 ...
继 Spring 2.0 对 Spring MVC 进行重大升级后,Spring 2.5 又为 Spring MVC 引入了注解驱动功能。现在你无须让 Controller 继承任何接口,无需在 XML 配置文件中定义请求和 Controller 的映射关系,仅仅使用注解就可以让一个 POJO 具有 Controller 的绝大部分功能 —— Spring MVC 框架的易用性得到了进一步的增强.在框架灵活性、易用性和扩展性上,Spring MVC 已经全面超越了其它的 MVC 框架,伴随着 Spring 一路高唱猛进,可以预见 Spring MVC 在 MVC 市场上的吸引力将越来越不可抗拒。 ...
--当前日期+20天。cast(replace(varchar(CURRENT timeSTAMP +20 days)  ,'-','')as varchar(8))  --获取当前日期:select current date from sysibm.sysdummy1; values current date;--获取当前日期 select current time from sysibm.sysdummy1; values current time; --获取当前时间戳 select current timestamp from sysibm.sysdummy1; values curren ...
PDFBox是Java实现的PDF文档协作类库,提供PDF文档的创建、处理以及文档内容提取功能,也包含了一些命令行实用工具。 Features:   * PDF to text extraction   * Merge PDF Documents   * PDF Document Encryption/Decryption   * Lucene Search Engine Integration   * Fill in form data FDF and XFDF   * Create a PDF from a text file   * Create images from P ...

Apache POI 介绍

Apache POI是Apache软件基金会的开放源码函式库,POI提供API给Java程式对Microsoft Office格式档案读和写的功能。   结构:   HSSF - 提供读写Microsoft Excel格式档案的功能。   XSSF - 提供读写Microsoft Excel OOXML格式档案的功能。   HWPF - 提供读写Microsoft Word格式档案的功能。   HSLF - 提供读写Microsoft PowerPoint格式档案的功能。   HDGF - 提供读写Microsoft Visio格式档案的功能。   创建Excel 文档   示例 ...
Global site tag (gtag.js) - Google Analytics