#ifndef RB_TREE_H#define RB_TREE_Hconst int BLACK = -1;const int RED = 1;static int number1 = 0; //////用于统计插入的各种情况次数的static int number2 = 0;static in....
分类:
编程语言 时间:
2015-11-09 12:45:59
阅读次数:
326
在vc中实现获取汉字拼音的首字母void GetFirstLetter(CString strName, CString& strFirstLetter){ TBYTE ucHigh, ucLow; int nCode; CString strRet; strFirstLetter.Empty();...
分类:
其他好文 时间:
2015-11-09 12:36:06
阅读次数:
275
TcpClient 在两种情况下会自动重连。1. Connector::connect 返回的 error 中需要重连;2. TcpClient::removeConnection 中判断需要重连;最终都会调用 Connector::retryvoid Connector::retry(int so...
分类:
其他好文 时间:
2015-11-09 12:31:02
阅读次数:
227
1、Arrays类概述 ·针对数组进行操作的工具类。 ·提供了排序,查找等功能。2、成员方法 ·public static String toString(int[] a):in[] a可以改为其他类型的数组,把数组转成字符串 ·public static void sort(int[] a...
分类:
编程语言 时间:
2015-11-09 12:27:41
阅读次数:
295
MYSQL中TIMESTAMP类型可以设定默认值,就像其他类型一样。 表:——————————————————————————————————————t1 CREATE TABLE `t1` ( `p_c` int(11) NOT NULL, `p_time` timestamp NOT NULL ...
分类:
数据库 时间:
2015-11-09 12:26:08
阅读次数:
288
For循环案例1. 创建a表,数据如下: create table a( id int, name varchar(30)IdName1关羽500张飞1000赵云100马超200黄忠2.创建b表,现要求将a表数据循环插入到b表,每次循环插入一条数据,显示结果如下:IdName1关羽500张飞100....
分类:
数据库 时间:
2015-11-09 12:21:44
阅读次数:
240
map即一个键值对应的数组,可以用键而不仅仅是数字作为索引。初始化:map mapOfVec; 新建了一个string为键int为值的map可以使用mapOfVec[“键”] == “值” 来进行赋值mapOfVec.count(k) 方法返回 Key为 k的元素个数,若无则返回0mapOfVec....
分类:
编程语言 时间:
2015-11-09 12:10:14
阅读次数:
204
文章来源:http://blog.csdn.net/doupei2006/article/details/7949077(一)利用外键实现级联删除1、先建立测试数据库CREATE TABLE `roottb` ( `id` INT(11) UNSIGNED AUTO_INCREMENT NOT N....
分类:
数据库 时间:
2015-11-09 10:45:00
阅读次数:
315
先看看下面的例子:public class ThreadTest { public static void main(String[] args) { final Counter counter = new Counter(); for (int i = 0; i ...
分类:
其他好文 时间:
2015-11-09 10:39:51
阅读次数:
273
prim方法:先求过一遍prim,同时标记使用过得边。然后同时记录任意2点间的最大值。每次加入一条新的边,会产生环,删去环中的最大值即可。#include#include#define INF 99999999const int maxn = 110;int map[maxn][maxn],vis[...
分类:
其他好文 时间:
2015-11-09 01:39:21
阅读次数:
190