本文提供一个完整的TCP Server实例,包括动态连接库、单元测试、验收测试、Winform模拟测试。供新手学习,还望老手多提意见。
分类:
编程语言 时间:
2014-08-02 09:57:13
阅读次数:
307
题目:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Have you thought about this?Here...
分类:
编程语言 时间:
2014-08-02 09:56:33
阅读次数:
249
几种常见的编码格式为什么要编码不知道大家有没有想过一个问题,那就是为什么要编码?我们能不能不编码?要回答这个问题必须要回到计算机是如何表示我们人类能够理解的符号的,这些符号也就是我们人类使用的语言。由于人类的语言有太多,因而表示这些语言的符号太多,无法用计算机中一个基本的存储单元—— byte 来表...
分类:
编程语言 时间:
2014-08-02 09:56:23
阅读次数:
297
题目:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.题解:这道题。。还有哪个roman to integer。。第一件事 就是先把r....
分类:
编程语言 时间:
2014-08-02 09:54:23
阅读次数:
314
题目:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1...
分类:
编程语言 时间:
2014-08-02 09:50:13
阅读次数:
232
题目:Given a string containing only digits, restore it by returning all possible valid IP address combinations.For example:Given "25525511135",return [....
分类:
编程语言 时间:
2014-08-02 09:49:53
阅读次数:
287
the Gemfire consultant add one more parameter to JVM -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.EPollSelectorProvider to be honest, I had no idea what it was. so I googled it. the key thin...
分类:
编程语言 时间:
2014-08-02 01:57:13
阅读次数:
235
本文涉及C++编程中表达式和运算的规范相关建议...
分类:
编程语言 时间:
2014-08-02 01:55:42
阅读次数:
218
/*
生产者/消费者通用模板
特点:
高性能:采用多线程,多队列平衡的信号量等待模型,有效减少锁等待
可调节:可以根据实际应用环境调整队列数,最多可支持64个队列
使用简单,一个构造函数,一个生产函数,一个消费函数。
*/
#ifndef PANDC_H
#define PANDC_H
#include
#include
#include
#include
using namespa...
分类:
编程语言 时间:
2014-08-02 01:55:22
阅读次数:
256
泛型编程与C++标准模板库:浅谈sort()排序函数...
分类:
编程语言 时间:
2014-08-02 01:54:12
阅读次数:
351
C++临时对象产生的场景:
1. 值传递 2. 函数返回 3. 后置++ 等
减少临时对象产生的方法:
1. 使用引用或指针传递
2. 避免隐式类型转换
3. 使用 += 代替 +
string x = a + b;
// 这里会产生保存a+b值的临时对象
string x(a); x += b; // 这样就不会产生临时对象
4. 使用前置++代替后置++...
分类:
编程语言 时间:
2014-08-02 01:53:52
阅读次数:
383
题目:Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.Each ....
分类:
编程语言 时间:
2014-08-02 01:48:12
阅读次数:
246
1.虚指针和虚函数表 1.1不含有任何数据成员或者虚函数的class或者struct大小为1,含有虚函数的对象在基地址部分有一个vptr,指向虚函数表,因此大小为4个字节。 1.2动态绑定的原理:假设派生类和基类存在覆盖的关系(基类中定义了虚函数),那么派生类在虚函数表中,会覆盖掉基类相应的虚函.....
分类:
编程语言 时间:
2014-08-02 01:47:42
阅读次数:
356
本文将介绍如何使用增强的catch 自动释放资源。
分类:
编程语言 时间:
2014-08-02 01:47:02
阅读次数:
195