摘要: @RabbitListener( bindings = { @QueueBinding( exchange = @Exchange(name = "test_event", type = "topic"), value = @Queue(name = "test_queue"), key = "ev 阅读全文
posted @ 2023-10-19 17:30 李白菜 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 1,partition by 分组后给分组数据排序 select t.*,row_number() over(partition by t."name",t."rid" order by t."rid") as "sort" from "person" t; 2、获取去重后的记录 select t2 阅读全文
posted @ 2023-07-26 14:32 李白菜 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 原因:windows和linux的sh文件格式不同。以换行为例,windows是\r\n,而Linux是\n。所以linux运行windows的sh文件会报错’\r’: command not found 解决办法:使用Vim打开文件,进行如下设置后即可正常运行。 :set ff=unix :wq 阅读全文
posted @ 2023-06-20 15:49 李白菜 阅读(1265) 评论(0) 推荐(0) 编辑
摘要: 1、location后面带 / ,proxy_pass 后面不带 / location /aaa/{ proxy_pass http://127.0.0.1:9099/test4/hello/getProxyUrl; } 测试地址:http://localhost:10000/aaa/123 测试结 阅读全文
posted @ 2023-02-21 11:19 李白菜 阅读(512) 评论(0) 推荐(0) 编辑
摘要: 1、CyclicBarrier无法阻塞主线程,不适合在需要同步返回的接口中使用。CountDownLatch可以阻塞主线程,适用于需要同步返回的接口 2、CyclicBarrier适用于异步任务,尤其需要对子线程的执行结果做汇聚计算的更为适合 3、使用示例 public static void ma 阅读全文
posted @ 2022-11-08 16:17 李白菜 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 1、不能用 !='' 或 ='' 判断,如: <if test="status != null and status !='' "> </if> 2、判断是否相等用 ==,如:<if test="status != null and status == 1 "> </if> 阅读全文
posted @ 2022-10-31 15:35 李白菜 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 1,切换用户,连接oracle数据库 [root@dh-db-lsvwbF7y ~]# su - oracle [oracle@dh-db-lsvwbF7y ~]$ [oracle@dh-db-lsvwbF7y ~]$ sqlplus /nolog SQL*Plus: Release 11.2.0. 阅读全文
posted @ 2022-02-16 17:40 李白菜 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 题目: 给你一个 下标从 0 开始 的整数数组 nums ,其中 nums[i] 表示第 i 名学生的分数。另给你一个整数 k 。从数组中选出任意 k 名学生的分数,使这 k 个分数间 最高分 和 最低分 的 差值 达到 最小化 。返回可能的 最小差值 。 示例 1: 输入:nums = [90], 阅读全文
posted @ 2022-02-16 14:53 李白菜 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 题目: 给定 n 个非负整数,用来表示柱状图中各个柱子的高度。每个柱子彼此相邻,且宽度为 1 。求在该柱状图中,能够勾勒出来的矩形的最大面积。 以上是柱状图的示例,其中每个柱子的宽度为 1,给定的高度为 [2,1,5,6,2,3] 图中阴影部分为所能勾勒出的最大矩形面积,其面积为 10 个单位。 题 阅读全文
posted @ 2021-10-23 17:54 李白菜 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 解法一:加减法 int a = 1, b = 10; a = a + b; // a = 1 + 10 = 11 b = a - b; // b = 11 - 10 = 1 a = a - b; // a = 11 - 1 = 10 这种解法是比较容易想到的方法,也比较好理解。 解法二:异或法 in 阅读全文
posted @ 2021-10-23 17:52 李白菜 阅读(86) 评论(0) 推荐(0) 编辑