作用:为每个线程创建一个独立的空间,使得线程对自己的空间中的数据进行操作(数据隔离)。 import threading from threading import local import time obj = local() def task(i): obj.xxxxx = i time.sle ...
分类:
其他好文 时间:
2020-07-03 21:07:57
阅读次数:
58
题目 Description 给定一个正整数序列A,要求支持以下操作 1): ADD a b c 表示在[a,b]上加上一个常数C。 2): COVER a b c 把[a,b]整体赋值为一个常数K。 3): QUERY a b 查询[a,b]的sum。 Input 第一行两个正整数n、m,n表示序 ...
分类:
其他好文 时间:
2020-07-03 17:30:05
阅读次数:
63
#include<map> #include<queue> #include<time.h> #include<limits.h> #include<cmath> #include<ostream> #include<iterator> #include<set> #include<stack> # ...
分类:
其他好文 时间:
2020-07-03 15:38:44
阅读次数:
52
原文:王知无 https://www.cnblogs.com/importbigdata/p/12178404.html 维表JOIN-绕不过去的业务场景 在Flink 流处理过程中,经常需要和外部系统进行交互,用维度表补全事实表中的字段。 例如:在电商场景中,需要一个商品的skuid去关联商品的一 ...
分类:
其他好文 时间:
2020-07-03 10:36:10
阅读次数:
58
/** * 求一个数的立方根,利用二分法,时间复杂度在logn **/ private static double getCubeRoot(double input){ double min = 0; double max = input; double mid = 0; while ((max - ...
分类:
其他好文 时间:
2020-07-01 22:04:03
阅读次数:
83
**1.@EnableCaching注解** @EnableCaching是由spring框架提供的,springboot框架对该注解进行了继承,该注解需要配置在类上(在中,通常配置在项目启动类上),用于开启基于注解的缓存支持 **2.@Cacheable注解** @Cacheable注解也是由sp ...
分类:
其他好文 时间:
2020-07-01 20:22:55
阅读次数:
80
JAVA反射机制是在运行状态中,对于任意一个类,都能够知道这个类的所有属性和方法; ...
分类:
编程语言 时间:
2020-07-01 09:39:37
阅读次数:
53
Java架构师之源码分析(含SpringBoot2.x Spring5 SpringMVC Mybatis) ...
分类:
编程语言 时间:
2020-06-30 12:30:47
阅读次数:
49
agc045_d Lamps and Buttons https://atcoder.jp/contests/agc045/tasks/agc045_d Tutorial 考虑Snuke的策略. 从小到大一次枚举 \(i\) ,按下 \(i\) ,如果 \(p_i=i\) ,则失败,否则可以点亮 \ ...
分类:
其他好文 时间:
2020-06-29 18:39:34
阅读次数:
107
public class Global { public static final String YES = "1"; private static final String NO="0"; public static Object getConst(String field){ try { ret ...
分类:
其他好文 时间:
2020-06-29 15:03:40
阅读次数:
155