参考自:http://www.cnblogs.com/skynet/archive/2010/12/12/1903949.html
1、Socket 简介
本地的进程间通信(IPC)有多种方法:
1)消息传递(PIPE、FIFO、消息队列等)
2)同步(互斥量、条件变量、读写锁、记录锁、信号量等)
3)共享内存(匿名的和具名的)
4)远程过程调用(Sol...
分类:
其他 时间:
2016-05-18 19:32:51
收藏:
0 评论:
0 赞:
0 阅读:
260
在前两节中,我们通过一个简单的例子从服务器端的角度简要的研究了twisted的源码。在本节,我们将通过另外一个例子,从客户端的角度研究twisted的相关源码,完整例子在这里下面是简化的代码:class PoetryProtocol(Protocol): poem = '' def dataReceived(self, data):
self.poem += data...
分类:
其他 时间:
2016-05-18 19:32:40
收藏:
0 评论:
0 赞:
0 阅读:
276
题目信息1091. Acute Stroke (30)时间限制400 ms
内存限制65536 kB
代码长度限制16000 B
One important factor to identify acute stroke (急性脑卒中) is the volume of the stroke core. Given the results of image analysis in which...
分类:
其他 时间:
2016-05-18 19:32:30
收藏:
0 评论:
0 赞:
0 阅读:
203
题目信息1087. All Roads Lead to Rome (30)时间限制200 ms
内存限制65536 kB
代码长度限制16000 B
Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with...
分类:
其他 时间:
2016-05-18 19:32:20
收藏:
0 评论:
0 赞:
0 阅读:
299
题目信息1089. Insert or Merge (25)时间限制200 ms
内存限制65536 kB
代码长度限制16000 BInsertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion so...
分类:
编程语言 时间:
2016-05-18 19:32:10
收藏:
0 评论:
0 赞:
0 阅读:
190
十六:IO操作
IO对象无拷贝和赋值,只能引用传递,并且不能是const
函数good() 所有错误位都没置位的情况下返回true;
fail() 一般用作流使用的条件(failbit,badbit)
eof()和bad()只表示特定的错误。
例如:将failbit和badbit复位,但eofbit不变
cin.clear(cin.rdstate() &~cin.fa...
分类:
编程语言 时间:
2016-05-18 19:32:00
收藏:
0 评论:
0 赞:
0 阅读:
259
题目信息1090. Highest Price in Supply Chain (25)时间限制200 ms
内存限制65536 kB
代码长度限制16000 B
A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)– everyone involved in moving a...
分类:
其他 时间:
2016-05-18 19:31:57
收藏:
0 评论:
0 赞:
0 阅读:
258
题目信息1092. To Buy or Not to Buy (20)时间限制100 ms
内存限制65536 kB
代码长度限制16000 B
Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were m...
分类:
其他 时间:
2016-05-18 19:31:42
收藏:
0 评论:
0 赞:
0 阅读:
237
一:
g++c1.cpp -o c1.exe -std=c++11
c++11,加入了int a = {10},的初始化形式,如果有精度损失,那么会有警告。
二:
对:const int引用= int //const 只是针对自己来说的
错:int 引用 = constint //不符合逻辑与语法,引用不是常量,说明可以改,但引用的却是常量,矛盾了。...
分类:
编程语言 时间:
2016-05-18 19:31:30
收藏:
0 评论:
0 赞:
0 阅读:
186
题目信息1093. Count PAT’s (25)时间限制120 ms
内存限制65536 kB
代码长度限制16000 B
The string APPAPT contains two PAT’s as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the secon...
分类:
其他 时间:
2016-05-18 19:31:20
收藏:
0 评论:
0 赞:
0 阅读:
229
湘大oj地址:http://202.197.224.59/OnlineJudge2/index.php/Problem/read/id/1086
菱形
时间限制:1000 ms | 内存限制:65536 KB
Description
小明现在是湘潭大学10级计算机系的学生。他的C语言学的还算可以,但是今天老师布置的一道课后作业题却把他难住了。题...
分类:
其他 时间:
2016-05-18 19:31:10
收藏:
0 评论:
0 赞:
0 阅读:
97
题目信息1094. The Largest Generation (25)时间限制200 ms
内存限制65536 kB
代码长度限制16000 B
A family hierarchy is usually presented by a pedigree tree where all the nodes on the same level belong to the same generat...
分类:
其他 时间:
2016-05-18 19:31:02
收藏:
0 评论:
0 赞:
0 阅读:
155
湘大oj题目地址:传送门
Cycloid
时间限制:1000 ms | 内存限制:65536 KB
Description
A cycloid is the curve traced by a point on the rim of a circular wheel as the wheel rolls along a straight li...
分类:
其他 时间:
2016-05-18 19:30:50
收藏:
0 评论:
0 赞:
0 阅读:
142
题目信息1095. Cars on Campus (30)时间限制220 ms
内存限制65536 kB
代码长度限制16000 B
Zhejiang University has 6 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the...
分类:
其他 时间:
2016-05-18 19:30:40
收藏:
0 评论:
0 赞:
0 阅读:
294
题目信息1101. Quick Sort (25)时间限制200 ms
内存限制65536 kB
代码长度限制16000 B
There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the...
分类:
其他 时间:
2016-05-18 19:30:31
收藏:
0 评论:
0 赞:
0 阅读:
301
题目信息1096. Consecutive Factors (20)时间限制400 ms
内存限制65536 kB
代码长度限制16000 B
Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored a...
分类:
其他 时间:
2016-05-18 19:30:20
收藏:
0 评论:
0 赞:
0 阅读:
218
题目信息1098. Insertion or Heap Sort (25)时间限制100 ms
内存限制65536 kB
代码长度限制16000 BAccording to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list...
分类:
编程语言 时间:
2016-05-18 19:30:10
收藏:
0 评论:
0 赞:
0 阅读:
171
题目信息1097. Deduplication on a Linked List (25)时间限制300 ms
内存限制65536 kB
代码长度限制16000 B
Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute value...
分类:
其他 时间:
2016-05-18 19:30:00
收藏:
0 评论:
0 赞:
0 阅读:
176
链接:http://ifeve.com/spring-interview-questions-and-answers/
原文:http://www.javacodegeeks.com/2014/05/spring-interview-questions-and-answers.html%20
什么是spring?
Spring 是个Java企业级应用的开源开发框架。Spring主要用来开发Java...
分类:
编程语言 时间:
2016-05-18 19:29:50
收藏:
0 评论:
0 赞:
0 阅读:
132
问题描述
输入:一个最多包含n个正整数的文件,每个数都小于n,其中n=107。如果在输入文件中有任何正数重复出现就是致命错误。没有其他数据与该正数相关联。
输出:按升序排列的输入正数的列表。
约束:最多有1MB的内存空间可用,有充足的磁盘存储空间可用。运行时间最多几分钟,运行时间为10秒就不需要进一步优化。
程序设计与实现概要:应用位图或位向量表示集合。可用一个10位长的字符...
分类:
编程语言 时间:
2016-05-18 19:29:40
收藏:
0 评论:
0 赞:
0 阅读:
167