添加记录: -- 增 -- INSERT[INTO] tb_name VALUES(值...) -- 先创建user表 CREATE TABLE user( id TINYINT UNSIGNED AUTO_INCREMENT KEY, username VARCHAR(20) NOT NULL U... ...
分类:
数据库 时间:
2016-08-04 16:18:01
阅读次数:
203
原文在 http://bbs.pediy.com/archive/index.php?t-97663.html,但是觉得这篇文章非常好,我抄下来作我笔记用 一、解析X509证书 1.从磁盘上的证书文件中读取证书数据 unsigned char* pbX509Data; // 证书数据 unsigne ...
题目大意: 有一些字符串,求其中两个等长且恰好只有一位不同的字符串的对数。 思路: Hash大法好!正着倒着各来一遍(底数不同),之后枚举不同的那一位,前后两段拼起来之后为了有区分前面一部分再乘一个数。模数用unsigned long long自然溢出。 代码: ...
分类:
其他好文 时间:
2016-08-03 20:15:53
阅读次数:
135
突然想到了计算机的补码,现在利用这个题目回顾一下相关知识点 unsigned char ch = -1; int val = ch; val的最终值是255; 换算成二进制一下,-1的源码:1000 0001,反码:1111 1110 ,负数在计算机中是以补码形式存储的,-1的补码:1111 111 ...
分类:
其他好文 时间:
2016-08-03 12:01:19
阅读次数:
122
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 ...
分类:
其他好文 时间:
2016-08-02 01:07:46
阅读次数:
122
Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), retur ...
分类:
其他好文 时间:
2016-08-02 01:03:34
阅读次数:
149
#include
#include
static unsigned int y = 1U;
unsigned int rand_r(unsigned int *seedp)
{
*seedp ^= (*seedp <> 17);
*seedp ^= (*seedp <<...
分类:
编程语言 时间:
2016-08-01 15:57:11
阅读次数:
373
Runtime 首先需要导入<objc/runtime.h> 一、Class 获取类的成员变量 Ivar *class_copyIvarList(Class cls,int *outCount); unsigned int count; Ivar *ivars = class_copyIvarLis ...
分类:
其他好文 时间:
2016-08-01 15:20:12
阅读次数:
169
1 建表 drop table if exists p40_member;create table p40_member( id mediumint unsigned not null auto_increment comment 'Id', username varchar(30) not nul ...
分类:
其他好文 时间:
2016-08-01 00:18:13
阅读次数:
1004
上面代码输出结果是:2,5 sizeof:是一个运算符,类型结果为size_t,在头文件中typedef为unsigned int,值通常在编译时计算好,参数类型可以是数组、指针、类型、对象,函数等。注意对齐问题,要以最长类型计算,得出占用字节的大小。 strlen:是一个函数,只能用char*做参 ...
分类:
移动开发 时间:
2016-07-31 17:49:46
阅读次数:
159