s********y 发帖数: 28 | 1 来自主题: JobHunting版 - utf-8 utf-8怎么count频率最高的字符的啊?
while (*p != 0)
{
if (*p & 0x80 == 0 || *p & 0xc0 == 0xc0)
++count;
++p;
}
这个可以count总数。 |
|
n**p 发帖数: 1150 | 2 while(s != NULL && *s != NULL)
{
if (*s & 0x80 == 0) {s++; continue;}
if (*s & 0xC0 == 0x80) return false;
char* t = s+1;
for(int bitmask = 0x40;
bitmask >0 && (*s & bitmask != 0);
bitmask /= 2, t++)
if (*t == NULL || (*t & 0xC0 != 0x80)) return false;
s = t + 1;
}
return true; |
|
w*s 发帖数: 7227 | 3 this is an embedded board,
if i nfs boot from /home/user1/fs, it boots fine.
Then i "sudo cp -Ra /home/user1/fs /home/wds",
then try to nfs boot from /home/wds/fs, it says
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available
partitions:
1f00 128 mtdblock0 (driver?)
1f01 1664 mtdblock1 (driver?)
1f02 256 mtdblock2 (driver?)
1f03 3072 mtdblock3 (driver?)
1f04 3072 mtdblock4 ... 阅读全帖 |
|
x*z 发帖数: 1010 | 4 ft,偶老不常看review,不过偶老原来工作就是负责benchmarking,performance
optimization,跟vendor compete world records之类的。现在工作角色变了,但是
还是有10~30%的分量。这个盘子现在已经快满了,不是做benchmarking的料了,随便
测了测(无优化),另外这个记错了一点,不是WD,是Maxtor Onetouch
root@moo:# df -i /dev/sde
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sde 110655152 521408 110133744 1% /media/bar
root@moo:# df -h /dev/sde
Filesystem Size Used Avail Use% Mounted on
/dev/sde 466G 440G 27G 95% /media/bar
root@moo:# d... 阅读全帖 |
|
c*********t 发帖数: 2921 | 5 有以下的statements:
int a=0x1234;
int b,c;
b=a[8:15];
c=a[15:8];
请问a[8:15]是指整数a的从bit8到bit15的值吗?
如果是的话b=0x3. c=0xc0. 对吗?
在哪里网站或哪本书有介绍这样提取一个整数的部分bits的值的介绍?
谢谢。 |
|