ThreadPoolExecutor介绍 通过 ThreadPoolExecutor 创建线程池,API 如下所示: public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUn ...
分类:
编程语言 时间:
2021-03-02 11:49:07
阅读次数:
0
public static void main(String[] args) { int num1 = 10_0000_0000; int rate = 20; long total = num1 * rate; System.out.println(total);// 输出为-1474836480 ...
分类:
其他好文 时间:
2021-03-01 14:18:24
阅读次数:
0
Angel图算法 [2.0]CommonFriends 计算两个好友的共同好友数,某种程度上可以刻画两个节点之间的紧密程度。 输入 输入数据路径:输入文件所在路径,无权网络数据, 数据格式为两列 srcId(long) | dstId(long), 其中|为分隔符,分隔字段表示空白符或者逗号等。 输 ...
分类:
编程语言 时间:
2021-03-01 13:31:13
阅读次数:
0
/// <summary> /// 运行时间 /// </summary> [ProtoMember(46)]public long WorkTime; Stopwatch stopwatch = new Stopwatch(); // 记录运行时间stopwatch.Start();。。。// 运 ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; typedef ...
分类:
编程语言 时间:
2021-02-27 13:27:43
阅读次数:
0
1 类型转换 ? 由于Java是强类型语言,所以要进行有些运算的时候,需要用到类型转换。运算中,不同类型的数据先转换为同一类型,然后进行运算。 低 高 byte,short,char > int > long > float > double 1.1 强制转换 由高到低 (类型)变量名 // 强制转 ...
分类:
编程语言 时间:
2021-02-27 13:11:10
阅读次数:
0
同一个nginx配置文件,请求不同的域名可以指定对应的目录 nginx配置 cat long.conf server { listen 80; server_name a.com b.com c.com; location / { root /home/long/$host/; index inde ...
分类:
其他好文 时间:
2021-02-27 13:10:39
阅读次数:
0
1。构造方法 public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFa ...
分类:
编程语言 时间:
2021-02-27 13:05:13
阅读次数:
0
题目 要点 其实本题是找所有一个列表中所有元素的公共子集,也就是最小是空集(""),最大是最短元素。那我们则需要比较最小长度的元素和最大长度的元素,看它们有多少相同。 解题 class Solution: def longestCommonPrefix(self, strs: List[str]) ...
分类:
其他好文 时间:
2021-02-25 12:22:33
阅读次数:
0
背景:测试服/正式服的字段类型为varchart(200) 页面该字段录入超过200个字符保存。测试服报错“Data too long for column”;正式服自动截取200个字符保存,没有报错。 原因:mysql的my.ini文件中的sql_mode配置不同,通过 select @@GLOB ...
分类:
数据库 时间:
2021-02-25 12:16:01
阅读次数:
0