隨筆 - 6, 文章 - 1, 評論 - 13, 引用 - 0
          數(shù)據(jù)加載中……

          2011年10月26日

          職責(zé)鏈(Chain of Responsibility)模式

               摘要: 一、 職責(zé)鏈(Chain of Responsibility)模式 責(zé)任鏈模式是一種對象的行為模式【GOF95】。在責(zé)任鏈模式里,很多對象由每一個對象對其下家的引用而連接起來形成一條鏈。請求在這個鏈上傳遞, 直到鏈上的某一個對象決定處理此請求。發(fā)出這個請求的客戶端并不知道鏈上的哪一個對象最終處理這個請求,這使得系統(tǒng)可以在不影響客戶端的情況下動態(tài)地重新 組織鏈和分配責(zé)任。 從擊鼓傳花談起 ...  閱讀全文

          posted @ 2011-11-08 20:53 風(fēng)清揚(yáng) 閱讀(279) | 評論 (0)編輯 收藏

          eclipse中修改java和jsp字體及大小

           1.更改java文件大小設(shè)置
          Window->preferences->General->Appearance->Colors   and   Fonts->
          Java->Java Editor Text Font->右邊按鈕Change 
          英文版默認(rèn)的是Courier New 常規(guī) 10
          2.更改jsp文件大小設(shè)置
          Window->preferences->General->Appearance->Colors   and   Fonts->
          Basic->TextFont->右邊按鈕Change 

          posted @ 2011-11-05 10:07 風(fēng)清揚(yáng) 閱讀(7927) | 評論 (1)編輯 收藏

          常用js正則表達(dá)式

          intege:"^-?[1-9]\\d*$", //整數(shù)
          intege1:"^[1-9]\\d*$", //正整數(shù)
          intege2:"^-[1-9]\\d*$", //負(fù)整數(shù)
          num:"^([+-]?)\\d*\\.?\\d+$", //數(shù)字
          num1:"^(([0-9]+.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*.[0-9]+)|([0-9]*[1-9][0-9]*))$",//正數(shù)(包括浮點(diǎn)和整數(shù))
          num2:"^-[1-9]\\d*|0$", //負(fù)數(shù)(負(fù)整數(shù) + 0)
          decmal:"^([+-]?)\\d*\\.\\d+$", //浮點(diǎn)數(shù)
          decmal1:"^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*$",   //正浮點(diǎn)數(shù)
          decmal2:"^-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*)$",  //負(fù)浮點(diǎn)數(shù)
          decmal3:"^-?([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0)$",  //浮點(diǎn)數(shù)
          decmal4:"^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0$",   //非負(fù)浮點(diǎn)數(shù)(正浮點(diǎn)數(shù) + 0)
          decmal5:"^(-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*))|0?.0+|0$",  //非正浮點(diǎn)數(shù)(負(fù)浮點(diǎn)數(shù) + 0)
          email:"^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$", //郵件
          color:"^[a-fA-F0-9]{6}$", //顏色
          url:"^http[s]?:\\/\\/([\\w-]+\\.)+[\\w-]+([\\w-./?%&=]*)?$", //url
          chinese:"^[\\u4E00-\\u9FA5\\uF900-\\uFA2D]+$", //僅中文
          ascii:"^[\\x00-\\xFF]+$", //僅ACSII字符
          zipcode:"^\\d{6}$", //郵編
          mobile:"^(13|15|18)[0-9]{9}$", //手機(jī)
          ip4:"^(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)$", //ip地址
          notempty:"^\\S+$", //非空
          picture:"(.*)\\.(jpg|bmp|gif|ico|pcx|jpeg|tif|png|raw|tga)$", //圖片
          rar:"(.*)\\.(rar|zip|7zip|tgz)$", //壓縮文件
          date:"^\\d{4}(\\-|\\/|\.)\\d{1,2}\\1\\d{1,2}$", //日期
          time:"^([0-1]\\d|2[0-3]):[0-5]\\d:[0-5]\\d$", //時(shí)間
          qq:"^[1-9]*[1-9][0-9]*$", //QQ號碼
          tel:"^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", //電話號碼的函數(shù)(包括驗(yàn)證國內(nèi)區(qū)號,國際區(qū)號,分機(jī)號)
          username:"^\\w+$", //用來用戶注冊。匹配由數(shù)字、26個英文字母或者下劃線組成的字符串
          letter:"^[A-Za-z]+$", //字母
          letter_u:"^[A-Z]+$", //大寫字母
          letter_l:"^[a-z]+$", //小寫字母
          idcard:"^[1-9]([0-9]{14}|[0-9]{17})$" //身份證

          posted @ 2011-10-29 19:15 風(fēng)清揚(yáng) 閱讀(316) | 評論 (0)編輯 收藏

          Access restriction: The type BASE64Encoder is not accessible due to restrict

          在Eclipse中編寫Java代碼時(shí),用到了BASE64Decoder,import sun.misc.BASE64Decoder;可是Eclipse提示:
          Access restriction : The type BASE64Decoder is not accessible due to restriction on required library C:\Program
          files\java\jre6\lib\rt.jar
          Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library C:\Program files\java\jre6\lib\rt.jar
          搞不懂是為什么,最后在http://forums.dzone.com/eclipse/384-access-restriction- problems.html找到答案,只需要在project build path中先移除JRE System Library,再添加庫JRE System Library,重新編譯后就一切正常了。但是我仍然很疑惑是為什么。。。
          原文見:http://zhoushuyan.cn/java/the-type-base64decoder-is-not-accessible-due-to-restriction-on-required-library/
          ------------------------------
          Windows -> Preferences -> Java -> Compiler -> Errors/Warnings ->
          Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning

          轉(zhuǎn)自:
          http://palwang.iteye.com/blog/906425

          posted @ 2011-10-26 22:29 風(fēng)清揚(yáng) 閱讀(29241) | 評論 (11)編輯 收藏

          主站蜘蛛池模板: 宁乡县| 肥乡县| 门源| 长海县| 乌苏市| 独山县| 阳江市| 深泽县| 汶上县| 资兴市| 和政县| 民乐县| 博野县| 泽普县| 怀来县| 新竹县| 阿克陶县| 吴旗县| 大足县| 新干县| 化德县| 盐源县| 井冈山市| 南康市| 清涧县| 福清市| 砚山县| 南汇区| 贺州市| 客服| 洞口县| 墨脱县| 深泽县| 双城市| 安丘市| 舞钢市| 红原县| 峨眉山市| 息烽县| 紫金县| 南郑县|