新建 javaBean,有那么多个成员变量:【get、set、toString 那些不用我教了吧......】 private String lastName; private Integer age; private Boolean boss; private Date birth; privat ...
分类:
编程语言 时间:
2021-07-28 21:34:46
阅读次数:
0
1.定义返回码枚举 1 public interface ResultCode { 2 public static Integer SUCCESS = 20000; 3 public static Integer ERROR = 20001; 4 } 2. 创建结果类 1 @Data 2 publi ...
分类:
其他好文 时间:
2021-07-27 17:30:58
阅读次数:
0
参考官网: https://www.pythoncentral.io/sqlalchemy-orm-examples/ 员工部门两个表,中间为多对多关系,这种一般需要创建一个中间表。多对多转换成一对多 from sqlalchemy import Integer, Column, String, F ...
分类:
数据库 时间:
2021-07-26 16:48:08
阅读次数:
0
1.if..else public int calculate(int a, int b, String operator) { int result = Integer.MIN_VALUE; if ("add".equals(operator)) { result = a + b; } else ...
分类:
其他好文 时间:
2021-07-15 18:58:38
阅读次数:
0
什么是 epoll? epoll 是 Linux 内核的可扩展 I/O 事件通知机制。取代了 select 与 poll 系统函数,让需要大量操作文件描述符的程序得以发挥更优异的性能。旧有的系统函数所花费的事件复杂度为 O(1),epoll 的时间复杂度为 O(logn)。epoll 实现的功能与 ...
分类:
其他好文 时间:
2021-07-12 17:56:41
阅读次数:
0
PostgreSQL的分区表创建较Oracle分区表复杂些,需要借助创建继承表和触发器的模式实现, 具体创建方法可以参照以下实验, 供参考。 创建父表 123456789101112131415161718 CREATE TABLE fenqu_table ( id integer NOT NULL ...
分类:
其他好文 时间:
2021-07-12 17:52:04
阅读次数:
0
public int calculate(String s) { int len = s.length(); Stack<Integer> s1 = new Stack<>(); // 操作数栈 int num = 0; char preSign = '+'; // 为了方便计算,1+1+1 > + ...
分类:
其他好文 时间:
2021-07-07 17:55:15
阅读次数:
0
自定义一个自己的业务异常 具体代码如下 @EqualsAndHashCode(callSuper = true) @Data public class ServiceException extends RuntimeException { private Integer code; private ...
分类:
其他好文 时间:
2021-07-05 18:24:18
阅读次数:
0
CosId 通用、灵活、高性能的分布式 ID 生成器 介绍 CosId 旨在提供通用、灵活、高性能的分布式系统 ID 生成器。 目前提供了俩大类 ID 生成器:SnowflakeId (单机 TPS 性能:409W/s JMH 基准测试)、SegmentId( RedisIdSegmentDistr ...
分类:
其他好文 时间:
2021-07-05 17:35:20
阅读次数:
0
TreeMap 与哈希表HashMap的区别: 有序表组织key,哈希表完全不组织。 **TreeMap关键点:**放入有序表中的元素,若不是基本类型,必须要有比较器,才能使其内部有序。 基本方法 Comparator<K> com = new Comparator<Integer>(){ @Ove ...
分类:
其他好文 时间:
2021-07-05 17:24:53
阅读次数:
0