发布时间:2014-06-21 16:59:56
Reversing the bits in an integer x is somewhat painful, but here's a SWAR algorithm for a 32-bit value:unsigned intreverse(register unsigned int x){x = (((x & 0xaaaaaaaa) >> 1) | ((x & 0x55555555) << 1));x = (((x & 0xcccccccc) >> 2) | ((x & 0x33333333) << 2));x = (((x & 0xf0f0f.........【阅读全文】
发布时间:2014-03-28 18:37:50
1、Shell版12#获取当前脚本所在绝对路径cur_dir=$(cd "$(dirname "$0")"; pwd)2、C语言版方法一:用realpath函数。这种方.........【阅读全文】