上一页 1 2 3 4 5 6 7 8 9 ··· 39 下一页
摘要: TCP的连接建立是一个三次握手过程,目的是为了通信双方确认开始序号,以便后续通信的有序进行。主要步骤如下:1. 连接开始时,连接建立方(Client)发送SYN包,并包含了自己的初始序号a;2. 连接接受方(Server)收到SYN包以后会回复一个SYN包,其中包含了... 阅读全文
posted @ 2019-03-20 10:10 strawqqhat 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 线程池的优点1、线程是稀缺资源,使用线程池可以减少创建和销毁线程的次数,每个工作线程都可以重复使用。2、可以根据系统的承受能力,调整线程池中工作线程的数量,防止因为消耗过多内存导致服务器崩溃。线程池的创建1 public ThreadPoolExecutor(int ... 阅读全文
posted @ 2019-03-20 09:31 strawqqhat 阅读(265) 评论(0) 推荐(0) 编辑
摘要: AVL树(http://baike.baidu.com/view/593144.htm?fr=aladdin),又称(严格)高度平衡的二叉搜索树。其他的平衡树还有:红黑树、Treap、伸展树、SBT。 注:使用 "nil 叶子"或"空(null)叶子",它不包含数据而... 阅读全文
posted @ 2019-03-20 08:59 strawqqhat 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 链接:https://www.nowcoder.com/discuss/113837 一面:从来没有那么流利的回答过面试官的问题!大部分都是面试官一说,我马上答出来,以至于我稍微有点停顿的时候,面试官马上说:你别急,先想想!(其实我只是说累!)问题比较多!记不太清了!... 阅读全文
posted @ 2019-03-19 21:24 strawqqhat 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 当程序在运行过程中,会将运算需要的数据从主存复制一份到cup的高速缓存当中,那么cpu进行计算时就可以直接从它的高速缓存读取数据和向其中写入数据,当运算结束后,再将高速缓存中的数据刷新到主存当中。举个简单的例子,比如下面这段代码:i=i+11当线程执行这个语句时,会先... 阅读全文
posted @ 2019-03-19 21:10 strawqqhat 阅读(699) 评论(0) 推荐(0) 编辑
摘要: Redis作为一个典型的非关系型数据库,目前来说在企业级应用中使用广泛。它十分适合存储存储量小、访问量巨大的场景,所有数据全部in-memory保证了数据的高速访问。作为和他一个类型的noSQL,它和memcached又有什么区别和优点呢? 一、Memca... 阅读全文
posted @ 2019-03-19 20:04 strawqqhat 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 在一个应用程序中,我们需要多次使用线程,也就意味着,我们需要多次创建并销毁线程。而创建并销毁线程的过程势必会消耗内存。而在Java中,内存资源是及其宝贵的,所以,我们就提出了线程池的概念。 线程池:Java中开辟出了一种管理线程的概念,... 阅读全文
posted @ 2019-03-19 19:41 strawqqhat 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 前言快速排序是一种很重要的排序算法,我花了不少时间去理解并总结它,希望可以通过图文的方式让你快速理解快速排序,并能手撸一个快排。快速排序简介快速排序是一种很不错的排序算法,算法复杂度为n*logn。快排使用了分而治之的思想,每次排序是都找到一个基准(我们学习时经常使用... 阅读全文
posted @ 2019-03-19 18:21 strawqqhat 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 遍历法static Node reverse(Node head){ if(head == null){ return null; } Node pre = head; Node cur = head; Node reHead = null; //如... 阅读全文
posted @ 2019-03-19 18:19 strawqqhat 阅读(165) 评论(0) 推荐(0) 编辑
摘要: HashMap的原理HashMap的数据结构为数组+链表,以key,value的形式存储,通过调用put和get方法来存制和取值。 它内部维护了一个entry数组。得到key的hashcode值将其移位按位与运算,然后在通过跟数组的长度-1做逻辑与运算得... 阅读全文
posted @ 2019-03-19 17:46 strawqqhat 阅读(1025) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 39 下一页
#home h1{ font-size:45px; } body{ background-image: url("放你的背景图链接"); background-position: initial; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; background-origin: initial; background-clip: initial; height:100%; width:100%; } #home{ opacity:0.7; } .wall{ position: fixed; top: 0; left: 0; bottom: 0; right: 0; } div#midground{ background: url("https://i.postimg.cc/PP5GtGtM/midground.png"); z-index: -1; -webkit-animation: cc 200s linear infinite; -moz-animation: cc 200s linear infinite; -o-animation: cc 200s linear infinite; animation: cc 200s linear infinite; } div#foreground{ background: url("https://i.postimg.cc/z3jZZD1B/foreground.png"); z-index: -2; -webkit-animation: cc 253s linear infinite; -o-animation: cc 253s linear infinite; -moz-animation: cc 253s linear infinite; animation: cc 253s linear infinite; } div#top{ background: url("https://i.postimg.cc/PP5GtGtM/midground.png"); z-index: -4; -webkit-animation: da 200s linear infinite; -o-animation: da 200s linear infinite; animation: da 200s linear infinite; } @-webkit-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @-o-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @-moz-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @keyframes cc { 0%{ background-position: 0 0; } 100%{ background-position: 600% 0; } } @keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-webkit-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-moz-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-ms-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } }