上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 33 下一页
  2017年3月10日
摘要: [cpp] view plain copy #include <stdio.h> #include <string.h> #include <iostream> using namespace std; //////////////////////////////////////////////// 阅读全文
posted @ 2017-03-10 19:35 baraka 阅读(21538) 评论(1) 推荐(0) 编辑
摘要: unsigned char bcd[13]; ...... string bcdstr; for(int i=0;i < 12;i++) { bcdstr=FormatString("%s0x%.2x",bcdstr.c_str(),bcd[i]); } 阅读全文
posted @ 2017-03-10 16:28 baraka 阅读(640) 评论(0) 推荐(0) 编辑
摘要: [cpp] view plain copy [cpp] view plain copy [cpp] view plain copy #include <assert.h> #include "utils.h" //基于查表实现BCD与Ascii之间的转换 static uint8 bcd2ascii 阅读全文
posted @ 2017-03-10 15:28 baraka 阅读(4128) 评论(0) 推荐(0) 编辑
摘要: 数据移位运算符,左移几位,如:x=i<<4;就是将i的值左移4位(放大2的4次方)后,赋给x,若i=2,则X=32。 阅读全文
posted @ 2017-03-10 14:27 baraka 阅读(306) 评论(0) 推荐(0) 编辑
摘要: __sync_fetch_and_add系列一共有十二个函数,有加/减/与/或/异或/等函数的原子性操作函数,__sync_fetch_and_add,顾名思义,先fetch,然后自加,返回的是自加以前的值。以count = 4为例,调用__sync_fetch_and_add(&count,1), 阅读全文
posted @ 2017-03-10 11:54 baraka 阅读(366) 评论(0) 推荐(0) 编辑
摘要: volatile 影响编译器编译的结果,指出,volatile 变量是随时可能发生变化的,与volatile变量有关的运算,不要进行编译优化,以免出错,(VC++ 在产生release版可执行码时会进行编译优化,加volatile关键字的变量有关的运算,将不进行编译优化。)。 例如: volatil 阅读全文
posted @ 2017-03-10 11:33 baraka 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 如果k是偶数,则使k=k+1;若k是奇数,则使k=k-1. 阅读全文
posted @ 2017-03-10 11:32 baraka 阅读(565) 评论(0) 推荐(1) 编辑
  2017年3月6日
摘要: ftp 7.7.6.201 21121 name:aaa password:123456 阅读全文
posted @ 2017-03-06 17:52 baraka 阅读(109) 评论(0) 推荐(0) 编辑
  2017年3月1日
摘要: ldd text查看依赖库 阅读全文
posted @ 2017-03-01 16:21 baraka 阅读(292) 评论(0) 推荐(0) 编辑
  2017年2月22日
摘要: console-consumer can't rebalance after 4 retries 解决方案:kafka0.9版本换成1.0版本 究竟是怎么回事我也不知道 阅读全文
posted @ 2017-02-22 19:03 baraka 阅读(1299) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19 20 21 22 23 ··· 33 下一页