var crypto = require('crypto');
var md5 = crypto.createHash('md5');

var result = md5.update('a').digest('hex');

// 输出:0cc175b9c0f1b6a831c399e269772661
console.log(result);
lohiecan (安哥拉鸡鸡 )- 2019-03-18 0 人
nodejs 自用crypto库实现md5加密
lohiecan (安哥拉鸡鸡 )- 2019-03-09 0 人
margin:auto 实现垂直居中和水平居中

import java.math.BigDecimal;
import java.math.RoundingMode;

class Main {
	public static void main(String[] args) {  
        BigDecimal a = new BigDecimal("1"); 
        a=a.divide(new BigDecimal("100"));
        a = a.setScale(2, RoundingMode.HALF_UP);    
        System.out.println(a);
	}
}
lohiecan (安哥拉鸡鸡 )- 2019-03-06 0 人
BigDecimal 四舍五入保留2位小数. ...
lohiecan (安哥拉鸡鸡 )- 2019-03-03 0 人
常用功能演示
lohiecan (安哥拉鸡鸡 )- 2019-03-03 0 人
localStorage一些操作即封装
class Main {
	public static void main(String[] args) {
        // 一维数组初始化
        test1();

        // 二维数组初始化
        //test2();
    }
    /**
    * 一维数组初始化
    */
	public static void test1() {
        //静态初始化数组:方法一  
        String cats[] = new String[] {  
                "Tom","Sam","Mimi"  
        };  

        //静态初始化数组:方法二  
        String dogs[] = {"Jimmy","Gougou","Doggy"};  

        //动态初始化数据  
        String books[] = new String[2];  
        books[0] = "Thinking in Java";  
        books[1] = "Effective Java";  

        System.out.println(cats.length);  
        System.out.println(dogs.length);  
        System.out.println(books.length);  
 
	}
  /**
    * 二维数组初始化
    */
    public static void test2 ( ){

        //静态初始化数组:方法一  
        String cats[] = new String[] {  
                "Tom","Sam","Mimi"  
        };  

        //静态初始化数组:方法二  
        String dogs[] = {"Jimmy","Gougou","Doggy"};  

        //动态初始化数据  
        String books[] = new String[2];  
        books[0] = "Thinking in Java";  
        books[1] = "Effective Java";  

        System.out.println(cats.length);  
        System.out.println(dogs.length);  
        System.out.println(books.length);   
    }
}
lohiecan (安哥拉鸡鸡 )- 2019-03-02 0 人
JAVA中String数组初始化,一维数组和二维数...