<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 2,  comments - 2,  trackbacks - 0
      置頂隨筆
          昨天發現一號玩的jar包(pinyin4j-2.5.0.jar),可以把漢字轉為拼音。可在http://pinyin4j.sourceforge.net/下載。下面是我做的一個Demo

    import net.sourceforge.pinyin4j.PinyinHelper;
    import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
    import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
    import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
    import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
    import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
    public class HanZiToPinYin {


        
    public static  String toPinYin(String hanzhis){
            CharSequence s
    = hanzhis;
            
            
    char [] hanzhi=new char[s.length()];
            
    for(int i=0;i<s.length();i++){
                hanzhi[i]
    =s.charAt(i);
            }

            
            
    char [] t1 =hanzhi; 
            String[] t2 
    = new String[s.length()];
            
    /**
             * 設置輸出格式
             
    */

            net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat t3 
    = new
            HanyuPinyinOutputFormat();
            t3.setCaseType(HanyuPinyinCaseType.UPPERCASE);
            t3.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
            t3.setVCharType(HanyuPinyinVCharType.WITH_V);
            
            
    int t0=t1.length;
            String py 
    = "";
            
    try {
                
    for (int i=0;i<t0;i++)
                
    {
                    t2 
    = PinyinHelper.toHanyuPinyinStringArray(t1[i], t3);
                    py
    =py+t2[0].toString();
                        }

            }

            
    catch (BadHanyuPinyinOutputFormatCombination e1) {
                e1.printStackTrace();
            }

            
            
    return py.trim();
            }

        
        
        
        
        
    public static void main(String[] args) {
            
            System.err.println(ToPinYin.toPinYing(
    "漢字轉拼音"));
        }

     
    }


    輸出結果:hanzizhuanpinyin
            轉換的正確率,還不錯。
    詳細請查看官方文檔!
    posted @ 2008-11-20 09:56 R_XiaoGuang 閱讀(3027) | 評論 (2)編輯 收藏
         摘要:   閱讀全文
    posted @ 2008-09-20 07:31 R_XiaoGuang 閱讀(131) | 評論 (0)編輯 收藏
      2008年11月20日
          昨天發現一號玩的jar包(pinyin4j-2.5.0.jar),可以把漢字轉為拼音。可在http://pinyin4j.sourceforge.net/下載。下面是我做的一個Demo

    import net.sourceforge.pinyin4j.PinyinHelper;
    import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
    import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
    import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
    import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
    import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
    public class HanZiToPinYin {


        
    public static  String toPinYin(String hanzhis){
            CharSequence s
    = hanzhis;
            
            
    char [] hanzhi=new char[s.length()];
            
    for(int i=0;i<s.length();i++){
                hanzhi[i]
    =s.charAt(i);
            }

            
            
    char [] t1 =hanzhi; 
            String[] t2 
    = new String[s.length()];
            
    /**
             * 設置輸出格式
             
    */

            net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat t3 
    = new
            HanyuPinyinOutputFormat();
            t3.setCaseType(HanyuPinyinCaseType.UPPERCASE);
            t3.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
            t3.setVCharType(HanyuPinyinVCharType.WITH_V);
            
            
    int t0=t1.length;
            String py 
    = "";
            
    try {
                
    for (int i=0;i<t0;i++)
                
    {
                    t2 
    = PinyinHelper.toHanyuPinyinStringArray(t1[i], t3);
                    py
    =py+t2[0].toString();
                        }

            }

            
    catch (BadHanyuPinyinOutputFormatCombination e1) {
                e1.printStackTrace();
            }

            
            
    return py.trim();
            }

        
        
        
        
        
    public static void main(String[] args) {
            
            System.err.println(ToPinYin.toPinYing(
    "漢字轉拼音"));
        }

     
    }


    輸出結果:hanzizhuanpinyin
            轉換的正確率,還不錯。
    詳細請查看官方文檔!
    posted @ 2008-11-20 09:56 R_XiaoGuang 閱讀(3027) | 評論 (2)編輯 收藏
      2008年9月20日
         摘要:   閱讀全文
    posted @ 2008-09-20 07:31 R_XiaoGuang 閱讀(131) | 評論 (0)編輯 收藏
      2008年7月5日
    此源碼來自http://hi.baidu.com/imake/blog/item/4364a51eb0af1d1a40341715.html


    我直接發源代碼了,大家自己編譯,然后運行就可以了。

    //Myeclipse Blue6 .5 破解程序

    import java.text.DecimalFormat; 
    import java.text.NumberFormat; 
    import java.text.SimpleDateFormat; 
    import java.util.Calendar; 

    public class Crack { 
        
    public static final void main(String[] args){ 
            String id
    ="iMake";//這里填你想注冊的名字
            String num="3";//這里填你想注冊的使用年限,最大為999
            System.out.println(getSerial(id,"100",num,false)); 
        } 
        
    public static String getSerial(String userId, String version, 
                String licenseNum, 
    boolean selected) { 
            Calendar cal 
    = Calendar.getInstance(); 
            cal.add(
    13); 
            cal.add(
    6-1); 
            NumberFormat nf 
    = new DecimalFormat("000"); 
            licenseNum 
    = nf.format(Integer.valueOf(licenseNum)); 
            String verTime 
    = selected ? (new StringBuffer("-")).append( 
                    (
    new SimpleDateFormat("yyMMdd")).format(cal.getTime())).append( 
                    
    "0").toString() : "-0812310"
            String type 
    = "YE3MB-"
            String need 
    = (new StringBuffer(String.valueOf(userId.substring(01)))) 
                    .append(type).append(version).append(licenseNum) 
                    .append(verTime).toString(); 
            String dx 
    = (new StringBuffer(String.valueOf(need))) 
                    .append( 
                            
    "Decompiling this copyrighted software is a violation of both your

    license agreement and the Digital Millenium Copyright Act of 
    1998

    (http:
    //www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA,

    penalties range up to a $
    500,000 fine or up to five years imprisonment for a first offense.

    Think about it; pay 
    for a license, avoid prosecution, and feel better about yourself."
                     
                            .append(userId).toString(); 
            
    int suf = decode(dx); 
            String code 
    = (new StringBuffer(String.valueOf(need))).append( 
                    String.valueOf(suf)).toString(); 
            
    return change(code); 
        } 

        
    private static int decode(String s) { 
            
    int i = 0
            
    char ac[] = s.toCharArray(); 
            
    int j = 0
            
    for (int k = ac.length; j < k; j++
                i 
    = 31 * i + ac[j]; 

            
    return Math.abs(i); 
        } 

        
    private static String change(String s) { 
            
    byte abyte0[] = s.getBytes(); 
            
    char ac[] = new char[s.length()]; 
            
    int i = 0
            
    for (int k = abyte0.length; i < k; i++) { 
                
    int j = abyte0[i]; 
                
    if (j >= 48 && j <= 57
                    j 
    = ((j - 48+ 5% 10 + 48
                
    else if (j >= 65 && j <= 90
                    j 
    = ((j - 65+ 13% 26 + 65
                
    else if (j >= 97 && j <= 122
                    j 
    = ((j - 97+ 13% 26 + 97
                ac[i] 
    = (char) j; 
            } 

            
    return String.valueOf(ac); 
        } 
    }



    posted @ 2008-07-05 17:15 R_XiaoGuang 閱讀(2986) | 評論 (0)編輯 收藏
    僅列出標題  
    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    沒有什么不可以承受,只是沒有落到自己身上。

    沒有什么不可以成功,只是沒有真正的努力過。

     

    常用鏈接

    留言簿(2)

    隨筆分類

    隨筆檔案

    最新隨筆

    搜索

    •  

    積分與排名

    • 積分 - 7294
    • 排名 - 2717

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 免费一区二区三区在线视频| 亚洲A∨无码无在线观看| 亚洲乱码av中文一区二区| 亚欧在线精品免费观看一区| 亚洲欧洲国产成人精品| 久热中文字幕在线精品免费| 久久精品国产亚洲av麻豆图片 | 久久久久久毛片免费播放| 伊人久久大香线蕉亚洲| 男性gay黄免费网站| 亚洲国产精品视频| 中文字幕免费在线观看动作大片| 日韩免费人妻AV无码专区蜜桃 | 国产亚洲成在线播放va| 波多野结衣久久高清免费 | 狼人大香伊蕉国产WWW亚洲| 国产a级特黄的片子视频免费| 久久91亚洲人成电影网站| 日韩人妻无码精品久久免费一| 四虎成人免费网站在线| WWW亚洲色大成网络.COM | 狠狠色婷婷狠狠狠亚洲综合 | 亚洲精品老司机在线观看| a一级毛片免费高清在线| 亚洲第一精品在线视频| 毛片基地免费视频a| 特级做a爰片毛片免费看| 久久青青成人亚洲精品| 亚洲视频免费播放| AV激情亚洲男人的天堂国语| 亚洲香蕉网久久综合影视| 又粗又大又黑又长的免费视频| 亚洲一区免费观看| 免费无码又爽又刺激高潮| 91免费福利视频| 亚洲午夜在线播放| 亚洲人色婷婷成人网站在线观看| 韩国亚洲伊人久久综合影院| 黑人精品videos亚洲人| 美女视频黄a视频全免费| 在线播放国产不卡免费视频|