unsigned 既为非负数,用此类型可以增加数据长度! 例如如果 tinyint最大是127,那 tinyint unsigned 最大 就可以到 127 * 2 unsigned 属性只针对整型,而binary属性只用于char 和varchar。 类型 说明 tinyint 非常小的整...
分类:
数据库 时间:
2014-12-16 14:45:14
阅读次数:
178
使用ZeroMQ创建消息时的代码通常如下:
zmq_msg_tmsgName; //1
zmq_msg_init(&msgName); //2
这两条代码做了什么呢?
首先对第1行代码,在zmq.h中有如下定义:
typedef structzmq_msg_t {unsigned char _ [32];} zmq_msg_t;
what?消息体就这样定义...
分类:
其他好文 时间:
2014-12-16 08:50:36
阅读次数:
239
//ObjMgt.h
#ifndef __OBJMGT_H__
#define __OBJMGT_H__
int AddObject (unsigned int key1, unsigned int key2, unsigned int key3);
void DeleteObject (unsigned int key1, unsigned int key2, unsigned i...
分类:
其他好文 时间:
2014-12-15 21:50:45
阅读次数:
225
获取AVCaptureSession samplebuffer 一像素的 rgb值typedef unsigned char byte;typedef struct RGBPixel{ byte red, green, blue;} RGBPixel;- (void)captureOutput...
分类:
其他好文 时间:
2014-12-15 21:42:34
阅读次数:
249
Reverse bits of an unsigned integer.typedef unsigned int uint;uint swapBits(uint x, uint i, uint j){ uint lo = ((x >> j) & 1); uint hi = ((x >> ...
分类:
其他好文 时间:
2014-12-15 18:56:51
阅读次数:
154
题目1067:n的阶乘
时间限制:1 秒
内存限制:32 兆
特殊判题:否
提交:5666
解决:2141
题目描述:
输入一个整数n,输出n的阶乘
输入:
一个整数n(1
输出:n的阶乘
样例输入:
3
样例输出:
6
#include
unsigned long int a[2...
分类:
其他好文 时间:
2014-12-15 00:14:10
阅读次数:
276
//初始化随机种子 //timeval是个结构体,里边有俩个变量,一个是以秒为单位的,一个是以微妙为单位的 unsigned rand_seed = (unsigned)(now.tv_sec*1000 + now.tv_usec/1000); //都转化为毫秒 ...
分类:
其他好文 时间:
2014-12-14 22:30:25
阅读次数:
178
#include
#include "oj.h"
#include
using namespace std;
// 功能:获取第nValue1个月出生多少对兔子
// 输入: nValue1为正整数
// 输出:无
// 返回:第nValue1个月出生多少对兔子
//根据前几个月的结果可以推断出该函数满足f(n) = f(n-1) + f(n-2)
unsigned int GetBirth...
分类:
其他好文 时间:
2014-12-14 21:24:24
阅读次数:
261
#include
#include
#include
#include
#include "oj.h"
using namespace std;
// 功能:判断输入 nValue 是否为水仙花数
// 输入: nValue为正整数
// 输出:无
// 返回:如果输入为水仙花数,返回1,否则返回0
unsigned int IsDaffodilNum(unsi...
分类:
其他好文 时间:
2014-12-14 18:36:02
阅读次数:
201
1 /* 2 二进制乘法 3 */ 4 #include 5 #include 6 #define LEN 64 //因子二进制位数的两倍,32位乘法结果不会超过64位 7 8 int main() 9 {10 unsigned int a = 0x131313...
分类:
其他好文 时间:
2014-12-14 13:13:02
阅读次数:
266