- 博客(13)
- 收藏
- 关注
原创 TCP小结
TCP是因特网运输层的面向连接的可靠的运输协议。为了提供可靠数据传输,TCP依赖于差错控制,重传,累积确认,定时器以及用于序号和确认号的首部字段。 TCP被称为是面向连接的,这是因为在一个应用程序可以开始向另一个应用进程发送数据之前,这两个进程必须先相互“握手”,即他们必须相互发送某些预备子弹,以及确保数据传输的参数。作为TCP连接建立的一部分,连接的双方都将初始化...
2018-07-25 23:43:34 164
原创 IDEA创建多级目录
刚刚在使用IDEA创建多层目录的时候,发现是不自动分层的。比如我想在common目录下创建一个message包,然后message包下有dao和service层,但是在创建之后呢,却是这个样子的。怎么办,经过查阅资料后,找到了分层的具体实现方式。1.先创建package 名为message 然后在鼠标点到src目录,2.在message目录下创建一个test.java的文件。3...
2018-07-20 18:25:17 9231
原创 UDP小结(一)
运输层概述运输层位于应用层和网络层之间,是分层网络体系结构中的重要部分,该层为在运行在不同主机上的应用进程提供直接的通信服务起着至关重要的作用。通常我们比较关注的就是TCP和UDP运输层协议。网络层的两个端系统之间的交付服务扩展到运行在两个不同端系统上的应用层进程之间的交付服务。两个主要的问题就是:1.两个实体怎样才能在一种会丢失或损失的媒体上可靠的通信。2.控制运输层实体的传输速率以避免...
2018-07-19 22:14:16 470
转载 varchar与nvarchar区别
问:sql server中的varchar和Nvarchar有什么区别啊,varchar好像是一个英文和一个汉字都站两个字节,而Nvarchar则是一个英文占一个字节,汉字占两个字节。可是这个对asp程序有什么影响? 答:varchar(n)长度为 n 个字节的可变长度且非 Unicode 的字符数据。n 必须是一个介于 1 和 8,000 之间的数值。存储大小为输入数据的字节的实际...
2018-07-17 10:15:34 227
原创 双调数组的查找
题目要求:/** * Created by ql on 2018/7/15. * 双调函数 * An array is bitonic if it consists of a strictly increasing sequence of keys immediately followed by * a strictly decreasing sequence of keys * Des...
2018-07-15 18:14:00 710 1
原创 Bug解决:Error creating document instance. Cause: org.xml.sax.SAXParseException
bug具体内容如下:org.xml.sax.SAXParseException; lineNumber: 354; columnNumber: 3; The element type "select" must be terminated by the matching end-tag "</select>".org.apache.ibatis.builder.BuilderExcep...
2018-07-14 11:41:42 13151 3
原创 二叉树遍历总结
这里只是整理好了代码。import java.util.Stack;/** * Created by ql on 2018/7/10. */class node{ public int value; public node left; public node right; public void node(int data){ this.v...
2018-07-10 17:16:02 403
原创 最短路径的问题----单源最短路径
算法老师在最短路径问题上讲了很多,在讲了贪心算法之后。紧接着讲最短路径,可以说是一脸懵逼。最近开始复习,总结一下。方法大约有这些。定义:最短路径即拥有最小权重的路径p;路径定义:p=<V0,V1,...,Vk>,其中当0<=i<k时,有(Vi,Vi+1)组成一条边。路径的权重:所有路径权重之和。加上权重的数学表示方式1.边存在权重的图:G(V,E,W),W是一个函数,作用于...
2018-07-09 21:13:22 7956
原创 股票最大收益问题+最大子数组之和问题
最近在复习算法考试,往年题目中有一些题目自己是之前不会的,整理一下,算是学习了。题目1:Given an array A[0...n-1]of numbers,the problem is to find 0<=i<=j<n,such that A[j]-A[i] is maximized(gain)Story:You learned what the stock price w...
2018-07-01 23:37:16 589
原创 每日一题6.30(准备看书了)
问题:Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white and blue.荷兰国旗问题。可以使用三路快排的分治思想,同样...
2018-07-01 00:15:37 130
原创 每日一题6.29
问题:Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length.Do not allocate extra space for another array, you must do this by mo...
2018-07-01 00:12:15 99
原创 每日一题6.28
问题:Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length.Do not allocate extra space for another array, you must do this by modify...
2018-07-01 00:05:14 147
原创 每日一题6.27
问题:Given an array nums and a value val, remove all instances of that value in-place and return the new length.Do not allocate extra space for another array, you must do this by modifying the input arr...
2018-07-01 00:01:15 133
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人