1.记录索引交换 class Solution { public: int minSwapsCouples(vector<int>& row) { int len=row.size(); vector<int> idx(len,-1); int ret=0; for(int i=0;i<len;++ ...
分类:
其他好文 时间:
2021-04-22 15:12:46
阅读次数:
0
Dim bag,pipe do Set bag=GetObject("WinMgmts:") Set pipe=bag.execquery("select * from win32_process where name='notepad.exe'") for each i in pipe i.ter ...
分类:
系统相关 时间:
2021-04-21 12:36:32
阅读次数:
0
都是JUC并发包下的类 CountDownLatch:倒计时,countDown每次减少,await控制达到倒计时要求值 //下自习离开案例,班长必须最后走 public class CountDownLatchDemo { public static void main(String[] args ...
分类:
其他好文 时间:
2021-04-21 12:21:06
阅读次数:
0
主键生成策略 @TabelID uuid 自增ID 雪花算法 mybatis-plus 的主键策略 package com.baomidou.mybatisplus.annotation; public enum IdType { AUTO(0), //数据库自增ID 记住表ID字段一定是自增的 N ...
分类:
其他好文 时间:
2021-04-20 15:05:56
阅读次数:
0
1、关闭MySQL [root@mysql ~]# /etc/init.d/mysqld stopShutting down MySQL.. SUCCESS! 2、修改参数文件/etc/my.cnf [root@mysql ~]# cat /etc/my.cnf[mysqld] port=3306 ...
分类:
数据库 时间:
2021-04-20 14:29:49
阅读次数:
0
写一个符合 Promise A+ 规范的 Promise 类型定义 // MyPromise.ts type resType = (value?: any) => void; type rejType = (reason?: any) => void; type executorType = (re ...
分类:
其他好文 时间:
2021-04-20 14:26:37
阅读次数:
0
es版本6.8.*及以下,7.9.*不适用。 直接贴代码 import java.io.FileNotFoundException; import java.io.IOException; import java.util.Date; import java.util.HashMap; import ...
分类:
编程语言 时间:
2021-04-19 15:09:30
阅读次数:
0
今天在navicat中编写sql操作oracle数据库时进行了误操作,可以使用如下语句进行回退回滚,因为navicat是自动提交事务的,而rollback没法回滚。 oracle回退 --开启闪退 alter table TB_MENU_INFO enable row movement; --闪退到 ...
分类:
数据库 时间:
2021-04-19 14:34:24
阅读次数:
0
💛线程休眠的意思, Thread.sleep(毫秒数); 💛sleep()会产生InterruptedException异常; 💛休眠时间达到后线程进入就绪状态. 💛sleep()可以用来模拟网络延迟,倒计时等. 💛每一个对象都有一把锁, sleep()不会释放锁. package com ...
分类:
编程语言 时间:
2021-04-16 12:23:58
阅读次数:
0
1:对synchronized的理解: 1.1 :假设t1和t2并发,开始执行时肯定有先有后 1.2:假设t1先执行,看到synchronized这个时候自动找“后面的共享对象”的对象锁,找到后并占有锁,然后执行后面同步代码块,在程序执行过程一直都是占有这把锁,直到同步代码块结束,锁才释放。 1.3 ...
分类:
其他好文 时间:
2021-04-15 12:38:55
阅读次数:
0