javaÔõôʵÏÖ·ÖÒ³
1.PaginationTable.java
package com.sinoest.train.common;
import java.util.List;
/**
* ·ÖÒ³±í
* @author ÀîÒ×烜-ÐÞ¸Ä
* 2009-6-17
*/
public class PaginationTable {
private List<?> entryList;//> Êý¾Ý
private int totalNumOfRows;// ×ÜÐÐÊý
private int rowsPerPage = 10;// ÿҳÐÐÊý
private int beginIndex = 0;//---> µ±Ç°Ò³ÆðʼÐÐ
private int endIndex;//-----> ÖÕÖ¹Ò³
private int pageIndex;//----> µ±Ç°Ò³
private int pageCount;//----> ×ÜÒ³Êý
public PaginationTable(){ }
public PaginationTable(int totalNumOfRows, int pageIndex) {
//super();
if(pageIndex<=0){
pageIndex=1;
}
this.totalNumOfRows = totalNumOfRows;
if(totalNumOfRows%rowsPerPage==0){
this.pageCount = this.totalNumOfRows/rowsPerPage;
}else {
this.pageCount = this.totalNumOfRows/rowsPerPage+1;
}
if(pageIndex > pageCount){
pageIndex = pageCount;
}
this.pageIndex = pageIndex;
if(totalNumOfRows > 0){
this.beginIndex = (pageIndex-1)*rowsPerPage;
}
this.endIndex = pageIndex*rowsPerPage;
endIndex = endIndex>this.totalNumOfRows ? this.totalNumOfRows : endIndex;
}
public PaginationTable(int rowsPerPage, int totalNumOfRows, int pageIndex) {
//super();
this.rowsPerPage = rowsPerPage;
if(pageIndex<=0){
pageIndex=1;
}
this.totalNumOfRows = totalNumOfRows;
if(totalNumOfRows%rowsPerPage==0){
this.pageCount = this.totalNumOfRows/rowsPerPage;
}else {
this.pageCount = this.totalNumOfRows/rowsPerPage+1;
}
if(pageIndex > pageCount){
pageIndex = pageCount;
}
this.pageIndex = pageIndex;
if(totalNumOfRows > 0){
this.beginIndex = (pageIndex-1)*rowsPerPage;
}
this.endIndex = pageIndex*rowsPerPage;
endIndex = endIndex>this.totalNumOfRows ? this.totalNumOfRows : endIndex;
}
/** ×ÜÒ³Êý£¬×îÉÙÒ»Ò³£¬0ÐÐÒ²°´Ò»Ò³¼ÆËã */
public int getTotalNumOfPage() {
return this.totalNumOfRows / this.rowsPerPage + 1;
}
/** Êý¾Ý */
Ïà¹ØÎĵµ£º
MD5Ëã·¨ÊÇÒ»Öַdz£ÓÅÐãµÄ¼ÓÃÜËã·¨¡£
MD5¼ÓÃÜËã·¨Ìص㣺Áé»îÐÔ¡¢²»¿É»Ö¸´ÐÔ¡£
½éÉÜMD5¼ÓÃÜËã·¨»ù±¾Çé¿öMD5µÄÈ«³ÆÊÇMessage-Digest Algorithm 5£¬ÔÚ90Äê´ú³õÓÉMITµÄ¼ÆËã»ú¿ÆѧʵÑéÊÒºÍRSA Data Security Inc·¢Ã÷£¬¾MD2¡¢MD3ºÍMD4·¢Õ¹¶øÀ´¡£
Message-Digest·ºÖ¸×Ö½Ú´®(Message)µÄHas ......
=====================================
Ç°ÑÔ
ÔÚÌ«Ô¾ÀúÁËÒ»ÄêµÄÍ´¿à¿ª·¢Ö®ºó£¬ÏîÄ¿ÒѾÈÕÇ÷Îȶ¨£¬½ÓÏÂÀ´µÄ¹¤×÷¾ÍÊÇÄÃÏÖÓеĴúÂëµ½ÆäËûµÄÊ¡ÊнøÐÐʵʩ¡¢È»ºó×öһЩ±¾µØ»¯¿ª·¢¡£ÈÕ×ÓÏà¶ÔÇáËÉÁËÐí¶à£¬ÓÚÊÇ¿ÉÒÔ³é³öʱ¼äÀ´ÎÂϰһϻù´¡µÄ¼¼Êõ֪ʶ£¬¸ø×Ô¼ºÁÐÁËÒ»¸ö¸´Ï°Ìá¸Ù£¬ÕâÒ²ÊÇÒ»¸öjava³ÌÐòÔ±ËùÓ¦¸ÃÕÆÎÕµÄ֪ʶÂöÂç¡£
=== ......
java.io.InputStreamµÄread()·½·¨ÃèÊö£º
If no byte is available because the end of the stream has been reached, the value -1 is returned.
µ½´ïÁ÷µÄĩβÕæ»á·Å»Ø-1Âð£¿
......
ͨ¹ýjava.awt.RobotµÄcreateScreenCapture½ØÆÁ¡£
public static void captureScreen(String fileName) throws Exception {
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Rectangle screenRectangle = new Rectangle(screenSize);
& ......
ÀûÓÃJNI¼¼Êõ£¬¿ÉÒÔ×öµ½C/C++ÓëJavaÖ®¼äµÄÏ໥µ÷Óá£
1¡¢Javaµ÷ÓÃC/C++½Ó¿Ú
Õâ¸öÊÇJNI×î»ù±¾µÄÓ¦Óã¬JNIÓкܶàÕâ·½ÃæµÄÀý×Ó´úÂë¡£Ò»°ã°ÑC/C++д³É¶¯Ì¬Á´½Ó¿â£»ÔÚJava³ÌÐòÔÚLoadLibrary£¬ÀûÓÃnative½Ó¿Ú£¬¼´¿ÉÍê³Éµ÷Óá£
2¡¢C/C++»Øµ÷Java½Ó¿Ú
ÕâÖÖÓ÷¨£¬JNIµÄÀý×ӱȽÏÉÙ¡£Æäʵ£¬Ò²±È½Ï¼òµ¥£¬JNIÒ²ÌṩÁËÕâÑùµÄ½Ó¿Ú¡ ......