码迷,mamicode.com
首页 >  
搜索关键字:unsigned    ( 4409个结果)
memcmp实现方式之一
实现方式: int?ho_memcmp(const?void?*s1,?const?void?*s2,?size_t?n)?{ ????unsigned?char?*p1,?*p2; ????p1?=?(unsigned?char?*)s1; ????p2?=?(unsigned?char?*)s2; ????...
分类:其他好文   时间:2015-03-17 08:12:51    阅读次数:115
rand()和srand()GetTickCount函数用法
标准库(被包含于中)提供两个帮助生成伪随机数的函数:函数一:int rand(void);从srand (seed)中指定的seed开始,返回一个[seed, RAND_MAX(0x7fff))间的随机整数。函数二:void srand(unsigned seed);参数seed是rand()的种子...
分类:其他好文   时间:2015-03-17 00:40:32    阅读次数:206
[LeetCode] Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 00111001011110...
分类:其他好文   时间:2015-03-16 23:16:55    阅读次数:331
[LeetCode] Number of 1 Bits
Write a function that takes an unsigned integer and returns the number of ’1’ bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11’ has binary representation 0000000000000...
分类:其他好文   时间:2015-03-16 23:09:57    阅读次数:195
图像处理编程中常见问题
想不到今天会被一个自己早就已经知道的问题绊了一晚上!!!(opencv中图像数据的存储,依据不同的输入图像尺寸会进行字节补齐,所以每行占用的字节数有待商榷)图像编程中的常见问题:1. 图像数据使用实际范围是unsigned char (0~255),但是在opencv的IplImage的imageD...
分类:其他好文   时间:2015-03-16 22:53:50    阅读次数:218
51系列小型操作系统精髓 简单实现6 C语言版待改进
#include "STC12C5A.H"#define TIMER_RELOAD() {TL0=0x00;TH0=0xC4;}//使能T/C初始10ms#define MAX_TASKS 8 //任务槽最大个数.unsigned char idata task_stack[MAX_TASKS][2...
分类:编程语言   时间:2015-03-16 21:09:29    阅读次数:163
裸机寄存器操作
贴个裸机扫盲,以防哪天被花盆砸中,记忆全无。(纯水贴,,活着) //1 mode config #define ON 0x0 //2 port register define #define rGPBCON (* (volatile unsigned *) 0x56000010) // Port B control, from datasheet //3 prt init void...
分类:其他好文   时间:2015-03-16 19:25:16    阅读次数:118
【iOS开发】Foundation框架的总结
第一种:结构体 1》范围 NSRange等价于CGRange typedef struct _NSRange { unsigned int location; unsigned int length; } NSRange; 使用较多的是CGRangeMake()方法; 2》几何数据 struct CGPoint { float x; float y; }; s...
分类:移动开发   时间:2015-03-16 19:21:54    阅读次数:131
What does this bit-manipulating function do?
http://stackoverflow.com/questions/8637142/what-does-this-bit-manipulating-function-dounsigned long ccNextPOT(unsigned long x){ x = x - 1; x = x...
分类:其他好文   时间:2015-03-16 15:58:34    阅读次数:168
190. Reverse Bits Leetcode Python
Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 001110010...
分类:编程语言   时间:2015-03-16 14:40:54    阅读次数:156
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!