线程池 程序启动一个新线程成本是比较高的,因为它涉及到与操作系统交互。而使用线程池可以很好的提高性能,尤其是 当程序中要创建大量生存期很短的线程时,更应该考虑使用线程池。 线程池里的每一个线程代码结束后,并不会死亡,而是再次回到线程池中成为空闲状态,等待下一个对象来使用。 在JDK 5之前,我们必须 ...
分类:
编程语言 时间:
2020-06-07 19:08:55
阅读次数:
65
在css中使用伪类虽然实现了样式的改变,但由于没有过渡效果会显得很生硬。以前如果要实现过渡,就需要借助第三方的js框架来实现。现在只需要使用CSS3的过渡(transition)功能,就可以从一组样式平滑的切换到另一组样式。 (1)背景色过渡变化 下面鼠标移入后,按钮背景色会慢慢地变成黄色。鼠标离开 ...
分类:
Web程序 时间:
2020-06-07 16:35:02
阅读次数:
232
package LeetCode_1143 /** * 1143. Longest Common Subsequence * https://leetcode.com/problems/longest-common-subsequence/description/ * * Given two str ...
分类:
其他好文 时间:
2020-06-07 12:48:01
阅读次数:
57
Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is < 5100 ...
分类:
其他好文 时间:
2020-06-06 11:10:45
阅读次数:
57
问题:Given two integers n and k, return all possible combinations of k numbers out of 1 … n. For example,If n = 4 and k = 2, a solution is: [ [2,4], [3, ...
分类:
其他好文 时间:
2020-06-06 01:16:22
阅读次数:
93
代码示例: 在编辑器中输入 div.one#two$*3>p{我是$}*2+a{a标签} ,按Tab键,会生成如下htmL <div class="one" id="two1"> <p>我是1</p> <p>我是2</p> <a href="">a标签</a></div> <div class="o ...
分类:
Web程序 时间:
2020-06-06 01:13:44
阅读次数:
118
1066 Root of AVL Tree (25分) An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node diff ...
分类:
其他好文 时间:
2020-06-05 23:18:28
阅读次数:
73
join Thread类 设计一个模型 1.有两个线程 One Two ;Two加入到One里面 2.设计模型的时候 two线程在one的run里面创建 保证两个有先后顺序 3.two.join(); 无参数==0 有参数==2000 synchronized锁 非常的厉害 一旦对象被锁定 不释放的 ...
分类:
编程语言 时间:
2020-06-05 22:48:25
阅读次数:
86
//pointer to structure #include <stdio.h> struct Person { char name[10]; char character[20]; int age; }; void display(struct Person *t); int main() { ...
分类:
其他好文 时间:
2020-06-04 21:27:17
阅读次数:
69
多个 ssh key 配置多个网站 一、生成ssh key ssh-keygen -t rsa -C "你的邮箱" -f ~/.ssh/id_rsa_one ssh-keygen -t rsa -C "你的邮箱" -f ~/.ssh/id_rsa_two # 不添加-f 参数 会默认将私钥保存在~/ ...
分类:
其他好文 时间:
2020-06-04 20:05:42
阅读次数:
65