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

ÌáÈ¡ºº×ÖÆ´ÒôÊ××Öĸ£¨Java°æ£©

package info.gnuhpc;
/**
* @author gnuhpc email: warmbupt@gmail.com blog: http://gnuhpc.info
* @date 2010-1-22
* @bugs ²»Ö§³Ö¶àÒô×Ö´¦Àí
*/
public class PinyinConv {
// ¼òÌåÖÐÎĵıàÂ뷶Χ´ÓB0A1£¨45217£©Ò»Ö±µ½F7FE£¨63486£©
private static int BEGIN = 45217;
private static int END = 63486;
// °´ÕÕÉùĸ±íʾ£¬Õâ¸ö±íÊÇÔÚGB2312ÖеijöÏֵĵÚÒ»¸öºº×Ö£¬Ò²¾ÍÊÇ˵“°¡”ÊÇ´ú±íÊ××ÖĸaµÄµÚÒ»¸öºº×Ö¡£
// i, u, v¶¼²»×öÉùĸ, ×Ô¶¨¹æÔò¸úËæÇ°ÃæµÄ×Öĸ
private static char[] chartable = { '°¡', '°Å', '²Á', '´î', '¶ê', '·¢', '¸Á', '¹þ',
'¹þ', '»÷', '¿¦', 'À¬', 'Âè', 'ÄÃ', 'Ŷ', 'ž', 'ÆÚ', 'È»', 'Èö', 'Ëú', 'Ëú',
'Ëú', 'ÍÚ', 'Îô', 'ѹ', 'ÔÑ', };
// ¶þÊ®Áù¸ö×ÖĸÇø¼ä¶ÔÓ¦¶þÊ®Æ߸ö¶Ëµã
// GB2312Â뺺×ÖÇø¼äÊ®½øÖƱíʾ
private static int[] table = new int[27];
// ¶ÔÓ¦Ê××ÖĸÇø¼ä±í
private static char[] initialtable = { 'a', 'b', 'c', 'd', 'e', 'f', 'g',
'h', 'h', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
't', 't', 'w', 'x', 'y', 'z', };
// ³õʼ»¯
static {
for (int i = 0; i < 26; i++) {
table[i] = gbValue(chartable[i]);// µÃµ½GB2312ÂëµÄÊ××ÖĸÇø¼ä¶Ëµã±í£¬Ê®½øÖÆ¡£
}
table[26] = END;// Çø¼ä±í½áβ
}
// ------------------------public·½·¨Çø------------------------
/**
* ¸ù¾ÝÒ»¸ö°üº¬ºº×ÖµÄ×Ö·û´®·µ»ØÒ»¸öºº×ÖÆ´ÒôÊ××ÖĸµÄ×Ö·û´® ×îÖØÒªµÄÒ»¸ö·½·¨£¬Ë¼Â·ÈçÏ£ºÒ»¸ö¸ö×Ö·û¶ÁÈë¡¢Åжϡ¢Êä³ö
*/
public static String cn2py(String SourceStr) {
String Result = "";
int StrLength = SourceStr.length();
int i;
try {
for (i = 0; i < StrLength; i++) {
Result += Char2Initial(SourceStr.charAt(i));
}
} catch (Exception e) {
Result = "";
}
return Result;
}
// ------------------------private·½·¨Çø------------------------
/**
* ÊäÈë×Ö·û,µÃµ½ËûµÄÉùĸ,Ó¢ÎÄ×Öĸ·µ»Ø¶ÔÓ¦µÄ´óд×Öĸ,ÆäË


Ïà¹ØÎĵµ£º

javaÖÐʹÓÃsqliteÊý¾Ý¿â

sqliteÊý¾Ý¿âµÚÈý·½javaÀ©Õ¹°üÏÂÔصØÖ·£ºhttp://www.zentus.com/sqlitejdbc/
ÓÐ2¸ö°ü£¬Ò»¸öÊÇnested£¨Ç¶ÈëʽµÄ£©£¬Ò»¸öÊÇnative(±¾µØµÄ)¡£
Çø±ðÔÚÓÚ:nested ²»ÐèÒª¶îÍâµÄdllÎļþ£¬µ«ÊÇËÙ¶ÈÂý¡£nativeÐèÒªÒ»¸ö¶îÍâµÄdllÎļþ£¬ËٶȺܿ졣
 1.ʹÓÃnested°ü£ºsqlitejdbc-v037-nested.jar
java´úÂ룺
java ´úÂë
packa ......

javaÖÐʹÓÃibatisÀ´µ÷Óô洢¹ý³Ì(ÏÂ)

3.3 ÓαêÑ­»·×î¼Ñ²ßÂÔ
ÎÒÃÇÔÚ½øÐÐPL/SQL±à³Ìʱ£¬¾­³£ÐèҪѭ»·¶ÁÈ¡½á¹û¼¯µÄÊý¾Ý¡£½øÐÐÖðÐд¦Àí£¬Õâ¸ö¹ý³Ì¾ÍÐèÒª¶ÔÓαê½øÐÐÑ­»·¡£¶ÔÓαê½øÐÐÑ­»·µÄ·½·¨ÓжàÖÖ£¬ÎÒÃÇÔÚ´ËÒ»Ò»·ÖÎö¡£
create or replace procedure proccycle(p varchar2)   
as   
cursor c_postype is select pos_type, description ......

JAVA ´úÀíģʽ

¶¯Ì¬´úÀí£º
public interface Qingke {
void qk();
}
public class dsz implements Qingke{
 
 public void qk() {
  System.out.print("dsz qk");
 }
}
public class Secretary implements InvocationHandler {
 private Object pro;
 private dsz dsz;
 public Obj ......

ÄãÄÜͨ¹ýÏÂÃæµÄ3µÀjavaÃæÊÔÌâÂð?

1.java static inner class ºÍ non-static inner classµÄÇø±ð?
2.Çëд³öÒ»¸ösingletonģʽµÄclass.
ÄãÈç¹ûд³öÏÂÃæµÄ2ÖÖÑùʽ,ÎÒ»áÎÊÄã:ÇëÎÊÄãÈçºÎÔÚͬһ¸öjvmÖв¢ÇÒÔÚͬһ¸öclassLoaderÖеõ½ËüµÄ¶à¸öʵÀý?(Çë²»ÒªÆæ¹Ö)
ÑùÁÐ1:
public class Singleton {  
 private final static Singleton instance= ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ