易截截图软件、单文件、免安装、纯绿色、仅160KB

Java中文字符转换拼音

将传入的任意中文字符转换为拼音
(1)多音字只取其中一个读音。
(2)生僻字如果没有拼音,使用unknown替代。
package com.amgotech;
public class ChineseSpelling
 {
   private static int[] pyvalue = new int[] { -20319, -20317, -20304, -20295, -20292, -20283, -20265, -20257, -20242, -20230, -20051, -20036, -20032, -20026, -20002, -19990, -19986, -19982, -19976, -19805, -19784, -19775, -19774, -19763, -19756, -19751, -19746, -19741, -19739, -19728, -19725, -19715, -19540, -19531, -19525, -19515, -19500, -19484, -19479, -19467, -19289, -19288, -19281, -19275, -19270, -19263, -19261, -19249, -19243, -19242, -19238, -19235, -19227, -19224, -19218, -19212, -19038, -19023, -19018, -19006, -19003, -18996, -18977, -18961, -18952, -18783, -18774, -18773, -18763, -18756, -18741, -18735, -18731, -18722, -18710, -18697, -18696, -18526, -18518, -18501, -18490, -18478, -18463, -18448, -18447, -18446, -18239, -18237, -18231, -18220, -18211, -18201, -18184, -18183, -18181, -18012, -17997, -17988, -17970, -17964, -17961, -17950, -17947, -17931, -17928, -17922, -17759, -17752, -17733, -17730, -17721, -17703, -17701, -17697, -17692, -17683, -17676, -17496, -17487, -17482, -17468, -17454, -17433, -17427, -17417, -17202, -17185, -16983, -16970, -16942, -16915, -16733, -16708, -16706, -16689, -16664, -16657, -16647, -16474, -16470, -16465, -16459, -16452, -16448, -16433, -16429, -16427, -16423, -16419, -16412, -16407, -16403, -16401, -16393, -16220, -16216, -16212, -16205, -16202, -16187, -16180, -16171, -16169, -16158, -16155, -15959, -15958, -15944, -15933, -15920, -15915, -15903, -15889, -15878, -15707, -15701, -15681, -15667, -15661, -15659, -15652, -15640, -15631, -15625, -15454, -15448, -15436, -15435, -15419, -15416, -15408, -15394, -15385, -15377, -15375, -15369, -15363, -15362, -15183, -15180, -15165, -15158, -15153, -15150, -15149, -15144, -15143, -15141, -15140, -15139, -15128, -15121, -15119, -15117, -15110, -15109, -14941, -14937, -14933, -14930, -14929, -14928,


相关文档:

Java调用Linux命令行若干实例

 Executing a CommandSee also e90 Reading Output from a Command.
try {
// Execute a command without arguments
String command = "ls";
Process child = Runtime.getRuntime().exec(command);

// Execute a command with an argument
command = "ls /tmp"; ......

Java除法结果带小数、进一法的实现

进一法: 即省略的位上只要大于零都要进一位 ;
四舍五入法: 即省略的位上小于五都要舍去,但省略的位上满五都要进一位 ;
还有一种
去尾法: 即省略的位上不管是否满五都要舍去 ;
1、除法带小数
例如:
  int a = 8;
  int b = 3;
  int c = ((double)la)/b;
  System.out.println(c); ......

Java加密和数字签名编程快速入门

      本文主要谈一下密码学中的加密和数字签名,以及其在java中如何进行使用。对密码学有兴趣的伙伴,推荐看Bruce Schneier的著作:Applied Crypotography。在jdk1.5的发行版本中安全性方面有了很大的改进,也提供了对RSA算法的直接支持,现在我们从实例入手解决问题(本文仅是作为简单介绍): ......

java函数的参数传递和String类型

以下内容摘自java函数的参数传递和String类型 http://www.blogjava.net/thuixy/archive/2009/06/06/280302.html
说完了java的String类型,我们最后看看java函数参数的传递,到底是值传递还是引用传递呢?一般的说法是对于基本类型比如int、char是值传递,对于对象类型是引用传递。这种说法没错,但是请看下面的例子:
Str ......

Java编码规范(The Elements of Java Style)

Genaral Principles 一般约定
1.Adhere to the style
of the original.
保持最初的样式。
2.Adhere to the Principle of Least
Astonishment.
遵守最小惊奇原则。
3.Do it right the first time.

第一次就应当做好。
4.Document any deviations.
对于任何背离都应当文档注释。
Formatting
Convent ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号