上一页 1 2 3 4 5 6 ··· 10 下一页
摘要: DataFrame 控制台打印不换行 import pandas as pd pd.set_option('display.width', 1000) # 控制,可以不换行 是否换行效果对不: 【自动换行】: 取消【自动换行】后: 阅读全文
posted @ 2022-07-31 10:51 BGStone 阅读(581) 评论(0) 推荐(0)
摘要: 数据的存储位置和数据的具体数值之间不存在任何关系。在面对查找问题时,这些数据结构必须采取逐一比对的方式去实现定位。 哈希表的设计,采用了函数映射的思想,将记录的存储位置与记录的关键字关联起来。 【存】:key——>运算出存储的位置(东西南北中:如 1905697244):存的时候,把key和valu 阅读全文
posted @ 2022-06-21 17:03 BGStone 阅读(294) 评论(0) 推荐(0)
摘要: 下列命令自动的结束一个事务 (就好像你在执行这个命令之前,做了一个 COMMIT):ALTER TABLE(alter table)BEGIN(begin)CREATE INDEX (create index)DROP DATABASE(drop database)DROP TABLE(drop t 阅读全文
posted @ 2022-04-04 18:59 BGStone 阅读(82) 评论(0) 推荐(0)
摘要: RestTemplate 的 post/get 请求,造成 程序停顿 2h 异常的现象:执行到 上面代码的 第5行后,不再往下继续执行,会停顿 2h 甚至更久(时长与 restTemplate 是否有资源有关)。由于这是后端服务处理程序,不存在超时问题,所以会长时间 停顿,处在假死状态。 如果是接受 阅读全文
posted @ 2022-03-18 14:19 BGStone 阅读(921) 评论(0) 推荐(0)
摘要: 批量处理-单次异常-回滚单次内容 批量任务,其中一批次异常,仅回滚 本批次整条线,但 批量任务中的其他任务不影响。 解决方案: 1. 任务处理,单独放入 一个类中,在 入口方法上(类上不可加) 加上事务:@Transactional(rollbackFor = Exception.class) 2. 阅读全文
posted @ 2021-12-15 22:18 BGStone 阅读(477) 评论(0) 推荐(0)
摘要: 前端传入 SQL 语句 到后端执行 本文运用注意事项: (1)使用阶段:测试阶段,上生产前需去掉。 (2)作用:通过 系统 执行SQL,绕开权限的控制。 1. Controller 1 @ApiOperation(value = "test") 2 @PostMapping("/executeSql 阅读全文
posted @ 2021-10-11 11:48 BGStone 阅读(2168) 评论(0) 推荐(0)
摘要: 手写分页 获取数据并处理 1. 准备测试数据 1 // 生成 连续的整数 2 private static List<Integer> makeSequence(int begin, int end) { 3 List<Integer> ret = new ArrayList<>(end - beg 阅读全文
posted @ 2021-09-22 21:12 BGStone 阅读(171) 评论(0) 推荐(0)
摘要: 集合(Map,List)分组:多属性进行分组 一、List 实体字段分组 1. 根据单一字段进行分组: Map<Integer, List<SomeEntity>> detailTypeMap = SomeEntityS.stream().collect(Collectors.groupingBy( 阅读全文
posted @ 2021-09-21 22:21 BGStone 阅读(7673) 评论(0) 推荐(0)
摘要: 枚举类 举例: 1 import lombok.Getter; 2 3 public class PublicConstants { 4 public enum StatusEnum { 5 6 STATUS_TEMP_STORAGE(1,"暂存", "待提交"), 7 STATUS_AUDI_TI 阅读全文
posted @ 2021-08-25 11:21 BGStone 阅读(532) 评论(0) 推荐(0)
摘要: 配置文件: 1 import com.fasterxml.jackson.annotation.JsonAutoDetect; 2 import com.fasterxml.jackson.annotation.PropertyAccessor; 3 import com.fasterxml.jac 阅读全文
posted @ 2021-06-29 11:58 BGStone 阅读(2004) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 10 下一页