<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[mettle_heng的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/mettle_heng</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; mettle_heng]]></copyright><item><title><![CDATA[获取10位的时间戳]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/123072488</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/123072488</guid><author>mettle_heng</author><pubDate>Tue, 22 Feb 2022 17:01:43 +0800</pubDate><description><![CDATA[/**

* 获取10位的时间戳

*

* @return

*/

public String timestamp() {

return String.format("%010d", System.currentTimeMillis() / 1000);

}
]]></description><category></category></item><item><title><![CDATA[获取一定长度的随机字符串]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/123072467</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/123072467</guid><author>mettle_heng</author><pubDate>Tue, 22 Feb 2022 17:00:56 +0800</pubDate><description><![CDATA[/**

* 获取一定长度的随机字符串

*

* @param len

* @return

*/

public String randomStr(int len) {

return RandomStringUtils.randomAlphanumeric(len);

}
]]></description><category></category></item><item><title><![CDATA[获取随机数]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/123072440</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/123072440</guid><author>mettle_heng</author><pubDate>Tue, 22 Feb 2022 17:00:14 +0800</pubDate><description><![CDATA[/**

* 生成4位随机数字

*

* @return

*/

public String random4Num() {

return String.format("%04d", new Random().nextInt(9999));

}
]]></description><category></category></item><item><title><![CDATA[sha1加密]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/123072402</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/123072402</guid><author>mettle_heng</author><pubDate>Tue, 22 Feb 2022 16:59:15 +0800</pubDate><description><![CDATA[/**

* sha1加密

*

* @param decript

* @return

*/

public String sha1(String decript) {

if (StringUtils.isBlank(decript)) {

return null;

}

return DigestUtils.sha1Hex(decript);

}
]]></description><category></category></item><item><title><![CDATA[微信小程序初探]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/123072134</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/123072134</guid><author>mettle_heng</author><pubDate>Tue, 22 Feb 2022 16:50:53 +0800</pubDate><description><![CDATA[import java.util.HashMap;

import java.util.Map;

import java.util.Random;



import org.apache.commons.codec.digest.DigestUtils;

import org.apache.commons.lang.RandomStringUtils;

import org.apache.commons.lang.StringUtils;

import org.springframework.be]]></description><category></category></item><item><title><![CDATA[poi导出excel]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/123072051</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/123072051</guid><author>mettle_heng</author><pubDate>Tue, 22 Feb 2022 16:48:52 +0800</pubDate><description><![CDATA[JavaPOI导出Excel有三种形式，他们分别是

1.HSSFWorkbook

2.XSSFWorkbook

3.SXSSFWorkbook。

HSSFWorkbook:是操作Excel2003以前（包括2003）的版本，扩展名是.xls；

XSSFWorkbook:是操作Excel2007后的版本，扩展名是.xlsx；

SXSSFWorkbook:是操作Excel2007后的版本，扩展名是.xlsx；

第一种：HSSFWorkbook

poi导出excel最常用的方式；但是此种方式的局限]]></description><category></category></item><item><title><![CDATA[获取tomcat下的项目路径]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/123071957</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/123071957</guid><author>mettle_heng</author><pubDate>Tue, 22 Feb 2022 16:45:52 +0800</pubDate><description><![CDATA[WebApplicationContext webApplicationContext = ContextLoader.getCurrentWebApplicationContext();

ServletContext servletContext = webApplicationContext.getServletContext();

String url = servletContext.getRealPath("/");
]]></description><category></category></item><item><title><![CDATA[mysql每隔几分钟取值问题]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/123071865</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/123071865</guid><author>mettle_heng</author><pubDate>Tue, 22 Feb 2022 16:42:23 +0800</pubDate><description><![CDATA[平均值

SELECT

device_code AS deviceCode,

DATE_FORMAT(

CONCAT(

DATE(DATE_SUB(timepoint,INTERVAL '08:15' MINUTE_SECOND)),

' ',

HOUR (DATE_SUB(timepoint,INTERVAL '08:15' MINUTE_SECOND)),

':',

FLOOR(MINUTE(DATE_SUB(timepoint,INTERVAL '08:15' MINUTE_SECON]]></description><category></category></item><item><title><![CDATA[sharding-jdbc和sharding-proxy使用]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/117783233</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/117783233</guid><author>mettle_heng</author><pubDate>Thu, 10 Jun 2021 16:20:17 +0800</pubDate><description><![CDATA[sharding-jdbc和sharding-proxy使用
sharding-jdbc使用
本项目选择sharding-jdbc作为分表分库的组件
sharding-jdbc后续发展为Sharding-Sphere，包含sharding-jdbc、Sharding-Proxy、Sharding-Sidecar
定位为轻量级Java框架，在Java的JDBC层提供的额外服务。 它使用客户端直连数据库，以jar包形式提供服务，需
额外部署和依赖，可理解为增强版的JDBC驱动，完全兼容JDBC和各种ORM框架。]]></description><category></category></item><item><title><![CDATA[正则表达式匹配数字（正负数和小数）]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/102657755</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/102657755</guid><author>mettle_heng</author><pubDate>Mon, 21 Oct 2019 09:50:29 +0800</pubDate><description><![CDATA[var reg = new RegExp('^-?([1-9]\\d*|[1-9]\\d*\\.\\d{1,2}|0\\.\\d{1,2})$');

if(reg.test(str)){

匹配成功

}else{

匹配失败

}
]]></description><category></category></item><item><title><![CDATA[Collection集合（List,Set）]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/88240274</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/88240274</guid><author>mettle_heng</author><pubDate>Wed, 06 Mar 2019 16:11:02 +0800</pubDate><description><![CDATA[public class CollectionDemo {
    public static void main(String[] args) {
//        ArrayList
//        arr();
//        去重
//        arr2();
//        LinkedList
//        linked();
//        Vecto...]]></description><category></category></item><item><title><![CDATA[webservice]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/79971958</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/79971958</guid><author>mettle_heng</author><pubDate>Tue, 17 Apr 2018 11:09:23 +0800</pubDate><description><![CDATA[WebService基础学习(一)—基础知识
        
        
        
            一、WebService  1.什么是WebService          Web Service(WEB服务)能够快捷和方便地综合结合各种系统、商务和任何应用平台。利用最新的Web Service 标准能够使任何软件系统和系统之间的应用互通互联，方便，而且更加廉价。]]></description><category></category></item><item><title><![CDATA[git]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/79890957</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/79890957</guid><author>mettle_heng</author><pubDate>Wed, 11 Apr 2018 09:01:18 +0800</pubDate><description><![CDATA[ 
        Git使用详细教程 
         
             
                 
                转载                 
                2016年03月23日 23:20:53 
             
         
                            


一：Git是什么...]]></description><category></category></item><item><title><![CDATA[angularjs设置路由]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/79540821</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/79540821</guid><author>mettle_heng</author><pubDate>Tue, 13 Mar 2018 15:15:22 +0800</pubDate><description><![CDATA[$routeProvider.when(url,{
    template:string, //在ng-view中插入简单的html内容
    templateUrl:string, //在ng-view中插入html模版文件
    controller:string,function / array, //在当前模版上执行的controller函数
    controllerAs:str...]]></description><category></category></item><item><title><![CDATA[Solr中Field常用属性]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/79523620</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/79523620</guid><author>mettle_heng</author><pubDate>Mon, 12 Mar 2018 10:26:41 +0800</pubDate><description><![CDATA[FieldType
实例：
name:就是FieldType的名称
class:指向了org.apache.slor.analysis对应的class名称，用这个来定义类型的行为
 
Field:
实例：
Name:是查询时的名称
Type:这个是之前定义的FieldType的名称
Indexed：是否索引（true/false）
Stored：是否存储（是否将索引结果存储到索]]></description><category></category></item><item><title><![CDATA[用cmd打开jar文件]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/79494767</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/79494767</guid><author>mettle_heng</author><pubDate>Fri, 09 Mar 2018 11:09:50 +0800</pubDate><description><![CDATA[]]></description><category></category></item><item><title><![CDATA[json数据格式转换]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/78606011</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/78606011</guid><author>mettle_heng</author><pubDate>Wed, 22 Nov 2017 17:40:11 +0800</pubDate><description><![CDATA[1、将任何javascript对象转换成json字符串

1)  String myObjectToString=myObject.toJSONString();

2)  StringmyObjectToString=JSON.stringify(jsonObj);

   使用的是JSON解析器

2、将JSON文本转换成javascript对象

1）var object=ev...]]></description><category></category></item><item><title><![CDATA[迭代器]]></title><link>https://blog.youkuaiyun.com/mettle_heng/article/details/78419848</link><guid>https://blog.youkuaiyun.com/mettle_heng/article/details/78419848</guid><author>mettle_heng</author><pubDate>Wed, 01 Nov 2017 22:54:52 +0800</pubDate><description><![CDATA[Iterator&amp;lt;class类&amp;gt; it=a.iterator();
while(it.hasNext()){
System.out.println(it.next());



}

Iterator提供了三种方法：

一、hasNext()其返回一个布尔类型的值，即如果仍有元素可以迭代则返回true；

二、next()

三、remove()


//           ...]]></description><category></category></item></channel></rss>