Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov ...
分类:
其他好文 时间:
2019-08-21 00:13:41
阅读次数:
90
DBCP(DataBase Connection Pool)数据库连接池,由Apache公司开发。连接池的运用避免了反复建立连接造成的资源浪费,预先建立一些连接放在数据库连接池中,需要时取出,不需要时放入连接池。 需要导入两个jar包:commons-pool-1.5.6和commons-dbcp- ...
分类:
数据库 时间:
2019-08-20 18:31:57
阅读次数:
116
public class CountDownLatchTest1 implements Runnable{ final AtomicInteger number = new AtomicInteger(); volatile boolean bol = false; @Override public... ...
分类:
编程语言 时间:
2019-08-20 18:27:16
阅读次数:
108
目录 直接定义的缺点 简易定义的方式 参考资料 直接定义的缺点 在tensorflow中假设有一批输入为: 其定义如下: tf.constant([ [ [ [3, 1, -3], [1, -1, 7] ], [ [-2, 2, -5], [2, 7, 3] ] ], [ [ [-1, 3, 1], ...
分类:
其他好文 时间:
2019-08-20 11:04:57
阅读次数:
65
参数明细 查看大图 ThreadPoolExecutor执行顺序: 线程池按以下行为执行任务 当线程数小于核心线程数时,创建线程。 当线程数大于等于核心线程数,且任务队列未满时,将任务放入任务队列。 当线程数大于等于核心线程数,且任务队列已满 若线程数小于最大线程数,创建线程 若线程数等于最大线程数 ...
分类:
其他好文 时间:
2019-08-20 00:37:11
阅读次数:
78
Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, ...
分类:
其他好文 时间:
2019-08-19 09:37:19
阅读次数:
70
ThreadPoolExecutor类的参数详解: Executors:使用该工具类,创建的线程池,会使用默认的方式创建,此时却是了很多的灵活性。比如说:线程的队列,线程的丢弃……等。 ThreadFactory:创建线程时,设置相应的属性。比如线程名字…… ...
分类:
编程语言 时间:
2019-08-18 23:48:12
阅读次数:
109
在JDK的命令行中,一般开发人员最耳熟能详的肯定就是java,javac,javap等常用命令,不过在jdk/bin下还有许多其他的命令行工具,它们被用来监测JVM运行时的状态,下面我们来详细解读一下几个常用的工具以及如何使用。 ...
分类:
编程语言 时间:
2019-08-18 17:51:54
阅读次数:
128
Redis复制的原理和优化 主从复制 slave会通过被复制同步master上面的数据,形成数据副本当master节点宕机时,slave可以升级为master节点承担写操作。允许有一主多从,slave可以承担读操作,提高读性能,master承担写操作。即达到读写分离 性质一个master可以有多个s ...
分类:
其他好文 时间:
2019-08-18 15:32:35
阅读次数:
61
# coding=utf-8 import requests from bs4 import BeautifulSoup import time from multiprocessing import Pool import threading from requests.adapters impo... ...
分类:
其他好文 时间:
2019-08-18 15:25:15
阅读次数:
99