The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of...
分类:
其他好文 时间:
2014-12-04 08:47:00
阅读次数:
168
HLSL的基本语法
1 数据类型
1.1 标量类型
1. bool: True or false .Note that the HLSL provides the true and false keywordslike in C++.
2. int: 32-bit signedinteger.
3. half: 16-bit-floatingpoint number.
4. flo...
分类:
其他好文 时间:
2014-12-03 23:26:12
阅读次数:
1711
POJ 2481 给出n个区间,第i个用\((x_i,y_i)\)表示,定义包含:i包含j等价于\(x_i\leq x_j\land y_j\leq y_i \land\lnot(x_i=x_j\land y_i=y_j)\),问对于每个区间,有多少个区间包含它。 BIT 做法:将区间排序,对所有i...
分类:
其他好文 时间:
2014-12-03 20:53:57
阅读次数:
226
39bits地址线,4K页时3级页表,64K页时2级页表。 In terms of MMU, it currently supports 39-bit address space for user and kernel (each) with 3-level page table and 4KB pages or 2-level page table and...
分类:
其他好文 时间:
2014-12-03 17:19:47
阅读次数:
190
1)、下载MongoDB http://downloads.mongodb.org/win32/mongodb-win32-i386-2.4.5.zip下载Windows 32-bit版本并解压缩,程序文件都在bin目录中,其它两个目录分别是C++调用是的头文件和库文件。bin目录中包含如下几个程序...
分类:
数据库 时间:
2014-12-03 17:09:20
阅读次数:
199
1.I2C协议 2条双向串行线,一条数据线SDA,一条时钟线SCL。 SDA传输数据是大端传输,每次传输8bit,即一字节。 支持多主控(multimastering),任何时间点只能有一个主控。 总线上每个设备都有自己的一个addr,共7个bit,广播地址全0. 系统中可能有多个同种芯片,为此ad...
分类:
其他好文 时间:
2014-12-03 14:09:29
阅读次数:
329
最近在看mysql优化视频及各方帖子,其中有建议为字段选取合适的整型类型,在看int、bigint、smallint和tinyint的选取的时候有点迷惑,刚刚弄清楚,这里分享一下这里先得说下基础知识,1字节(Byte)占8个位(bit),1个位表示一个二进制的0或者1,1个字节能表示最大的整数是255,怎..
分类:
数据库 时间:
2014-12-02 17:36:20
阅读次数:
142
直接定义这样的函数时,Python会报错:
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:16:31) [MSC v.1600 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> def foo(p1, p...
分类:
编程语言 时间:
2014-12-01 22:27:21
阅读次数:
1049
1、 打开Nodejs官网http://www.nodejs.org/,点“DOWNLOADS”,点64-bit下载“node-v0.10.33-x64.msi”。2、 下载好后,双击“node-v0.10.33-x64.msi”,按照默认选项安装Nodejs,默认安装路径为:C:\Program ...
分类:
Windows程序 时间:
2014-12-01 22:19:29
阅读次数:
1744
1.bit电脑中最小的计量单位,比如0或1代表一个bit,简称“位”2.byte电脑存储的基本单位。因为上面的bit小弟太小了,所以产生了byte。由8个bit存成了byte,最小为0最大为11111111,一个byte能存储一个字一些问题1.一个汉字占2个byte其实是由unicode字符集决定的...
分类:
其他好文 时间:
2014-12-01 22:11:43
阅读次数:
176