java UnicodeÓëÖÐÎÄ»¥»»
static String string2Unicode(String s) {
try {
StringBuffer out = new StringBuffer("");
byte[] bytes = s.getBytes("unicode");
for (int i = 2; i < bytes.length - 1; i += 2) {
out.append("u");
String str = Integer.toHexString(bytes[i + 1] & 0xff);
for (int j = str.length(); j < 2; j++) {
out.append("0");
}
String str1 = Integer.toHexString(bytes[i] & 0xff);
out.append(str);
out.append(str1);
out.append(" ");
}
return out.toString().toUpperCase();
}
catch (UnsupportedEncodingException e) {
e.printStackTrace();
return null;
}
}
static String unicode2String(String unicodeStr){
StringBuffer sb = new StringBuffer();
String str[] = unicodeStr.toUpperCase().split("U");
for(int i=0;i
Ïà¹ØÎĵµ£º
¡¡1. String.trim()
¡¡¡¡trim()ÊÇÈ¥µôÊ×β¿Õ¸ñ
¡¡¡¡2.str.replace(" ", ""); È¥µôËùÓпոñ£¬°üÀ¨Ê×β¡¢Öмä
¡¡String str = " hell o ";
¡¡¡¡String str2 = str.replaceAll(" ", "");
¡¡¡¡System.out.println(str2);
¡¡¡¡3.»òÕßreplaceAll(" +",""); È¥µôË ......
public class JavaPlus {
public static void main(String[] args) {
int x = 5;
x++;// x = x + 1;//ºó¼Ó¼Ó
System.out.println(x);
x--;// x = x - 1;//ºó¼õ¼õ
System.out.println(x);
++x;// x = x + 1;//ǰ¼Ó¼Ó
Sys ......
public class InsertBlobData {
Connection con = null;
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
InsertBlobData data = new InsertBlobData();
data.insertBlogInfo("002jpg", "sdsdfdf", "2007-02-1 ......
ÔÌâÈçÏÂ:
ÓÃ×Ö·û´®ÊäÈëµÄ·½Ê½±àдһ¸ö¼òµ¥µÄͨѶ¼¡£´ËͨѶ¼ÓɶàÌõ¼Ç¼¹¹³É¡£
ÿÌõ¼Ç¼°üÀ¨Ò»¸öÁªÏµÈ˵ÄÐÕÃû¡¢ÐԱ𡢵绰¡¢Í¨ÐŵØÖ·£¬²¢¾ßÓвéѯ¡¢Ôö¼Ó¡¢Ð޸ġ¢É¾³ýµÈ¹¦ÄÜ£¬
ÇÒÿִÐÐÒ»´Î¹¦ÄܲÙ×÷ºó£¬¿ÉÒÔÑ¡ÔñÓÃÀàËÆÒÔϵĸñʽ£¬Êä³öͨѶ¼µÄËùÓÐÐÅÏ¢¼Ç¼£º
±àºÅ ÐÕÃû &nbs ......
ÔÚJSPÀ»ñÈ¡¿Í»§¶ËµÄIPµØÖ·µÄ·½·¨ÊÇ£ºrequest.getRemoteAddr£¨£©£¬ÕâÖÖ·½·¨Ôڴ󲿷ÖÇé¿ö϶¼ÊÇÓÐЧµÄ¡£µ«ÊÇÔÚͨ¹ýÁËApache£¬SquidµÈ·´Ïò´úÀíÈí¼þ¾Í²»ÄÜ»ñÈ¡µ½¿Í»§¶ËµÄÕæÊµIPµØÖ·ÁË¡£
Èç¹ûʹÓÃÁË·´Ïò´úÀíÈí¼þ£¬½«http://192.168.1.110£º2046/ µÄURL·´Ïò´úÀíΪ http://www.javapeixun.com.cn / µÄURLÊ ......