Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java³£ÓÃÕý則±í達ʽ

public class Regex {

/**
* ¼ì²éemailÊäÈëÊÇ·ñÕýÈ·
* ÕýÈ·µÄÊéд¸ñʽΪ username@domain
* @param value
* @return
*/
public boolean checkEmail(String value, int length) {
return value.matches("\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*")&&value.length()<=length;
}

/**
* ¼ì²éµç»°ÊäÈëÊÇ·ñÕýÈ·
* ÕýÈ·¸ñʽ 012-87654321¡¢0123-87654321¡¢0123£­7654321
* @param value
* @return
*/
public boolean checkTel(String value) {
return value.matches("\\d{4}-\\d{8}|\\d{4}-\\d{7}|\\d(3)-\\d(8)");
}

/**
* ¼ì²éÊÖ»úÊäÈëÊÇ·ñÕýÈ·
*
* @param value
* @return
*/
public boolean checkMobile(String value) {
return value.matches("^[1][3,5]+\\d{9}");
}

/**
* ¼ì²éÖÐÎÄÃûÊäÈëÊÇ·ñÕýÈ·
*
* @param value
* @return
*/
public boolean checkChineseName(String value, int length) {
return value.matches("^[\u4e00-\u9fa5]+$")&&value.length()<=length;
}
/**
* ¼ì²éHTMLÖÐÊ×β¿ÕÐлò¿Õ¸ñ
* @param value
* @return
*/
public boolean checkBlank(String value){
return value.matches("^\\s*|\\s*$");
}
/**
* ¼ì²é×Ö·û´®ÊÇ·ñº¬ÓÐHTML±êÇ©
* @param value
* @return
*/

public boolean checkHtmlTag(String value){
return value.matches("<(\\S*?)[^>]*>.*?</\\1>|<.*? />");
}
/**
* ¼ì²éURLÊÇ·ñºÏ·¨
* @param value
* @return
*/
public boolean checkURL(String value){
return value.matches("[a-zA-z]+://[^\\s]*");
}
/**
* ¼ì²éIPÊÇ·ñºÏ·¨
* @param value
* @return
*/


Ïà¹ØÎĵµ£º

Java Ïß³Ì Thread ¶ÔÏóËøµÄwaitºÍnotify½âÎö

ͨ³££¬¶àÏß³ÌÖ®¼äÐèҪЭµ÷¹¤×÷¡£ÀýÈ磬ä¯ÀÀÆ÷µÄÒ»¸öÏÔʾͼƬµÄÏß³ÌdisplayThreadÏëÒªÖ´ÐÐÏÔʾͼƬµÄÈÎÎñ£¬±ØÐëµÈ´ýÏÂÔØÏß³ÌdownloadThread½«¸ÃͼƬÏÂÔØÍê±Ï¡£Èç¹ûͼƬ»¹Ã»ÓÐÏÂÔØÍ꣬displayThread¿ÉÒÔÔÝÍ££¬µ±downloadThreadÍê³ÉÁËÈÎÎñºó£¬ÔÙ֪ͨdisplayThread“ͼƬ׼±¸Íê±Ï£¬¿ÉÒÔÏÔʾÁË”£¬Õâʱ£¬displayThread ......

java ½âѹËõzipÎļþ

²âÊÔ»·¾³£ºwin2000+jdk1.4+jb2006
 import java.io.*;
import java.util.Enumeration;
//import java.util.zip.*;
import org.apache.tools.zip.*;
public class Test {
//½âѹÎļþ
  public static void extZipFileList(String zipFileName, String extPlace) {
    try {
   ......

Java»ñÈ¡ÇëÇó¿Í»§¶ËµÄÕæʵIPµØÖ·

ͨ³£Í¨¹ýrequest.getRemoteAddr()
È¡µÃ¿Í»§¶ËµÄIPµØÖ·£¬×ö¼øȨºÍУÑ飬Âß¼­Ã»ÎÊÌ⣬ÄÇô¿Ï¶¨request.getRemoteAddr()³öÁËÎÊÌ⣬googleÏ£¬·¢ÏÖÓÐÈËÓöµ½ÀàËƵÄÎÊÌâ¡£
×îÖÕ¶¨Î»Îªrequest.getRemoteAddr()ÕâÖÖ·½·¨Ôڴ󲿷ÖÇé¿ö϶¼ÊÇÓÐЧµÄ¡£µ«ÊÇÔÚͨ¹ýÁËApache,SquidµÈ·´Ïò´úÀíÈí¼þ¾Í²»ÄÜ»ñÈ¡µ½¿Í»§¶ËµÄÕæʵIPµØÖ·ÁË¡£
......

¡¾Java EEѧϰ1¡¿——MyEclipseÊý¾Ý¿âÁ¬½Ó

×÷ÕߣºÐûÕ×Åô
------------------------------------------------------------------------------------------------------------------------------------------
¹¤×÷µÚÒ»²½£ºÊìϤMyEclipseµÄ»·¾³ÒÔ¼°Ö÷Òª¹¦ÄÜ¡£
¹¤×÷µÚ¶þ²½£º½¨Á¢Êý¾Ý¿âÁ¬½Ó
Êý¾Ý¿â£ºMySQL
1¡¢MySQLµÄÅäÖÃÓëÎÊÌâ½â¾ö
     Ïê¼ûÎ ......

HTTPs in java dev @IBM

      ×î½üÔÚ¿ª·¢Ò»¸öСµÄESBϵͳ£¬»áÔÚÕâÀïճһЩ¾õµÃ»áÓõĵ½µÄÎÄÕ¡£
³ö×Ô£ºwww.ibm.com.cn MattTowers 2002Äê10ÔÂ08ÈÕ
ÕªÒª
ʹÓà HTTPS£¨Hypertext Transfer Protocol Secure °²È«³¬Îı¾´«ÊäЭÒ飩²¢·ÇÄãËùÏëµÄÄÇÑù¼òµ¥Ö±½Ó¡£Èç¹ûÄãÔø¾­³¢ÊÔÔÚ Java ¿Í»§¶ËºÍ HTTPS ·þÎñÆ÷Ö®¼ä½øÐа²È«µÄͨ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ