Given n non-negative integers a1, a2,
..., an, where each represents a point at coordinate (i, ai). n vertical
lines are drawn such that the two endpoints of line i is at (i, ai) and (i,
0). Fin...
分类:
其他好文 时间:
2016-05-12 14:36:17
阅读次数:
134
/** * 数据库操作助手类 */ public class DatabaseHelper { private static final Logger LOGGER = LoggerFactory.getLogger(DatabaseHelper.class); private static fin ...
分类:
数据库 时间:
2016-05-11 18:12:19
阅读次数:
410
public class AuthCode { public static final int AUTHCODE_LENTH = 5;//验证码的长度 public static final int SINGLECODE_WIDTH = 15;//单个验证码的宽度 public static fin ...
分类:
其他好文 时间:
2016-05-09 22:10:33
阅读次数:
264
一、ActionSupport 为了让用户开发的Action类更加规范,Struts2提供了一个Action接口,这个接口定义了Struts2的Action处理类应该实现的规范。下面是标准Action接口的代码: public interface Action { public static fin... ...
分类:
其他好文 时间:
2016-05-08 16:44:48
阅读次数:
217
TCP连接需三次握手才能建立,断开连接则需要四次握手。 客户端TCP状态迁移: CLOSED->SYN_SENT->ESTABLISHED->FIN_WAIT_1->FIN_WAIT_2->TIME_WAIT->CLOSED 服务器TCP状态迁移: CLOSED->LISTEN->SYN收到->ES ...
分类:
其他好文 时间:
2016-05-08 01:09:59
阅读次数:
351
Description Description A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.You are to fin ...
分类:
其他好文 时间:
2016-05-07 18:05:15
阅读次数:
147
原文链接:http://www.jb51.net/LINUXjishu/88971.html 说明:/home目录里面有data目录,data目录里面有a、b、c、d、e五个目录,现在要把data目录里面除过e目录之外的所有目录拷贝到/bak目录中方法一:终端命令行下执行以下命令cp -R `fin ...
分类:
系统相关 时间:
2016-05-02 11:45:22
阅读次数:
166
TCP三次握手所谓三次握手是建立一个TCP连接时,需要客户端与服务端发送3个包。位码即tcp标志位,有6种标示:SYN(synchronous建立联机)ACK(acknowledgement确认)PSH(push传送)FIN(finish结束)RST(reset重置)URG(urgent紧急)Sequencenumber(顺序号码)Acknowledgenumber(确认号码)第..
分类:
其他好文 时间:
2016-04-22 16:53:45
阅读次数:
215
通常recv有几种返回值 1.==0 表示收到FIN包, 因为FIN包,是状态为标记为FIN的空包,没有携带数据,所以recv的长度为0 2.>0 表示收到了数据, 但是有没有收完,是不知道的 3.<0 1) == EAGAIN 表示接收缓冲区中已经没数据了,需要暂停下,业务程序需要检查下包的完整性 ...
分类:
其他好文 时间:
2016-04-22 16:08:31
阅读次数:
199
前些天,一堆人在 TCPCopy 社区里闲扯蛋,有人提了一个问题:FIN_WAIT1 能持续多久?引发了一场讨论,期间我得到斌哥和多位朋友的点化,受益良多。 让我们热热身,通过一张旧图来回忆一下 TCP 关闭连接时的情况: TCP Close TCP Close 看图可知,主动关闭的一方发出 FIN ...
分类:
其他好文 时间:
2016-04-19 16:54:15
阅读次数:
267