练习 8.3: 在netcat3例子中,conn虽然是一个interface类型的值,但是其底层真实类型是*net.TCPConn,代表一个TCP连接。一个TCP连接有读和写两个部分,可以使用CloseRead和CloseWrite方法分别关闭它们。修改netcat3的主goroutine代码,只关 ...
分类:
编程语言 时间:
2018-04-29 13:28:21
阅读次数:
175
一,准备工作 1,netty-all-4.1.5.Final.jar(官网下载) 2,eclipse 二,步骤概要 1,服务器开发 (1),创建Server类 该类是程序的主入口,有main方法,服务器开启也是在此执行。 该类主要是提供了channel链接,绑定了端口。 该类需要new一个Inita ...
分类:
Web程序 时间:
2018-04-04 18:13:29
阅读次数:
266
随着移动互联网的普及,现在手机微信应用也越来越被依赖,说到微信那就不得不说其中的一项互动功能-“微信运动”。他不仅可以记录你当天的运动量,还可以与好友来一场“激烈”的PK以争夺唯一的运动封面展示权,但是问题又来了,如果我们每天上班没办法也没时间走那么多步数,难道我们就只能被沦为loser了吗? 答案 ...
分类:
微信 时间:
2018-04-02 20:20:58
阅读次数:
13485
List storeAnimation; public void Awake() { storeAnimation = new List(); storeAnimation.Clear(); } private void Update() { //1. 获取鼠标点击位置 //创建射线;从摄像机发射一... ...
分类:
编程语言 时间:
2018-03-30 21:50:23
阅读次数:
189
n people are standing in a line to play table tennis. At first, the first two players in the line play a game. Then the loser goes to the end of the l ...
分类:
其他好文 时间:
2018-03-04 22:54:24
阅读次数:
130
博客转载自:http://blog.csdn.net/Loser__Wang/article/details/51811347 本文目的在于记录如何使用MATLAB做摄像机标定,并通过opencv进行校正后的显示。 首先关于校正的基本知识通过OpenCV官网的介绍即可简单了解: http://doc ...
分类:
其他好文 时间:
2018-02-26 11:27:24
阅读次数:
810
As iron sharpens iron, so a friend sharpens a friend. 铁磨铁,可以磨砺出刀刃,朋友相交,亦应如此。 When making friends with others, please be a little more careful. Hold yo ...
分类:
其他好文 时间:
2018-02-25 20:44:30
阅读次数:
225
题意 一个人在数轴上走,每秒1/2概率留在原地,1/4概率前进1,1/4概率后退1。开始在0,问t秒后在位置p的概率。 题解 当时算了一个长式子过的。小火车给了一个很强的解法。将每一秒拆成两个时刻,那么原问题等价于每个时刻1/2概率前进1/2,1/2概率后退1/2。那么问题就变成了在2t时刻在位置p ...
分类:
其他好文 时间:
2018-02-11 14:40:29
阅读次数:
151
这次开发支付对帐时,持久化对帐数据时线上突然出现下面这个死锁. ### Error updating database. Cause: com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException: Deadlock found whe ...
分类:
数据库 时间:
2018-01-29 16:01:55
阅读次数:
338
1.redis基础类 package com.qlchat.component.redis.template; import javax.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory... ...
分类:
编程语言 时间:
2018-01-24 12:35:35
阅读次数:
225