document.write("");
摘要: 使用Seata 1.3.0版本,测试A服务调用B服务,且A方法中,手动写了一个异常,测试是否正常回滚(Mysql已经测试过) 发现报错:ORA-02289: 序列不存在 一看就是undo_log这张表的sequence没有建立,导致数据保存不了, 太久没有用oracle了,之前搜索undo_log的 阅读全文
posted @ 2024-07-19 15:12 人间春风意 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 1. 新增编码器(由于使用了动态的Feign,所以不能像正常使用Feign一样指定configuration配置编码器) import feign.RequestTemplate; import feign.codec.EncodeException; import feign.codec.Enco 阅读全文
posted @ 2024-07-15 09:47 人间春风意 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 背景:某次查看日志,发现数据不符合预期,希望获取的是降序排序,但是部分数据是乱序的 已知List.sort()方法应该不会出异常,所以应该是判断先后方法出问题了 果然,因为一开始写代码时,没有考虑到差值可能会超出int取值范围,由此导致排序异常 PS:差值超出int取值范围了 原代码 List<XX 阅读全文
posted @ 2024-06-13 16:59 人间春风意 阅读(2) 评论(0) 推荐(0) 编辑
摘要: pip install pillow from PIL import Image def png_to_ico(png_path, ico_path): img = Image.open(png_path) img.save(ico_path, format='ICO') png_to_ico('V 阅读全文
posted @ 2024-06-12 11:26 人间春风意 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 背景:IDEA中双击打开一个.py文件时,弹出一个文件类型的弹窗(没注意是什么,估计是不小心按到了什么快捷键),当时随便选的Text,结果不知道为什么,这个文件无法在IDEA中打开(之前都正常) 由于对idea的file types设定不了解,所以一个菜单一个菜单往下看,因为同后缀的其它文件都可以打 阅读全文
posted @ 2024-06-11 15:32 人间春风意 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 安装依赖 pip install psutil 代码 import psutil def check_if_process_running(process_name): ''' Check if there is any running process that contains the given 阅读全文
posted @ 2024-06-11 11:18 人间春风意 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 背景:RecyclerView 左右滑动时,需要获取当前显示在页面上的选项卡 步骤: 1. RecyclerView 添加addOnScrollListener,回调中可以直接获取对应Item Index xxxRecyclerView.addOnScrollListener(new Recycle 阅读全文
posted @ 2024-06-07 09:23 人间春风意 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 背景:水平滚动的List,一项Item占满页面宽度,相当于数量不定的选项卡,每个选项卡占满一页,左右滑动时,如何限制一次只能滑动一个Item 步骤: 1. 水平滚动布局 linearLayoutManager = new LinearLayoutManager(this); linearLayout 阅读全文
posted @ 2024-06-07 09:16 人间春风意 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 问题背景:使用适配器显示一个列表,列表中Item中有EditText,滚动时会有EditText组件内容消失 步骤: 1. 在Adapter中,添加interface public interface OnEidtTextChangeListener { void xxxTextChanged(Ch 阅读全文
posted @ 2024-06-07 09:09 人间春风意 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 在Activity中,使用this.getCurrentFocus(),获取当前焦点所在的View, 再判断是否是EditText(可调整成其他组件),看个人需要再做特定的逻辑处理 String content = "xxxxx"; EditText focusedEditText = null; 阅读全文
posted @ 2024-06-07 08:52 人间春风意 阅读(5) 评论(0) 推荐(0) 编辑