简单的HTTP推协议
1 介绍
1.1目的
本协议的初衷是提供一种HTTP客户端透明长连接的支持,在服务端连接大部分时间都是空闲的,也不会被中继传递。
1.2 一般性的说明
略
1.3 术语
本规范使用一系列的名词来指代协议中的碰到的对象。
服务器(server)
实现本协议的HTTP服务器。
客户端(client)
一个可以向HTTP服务器发起TCP/IP连接的程序。
...
分类:
其他好文 时间:
2014-08-21 15:05:54
阅读次数:
194
1148 - Mad Counting
PDF (English) Statistics Forum
Time Limit: 0.5 second(s) Memory Limit: 32 MB
Mob was hijacked by the mayor of the Town "TruthTown". Mayor wants Mob to count the total population...
分类:
其他好文 时间:
2014-08-21 11:34:55
阅读次数:
261
思路:
设输入的两个数分别为n和a,每一次所得到的数为update:
开始update=a,依次update分别为update*10+a,这样数据会超出范围,则update每次为update=(update*10+a)%n即可,
如果update=0,跳出循环;
只需证明:(update*10+a)%n=(update%n*10+a)%n即可;
...
分类:
其他好文 时间:
2014-08-21 09:53:43
阅读次数:
182
语言集成查询 (LINQ) 是 Visual Studio 2008 中引入的一组功能,可为 C# 和 Visual Basic 语言语法提供强大的查询功能。 LINQ 引入了标准易学的数据查询和更新模式,可以扩展该方法来支持任何类型的数据存储。 Visual Studio 包括 LINQ 提...
分类:
其他好文 时间:
2014-08-21 01:32:43
阅读次数:
190
Multi Paxos基于Basic Paxos,将原来2-Phase过程简化为了1-Phase,从而加快了提交速度。Multi Paxos要求在各个Proposer中有唯一的Leader,并由这个Leader唯一地提交value给各Acceptor进行表决,在系统中仅有一个L...
分类:
其他好文 时间:
2014-08-20 18:13:43
阅读次数:
298
server{listen80;server_namelocalhost;#charsetkoi8-r;#access_loglogs/host.access.logmain;location/{roothtml;indexindex.htmlindex.htm;location~.*\.(php|php5)?${fastcgi_passunix:/tmp/php-cgi.sock;fastcgi_indexindex.php;includefastcgi.conf;}auth_basic"Authorize..
分类:
其他好文 时间:
2014-08-20 14:21:52
阅读次数:
238
std::string?GenUuid()
{
boost::uuids::basic_random_generator<boost::mt19937>?gen;
boost::uuids::uuid?u?=?gen();
std::stringstream?ss;
ss?<<?u;
return?ss.str();
}...
分类:
其他好文 时间:
2014-08-20 12:42:52
阅读次数:
285
一、设置字体大小Window-->Preferences-->Gengeral-->Appearance-->Colors and Fonts--->Basic-->Text Font最舒服字体:Consolas 、Monaco 大小:14二、设置背景颜色豆沙绿Window-->...
分类:
系统相关 时间:
2014-08-20 12:22:42
阅读次数:
388
使用Eclipse的代码补全快捷键alt+/已经习惯了,但是IntelJIDEA中这个快捷键组合没有效果,那么我们来修改之,按ctrl+alt+s打开设置界面
之后在keymaps中选择Eclipse即可,那么下面就要来修改了,在右上角的搜索框中输入completion,在MainMenu中可以找到
选中Basic那一行,右击,选择Add
Keyboard Shortcut,在这个窗口...
分类:
其他好文 时间:
2014-08-20 01:26:36
阅读次数:
260
three basic data typestextnumberboolean变量var var_name; 用'='初始化变量var var_name = ini_value;const (不是所有浏览器都支持const)声明:const const_name = ini_value;nan: n...
分类:
编程语言 时间:
2014-08-19 23:55:55
阅读次数:
254