一个单词单词字母交换,可得另一个单词,如army->mary,成为兄弟单词。提供一个单词,在字典中找到它的兄弟。描述数据结构和查询过程。#include #include #include using namespace std;void add(unsigned int count[],char ...
分类:
其他好文 时间:
2014-07-07 20:57:31
阅读次数:
244
#include #include #include #include class semaphore{unsigned int count_;boost::mutex mutex_;boost::condition_variable condition_;public:explicit sema....
分类:
其他好文 时间:
2014-07-01 22:03:34
阅读次数:
474
如下代码(支持windows与Linux)会以【16进制】【每行16字节】打印出一块内存的内容:void PrintBuffer(void* pBuff, unsigned int nLen){ if (NULL == pBuff || 0 == nLen) { retur...
分类:
其他好文 时间:
2014-07-01 20:28:28
阅读次数:
218
定义LCD相应寄存器的结构体struct lcd_regs { unsigned long lcdcon1; unsigned long lcdcon2; unsigned long lcdcon3; unsigned long lcd...
分类:
其他好文 时间:
2014-07-01 19:12:25
阅读次数:
204
long long unsigned int num = 20140701092715;在C语言中编译器会把没有小数的数值常量默认为整形,这条语句编译器会报警告: [root@localhost ~]# gcc -o test 1.c 1.c: In function ‘main’: 1.c...
分类:
编程语言 时间:
2014-07-01 18:56:09
阅读次数:
233
OVS中流表操作的理解关键在于这里哈希表的实现,引入的 flex_array方便了内存的管理,通过 hash&(桶数-1)可以随机的将一个元素定位到某一个桶中。
接下来是代码细节。
一. 核心数据结构
//流表
struct flow_table
{
struct flex_array
* buckets; //具体的流表项
unsigned...
分类:
其他好文 时间:
2014-07-01 11:09:12
阅读次数:
638
1、整型MySQL数据类型含义(有符号)tinyint(m)1个字节范围(-128~127)smallint(m)2个字节范围(-32768~32767)mediumint(m)3个字节范围(-8388608~8388607)int(m)4个字节范围(-2147483648~2147483647)bigint(m)8个字节范围(+-9.22*10的18次方)取值范围如果加了unsigned,则最大值..
分类:
数据库 时间:
2014-07-01 09:43:40
阅读次数:
206
Stage II过程分析
在Stage II中使用到了一些比较重要的数据结构,这里先对这些数据结构来进行下分析:
typedef struct global_data {
bd_t *bd;
unsigned long flags;
unsigned long baudrate;
unsigned long have_console; /* serial_init() was cal...
分类:
其他好文 时间:
2014-07-01 06:16:16
阅读次数:
371
数据表如下:CREATE TABLE IF NOT EXISTS `china` (`region_id` smallint(5) unsigned NOT NULL, `parent_id` smallint(5) unsigned NOT NULL DEFAULT '0', `region_na...
分类:
Web程序 时间:
2014-07-01 00:50:55
阅读次数:
255
本文分析的是llvm libc++的实现:http://libcxx.llvm.org/
class thread
thread类直接包装了一个pthread_t,在linux下实际是unsigned long int。
class thread
{
pthread_t __t_; id get_id() const _NOEXCEPT {return __t_;}
}
...
分类:
编程语言 时间:
2014-06-30 19:29:24
阅读次数:
257