【MapSheep】
[好记性不如烂笔头]
摘要: 服务器地址监听服务器地址: http://jrebel.cicoding.cn GUID生成器: http://jrebel.cicoding.cn/guid 生成的格式: http://jrebel.cicoding.cn/43B6551C-9785-CEA6-05DF-10AC0AF49AA7 阅读全文
posted @ 2020-08-04 10:05 (Play) 阅读(12750) 评论(4) 推荐(8) 编辑
摘要: MySQL dual(自带表) select '张三' as '变量1', (select s_name from Student where s_sex = '男' LIMIT 1) as '变量2', 2 as '变量3', null from dual; 阅读全文
posted @ 2024-03-14 11:56 (Play) 阅读(15) 评论(0) 推荐(0) 编辑
摘要: import java.sql.*; public class CheckTableExistence { public static void main(String[] args) throws SQLException { String url = "jdbc:mysql://localhos 阅读全文
posted @ 2024-01-23 16:19 (Play) 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 其中,column_name为要分割的列名,table_name为表名。这条查询将会返回每个记录中最后一个'/'之前的部分作为结果。 -1 取 ‘/’ 之后 0 取 '/' 之前 SELECT SUBSTRING_INDEX(column_name, '/', -1) AS result FROM 阅读全文
posted @ 2024-01-18 10:17 (Play) 阅读(5) 评论(0) 推荐(0) 编辑
摘要: IdType.AUTO 主键自增,系统分配,不需要手动输入,但需要设置 mysql auto_increment IdType.NONE 未设置主键 IdType.INPUT 需要自己输入 主键值**(配合MySQL int类型自增,亲测可用)** IdType.ASSIGN_ID 系统分配 ID, 阅读全文
posted @ 2024-01-12 17:23 (Play) 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 1、count0函数 里面的参数是列名的的时候,会计算有值项的次数sum(函数 里面的参数是列名的时候,会计算 列名的值的和。2、两个函数在 记录的列名的值为空或者是null时,都不会去统计即count(列名)和sum(列名) 都不计入这条记录 3、count()可以计算出行数,count (1)也 阅读全文
posted @ 2023-11-23 16:36 (Play) 阅读(48) 评论(0) 推荐(0) 编辑
摘要: Map<String, String> resultMap = map.entrySet().stream().collect(Collectors.toMap(entry -> entry.getKey(), entry -> Optional.ofNullable(entry.getValue( 阅读全文
posted @ 2023-11-07 10:28 (Play) 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 参考网址 点击跳转 示例 如图 阅读全文
posted @ 2023-11-01 17:24 (Play) 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 要使用Collectors.groupingBy根据某个字段统计,你可以通过提供一个函数来指定分组的条件。 假设你有一个包含Person对象的列表,每个对象都有age字段表示年龄,你想要根据年龄分组,并统计每个年龄组的人数。以下是一个使用Collectors.groupingBy的示例代码: imp 阅读全文
posted @ 2023-10-31 14:53 (Play) 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 目录报错:分析解决方案 报错: 日志 ERROR [o.a.c.c.C.[.[.[/sa].[dispatcherServlet]] - Servlet.service() for servlet [dispatcherServlet] in context with path [/sa] thre 阅读全文
posted @ 2023-10-31 11:58 (Play) 阅读(315) 评论(0) 推荐(1) 编辑
摘要: 要使用Collectors.groupingBy计算百分比,你需要先对数据进行分组,然后计算每个组内元素的百分比。 假设你有一个包含整数的列表,你想要按照它们的奇偶性进行分组,并计算每个组内元素的百分比。以下是一个使用Collectors.groupingBy和自定义收集器的示例代码: import 阅读全文
posted @ 2023-10-31 11:40 (Play) 阅读(109) 评论(4) 推荐(0) 编辑