java ·ÖÒ³
¹Ø¼ü×Ö: java·ÖÒ³´úÂëʵÀý
package com.hjf.web.view;
public class PageUtil ...{
private int pageSize;//ÿҳÏÔʾµÄÌõÊý
private int recordCount;//×ܹ²µÄÌõÊý
private int currentPage;//µ±Ç°Ò³Ãæ
public PageUtil(int pageSize, int recordCount, int currentPage) ...{
this.pageSize = pageSize;
this.recordCount = recordCount;
setCurrentPage(currentPage);
}
//¹¹Ôì·½·¨
public PageUtil(int pageSize, int recordCount) ...{
this(pageSize, recordCount, 1);
}
//×ÜÒ³Êý
public int getPageCount() ...{
int size = recordCount/pageSize;//×ÜÌõÊý/ÿҳÏÔʾµÄÌõÊý=×ÜÒ³Êý
int mod = recordCount % pageSize;//×îºóÒ»Ò³µÄÌõÊý
if(mod != 0)
size++;
return recordCount == 0 ? 1 : size;
}
//°üº¬£¬ÆðʼË÷ÒýΪ0
public int getfromIndex() ...{
//System.out.println("from index:"+(currentPage-1) * pageSize)
Ïà¹ØÎĵµ£º
ÏÈÀ´Á˽âÒ»ÏÂÁ´±íģʽµÄÔÀí£º
Ê×ÏÈдһ¸öJavaBean£¬ÄÚÈÝÊÇÒªÌí¼ÓµÄÔªËغ͸ÃÔªËصĽڵ㡣
public class NodeBean implements Serializable
{
private Object data; //ÔªËر¾Éí
private NodeBean next; //ÏÂÒ»¸ö½Úµã
&n ......
°üÊÇJavaÓïÑÔÌṩµÄÒ»ÖÖÇø±ðÀàÃû×ÖÃüÃû¿Õ¼äµÄ»úÖÆ£¬ËüÊÇÀàµÄÒ»ÖÖÎļþ×éÖ¯ºÍ¹ÜÀí·½Ê½¡¢ÊÇÒ»×鹦ÄÜÏàËÆ»òÏà¹ØµÄÀà»ò½Ó¿ÚµÄ¼¯ºÏ¡£Java packageÌṩÁË·ÃÎÊȨÏÞºÍÃüÃûµÄ¹ÜÀí»úÖÆ£¬ËüÊÇJavaÖкܻù´¡È´Óַdz£ÖØÒªµÄÒ»¸ö¸ÅÄî¡£
Ò»¡¢°üµÄ×÷ÓÃ
1 °Ñ¹¦ÄÜÏàËÆ»òÏà¹ØµÄÀà»ò½Ó¿Ú×éÖ¯ÔÚͬһ¸ö°üÖУ¬·½±ãÀàµÄ²éÕÒºÍʹÓá£
2 Èçͬ ......
Ö÷Ïß³ÌÖУº
InitThread initThread=new InitThread(new Semaphore(0));//³õʼ»¯Ò»¸ö×ÓỊ̈߳¬´«Ò»¸ö³õֵΪ0µÄÐźÅÁ¿¸øËü
Display.getDefault().asyncExec(initThread);
try {//´Ë´¦»á¹ÒÆð£¬Ö±µ½×ÓÏß³ÌÍê³É¹¤×÷£¬ÐÞ¸ÄÁËÐźÅÁ¿µÄÖµ£¬Ö÷Ï̲߳Żá¼ÌÐø
initThread.getSemaphore().acquire();
} catch (Inte ......
±±¾© ÁõÓñÇ¿ Èí¼þ¹¤³Ìʦ ¼òÀú java php
ÇóÖ°¼òÀú
· »ù±¾ÐÅÏ¢
ÐÕ Ãû:
ÁõÓñÇ¿
³öÉúÈÕÆÚ:
1988Äê10ÔÂ23ÈÕ
ÐÔ ±ð:
ÄÐ
Ãñ ×å:
ºº×å
ר Òµ£º
Èí¼þ¼¼Êõ
½¡¿µ×´¿ö:
½¡¿µ
E - Mail:
mengxiangbaidu@qq.com
ÁªÏµµç»° ......
ÒÔÇ°¿´¹ýÕâ±¾Ê飬×î½ü¾õµÃ×÷ÕßÓÐЩ¹Ûµã»¹ÊÇͦ¶ÔÁË£¬¼ÓÉÏЩ×Ô¼ºµÄ×ܽᣬÕûÀíÏ£¬Ï£ÍûÄܶÔÒÔºó¹¤×÷ѧϰÓÐÖ¸µ¼×÷Óá£
³ÌÐòÔ±µÄÈýÖÖ¾³½ç£º
¿ÉÄÜÍõ¹úά´ó¸ç¿´¿´ºóÈË°ÑËûµÄÈËÉúÈý¾³½ç·¢Õ¹µÃÈçºÎ¿çѧ¿Æ£¬¶àÃÅÀ࣬һ¶¨ÈªÏÂÓÐÖª£¬±¶¸ÐÐÀο°¡£¬¹þ¹þ£¡
1¡¢³ÌÐòÔ±µÚÒ»²ã¾³½ç£ºÕâ°ï¸çÃÇÒ»°ã¶¼ÊDZÏÒµÈýÄêÒÔÄڵģ¬±È½ÏÓо«Á¦£¬¶ ......