上一页 1 2 3 4 5 6 ··· 29 下一页
摘要: 在 spring 中大部分时候使用的是声明式事务,也就是 @Transaction 注解,但在某些特殊情况下也需要手动控制事务的开启/提交/回滚。 工具类封装: 1 @Component 2 public class TransactionUtils { 3 @Resource 4 private 阅读全文
posted @ 2022-11-17 15:05 牛有肉 阅读(3730) 评论(0) 推荐(0) 编辑
摘要: Lost Update 问题 A4的访问模式r1[x], w2[x], w2[commit], w1[x], w1[commit] 这种访问模式下,w2的更新可能会丢失。因为w1可能基于一个比较old-x来做更新x的操作。 RR 隔离级别下的事务表现 快照读 测试数据: 事务 1: start tr 阅读全文
posted @ 2022-11-17 14:59 牛有肉 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 页面中放两个输入框,一个绑定真实数据、一个绑定脱敏数据,仅展示脱敏数据。 <van-field v-model="person.cardNo" v-show="false" name="证件号码" label="证件号码" left-icon="coupon" placeholder="证件号码" 阅读全文
posted @ 2022-11-14 17:15 牛有肉 阅读(335) 评论(0) 推荐(0) 编辑
摘要: Activiti 项目是一项新的基于Apache许可的开源BPM平台,从基础开始构建,旨在提供支持新的BPMN 2.0标准,包括支持对象管理组(OMG),提供技术实现。 对于开发者来说,Activiti 就是一套 BPMN2.0 标准的流程引擎,通过 Activiti 实现流程的驱动及各类操作。 这 阅读全文
posted @ 2022-10-26 17:45 牛有肉 阅读(401) 评论(1) 推荐(0) 编辑
摘要: 效果: 使用原生 JS 实现一个简单的树插件。 首先元数据的数据结构,每个节点需要包含自己的主键和父级节点的主键,才能描述树形结构。比如: [{ "id": "1", "name": "一级目录1", "fatherId": "0", }, { "id": "2", "name": "二级目录1", 阅读全文
posted @ 2022-06-01 20:06 牛有肉 阅读(1712) 评论(0) 推荐(0) 编辑
摘要: 简单题,溜溜手。 C: #include <stdlib.h> #include <string.h> void allocation(int *givenArr, int currentCandie, int currentPeople, int candies, int num_people) 阅读全文
posted @ 2022-05-29 22:33 牛有肉 阅读(54) 评论(0) 推荐(0) 编辑
摘要: C: // 队列与栈 struct Node { int val; int depth; struct Node *next; struct Node *pre; }; struct Queue { struct Node *head; struct Node *last; int len; }; 阅读全文
posted @ 2022-05-18 11:37 牛有肉 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 先计算最长公共子序列,然后以最长公共子序列为 base ,与两个原序列合并。 dp 后恢复子序列的手法很关键 C: #include <stdlib.h> #include <stdio.h> #include <string.h> char *combine(char *base, char *s 阅读全文
posted @ 2022-05-09 13:53 牛有肉 阅读(247) 评论(0) 推荐(0) 编辑
摘要: C: #include <stdio.h> #include <stdlib.h> int dp(int *prices, int fee, int point, int hasShared, int *cache) { if (point == 0) { if (hasShared == 0) r 阅读全文
posted @ 2022-05-05 10:11 牛有肉 阅读(42) 评论(0) 推荐(0) 编辑
摘要: C 手写栈结构: #include <stdlib.h> #include <stdio.h> #include <string.h> #include "stdbool.h" struct Node { char val; int num; struct Node *next; struct No 阅读全文
posted @ 2022-05-02 22:26 牛有肉 阅读(24) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 29 下一页