freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

網(wǎng)上書店網(wǎng)站jspjava畢業(yè)設(shè)計(jì)論文(編輯修改稿)

2024-07-25 21:09 本頁面
 

【文章內(nèi)容簡(jiǎn)介】 小 private int pageSize=20。 //記錄總數(shù) private int totalCount。 //總頁數(shù) private int pageCount。 //默認(rèn)構(gòu)造方法 public PageBean(){ } //非默認(rèn)的構(gòu)造方法 public PageBean(int pageNo,int pageSize,int totalCount){ //=pageNo。 =totalCount。 =pageSize。 =getPageCount()。 setPageNo(pageNo)。 public int getPageNo() { return pageNo。 } public void setPageNo(int pageNo) { //如果當(dāng)前頁實(shí)際的總頁數(shù) if(pageNo){ pageNo=。 } if(==0){ pageNo=1。 } = pageNo。 } public int getPageSize() { return pageSize。 } public void setPageSize(int pageSize) { = pageSize。 } public int getTotalCount() { return totalCount。 } public void setTotalCount(int totalCount) { = totalCount。 } //計(jì)算記錄頁數(shù) public int getPageCount() { if(totalCount%pageSize==0){ pageCount=totalCount/pageSize。 }else{ pageCount=totalCount/pageSize+1。 } return pageCount。 } public void setPageCount(int pageCount) { = pageCount。 }}5. MD5加密技術(shù)分頁顯示是Web數(shù)據(jù)庫應(yīng)用中經(jīng)常遇到的問題,當(dāng)用戶的數(shù)據(jù)庫查詢結(jié)果遠(yuǎn)遠(yuǎn)超過了計(jì)算機(jī)屏幕的顯示能力的時(shí)候,該如何合理地將數(shù)據(jù)在頁面顯示就成為一個(gè)很重要的問題了,而分頁顯示正好解決了這個(gè)問題。下面是分頁顯示的具體代碼:package 。import 。import 。import 。//用于計(jì)算某一字符串的MD5密文的public class MD5 { /** * @param args */ public static void main(String[] args) { (liuge的MD5密文是:+md5(123456))。 } /** * Used building output as Hex */ private static final char[] DIGITS = { 39。039。, 39。139。, 39。239。, 39。339。, 39。439。, 39。539。, 39。639。, 39。739。, 39。839。, 39。939。, 39。a39。, 39。b39。, 39。c39。, 39。d39。, 39。e39。, 39。f39。 }。 /** * 對(duì)字符串進(jìn)行MD5加密 * * @param text 明文 * * @return 密文 */ public static String md5(String text) { MessageDigest msgDigest = null。 try { //使用何種消息摘要算法(SHA、MD5) msgDigest = (MD5)。 } catch (NoSuchAlgorithmException e) { throw new IllegalStateException( System doesn39。t support MD5 algorithm.)。 } try { ((utf8))。 } catch (UnsupportedEncodingException e) { throw new IllegalStateException( System doesn39。t support your EncodingException.)。 } byte[] bytes = ()。 String md5Str = new String(encodeHex(bytes))。 return md5Str。 } public static char[] encodeHex(byte[] data) { int l = 。 char[] out = new char[l 1]。 // two characters form the hex value. for (int i = 0, j = 0。 i l。 i++) { out[j++] = DIGITS[(0xF0 amp。 data[i]) 4]。 out[j++] = DIGITS[0x0F amp。 data[i]]。 } return out。 }}6. 生成驗(yàn)證碼技術(shù)package 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。import 。/** * 生成驗(yàn)證碼的Servelt * 驗(yàn)證碼其實(shí)就是一張圖片, SE的核心內(nèi)容 * * */public class CheckcodeServlet extends HttpServlet { private static final long serialVersionUID = 8112015860301637701L。 private Font mFont=new Font(Times New Roman, ,18)。//設(shè)置字體 //static String AuthCode=。// 處理post public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException {// 取得一個(gè)10009999的隨機(jī)數(shù) HttpSession session=()。//(false)當(dāng)參數(shù)為false時(shí),有可能不創(chuàng)建session //(getImg,s)。 //設(shè)置Servlet返回的是圖形的內(nèi)容 (image/gif)。 //防止緩存 (Pragma,Nocache)。 (CacheControl,nocache)。 (Expires, 0)。 //要生成的驗(yàn)證碼圖形的寬度和高度(默認(rèn)) int width=60。 int height=20。 if((width)!=null amp。amp。 !(width).equals()) width = ((width))。 if((height)!=null amp。amp。 !(height).equals()) height = ((height))。 //產(chǎn)生Servlet的輸出流 ServletOutputStream out=()。 BufferedImage image=new BufferedImage(width,height,)。 //設(shè)置圖片大小的 Graphics gra=()。 Random random=new Random()。(getRandColor(200,250))。 //設(shè)置背景色 (0,0,width,height)。()。 //設(shè)置字體色 (mFont)。// 隨機(jī)產(chǎn)生155條干擾線,使圖象中的認(rèn)證碼不易被其它程序探測(cè)到 (getRandColor(160,200))。 for (int i=0。i155。i++) { int x = (width)。 int y = (height)。 int xl = (12)。 int yl = (12)。(x,y,x+xl,y+yl)。 } // 取隨機(jī)產(chǎn)生的認(rèn)證碼(4位數(shù)字) String sRand=。 for (int i=0。i4。i++){ String rand=((10))。 sRand+=rand。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1