精华内容
下载资源
问答
  • java中文汉字笔画排序

    2017-07-27 13:36:26
    利用java对基本汉字(unicode编码4E00-9FA5)进行笔画排序 资源更新查看:https://blog.csdn.net/u013271384/article/details/76549368
  • java汉字笔画排序源码

    2018-01-06 15:13:33
    原文地址:http://blog.csdn.net/u013271384/article/details/76549368
  • java汉字笔画排序

    千次阅读 2017-08-01 18:11:55
    这是我自己写的一个java排序的库,排序主要针对String及类中的String字段进行排序,需要为类中要排序的字段生成get、set方法。 文件目录如下: 1.ObjectStrokeComparator:对指定类进行排序 对List排序: ...

    排序范围:unicode编码4E00-9FA5


    以下是第二版内容

    第二版下载地址:
    例子:https://download.csdn.net/download/u013271384/20022671
    源码:https://download.csdn.net/download/u013271384/20022646


    以下是第一版内容

    这是我自己写的一个java排序的库,排序主要针对String及类中的String字段进行排序,需要为类中要排序的字段生成get、set方法。
    文件目录如下:

    目录结构

    1.ObjectStrokeComparator:对指定类进行排序
    对List排序:

    List<Stroke> strokes = new ArrayList<Stroke>();
    		Stroke stroke1 = new Stroke();
    		stroke1.setName("张三无");
    		strokes.add(stroke1);
    		stroke1 = new Stroke();
    		stroke1.setName("赵明红匠");
    		strokes.add(stroke1);
    		stroke1 = new Stroke();
    		stroke1.setName("李位");
    		strokes.add(stroke1);
    		stroke1 = new Stroke();
    		stroke1.setName("王东栋");
    		strokes.add(stroke1);
    		stroke1 = new Stroke();
    		stroke1.setName("张三");
    		strokes.add(stroke1);
    		stroke1 = new Stroke();
    		strokes.add(stroke1);
    		
    Collections.sort(strokes, new ObjectStrokeComparator(Stroke.class, "name"));//对Stroke中的name字段排序
    

    2.StringStrokeComparator:针对String排序
    对List排序:

    List<String> name = new ArrayList<String>();
    		name.add("李四");
    		name.add("张三44");
    		name.add("张三是");
    		name.add("张三2");
    		name.add("张三");
    		name.add("赵明");
    		name.add("王东西");
    		
    		Collections.sort(name, new StringStrokeComparator());
    

    也可以利用ObjectStrokeComparator对String进行排序,使用如下,第二个参数可以为null。

    Collections.sort(name, new ObjectStrokeComparator(String.class, ""));
    

    3.SubObjectStrokeComparator:针对类子类下String排序
    (需要类下面的字段相对应)
    对List排序:

    public class Parent{
    		
    		private Stroke stroke;
    
    		public Stroke getStroke() {
    			return stroke;
    		}
    
    		public void setStroke(Stroke stroke) {
    			this.stroke = stroke;
    		}
    	}
    
    
    排序
    List<Parent> parents = new ArrayList<MainActivity.Parent>();
    		Collections.sort(parents, new SubObjectStrokeComparator("stroke.name"));
    

    以上所有的排序都需要为排序字段生成get,set方法!

    jar下载地址:点我下载
    源代码下载:点我下载

    展开全文
  • java获取汉字笔画

    千次阅读 2019-02-20 17:42:32
    java获取汉字笔画数 前段时间做个项目,主要是中文验证码识别,分为了几类问题,一类是得出某个汉字的笔画数,在网上搜了一下,基本方法都是大同小异,都是通过查GB2312的字符集的笔划列表。下面给出源代码。 稍有...

    转自:https://blog.csdn.net/baidu_18987603/article/details/53375195?tdsourcetag=s_pcqq_aiomsg

    java获取汉字笔画数

    前段时间做个项目,主要是中文验证码识别,分为了几类问题,一类是得出某个汉字的笔画数,在网上搜了一下,基本方法都是大同小异,都是通过查GB2312的字符集的笔划列表。下面给出源代码。

    稍有更改, 主要是getBytes的时候选择了gbk

     

     

    /**
     * @auth thewindkee
     * @Date 2019/2/20 0020 下午 5:29
     */
    public class BihuaTest {
        public static void main(String[] args) throws UnsupportedEncodingException {
            BihuaTest test = new BihuaTest();
            System.out.println(test.getStrokeCount('水'));
            System.out.println(test.getStrokeCount('淼'));
            System.out.println(test.getStrokeCount('中'));
            System.out.println(test.getStrokeCount('国'));
            System.out.println(test.getStrokeCount('人'));
        }
    
        public int getStrokeCount(char charcator) throws UnsupportedEncodingException {
            byte[] bytes = (String.valueOf(charcator)).getBytes("gbk");
            if (bytes == null || bytes.length > 2 || bytes.length <= 0) {
                // 错误引用,非合法字符
                return 0;
            }
            if (bytes.length == 1) {
                // 英文字符
                return 0;
            }
            if (bytes.length == 2) {
                // 中文字符
                int highByte = 256 + bytes[0];
                int lowByte = 256 + bytes[1];
                return GetGB2312StrokeCountM(highByte, lowByte);
            }
    
            // 未知错误
            return 0;
        }
    
        /// <summary>
        /// 获取字符串中所有汉字的笔画总和
        /// </summary>
        /// <param name="cnWords">字符串</param>
        /// <returns></returns>
        public int GetStrokeCount(String Words) throws UnsupportedEncodingException {
    
            //去除非中文
            char[] words = Words.toCharArray();
            int count = 0;
            for (int i = 0; i < words.length; i++)
            {
                int returnCount=  getStrokeCount(words[i]);
                if (returnCount > 0)
                {
                    count += returnCount;
                }
            }
            return count;
        }
        /// <summary>
        /// 通过编码计算得到该汉字的偏移量,通过偏移量再在上面的笔画列表中
        /// 得到该汉字的笔画数.
        /// </summary>
        /// <param name="c1"></param>
        /// <param name="c2"></param>
        /// <returns></returns>
        public static int GetGB2312StrokeCountM(int c1, int c2)
        {
            int OffSet;
            if (c1 < 0xB0 || c1 > 0xF7 || c2 < 0xA1 || c2 > 0xFE)
            {
                // 不是一个有效的GB2312汉字字符
                return -1;
            }
            OffSet = (c1 - 0xB0) * (0xFE - 0xA0) + (c2 - 0xA1);
            return gb2312_stroke_count[OffSet];
        }
        /// <summary>
        /// GB2312的字符集的笔划列表,可以参考gb2312字符全集
        /// </summary>
        //
        public static   int[] gb2312_stroke_count = {
                /* B0 */
                10, 7, 10, 10, 8, 10, 9, 11, 17, 14, 13, 5, 13, 10, 12, 15, 10, 6, 10, 9,
                13, 8, 10, 10, 8, 8, 10, 5, 10, 14, 16, 9, 12, 12, 15, 15, 7, 10,
                5, 5, 7, 10, 2, 9, 4, 8, 12, 13, 7, 10, 7, 21, 10, 8, 5, 9, 6, 13,
                8, 8, 9, 13, 12, 10, 13, 7, 10, 10, 8, 8, 7, 8, 7, 19, 5, 4, 8, 5,
                9, 10, 14, 14, 9, 12, 15, 10, 15, 12, 12, 8, 9, 5, 15, 10,
                /* B1 */
                16, 13, 9, 12, 8, 8, 8, 7, 15, 10, 13, 19, 8, 13, 12, 8, 5, 12, 9,
                4, 9, 10, 7, 8, 12, 12, 10, 8, 8, 5, 11, 11, 11, 9, 9, 18, 9, 12,
                14, 4, 13, 10, 8, 14, 13, 14, 6, 10, 9, 4, 7, 13, 6, 11, 14, 5, 13,
                16, 17, 16, 9, 18, 5, 12, 8, 9, 9, 8, 4, 16, 16, 17, 12, 9, 11, 15,
                8, 19, 16, 7, 15, 11, 12, 16, 13, 10, 13, 7, 6, 9, 5, 8, 9, 9,
                /* B2 */
                10, 6, 8, 11, 15, 8, 10, 8, 12, 9, 13, 10, 14, 7, 8, 11, 11, 14,
                12, 8, 7, 10, 2, 10, 7, 11, 4, 5, 7, 19, 10, 8, 17, 11, 12, 7, 3,
                7, 12, 15, 8, 11, 11, 14, 16, 8, 10, 9, 11, 11, 7, 7, 10, 4, 7, 17,
                16, 16, 15, 11, 9, 8, 12, 8, 5, 9, 7, 19, 12, 3, 9, 9, 9, 14, 12,
                14, 7, 9, 8, 8, 10, 10, 12, 11, 14, 12, 11, 13, 11, 6, 11, 19, 8,
                11,
                /* B3 */
                6, 9, 11, 4, 11, 7, 2, 12, 8, 11, 10, 12, 7, 9, 12, 15, 15, 11, 7,
                8, 4, 7, 15, 12, 7, 15, 10, 6, 7, 6, 11, 7, 7, 7, 12, 8, 15, 10, 9,
                16, 6, 7, 10, 12, 12, 15, 8, 8, 10, 10, 10, 6, 13, 9, 11, 6, 7, 6,
                6, 10, 8, 8, 4, 7, 10, 5, 9, 6, 6, 6, 11, 8, 8, 13, 12, 14, 13, 13,
                13, 4, 11, 14, 4, 10, 7, 5, 16, 12, 18, 12, 13, 12, 9, 13,
                /* B4 */
                10, 12, 24, 13, 13, 5, 12, 3, 9, 13, 7, 11, 12, 7, 9, 12, 15, 7, 6,
                6, 7, 8, 11, 13, 8, 9, 13, 15, 10, 11, 7, 21, 18, 11, 11, 9, 14,
                14, 13, 13, 10, 7, 6, 8, 12, 6, 15, 12, 7, 5, 4, 5, 11, 11, 15, 17,
                9, 19, 16, 12, 14, 11, 13, 10, 13, 14, 11, 14, 7, 6, 3, 14, 15, 12,
                11, 10, 13, 12, 6, 12, 14, 5, 3, 7, 4, 12, 17, 9, 9, 5, 9, 11, 9,
                11,
                /* B5 */
                9, 10, 8, 4, 8, 10, 11, 9, 5, 12, 7, 11, 11, 8, 11, 11, 6, 9, 10,
                9, 10, 2, 10, 17, 10, 7, 11, 6, 8, 15, 11, 12, 11, 15, 11, 8, 19,
                6, 12, 12, 17, 14, 4, 12, 7, 14, 8, 10, 11, 7, 10, 14, 14, 8, 8, 6,
                12, 11, 9, 7, 10, 12, 16, 11, 13, 13, 9, 8, 16, 9, 5, 7, 7, 8, 11,
                12, 11, 13, 13, 5, 16, 10, 2, 11, 6, 8, 10, 12, 10, 14, 15, 8, 11,
                13,
                /* B6 */
                2, 7, 5, 7, 8, 12, 13, 8, 4, 6, 5, 5, 12, 15, 6, 9, 8, 9, 7, 9, 11,
                7, 4, 9, 7, 10, 12, 10, 13, 9, 12, 9, 10, 11, 13, 12, 7, 14, 7, 9,
                12, 7, 14, 12, 14, 9, 11, 12, 11, 7, 4, 5, 15, 7, 19, 12, 10, 7, 9,
                9, 12, 11, 9, 6, 6, 9, 13, 6, 13, 11, 8, 12, 11, 13, 10, 12, 9, 15,
                6, 10, 10, 4, 7, 12, 11, 10, 10, 6, 2, 6, 5, 9, 9, 2,
                /* B7 */
                9, 5, 9, 12, 6, 4, 9, 8, 9, 18, 6, 12, 18, 15, 8, 8, 17, 3, 10, 4,
                7, 8, 8, 5, 7, 7, 7, 7, 4, 8, 8, 6, 7, 6, 6, 7, 8, 11, 8, 11, 3, 8,
                10, 10, 7, 8, 8, 8, 9, 7, 11, 7, 8, 4, 7, 7, 12, 7, 10, 8, 6, 8,
                12, 12, 4, 9, 8, 13, 10, 12, 4, 9, 11, 10, 5, 13, 6, 8, 4, 7, 7, 4,
                15, 8, 14, 7, 8, 13, 12, 9, 11, 6, 9, 8,
                /* B8 */
                10, 11, 13, 11, 5, 7, 7, 11, 10, 10, 8, 11, 12, 8, 14, 9, 11, 18,
                12, 9, 12, 5, 8, 4, 13, 6, 12, 4, 7, 6, 13, 8, 15, 14, 8, 7, 13, 9,
                11, 12, 3, 5, 7, 9, 9, 7, 10, 13, 8, 11, 21, 4, 6, 9, 9, 7, 7, 7,
                12, 7, 16, 10, 10, 14, 10, 16, 13, 15, 15, 7, 10, 14, 12, 4, 11,
                10, 8, 12, 9, 12, 10, 12, 9, 12, 11, 3, 6, 9, 10, 13, 10, 7, 8, 19,
                /* B9 */
                10, 10, 11, 3, 7, 5, 10, 11, 8, 10, 4, 9, 3, 6, 7, 9, 7, 6, 9, 4,
                7, 8, 8, 9, 8, 8, 11, 12, 11, 8, 14, 7, 8, 8, 8, 13, 5, 11, 9, 7,
                8, 9, 10, 8, 12, 8, 5, 9, 14, 9, 13, 8, 8, 8, 12, 6, 8, 9, 6, 14,
                11, 23, 12, 20, 8, 6, 3, 10, 13, 8, 6, 11, 5, 7, 9, 6, 9, 8, 9, 10,
                8, 13, 9, 8, 12, 13, 12, 12, 10, 8, 8, 14, 6, 9, 15, 9, 10, 10, 6,
                10, 9, 12, 14, 7, 12, 7, 11, 12, 8, 12, 7, 16, 16, 10, 7, 16, 10,
                11, 6, 5, 5, 8, 10, 17, 17, 14, 11, 9, 6, 10, 5, 10, 8, 12, 10, 11,
                10, 5, 8, 7, 6, 11, 13, 9, 8, 11, 14, 14, 15, 9, 15, 12, 11, 9, 9,
                9, 10, 7, 15, 16, 9, 8, 9, 10, 9, 11, 9, 7, 5, 6, 12, 9, 12, 7, 9,
                10, 6, 8, 5, 8, 13, 10, 12, 9, 15, 8, 15, 12,
                /* BB */
                8, 8, 11, 7, 4, 7, 4, 7, 9, 6, 12, 12, 8, 6, 4, 8, 13, 9, 7, 11, 7,
                6, 8, 10, 7, 12, 10, 11, 10, 12, 13, 11, 10, 9, 4, 9, 12, 11, 16,
                15, 17, 9, 11, 12, 13, 10, 13, 9, 11, 6, 9, 12, 17, 9, 12, 6, 13,
                10, 15, 5, 12, 11, 10, 11, 6, 10, 5, 6, 9, 9, 9, 8, 11, 13, 9, 11,
                17, 9, 6, 4, 10, 8, 12, 16, 8, 11, 5, 6, 11, 6, 13, 15, 10, 14,
                /* BC */
                6, 5, 9, 16, 4, 7, 10, 11, 12, 6, 7, 12, 13, 20, 12, 3, 9, 10, 6,
                7, 13, 6, 9, 2, 10, 3, 13, 7, 16, 8, 6, 11, 8, 11, 9, 11, 11, 4, 5,
                9, 7, 7, 7, 10, 6, 14, 9, 6, 8, 10, 5, 9, 12, 10, 5, 10, 11, 15, 6,
                9, 8, 13, 7, 10, 7, 6, 11, 7, 13, 10, 8, 8, 6, 12, 9, 11, 9, 14,
                12, 8, 10, 13, 9, 11, 11, 9, 14, 13, 12, 9, 4, 13, 15, 6,
                /* BD */
                10, 10, 9, 8, 11, 12, 10, 8, 15, 9, 9, 10, 6, 19, 12, 10, 9, 6, 6,
                13, 8, 15, 12, 17, 12, 10, 6, 8, 9, 9, 9, 20, 12, 11, 11, 8, 11, 9,
                7, 9, 16, 9, 13, 11, 14, 10, 10, 5, 12, 12, 11, 9, 11, 12, 6, 14,
                7, 5, 10, 8, 11, 13, 14, 9, 9, 13, 8, 7, 17, 7, 9, 10, 4, 9, 9, 8,
                3, 12, 4, 8, 4, 9, 18, 10, 13, 4, 13, 7, 13, 10, 13, 7, 10, 10,
                /* BE */
                6, 7, 9, 14, 8, 13, 12, 16, 8, 11, 14, 13, 8, 4, 19, 12, 11, 14,
                14, 12, 16, 8, 10, 13, 11, 10, 8, 9, 12, 12, 7, 5, 7, 9, 3, 7, 2,
                10, 11, 11, 5, 6, 13, 8, 12, 8, 17, 8, 8, 10, 8, 8, 11, 7, 8, 9, 9,
                8, 14, 7, 11, 4, 8, 11, 15, 13, 10, 5, 11, 8, 10, 10, 12, 10, 10,
                11, 8, 10, 15, 23, 7, 11, 10, 17, 9, 6, 6, 9, 7, 11, 9, 6, 7, 10,
                /* BF */
                9, 12, 10, 9, 10, 12, 8, 5, 9, 4, 12, 13, 8, 12, 5, 12, 11, 7, 9,
                9, 11, 14, 17, 6, 7, 4, 8, 6, 9, 10, 15, 8, 8, 9, 12, 15, 14, 9, 7,
                9, 5, 12, 7, 8, 9, 10, 8, 11, 9, 10, 7, 7, 8, 10, 4, 11, 7, 3, 6,
                11, 9, 10, 13, 8, 14, 7, 12, 6, 9, 9, 13, 10, 7, 13, 8, 7, 10, 12,
                6, 12, 7, 10, 8, 11, 7, 7, 3, 11, 8, 13, 12, 9, 13, 11,
                /* C0 */
                12, 12, 12, 8, 8, 10, 7, 9, 6, 13, 12, 8, 8, 12, 14, 12, 14, 11,
                10, 7, 13, 13, 11, 9, 8, 16, 12, 5, 15, 14, 12, 9, 16, 12, 9, 13,
                11, 12, 10, 11, 8, 10, 10, 10, 7, 7, 6, 8, 9, 13, 10, 10, 11, 5,
                13, 18, 16, 15, 11, 17, 9, 16, 6, 9, 8, 12, 13, 7, 9, 11, 11, 15,
                16, 10, 10, 13, 11, 7, 7, 15, 5, 10, 9, 6, 10, 7, 5, 7, 10, 4, 7,
                12, 8, 9,
                /* C1 */
                12, 5, 11, 7, 8, 2, 14, 10, 9, 12, 10, 7, 18, 13, 8, 10, 8, 11, 11,
                12, 10, 9, 8, 13, 10, 11, 13, 7, 7, 11, 12, 12, 9, 10, 15, 11, 14,
                7, 16, 14, 5, 15, 2, 14, 17, 14, 10, 6, 12, 10, 6, 11, 12, 8, 17,
                16, 9, 7, 20, 11, 15, 10, 7, 8, 9, 11, 13, 13, 10, 7, 11, 10, 7,
                10, 8, 11, 5, 5, 13, 11, 14, 12, 13, 10, 6, 15, 10, 9, 4, 5, 11, 8,
                11, 16,
                /* C2 */
                11, 8, 8, 7, 13, 9, 12, 15, 14, 8, 7, 5, 11, 7, 8, 11, 7, 8, 12,
                19, 13, 21, 13, 10, 11, 16, 12, 8, 7, 15, 7, 6, 11, 8, 10, 15, 12,
                12, 10, 12, 9, 11, 13, 11, 9, 10, 9, 13, 7, 7, 11, 11, 7, 8, 6, 4,
                7, 7, 6, 11, 17, 8, 11, 13, 14, 14, 13, 12, 9, 9, 9, 6, 11, 7, 8,
                9, 3, 9, 14, 6, 10, 6, 7, 8, 6, 9, 15, 14, 12, 13, 14, 11, 14, 14,
                /* C3 */
                13, 6, 9, 8, 8, 6, 10, 11, 8, 13, 4, 5, 10, 5, 8, 9, 12, 14, 9, 3,
                8, 8, 11, 14, 15, 13, 7, 9, 12, 14, 7, 9, 9, 12, 8, 12, 3, 7, 5,
                11, 13, 17, 13, 13, 11, 11, 8, 11, 15, 19, 17, 9, 11, 8, 6, 10, 8,
                8, 14, 11, 12, 12, 10, 11, 11, 7, 9, 10, 12, 9, 8, 11, 13, 17, 9,
                12, 8, 7, 14, 5, 5, 8, 5, 11, 10, 9, 8, 16, 8, 11, 6, 8, 13, 13,
                /* C4 */
                14, 19, 14, 14, 16, 15, 20, 8, 5, 10, 15, 16, 8, 13, 13, 8, 11, 6,
                9, 8, 7, 7, 8, 5, 13, 14, 13, 12, 14, 4, 5, 13, 8, 16, 10, 9, 7, 9,
                6, 9, 7, 6, 2, 5, 9, 8, 9, 7, 10, 22, 9, 10, 9, 8, 11, 8, 10, 4,
                14, 10, 8, 16, 10, 8, 5, 7, 7, 10, 13, 9, 13, 14, 8, 6, 15, 15, 11,
                8, 10, 14, 5, 7, 10, 10, 19, 11, 15, 15, 10, 11, 9, 8, 16, 5,
                /* C5 */
                8, 8, 4, 7, 9, 7, 10, 9, 6, 7, 5, 7, 9, 3, 13, 9, 8, 9, 17, 20, 10,
                10, 8, 9, 8, 18, 7, 11, 7, 11, 9, 8, 8, 8, 12, 8, 11, 12, 11, 12,
                9, 19, 15, 11, 15, 9, 10, 7, 9, 6, 8, 10, 16, 9, 7, 8, 7, 9, 10,
                12, 8, 8, 9, 11, 14, 12, 10, 10, 8, 7, 12, 9, 10, 8, 11, 15, 12,
                13, 12, 13, 16, 16, 8, 13, 11, 13, 8, 9, 21, 7, 8, 15, 12, 9,
                /* C6 */
                11, 12, 10, 5, 4, 12, 15, 7, 20, 15, 11, 4, 12, 15, 14, 16, 11, 14,
                16, 9, 13, 8, 9, 13, 6, 8, 8, 11, 5, 8, 10, 7, 9, 8, 8, 11, 11, 10,
                14, 8, 11, 10, 5, 12, 4, 10, 12, 11, 13, 10, 6, 10, 12, 10, 14, 19,
                18, 12, 12, 10, 11, 8, 2, 10, 14, 9, 7, 8, 12, 8, 8, 11, 11, 10, 6,
                14, 8, 6, 11, 10, 6, 3, 6, 7, 9, 9, 16, 4, 6, 7, 7, 8, 5, 11,
                /* C7 */
                9, 9, 9, 6, 8, 10, 3, 6, 13, 5, 12, 11, 16, 10, 10, 9, 15, 13, 8,
                15, 11, 12, 4, 14, 8, 7, 12, 7, 14, 14, 12, 7, 16, 14, 14, 10, 10,
                17, 6, 8, 5, 16, 15, 12, 10, 9, 10, 4, 8, 5, 8, 9, 9, 9, 9, 10, 12,
                13, 7, 15, 12, 13, 7, 8, 9, 9, 10, 10, 11, 16, 12, 12, 11, 8, 10,
                6, 12, 7, 9, 5, 7, 11, 7, 5, 9, 8, 12, 4, 11, 6, 11, 8, 7, 11,
                /* C8 */
                8, 11, 17, 15, 5, 11, 23, 6, 16, 10, 6, 11, 10, 4, 8, 4, 10, 8, 16,
                7, 13, 14, 12, 11, 12, 13, 12, 16, 5, 9, 22, 20, 20, 20, 5, 9, 7,
                9, 12, 10, 4, 4, 2, 7, 7, 6, 4, 3, 7, 6, 5, 4, 4, 6, 9, 13, 9, 16,
                14, 13, 10, 9, 4, 12, 9, 6, 9, 20, 16, 17, 6, 10, 8, 6, 2, 15, 8,
                6, 15, 13, 12, 7, 10, 8, 10, 15, 9, 11, 13, 17, 13, 14, 3, 8,
                /* C9 */
                6, 12, 10, 13, 8, 12, 12, 6, 12, 13, 6, 10, 12, 14, 10, 9, 6, 8, 7,
                7, 13, 11, 13, 12, 10, 9, 8, 7, 3, 7, 14, 8, 5, 8, 16, 17, 16, 12,
                6, 10, 15, 14, 6, 11, 12, 10, 3, 8, 14, 11, 10, 12, 10, 6, 3, 14,
                4, 10, 7, 8, 11, 11, 11, 6, 8, 11, 13, 10, 13, 10, 7, 6, 10, 5, 8,
                7, 7, 11, 10, 8, 9, 7, 8, 11, 9, 8, 13, 11, 7, 5, 12, 9, 4, 11,
                /* CA */
                9, 11, 12, 9, 5, 6, 5, 9, 9, 12, 8, 3, 8, 2, 5, 9, 7, 4, 9, 9, 8,
                7, 5, 5, 8, 9, 8, 8, 6, 5, 3, 5, 9, 8, 9, 14, 10, 8, 9, 13, 16, 9,
                5, 8, 12, 8, 4, 5, 9, 9, 8, 8, 6, 4, 9, 6, 7, 11, 11, 8, 14, 11,
                15, 8, 11, 10, 7, 13, 8, 12, 11, 12, 4, 12, 11, 15, 16, 12, 17, 13,
                13, 12, 13, 12, 5, 8, 9, 7, 6, 9, 14, 11, 13, 14,
                /* CB */
                10, 8, 9, 14, 10, 5, 5, 10, 9, 17, 4, 11, 10, 4, 13, 12, 7, 17, 9,
                12, 9, 11, 10, 9, 12, 15, 15, 9, 7, 5, 5, 6, 13, 6, 13, 5, 7, 6, 8,
                3, 8, 10, 8, 10, 9, 7, 6, 9, 12, 15, 16, 14, 7, 12, 9, 10, 10, 12,
                14, 13, 13, 11, 7, 8, 14, 13, 14, 9, 11, 11, 10, 21, 13, 6, 17, 12,
                14, 10, 6, 10, 10, 13, 11, 10, 14, 11, 10, 12, 8, 13, 5, 5, 6, 12,
                /* CC */
                16, 9, 17, 15, 9, 8, 8, 5, 10, 11, 4, 8, 7, 7, 13, 8, 15, 13, 7,
                17, 13, 15, 14, 10, 8, 12, 10, 14, 11, 5, 9, 6, 13, 13, 11, 12, 15,
                10, 16, 10, 15, 11, 15, 10, 11, 10, 13, 10, 11, 10, 9, 11, 10, 5,
                10, 10, 18, 13, 10, 13, 11, 10, 15, 12, 12, 15, 16, 12, 7, 12, 17,
                11, 10, 9, 8, 4, 11, 13, 5, 11, 9, 14, 12, 9, 7, 8, 11, 13, 9, 10,
                8, 4, 7, 9,
                /* CD */
                5, 6, 11, 9, 9, 9, 12, 10, 10, 13, 17, 6, 11, 7, 12, 11, 10, 12, 9,
                12, 11, 7, 5, 10, 5, 7, 9, 8, 10, 10, 10, 11, 3, 6, 8, 12, 6, 11,
                13, 13, 13, 14, 9, 7, 4, 17, 8, 6, 11, 10, 7, 6, 8, 12, 7, 8, 12,
                9, 9, 12, 9, 9, 4, 10, 9, 5, 15, 9, 12, 8, 10, 3, 11, 7, 13, 10,
                11, 12, 11, 8, 11, 3, 12, 7, 4, 3, 8, 6, 8, 8, 11, 7, 6, 9,
                /* CE */
                20, 13, 6, 4, 7, 10, 7, 11, 11, 4, 14, 11, 7, 11, 8, 6, 6, 7, 7, 5,
                14, 8, 9, 9, 12, 17, 7, 12, 11, 11, 15, 3, 14, 12, 10, 4, 9, 7, 7,
                14, 10, 6, 13, 10, 8, 9, 13, 10, 12, 7, 14, 8, 12, 7, 7, 7, 9, 4,
                6, 9, 9, 4, 7, 11, 7, 7, 4, 8, 4, 10, 4, 14, 6, 9, 7, 5, 13, 11, 8,
                4, 5, 10, 9, 8, 14, 8, 6, 11, 8, 12, 15, 6, 13, 10,
                /* CF */
                12, 10, 7, 11, 15, 3, 11, 14, 11, 13, 6, 12, 17, 11, 10, 3, 13, 12,
                11, 9, 7, 12, 6, 8, 15, 9, 7, 17, 14, 13, 9, 8, 9, 3, 12, 10, 6,
                11, 13, 6, 5, 14, 6, 9, 8, 11, 11, 7, 9, 8, 13, 9, 9, 8, 13, 7, 13,
                11, 12, 9, 10, 8, 8, 9, 11, 22, 9, 15, 17, 12, 3, 12, 10, 8, 13, 9,
                8, 9, 9, 15, 13, 6, 11, 11, 12, 15, 9, 10, 18, 12, 10, 10, 11, 10,
                /* D0 */
                3, 7, 10, 7, 11, 10, 10, 13, 8, 13, 15, 15, 6, 9, 13, 6, 11, 8, 11,
                5, 11, 9, 19, 16, 8, 8, 12, 10, 16, 7, 12, 8, 7, 13, 7, 4, 9, 11,
                9, 13, 12, 12, 6, 6, 9, 7, 6, 6, 16, 8, 7, 8, 8, 5, 4, 10, 6, 7,
                12, 14, 6, 9, 10, 6, 13, 12, 7, 10, 10, 14, 6, 14, 11, 14, 9, 10,
                6, 13, 11, 9, 6, 7, 10, 9, 12, 12, 11, 11, 7, 12, 9, 11, 11, 5,
                /* D1 */
                9, 19, 10, 9, 13, 16, 8, 5, 11, 6, 9, 14, 12, 6, 8, 6, 6, 6, 10, 6,
                5, 5, 9, 6, 6, 8, 9, 10, 7, 3, 7, 4, 10, 11, 13, 11, 12, 9, 6, 6,
                11, 9, 11, 10, 11, 10, 7, 9, 12, 8, 7, 7, 15, 11, 8, 8, 8, 11, 11,
                9, 14, 10, 12, 16, 6, 9, 12, 10, 9, 12, 10, 11, 10, 9, 5, 10, 10,
                7, 6, 8, 8, 6, 9, 6, 10, 6, 11, 9, 10, 14, 16, 13, 7, 14,
                /* D2 */
                13, 6, 13, 11, 12, 9, 9, 10, 9, 9, 20, 12, 15, 8, 6, 11, 7, 3, 6,
                11, 5, 5, 6, 12, 8, 11, 1, 12, 7, 12, 11, 8, 6, 6, 13, 6, 12, 11,
                5, 10, 14, 7, 8, 9, 18, 12, 9, 10, 3, 1, 7, 4, 4, 7, 8, 7, 6, 3, 7,
                17, 11, 13, 9, 6, 13, 13, 15, 4, 3, 10, 13, 8, 5, 10, 7, 6, 17, 11,
                8, 9, 9, 6, 10, 9, 6, 8, 7, 11, 11, 11, 7, 4, 4, 11,
                /* D3 */
                5, 8, 15, 11, 18, 7, 14, 10, 11, 11, 9, 14, 7, 17, 9, 15, 13, 12,
                9, 9, 8, 7, 17, 10, 11, 13, 14, 13, 8, 8, 10, 5, 11, 9, 5, 9, 6,
                11, 7, 4, 5, 7, 10, 7, 8, 12, 7, 6, 4, 5, 7, 12, 9, 2, 5, 6, 11, 3,
                8, 13, 13, 13, 14, 7, 9, 12, 8, 12, 12, 11, 11, 4, 10, 8, 3, 6, 9,
                6, 9, 6, 5, 11, 6, 8, 6, 12, 12, 10, 12, 13, 11, 9, 8, 13,
                /* D4 */
                10, 12, 12, 10, 15, 5, 10, 11, 10, 4, 9, 10, 10, 12, 14, 7, 7, 10,
                13, 13, 12, 7, 8, 14, 9, 9, 4, 6, 12, 11, 9, 8, 12, 4, 10, 10, 10,
                4, 9, 4, 9, 4, 7, 15, 11, 10, 13, 5, 5, 10, 6, 10, 9, 7, 10, 10, 6,
                6, 9, 19, 12, 16, 10, 10, 12, 14, 17, 12, 19, 8, 6, 16, 9, 20, 16,
                10, 7, 7, 17, 8, 8, 6, 8, 10, 9, 15, 15, 12, 16, 4, 12, 12, 5, 5,
                /* D5 */
                11, 8, 9, 9, 14, 8, 5, 9, 7, 14, 10, 6, 10, 10, 14, 18, 9, 13, 11,
                8, 10, 8, 14, 11, 10, 22, 9, 5, 9, 10, 12, 11, 15, 11, 14, 14, 7,
                12, 10, 7, 3, 7, 8, 5, 8, 16, 13, 8, 9, 7, 8, 9, 13, 13, 6, 14, 5,
                14, 7, 10, 12, 16, 8, 13, 14, 7, 10, 9, 13, 10, 13, 10, 16, 6, 7,
                8, 8, 10, 7, 15, 10, 15, 6, 13, 9, 11, 8, 9, 6, 8, 16, 9, 5, 9,
                /* D6 */
                9, 10, 8, 7, 6, 8, 4, 7, 14, 8, 8, 10, 5, 3, 8, 11, 8, 12, 12, 6,
                10, 8, 7, 9, 4, 11, 5, 6, 7, 7, 10, 11, 6, 10, 13, 8, 9, 8, 12, 10,
                13, 8, 8, 11, 12, 8, 11, 4, 9, 8, 9, 10, 8, 9, 8, 9, 6, 6, 6, 8, 6,
                9, 7, 12, 9, 7, 8, 8, 10, 8, 9, 17, 10, 10, 12, 6, 11, 10, 8, 10,
                6, 10, 12, 8, 17, 15, 5, 11, 9, 7, 11, 8, 12, 12,
                /* D7 */
                7, 8, 9, 8, 7, 4, 9, 4, 9, 8, 15, 14, 15, 10, 6, 12, 6, 15, 6, 7,
                12, 13, 9, 14, 7, 11, 10, 10, 10, 8, 8, 10, 12, 8, 10, 11, 11, 7,
                9, 9, 9, 10, 9, 12, 11, 7, 12, 5, 9, 13, 3, 6, 11, 6, 18, 12, 15,
                8, 11, 9, 7, 7, 7, 9, 12, 10, 7, 8, 11, 9, 7, 7, 8, 10, 20, 16, 15,
                12, 13, 12, 15, 9, 5, 7, 9, 11, 7, 7, 10, 0, 0, 0, 0, 0,
                /* D8 */
                3, 3, 3, 4, 4, 4, 5, 6, 6, 10, 10, 16, 1, 8, 1, 2, 3, 4, 4, 5, 5,
                6, 9, 11, 14, 14, 19, 1, 8, 14, 2, 6, 4, 7, 7, 11, 14, 4, 6, 10,
                11, 12, 14, 15, 16, 2, 5, 8, 11, 11, 15, 8, 7, 2, 4, 6, 7, 8, 8, 8,
                9, 10, 10, 10, 13, 13, 14, 14, 15, 16, 2, 8, 2, 4, 4, 4, 5, 5, 5,
                5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7,
                /* D9 */
                7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,
                9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11,
                11, 11, 11, 11, 11, 11, 12, 12, 12, 13, 14, 14, 14, 14, 14, 14, 15,
                15, 5, 6, 7, 7, 9, 17, 6, 8, 4, 12, 16, 17, 18, 21, 2, 9, 9, 11, 6,
                6, 7, 2, 8, 10, 10, 11, 12, 12, 12, 13, 16, 19, 19, 2, 6, 8, 8,
                /* DA */
                10, 2, 10, 10, 2, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
                8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11,
                11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13,
                14, 14, 14, 15, 15, 19, 2, 8, 2, 5, 5, 6, 6, 7, 7, 7, 7, 8, 9, 9,
                10, 10, 10, 11, 11, 11, 16, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7,
                /* DB */
                7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 11, 11, 13, 13,
                13, 14, 14, 16, 19, 17, 5, 7, 5, 7, 7, 8, 10, 10, 11, 15, 9, 17,
                20, 2, 2, 6, 10, 2, 5, 10, 12, 7, 9, 9, 14, 16, 16, 17, 6, 6, 6, 6,
                6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,
                9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11,
                /* DC */
                11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14, 15, 20, 21,
                22, 3, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
                7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
                8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
                9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
                /* DD */
                9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
                10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11,
                11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
                11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
                12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
                13, 14, 14, 14, 14, 14, 14, 14,
                /* DE */
                14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16,
                16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 19, 19, 19, 20, 20, 22,
                3, 9, 6, 7, 9, 9, 10, 10, 11, 3, 5, 5, 12, 3, 6, 7, 8, 8, 8, 8, 9,
                9, 9, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
                12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13,
                13, 14, 14, 14, 14,
                /* DF */
                14, 15, 15, 15, 15, 16, 16, 16, 17, 17, 19, 23, 25, 3, 7, 8, 12, 5,
                5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8,
                8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
                9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10,
                10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
                /* E0 */
                11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12,
                12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13,
                13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14,
                14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16,
                16, 16, 16, 16, 17, 17, 19, 25, 3, 6, 6, 7, 7, 8, 9, 10, 11, 11,
                16, 7, 8, 8, 8, 10, 11, 11,
                /* E1 */
                11, 12, 14, 14, 15, 15, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8,
                8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11,
                11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 14, 15, 15,
                17, 17, 19, 3, 7, 8, 9, 9, 9, 10, 11, 11, 12, 13, 15, 16, 24, 3, 3,
                5, 6, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10,
                /* E2 */
                10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 14, 14, 15,
                15, 16, 17, 20, 6, 14, 12, 14, 3, 3, 6, 7, 7, 7, 7, 7, 8, 9, 10,
                10, 11, 12, 12, 13, 13, 14, 15, 15, 25, 5, 7, 7, 8, 9, 9, 11, 11,
                11, 11, 12, 13, 14, 15, 16, 16, 17, 3, 5, 6, 6, 7, 7, 7, 7, 7, 7,
                7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9,
                /* E3 */
                9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11,
                11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 14, 15, 15, 15, 16, 16, 18,
                8, 17, 4, 6, 7, 7, 7, 7, 9, 9, 10, 10, 10, 11, 11, 11, 11, 11, 11,
                12, 12, 13, 13, 13, 14, 3, 4, 8, 3, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7,
                7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
                /* E4 */
                9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10,
                10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11,
                11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
                12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
                13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15,
                15, 15, 15, 15, 16,
                /* E5 */
                16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 19, 19, 19, 20, 20, 21, 24,
                3, 5, 8, 8, 9, 10, 12, 13, 14, 14, 15, 16, 16, 17, 17, 3, 7, 7, 8,
                8, 8, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 12,
                12, 12, 12, 13, 13, 13, 13, 15, 15, 16, 16, 17, 17, 18, 3, 11, 9,
                12, 5, 9, 10, 10, 12, 14, 15, 21, 8, 8, 9, 11, 12, 22, 3, 6, 6, 7,
                7, 7, 7,
                /* E6 */
                7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10,
                10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13,
                13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 16, 16, 17, 17, 20,
                5, 9, 7, 8, 12, 3, 3, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 10, 11, 11,
                11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 19, 20, 3, 6, 6, 6, 6, 6,
                /* E7 */
                7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 11,
                11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
                13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 16,
                16, 16, 16, 19, 3, 15, 3, 8, 10, 6, 6, 8, 8, 8, 9, 9, 9, 9, 9, 9,
                9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 12, 12, 12, 12,
                12, 12, 12,
                /* E8 */
                12, 12, 13, 13, 13, 13, 13, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16,
                17, 17, 17, 18, 20, 20, 13, 13, 14, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8,
                8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
                9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
                10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12,
                12,
                /* E9 */
                12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
                13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14,
                14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16,
                16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 13, 14, 8, 9, 9, 9,
                11, 11, 11, 12, 12, 14, 16, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10,
                10, 10, 10, 11, 12, 12,
                /* EA */
                12, 12, 13, 15, 16, 10, 5, 8, 11, 12, 12, 13, 13, 13, 14, 14, 8, 9,
                12, 16, 16, 17, 4, 6, 6, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9,
                10, 10, 10, 10, 10, 10, 11, 11, 12, 13, 13, 14, 14, 16, 18, 18, 20,
                21, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 14, 9, 10, 11,
                12, 13, 14, 15, 15, 9, 13, 6, 8, 9, 11, 11, 12, 12, 12, 13, 14, 10,
                11, 12,
                /* EB */
                14, 17, 10, 10, 12, 12, 12, 13, 15, 16, 16, 22, 5, 6, 7, 7, 9, 10,
                10, 11, 13, 4, 11, 13, 12, 13, 15, 9, 15, 6, 7, 7, 7, 8, 8, 8, 8,
                8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10,
                10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12,
                12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 15, 15, 16, 17, 17,
                17, 17,
                /* EC */
                17, 16, 7, 11, 12, 13, 13, 16, 9, 9, 12, 13, 16, 16, 4, 13, 13, 17,
                12, 15, 16, 8, 10, 10, 10, 11, 11, 13, 14, 7, 8, 8, 8, 9, 9, 9, 9,
                9, 10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14,
                15, 15, 15, 15, 16, 16, 16, 18, 21, 30, 4, 11, 13, 16, 8, 8, 9, 11,
                12, 4, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 12, 12, 13, 14, 16,
                21, 7, 7,
                /* ED */
                9, 10, 10, 10, 10, 10, 10, 11, 13, 13, 14, 16, 16, 17, 17, 24, 4,
                6, 8, 9, 12, 7, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10,
                10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 13, 13, 13,
                13, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 17, 17, 18, 19, 18, 21,
                11, 12, 17, 19, 8, 9, 9, 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12,
                12, 12, 12, 13, 13,
                /* EE */
                13, 13, 14, 14, 14, 14, 15, 15, 16, 16, 16, 17, 18, 7, 8, 9, 9, 9,
                10, 12, 13, 17, 9, 10, 10, 12, 13, 14, 14, 16, 17, 17, 10, 16, 23,
                5, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
                10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
                10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
                11, 11, 11,
                /* EF */
                11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12,
                12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13,
                13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15,
                15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17,
                17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 19, 20, 14, 9, 12, 13, 9,
                9, 10, 10, 11, 12, 12, 12, 13, 13,
                /* F0 */
                15, 15, 16, 17, 18, 22, 9, 11, 12, 13, 17, 10, 11, 7, 7, 8, 9, 9,
                10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12,
                13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 16, 16, 16, 17, 17,
                17, 17, 18, 18, 22, 5, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10,
                10, 10, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13,
                14, 14, 14, 14, 14, 14, 14,
                /* F1 */
                15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 18, 18, 18, 18,
                21, 23, 11, 12, 8, 8, 9, 9, 10, 11, 13, 13, 14, 14, 14, 15, 5, 8,
                9, 9, 9, 9, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 13,
                13, 14, 14, 14, 14, 14, 15, 15, 16, 17, 19, 24, 5, 9, 11, 12, 9, 6,
                9, 10, 12, 12, 13, 14, 15, 15, 16, 16, 22, 12, 8, 11, 11, 11, 12,
                15, 16, 12, 9, 10, 10,
                /* F2 */
                12, 12, 12, 12, 13, 15, 15, 16, 16, 16, 18, 20, 21, 6, 10, 7, 8, 9,
                9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11,
                11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
                12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14,
                14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
                15, 15, 15, 15, 16, 16, 16, 16,
                /* F3 */
                16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17,
                18, 18, 18, 18, 19, 19, 19, 19, 20, 21, 24, 26, 6, 14, 17, 17, 10,
                8, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11,
                11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14,
                14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16,
                16, 16, 17, 17, 17, 17, 17, 17,
                /* F4 */
                18, 18, 18, 19, 19, 19, 8, 9, 11, 12, 10, 10, 9, 9, 9, 10, 10, 10,
                10, 11, 11, 11, 11, 12, 13, 13, 14, 15, 17, 18, 19, 10, 10, 11, 13,
                13, 19, 11, 11, 13, 15, 15, 16, 9, 10, 10, 11, 11, 12, 12, 13, 14,
                14, 14, 15, 15, 15, 15, 15, 16, 18, 6, 15, 9, 11, 12, 14, 14, 15,
                15, 16, 17, 6, 12, 14, 14, 17, 25, 11, 19, 9, 12, 13, 13, 23, 11,
                15, 10, 11, 9, 10, 10, 10, 12,
                /* F5 */
                12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 16, 16, 16, 17, 17,
                18, 19, 19, 19, 20, 20, 21, 7, 16, 10, 13, 14, 18, 18, 10, 10, 11,
                11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13,
                14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16,
                16, 17, 17, 17, 19, 19, 19, 19, 19, 20, 21, 22, 22, 23, 24, 7, 12,
                13, 13, 17, 17, 11, 11, 12, 12, 13,
                /* F6 */
                13, 14, 15, 13, 18, 12, 11, 12, 12, 14, 14, 16, 16, 16, 19, 19, 20,
                22, 10, 13, 13, 13, 14, 14, 15, 15, 17, 8, 12, 20, 8, 10, 10, 13,
                14, 18, 18, 14, 14, 15, 16, 17, 18, 18, 21, 24, 12, 12, 13, 13, 13,
                13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15,
                15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
                16, 17, 17, 17, 17, 17, 17, 17, 17,
                /* F7 */
                18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 20, 20, 20, 21, 14, 14,
                15, 15, 16, 18, 18, 18, 19, 19, 13, 13, 14, 14, 14, 15, 15, 17, 17,
                18, 18, 19, 19, 22, 14, 14, 15, 16, 16, 17, 19, 12, 15, 18, 22, 22,
                10, 13, 14, 15, 15, 16, 16, 16, 18, 19, 20, 23, 25, 14, 15, 17, 13,
                16, 16, 17, 19, 19, 21, 23, 17, 17, 17, 18, 18, 19, 20, 20, 20, 20,
                21, 17, 18, 20, 23, 23, 16, 17, 23,
                /* F8 */
        };
    }
    

     

    展开全文
  • * 获取中文笔画顺序及笔数 * @author 杨红杰 * @date 2019/10/24 14:46 */ public class BiHua { public static void main(String[] args) throws Exception { String str = "我爱你中国"; System.out....

    效果展示

    我爱你中国
    我字共7画;我字的笔顺:撇,横,竖钩,提,斜钩,撇,点
    爱字共10画;爱字的笔顺:撇,点,点,撇,点,横撇/横钩,横,撇,横撇/横钩,捺
    你字共7画;你字的笔顺:撇,竖,撇,横撇/横钩,竖钩,撇,点
    中字共4画;中字的笔顺:竖,横折,横,竖
    国字共8画;国字的笔顺:竖,横折,横,横,竖,横,点,横

    具体代码如下:

    import org.apache.commons.httpclient.HttpClient;
    import org.apache.commons.httpclient.HttpConnectionManager;
    import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
    import org.apache.commons.httpclient.methods.GetMethod;
    
    /**
     * 获取中文笔画顺序及笔数
     * @author 杨红杰
     * @date 2019/10/24 14:46
     */
    public class BiHua {
    
        public static void main(String[] args) throws Exception {
            String str = "我爱你中国";
            System.out.println(str);
            for (int i= 0; i < str.length(); i++) {
                System.out.println(getBiShunAndBiShu(str.substring(i, i+ 1)));
            }
        }
    
        public static String getBiShunAndBiShu(String str) throws Exception {
            HttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
            connectionManager.getParams().setDefaultMaxConnectionsPerHost(10);
            connectionManager.getParams().setConnectionTimeout(300000000);
            connectionManager.getParams().setSoTimeout(300000000);
            HttpClient client = new HttpClient(connectionManager);
            GetMethod method = new GetMethod("http://bishun.shufaji.com/" + cnToUnicode(str) + ".html");
            client.executeMethod(method);
            String returnJson = new String(method.getResponseBody(), "utf-8");
            int idx1 = returnJson.indexOf("<div id=\"hzcanvas\">");
            if (idx1 != -1) {
                idx1 += 19;
                int idx2 = returnJson.indexOf("</div>", idx1);
                returnJson = returnJson.substring(idx1, idx2 == -1 ? returnJson.length() : idx2);
            }
            return returnJson;
        }
    
        /**
         * 中文转Unicode
         * @param cn
         * @return
         */
        private static String cnToUnicode(String cn) {
            char[] chars = cn.toCharArray();
            String returnStr = "";
            for (int i = 0; i < chars.length; i++) {
                returnStr += "0x" + Integer.toString(chars[i], 16);
            }
            return returnStr;
        }
    }

     

    展开全文
  • java实现汉字的笔画数源代码,理解学习java
  • java汉字笔画排序,对排序方法重新定义,减少占用,效率提升,https://blog.csdn.net/u013271384/article/details/76549368
  • 一、需求描述 最近有个需求,要求对列表进行排序,排序规则如下所示:...java汉字笔画排序源码 后来找到了原作者的介绍,在此感谢。地址: https://blog.csdn.net/u013271384/article/details/76549368 上面...

    一、需求描述

    最近有个需求,要求对列表进行排序,排序规则如下所示:

    语言(文化)代码国家/地区排序方式
    zh-CN简体中文(中国)汉语拼音
    zh-HK繁体中文(中国香港特别行政区)笔划
    zh-TW繁体中文(中国台湾)笔划

    关于汉语拼音排序的很久之前就实现了,已经运行两年了。笔划排序的是刚刚要求添加的需求,因此得想办法实现中文汉字进行笔划排序。

    二、如何实现中文汉字笔划排序的需求?

    进过百度搜索,最终搜索到了下面的链接:

    下面我们来测试下这个工具类。

    2.1 测试 StringStrokeComparator排序

    StringStrokeComparator排序,是对纯粹的字符串集合进行排序

    在这里插入图片描述

    2.1.1 测试程序

    package com.oyp.csdn.test;
    
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.List;
    
    import com.junfeng.strokesort.comparator.StringStrokeComparator;
    
    public class TestStringStrokeComparator {
    
        public static void main(String[] args) {
            List<String> name = new ArrayList<String>();
            name.add("欧阳鹏");
            name.add("阿森松島");
            name.add("安道爾");
            name.add("阿拉伯聯合大公國");
            name.add("阿富汗");
            name.add("安地卡及巴布達");
            name.add("安圭拉");
            name.add("阿爾巴尼亞");
            name.add("亞美尼亞");
            name.add("安哥拉");
            name.add("南極洲");
            name.add("阿根廷");
            name.add("美屬薩摩亞");
            name.add("奧蘭群島");
            name.add("波士尼亞赫塞哥維納");
            name.add("巴林");
            name.add("聖巴泰勒米");
            name.add("汶萊");
            name.add("玻利維亞");
            name.add("聖克里斯多福及尼維斯");
            name.add("朝鮮");
            name.add("韓國");
            name.add("科威特");
            name.add("開曼群島");
            name.add("哈薩克");
            name.add("寮國");
            name.add("黎巴嫩");
            name.add("聖露西亞");
            name.add("薩爾瓦多");
            name.add("馬約特");
            name.add("台灣(中國)");
            name.add("香港(中國)");
            name.add("澳門(中國)");
            name.add("蘇丹");
    
            //添加部分 生僻字
            name.add("嘣");
            name.add("嚋");
            name.add("蘇丹");
            name.add("哜");
            name.add("囆");
            name.add("囎");
            name.add("囼");
            name.add("圀");
            name.add("壝");
            name.add("壝");
            name.add("墪");
            name.add("夨");
            name.add("夒");
            name.add("孅");
            name.add("孏");
            name.add("孆");
            name.add("媘");
            name.add("孑");
            name.add("孒");
            name.add("孓");
            name.add("孖");
            name.add("孠");
            name.add("孧");
            name.add("滽");
            name.add("滽");
            name.add("瀶");
            name.add("瀶");
            name.add("犪");
            name.add("犓");
            name.add("犫");
    
            /** 使用 */
            Collections.sort(name, new StringStrokeComparator());
            for (String string : name) {
                System.out.println(string);
            }
        }
    }
    
    

    2.1.2 测试结果

    测试结果为:

    孑
    孒
    孓
    夨
    巴林
    台灣(中國)
    孖
    安圭拉
    安地卡及巴布達
    安哥拉
    安道爾
    汶萊
    阿拉伯聯合大公國
    阿根廷
    阿富汗
    阿森松島
    阿爾巴尼亞
    亞美尼亞
    囼
    孠
    孧
    欧阳鹏
    波士尼亞赫塞哥維納
    南極洲
    哈薩克
    哜
    圀
    玻利維亞
    科威特
    美屬薩摩亞
    香港(中國)
    馬約特
    媘
    朝鮮
    開曼群島
    聖巴泰勒米
    聖克里斯多福及尼維斯
    聖露西亞
    嘣
    奧蘭群島
    滽
    滽
    犓
    墪
    寮國
    澳門(中國)
    黎巴嫩
    薩爾瓦多
    嚋
    韓國
    壝
    壝
    夒
    蘇丹
    蘇丹
    孅
    孆
    瀶
    瀶
    囆
    囎
    孏
    犪
    犫
    
    Process finished with exit code 0
    

    2.2 测试 ObjectStrokeComparator 排序

    ObjectStrokeComparator排序,可以对对象进行排序,指定使用对象的那个属性进行排序

    在这里插入图片描述

    2.2.1 测试程序

    测试代码如下所示:

    package com.oyp.csdn.test;
    
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.List;
    
    import com.junfeng.strokesort.comparator.ObjectStrokeComparator;
    import com.junfeng.strokesort.model.Stroke;
    
    public class TestObjectStrokeComparator {
    
    	public static void main(String[] args) {
    		List<Stroke> strokes = new ArrayList<Stroke>();
    		Stroke stroke1 = new Stroke();
    		stroke1.setName("张三无");
    		strokes.add(stroke1);
    		stroke1 = new Stroke();
    		stroke1.setName("赵明红匠");
    		strokes.add(stroke1);
    		stroke1 = new Stroke();
    		stroke1.setName("李四");
    		strokes.add(stroke1);
    		stroke1 = new Stroke();
    		stroke1.setName("王东栋");
    		strokes.add(stroke1);
    		stroke1 = new Stroke();
    		stroke1.setName("李四仨");
    		strokes.add(stroke1);
    		stroke1 = new Stroke();
    		stroke1.setName("张三");
    		strokes.add(stroke1);
    		stroke1 = new Stroke();
    		stroke1.setName("欧阳鹏");
    		strokes.add(stroke1);
    		
    		/** 使用 */
    		Collections.sort(strokes, new ObjectStrokeComparator(Stroke.class, "name"));
    
    		for (Stroke stroke : strokes) {
    			System.out.println(stroke.getName());
    		}
    
    		System.out.println("----------");
    
    		List<CountryOrRegion> countryOrRegionArrayList = new ArrayList<CountryOrRegion>();
    		CountryOrRegion countryOrRegion = new CountryOrRegion();
    		countryOrRegion.setName("阿森松島");
    		countryOrRegionArrayList.add(countryOrRegion);
    		countryOrRegion = new CountryOrRegion();
    		countryOrRegion.setName("安道爾");
    		countryOrRegionArrayList.add(countryOrRegion);
    		countryOrRegion = new CountryOrRegion();
    		countryOrRegion.setName("聖克里斯多福及尼維斯");
    		countryOrRegionArrayList.add(countryOrRegion);
    		countryOrRegion = new CountryOrRegion();
    		countryOrRegion.setName("阿爾巴尼亞");
    		countryOrRegionArrayList.add(countryOrRegion);
    		countryOrRegion = new CountryOrRegion();
    		countryOrRegion.setName("美屬薩摩亞");
    		countryOrRegionArrayList.add(countryOrRegion);
    
    		/** 使用 */
    		Collections.sort(countryOrRegionArrayList, new ObjectStrokeComparator(CountryOrRegion.class, "name"));
    		for (CountryOrRegion countryOrRegionItem : countryOrRegionArrayList) {
    			System.out.println(countryOrRegionItem.getName());
    		}
    
    		System.out.println("----------");
    		
    		List<String> name = new ArrayList<String>();
    		name.add("阿森松島");
    		name.add("安道爾");
    		name.add("阿拉伯聯合大公國");
    		name.add("阿富汗");
    		name.add("安地卡及巴布達");
    		name.add("安圭拉");
    		name.add("阿爾巴尼亞");
    		name.add("亞美尼亞");
    		name.add("安哥拉");
    		name.add("南極洲");
    		name.add("阿根廷");
    		name.add("美屬薩摩亞");
    		name.add("奧蘭群島");
    		name.add("波士尼亞赫塞哥維納");
    		name.add("巴林");
    		name.add("聖巴泰勒米");
    		name.add("汶萊");
    		name.add("玻利維亞");
    		name.add("聖克里斯多福及尼維斯");
    		name.add("朝鮮");
    		name.add("韓國");
    		name.add("科威特");
    		name.add("開曼群島");
    		name.add("哈薩克");
    		name.add("寮國");
    		name.add("黎巴嫩");
    		name.add("聖露西亞");
    		name.add("薩爾瓦多");
    		name.add("馬約特");
    		name.add("台灣(中國)");
    		name.add("香港(中國)");
    		name.add("澳門(中國)");
    		name.add("蘇丹");
    		/** 使用 */
    		Collections.sort(name, new ObjectStrokeComparator(String.class, null));
    
    		for (String string : name) {
    			System.out.println(string);
    		}
    	}
    }
    
    

    其中 CountryOrRegion为自定义的一个java bean

    package com.oyp.csdn.test;
    
    public class CountryOrRegion {
        public String getName() {
            return name;
        }
    
        public void setName(String name) {
            this.name = name;
        }
    
        /**
         * 国家或地区名
         */
        private String name;
    
        @Override
        public String toString() {
            return "CountryOrRegion{" +
                    "name='" + name + '\'' +
                    '}';
        }
    }
    
    

    2.2.2 测试结果

    测试结果为:

    王东栋
    张三
    张三无
    李四
    李四仨
    欧阳鹏
    赵明红匠
    ----------
    安道爾
    阿森松島
    阿爾巴尼亞
    美屬薩摩亞
    聖克里斯多福及尼維斯
    ----------
    巴林
    台灣(中國)
    安圭拉
    安地卡及巴布達
    安哥拉
    安道爾
    汶萊
    阿拉伯聯合大公國
    阿根廷
    阿富汗
    阿森松島
    阿爾巴尼亞
    亞美尼亞
    波士尼亞赫塞哥維納
    南極洲
    哈薩克
    玻利維亞
    科威特
    美屬薩摩亞
    香港(中國)
    馬約特
    朝鮮
    開曼群島
    聖巴泰勒米
    聖克里斯多福及尼維斯
    聖露西亞
    奧蘭群島
    寮國
    澳門(中國)
    黎巴嫩
    薩爾瓦多
    韓國
    蘇丹
    
    Process finished with exit code 0
    
    

    三、相关链接

    上面的资源也可以在github上直接下载, 地址为: https://github.com/ouyangpeng/ChineseStrokeSorting

    扩展链接,基本实现原理:

    获取汉字笔画,下面的文章都不靠谱,获取不到有效的笔画数。
    + [轮子]获取汉字笔画数
    + java获取汉字笔画数
    + java 汉字字典,获取汉字拼音,拼音首字母,五笔,笔画,笔画顺序

    要想得到有效的笔画数,还得自己一个一个来做一个数据库。

    这个数据库我弄好了,放在csdn,下载地址:

    使用sqlite3命令打开这个db文件

    在这里插入图片描述

    内容如下所示,总共有20902个汉字,满足了日常的需求了。

    在这里插入图片描述
    在这里插入图片描述

    直接 通过命令将这个db文件导出来。

    在这里插入图片描述

    sqlite3 ChinessStroke.db
    SQLite version 3.22.0 2018-01-22 18:45:57
    Enter ".help" for usage hints.
    sqlite> .output ChinessStroke.dat
    sqlite> select * from BI_HUA_BEAN;
    sqlite> .output stdout
    sqlite>
    
    

    生成的 ChinessStroke.dat文件内容如下:
    在这里插入图片描述

    下载地址:https://github.com/ouyangpeng/ChineseStrokeSorting/blob/master/jar包源代码以及demo下载/ChinessStroke.dat

    四、在Android上实现中文笔画排序

    效果如下:


    在这里插入图片描述

    作者:欧阳鹏 欢迎转载,与人分享是进步的源泉!
    转载请保留原文地址:https://blog.csdn.net/qq446282412/article/details/83863693
    如果本文对您有所帮助,欢迎您扫码下图所示的支付宝和微信支付二维码对本文进行打赏。

    展开全文
  • 计算汉字笔画java实现

    热门讨论 2012-09-08 12:50:18
    计算汉字笔画数,用java实现 计算汉字笔画数,用java实现
  • Java 汉字 拼音 部首 笔画 笔画数目 Java,获取汉字拼音、部首、笔画笔画数目源文件、源码
  • java 一笔画问题

    2014-04-26 16:50:51
    java 编写的小游戏 适合初学者学习
  • java实现计算汉字笔画

    2020-06-22 15:35:24
    汉字笔画计算 可用于人名笔画计算 核心代码来自互联网 我只添加了某些方法 package com.lhdz.core.util; /** 计算汉字笔画 */ public class CnToStrokeCountUtil { //需要计算的汉字 只需要调用该方法即可 public ...
  • java汉字笔画排序,对排序方法重新定义,减少占用,效率提升,https://blog.csdn.net/u013271384/article/details/76549368
  • 利用java对基本汉字(unicode编码4E00-9FA5)进行笔画排序 资源更新查看:https://blog.csdn.net/u013271384/article/details/76549368
  • 主要介绍了Java调用setStroke()方法设置笔画属性的语法,如何改变线条的粗细、虚实和定义线段端点的形状、风格等,需要的朋友可以参考下
  • java实现汉字的笔画

    千次阅读 热门讨论 2010-07-08 22:05:00
    核心代码来自互联网,为了更容易测试,我做了个简单的界面。 Code: import java.awt.Color; import java.awt.Font; import java.awt.Insets; import java.awt.event.ActionE
  • 主要介绍了java绘制哆啦A梦,特别的可爱,文中示例代码介绍的也非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
  • cnStr = "CSDN - 专家门诊 - Java"; chars = cnStr.toCharArray(); System.out.print("的笔画数分别是:"); for (int i = 0; i ; i++) { System.out.print("*" + CnToStrokeCount.getStrokeCount(chars[i])); } ...
  • import java.awt.Font; import java.awt.Shape; import java.awt.font.FontRenderContext; import java.awt.font.GlyphVector; import java.awt.geom.AffineTransform; import java.util.Scanner; pu
  • Java之实现简单中文笔画验证码 开发工具与关键技术:Java[MyEclipse 10] 作者:谢景 撰写时间:2019-5-06 在做项目中我们为了防止别人恶意提交,我们会进行验证码验证登录,我们常用的是随机验证码校对,例如下面...
  • 名字笔画查询

    2018-06-16 12:03:15
    已有图形化界面,选择文件后自动化筛选出相应笔画的文字。例如:输入文件txt为道德经,则会根据每一行判断是否具有需求笔画的两个字(如13画和8画)。输出为另一个结果。如需源码即修改13和8为其他数字,可留言邮箱
  • * 实现了一下常用的需求,例如返回拼音,五笔,拼音首字母,笔画数目,笔画顺序。 * * @author siqi * */ public class Dic { /** * 设置是否输出调试信息 */ private static boolean DEBUG = true; ...
  • java使用Unicode码对中文进行排序

    千次阅读 2012-03-14 18:04:23
    Java中,对一个数组或列表(在本文中统称为集合)中的元素排序,是一个很经常的事情。好在Sun公司在Java库中实现了大部分功能。如果集合中的元素实现了Comparable接口,调用以下的静态(static)方法,就可以直接对...
  •  一种是拼音,一种是笔画。  本文就讲述如何实现按拼音排序的比较器(Comparator)。  作者:Jeff发表于:2007年12月21日 11:27 最后更新于:2007年12月21日 12:38 版权声明:可以任意转载,转载时请务必以...
  • CnToStrokeCountUtils.java

    2020-12-10 15:50:52
    java按照姓的笔画排序的一个工具类,根据GB2312的字符集的笔划列表,可以参考gb2312字符全集。
  • 对于包含汉字的字符串来说,排序的方式主要有两种:一种是拼音,一种是笔画。 本文就讲述如何实现按笔划排序的比较器(Comparator)。 作者:Jeff发表于:2007年12月21日 11:27 最后更新于:2007年12月21日 12:38...
  • Java实现画图面板

    2017-08-03 18:20:55
    Java实现简单的画图功能,具体为画直线、曲线、矩形以及圆。 实现了一些简单的功能,代码可执行。 用Java实现简单的画图功能,具体为画直线、曲线、矩形以及圆。 实现了一些简单的功能,代码可执行。
  • java高级应用简笔

    2018-11-13 20:33:01
    包含近期学习的java高级应用: 自定义注解和相关使用、反射机制、字节码操作、动态编译、JVM类加载器
  • Java绘制图形时,设置笔画的粗细和样式也是一个比较重要的操作。设置笔画的操作主要是通过重写JComponent类的paint()方法,并在该方法中使用Graphics2D类的setStroke()方法和使用BasicStroke类创建笔画对象来实现...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 3,651
精华内容 1,460
关键字:

java笔画

java 订阅