send函数 int send( SOCKET s, const char FAR *buf, int len, int flags ); 不论是客户还是server应用程序都用send函数来向TCP连接的还有一端发送数据。客户程序一般用send函数向server发送请求,而server则通经常使用...
分类:
其他好文 时间:
2014-07-16 19:01:38
阅读次数:
192
啊 真无语 ~这题 一读完 就有感觉是 记忆化搜索 但就是一下子写不出来 =-=后来参考了别人的代码 发现还是有模糊的地方好好记住就是了 ~ touch me 1 #include 2 #include 3 using namespace std; 4 5 const int siz...
分类:
其他好文 时间:
2014-07-16 18:55:30
阅读次数:
160
/* Convert a UTF-8 string into a UCS-2 array. */void tcstrutftoucs(const char *str, uint16_t *ary, int *np){ assert(str && ary && np); const unsigne.....
分类:
其他好文 时间:
2014-07-16 17:58:24
阅读次数:
217
比较C#中的readonly与constC#中有两种常量类型,分别为readonly(运行时常量)[read-run]与const(编译时常量)[const-compile],本文将就这两种类型的不同特性进行比较并说明各自的适用场景。工作原理 readonly为运行时常量,程序运行时进行赋值,赋值完...
分类:
其他好文 时间:
2014-07-16 17:55:52
阅读次数:
179
--创建表CREATE [GLOBAL TEMPORARY] TABLE table_name(coloum_name TYPE [CONSTRAINT constraint_def DEFAULT default_exp][,coloum_name TYPE [CONSTRAINT const.....
分类:
数据库 时间:
2014-07-16 17:50:53
阅读次数:
394
什么是匿名Service?凡是没有到ServiceManager上注册的Service,都是匿名Service。
还是拿上一篇的例子来举例,看代码:
status_t MediaPlayer::setDataSource(int fd, int64_t offset, int64_t length)
{
status_t err = UNKNOWN_ERROR;
const s...
分类:
移动开发 时间:
2014-07-16 17:17:32
阅读次数:
379
函数原型:
char *strpbrk( const char *string, const char *strCharSet );
wchar_t *wcspbrk( const wchar_t *string, const wchar_t *strCharSet );
char * strpbrk(const char * cs,const char * ct)
{
const...
分类:
其他好文 时间:
2014-07-16 11:00:17
阅读次数:
176
点击打开链接
题意:有一个池塘因为下雨,通过修通渠道来排水,怎么排的水最多?
解析:经典最大流,通过改变容量,来减少流量的使用,实现了空间优化
#include
#include
#include
#include
#include
using namespace std;
const int maxn = 1005;
#define INF 0xfffffff
int n, m, u...
分类:
其他好文 时间:
2014-07-16 10:55:10
阅读次数:
192
/*
* poj1251-- Kruskal
* date 2014/7/15
* state AC
*/
#include
#include
#include
#include
#include
using namespace std;
int const MAXN=30+100;
int u[MAXN];
int v[MAXN];
int w[MAXN+50];
int p[...
分类:
其他好文 时间:
2014-07-16 10:34:41
阅读次数:
180
点击打开链接
题意:某人想实现太空旅行,可以通过空洞实现,而它们的连通方式就是一张n * n的矩阵;现在有一种武器,可以一次性消灭它的一行或者一列(意思就是相当于留下一条可行路)。
解析:利用匈牙利算法实现,二分图匹配
#include
#include
#include>
using namespace std;
const int maxn = 1005;
int mapp[ max...
分类:
其他好文 时间:
2014-07-16 09:11:30
阅读次数:
190