Math.ceil,Math.round,Math.floor区别
摘要:Math.ceil,Math.round,Math.floor区别 //向上取整 System.out.println("amt1=" + Math.ceil(71.01)); //四舍五入 System.out.println("amt2=" + Math.round(71.01)); //向下取
阅读全文
posted @
2023-04-22 11:43
oktokeep
阅读(42)
推荐(0)
Java编码规范-字符串与Integer的比较,BigDecimal非空参数,BigDecimal加减乘除DEMO
摘要:Java编码规范-字符串与Integer的比较,BigDecimal非空参数 package com.example.core.mydemo; import java.math.BigDecimal; public class IntTest { public static void main(St
阅读全文
posted @
2023-04-22 11:41
oktokeep
阅读(65)
推荐(0)
elasticsearch6.8 ik分词器需安装
摘要:elasticsearch6.8 ik分词器需安装order_info_es/_analyze POST{ "analyzer": "ik_max_word", "text": "湖南省常德市"} ##未安装的报错{"error": {"root_cause": [{"type": "remote_
阅读全文
posted @
2023-04-11 00:14
oktokeep
阅读(151)
推荐(0)
关于Elasticsearch查找相关的问题汇总(match、match_phrase、query_string和term)
摘要:关于Elasticsearch查找相关的问题汇总(match、match_phrase、query_string和term) 查询全部: { "query": { "match_all": {} } } 对应的 QueryBuilder Class 为 MatchAllQueryBuil
阅读全文
posted @
2023-04-10 23:52
oktokeep
阅读(801)
推荐(0)
es语法 rest api 模拟query 根据中文姓名搜索demo
摘要:es语法 rest api 模拟query 根据中文姓名搜索demo order_info_es/_doc/40094182abc GET order_info_es/_settings?pretty GET { "order_info_es": { "settings": { "index": {
阅读全文
posted @
2023-04-10 23:51
oktokeep
阅读(77)
推荐(0)
Java8 - sum求和,将 List 集合转为 Map,key去重(groupingBy),sorted排序
摘要:Java8 - sum求和,将 List 集合转为 Map,key去重(groupingBy),sorted排序 package com.example.core.mydemo.java8; public class GoodsPriceDTO { private Integer id; priva
阅读全文
posted @
2023-04-10 23:10
oktokeep
阅读(533)
推荐(0)
SM4Utils加解密demo
摘要:SM4Utils加解密demo package com.example.core.mydemo.sm4; import cn.org.bjca.utils.SM4Utils; public class SM4Test { public static void main(String[] args)
阅读全文
posted @
2023-04-10 23:09
oktokeep
阅读(605)
推荐(1)
Java8统计金额demo
摘要:Java8统计金额demo package com.example.core.mydemo.java8; public class GoodsPriceDTO { private String goodName; private Integer amount; public String getGo
阅读全文
posted @
2023-04-10 23:07
oktokeep
阅读(175)
推荐(0)
判断日期是否为周六周日,BigDecimal比较大小
摘要:判断日期是否为周六周日,BigDecimal比较大小 package com.example.core.mydemo.date; import java.math.BigDecimal; import java.time.DayOfWeek; import java.time.LocalDateTi
阅读全文
posted @
2023-04-10 23:06
oktokeep
阅读(123)
推荐(0)
python生成随机四位数和AttributeError: module 'random' has no attribute 'sample'
摘要:python生成随机四位数和AttributeError: module 'random' has no attribute 'sample' ## AttributeError: module 'random' has no attribute 'sample' ##解决方法:##原来是因为命名.
阅读全文
posted @
2023-04-03 09:36
oktokeep
阅读(327)
推荐(0)