JavaÃÜÂë¼ÓÃÜ
Java´úÂë
package com.sunnylocus.util;
import java.security.MessageDigest;
/**
* ¶ÔÃÜÂë½øÐмÓÃܺÍÑéÖ¤µÄÀà
*/
public class CipherUtil{
//Ê®Áù½øÖÆÏÂÊý×Öµ½×Ö·ûµÄÓ³ÉäÊý×é
private final static String[] hexDigits = {"0", "1", "2", "3", "4",
"5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"};
/** * °ÑinputString¼ÓÃÜ */
public static String generatePassword(String inputString){
return encodeByMD5(inputString);
}
/**
* ÑéÖ¤ÊäÈëµÄÃÜÂëÊÇ·ñÕýÈ·
* @param password ¼ÓÃܺóµÄÃÜÂë
* @param inputString ÊäÈëµÄ×Ö·û´®
* @return ÑéÖ¤½á¹û£¬TRUE:ÕýÈ· FALSE:´íÎó
*/
public static boolean validatePassword(String password, String inputString){
if(password.equals(encodeByMD5(inputString))){
return true;
Ïà¹ØÎĵµ£º
XSDÎļþ £¨XML Schema ÓïÑÔÒ²³Æ×÷ XML Schema ¶¨Ò壨XML Schema Definition£¬XSD£©¡£ ¾ßÌåʹÓ÷½·¨ºÍ¶¨ÒåÇë²Î¿´£º
http://www.w3school.com.cn/schema/index.asp
java×Ôjdk1.5ÒÔÉÏÐÂÔöÁËSchemaFactoryÀà ¿ÉÒÔʵÏÖ¶ÔXSDÑéÖ¤µÄÖ§³Ö£¬Ê¹ÓÃÆðÀ´Ò²ºÜ·½±ã¡£
ÒÔÏ´úÂë¿ÉÓÃÔÚJDK1.5+ ÑéÖ¤xml
public class SimpleErrorHandler i ......
WindowsϵÄMemcache°²×°£º
1. ÏÂÔØmemcacheµÄwindowsÎȶ¨°æ£¬½âѹ·Åij¸öÅÌÏÂÃæ£¬±ÈÈçÔÚc:\memcached
2. ÔÚÖÕ¶Ë£¨Ò²¼´cmdÃüÁî½çÃæ£©ÏÂÊäÈë ‘c:\memcached\memcached.exe -d install’ °²×°
3. ÔÙÊäÈ룺 ‘c:\memcached\memcached.exe -d start’ Æô¶¯¡£NOTE: ÒÔºómemcached½«×÷ΪwindowsµÄÒ»¸ö· ......
LombokÊÇÒ»ÖÖJavaArchive(JAR)Îļþ£¬¿ÉÓÃÀ´Ïû³ýJava´úÂëµÄÈß³¤¡£Í¨¹ýÔÚ¿ª·¢»·¾³ÖÐʵÏÖLombok£¬¿ª·¢ÈËÔ±¿ÉÒÔ½ÚÊ¡¹¹½¨ÖîÈçhashCode()ºÍequals()ÕâÑùµÄ·½·¨ÒÔ¼°ÒÔÍùÓÃÀ´·ÖÀà¸÷ÖÖaccessorºÍmutatorµÄ´óÁ¿Ê±¼ä¡£
ÎÒÃÇ¿´ÕâÑùÒ»¸öÀý×Ó£¬Ò»¸ö±ê×¼µÄJavabean¡£Ò»¸öµäÐ͵ÄJavabeanÒ»°ã¾ßÓм¸¸öÊôÐÔ¡£Ã¿¸öÊôÐÔ¾ßÓÐÒ»¸öaccessorºÍmutat ......
×òÌìÔÚдÍêjavaÏÂÔØµÄÎÄÕºó¾ÍÔÚ½ñÌì·¢ÏÖÁËÒ»¸öÎÊÌ⡣ͨ¹ýÕâ¸öÎÊÌâÒ²·´Ó¦³ö¶ÔHttpURLConnectionÕâ¸öÀ໹²»Á˽⡣³Ã´Ë»ú»áÔÙÌí¼ÓһЩ¶ÔÕâ¸öÀàµÄÁ˽â°É¡£Ê×ÏÈ¿´¿´Ç°ÃæÄǶϴúÂëÔÚÎҵijÌÐòÖгöÏÖÁËʲôÎÊÌ⣺
ÔÚÎҵijÌÐòÖ ......
¶ÔÓÚÕâ¸öϵÁÐÀïµÄÎÊÌ⣬ÿ¸öѧJavaµÄÈ˶¼Ó¦¸Ã¸ã¶®¡£µ±È»£¬Èç¹ûÖ»ÊÇѧJavaÍæÍæ¾ÍÎÞËùνÁË¡£Èç¹ûÄãÈÏΪ×Ô¼ºÒѾ³¬Ô½³õѧÕßÁË£¬È´²»ºÜ¶®ÕâЩÎÊÌ⣬Ç뽫Äã×Ô¼ºÖعé³õѧÕßÐÐÁС£ÄÚÈݾùÀ´×ÔÓÚCSDNµÄ¾µäÀÏÌù¡£
ÎÊÌâÒ»£ºÎÒÉùÃ÷ÁËʲô£¡
String s = "Hello world!";
Ðí¶àÈ˶¼×ö¹ýÕâÑùµÄÊÂÇ飬µ«ÊÇ£¬ÎÒÃǵ½µ×ÉùÃ÷ÁËʲô£¿»Ø´ðͨ ......