手机版海贼王辅助工具预览版
手机版海贼王辅助工具预览版[@more@]我的另一个博客有测试版下载
Java 利用 JNI 获得硬盘物理序列号
Java 利用 JNI 获得硬盘物理序列号[@more@]能获物理硬盘的型号(Model Number)、物理序列号(Serial Number)、修订号(Revision Number)、缓存容量(Buffer Size)、柱面数(Cylinders)、磁头数(Heads)、每磁道的扇区数(Sectors per track)。对于 IDE 接口硬盘,不管是在 WINDOWS 9X(ME) 操作系统还是 WINDOWS NT(2K) 操作系统,它能获取以上全部参数,对于 SCSI 接口硬盘,它只能在 WINDOWS NT(2K) 操作系统下获取前三项参数。代码下载 JDiskSerial.zip
用 gcc 编译动态连接库文件 -- JNI
用 gcc 编译动态连接库文件[@more@]Linux: gcc -fPIC -shared -o liba.so a.cWindows: gcc -shared -Wl,--add-stdcall-alias -o a.dll a.c前面参数 -Wl 里面不是数字1,而是小写字母l注:Windows 下用 MinGW
APR's Version Numbering
This document covers how the APR projects are versioned. Since the APR projects are libraries, it is very important to define a stable API for users of the libraries. However, we also need to move the libraries forward, technologically. To balance these two needs, a strict policy of versioning is required, which users can rely upon to understand the limitations, restrictions, and the changes that can occur from one release of APR to the next.[@more@]The Basics Versions are denoted using a standa
Versioning Guidelines
Overview This document provides:a set of guidelines intended to help project teams balance the need to provide a stable interface to clients with the growth and evolution of components over time, a language for describing the changes to a component and the types of incompatibilities such changes may create, and a protocol for communicating those changes and incompatibilities to users and developers. [@more@]Overview This document provides:a set of guidelines intended to help project teams balanc
Backbase 3.3 FOR JSF 破解补丁
Backbase 3.3 FOR JSF 破解补丁[@more@]第一次写 Java 的破解程序, 花了整整一天. 下载地址: Backbase-JSF-3.3-Cracker.zip
Windows 下利用 SWT 实现任务栏小图标
Windows 下利用 SWT 实现任务栏小图标[@more@]源代码: package edu.gdcc.banny.clazz; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ShellAdapter; import org.eclipse.swt.events.ShellEvent; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Tray; import org.eclipse.swt.widgets.TrayIte
利用 mod_jk 把 Apache 与 JBoss 整合起来
利用 mod_jk 把 Apache 与 JBoss 整合起来[@more@]1, 准备工具:Apache-2.2: 下载地址mod_jk: 下载地址2, 安装程序根据我的前面那篇文章《把 JBoss 做成 NT 服务》把 JBoss 配置好; 安装 Apache-2.2, 安装成 NT 服务启动, 把下载下来的 mod_jk-apache-2.2.3.so 复制到 %APACHE_HOME%/modules 目录下, 改名为 mod_jk.so.3, 配置在 %APACHE_HOME%/conf 目录下创建一个文件 workers.properties, 内容如下:# Define 1 real worker using ajp13worker.list=admin# Set properties for admin (ajp13)worker.admin.type=ajp13worker.admin.host=lo
利用替换法, 生成指定模板的 Word 文档 (Java)
利用替换法, 生成指定模板的 Word 文档 (Java)[@more@]前天, 因女朋友公司需要, 需要把 3000 多记录的文本文件做成 Word 格式供打印, 其中文本文件每一行一条记录, 如下图所示:数据格式截图: 目标 Word 文档格式截图: 其中联系人统一改为某某负责人(收), 若为市或地区级的防疫站, 统一改为`计免科负责人(收)`, 否则为`防疫科负责人(收)`, 在上数据中, `卫生防疫站`都须替换为`疾病预防控制中心`.为解决上述问题, 分三步:1, 建立 Word 文档, 格式如图: 2, 写 Java 程序, 利用替换法替换为有用的信息;3, 开始替换, 以下为源代码:Main.java/*
Error 与 Exception 的区别
Error 与 Exception 的区别[@more@]了解异常与错误的区别,并且知道当你截获一个异常时,应该怎么办。 by Josh Street 转自 csdn许多程序员并没有意识到一个错误和一个异常是有区别的,在出现问题时,这种区别对如何操作你的代码有很重要的含意(见工具条,“简介错误与异常”)。 正如Mary Campione在The Java Tutorial(Java指南)中所写的,“一个异常是在一个程序执行过程中出现的一个事件,它中断了正常指令的运行。”根据American Heritage Dictionary的解释,一个错误是“偏离了可接受的代码行为的一个动作或一个实例。”那么偏
Servlet 中设置下载文件名
response.setContentType("text/x-msdownload");response.addHeader("Content-Disposition","attachment; filename="" + name + """);[@more@]
Lucene 的包结构
Lucene包结构功能表包名功能org.apache.lucene.analysis语言分析器,主要用于的切词,支持中文主要是扩展此类org.apache.lucene.document索引存储时的文档结构管理,类似于关系型数据库的表结构org.apache.lucene.index索引管理,包括索引建立、删除等org.apache.lucene.queryParser查询分析器,实现查询关键词间的运算,如与、或、非等org.apache.lucene.search检索管理,根据查询条件,检索得到结果org.apache.lucene.store数据存储管理,主要包括一些底层的I/O操作org.apache.lucene.util一些公用类[@more@]
Lucene 总结
建立与更新索引. IndexWriter(String/File/Directory, Analyzer, boolean), boolean 为 true 时建立新索引, false 时不创建新索引. IndexWriter.addDocument(Document) 添加一条记录. Document.add(Field) 添加一个字段. 方法切词索引存储用途Field(name, value, Field.Store.YES, Field.Index.TOKENIZED)YYY标题,文章内容Field(name, value)YYNMETA信息Field(name, value, Field.Store.YES, Field.Index.UN_TOKENIZED)NYY作者Field(name, value, Field.Store.YES, Field.Index.NO)NNY文件路径Field(name, value, Field.Store.NO, Field.
Java 对图片缩放处理
缩放处理图片上传到服务器后,会根据情况将图片缩小成一个图标,我们可以利用java强大的图形处理功能,对上传的图片进行缩放处理. 下面的程序使用jdk1.4中最新的ImageIO对图片进行读写.使用AffineTransform对图片进行缩放. import java.io.File; import java.awt.image.BufferedImage; import java.awt.Image; import java.awt.image.AffineTransformOp; import javax.imageio.ImageIO; import java.awt.geom.AffineTransform; public class UploadImg{ /** * @param fromdir 图片的原始目录 * @param todir 处理后的图片存放目录 * @param i