在JAVA中有如下代码:
1 2 3 4 5 6 7 8 9 10 |
public class Test { static { _i = 10; } public static int _i; public static void main(String[] args) { System.out.println(_i); } } |
&n …
DevOps
在JAVA中有如下代码:
1 2 3 4 5 6 7 8 9 10 |
public class Test { static { _i = 10; } public static int _i; public static void main(String[] args) { System.out.println(_i); } } |
&n …
【转载】http://hj149.javaeye.com/blog/505237 hasOwnProperty …
测试目的: 浏览器最多允许的cookie的个数是多少?子域与父域之间的关系? 实验 …
缘起 localstorage 以chrome为例,localstorage的存储 …
一、 http代理服务器代理https请求(这个就是http隧道吧) 1) 打开连接 CONNECT pass …
1. -k 参数 禁止memcached使用swap; 参考资料: http://blog.csdn.net/ …
缘起 pc上的网页元素调试的软件很多,用起来也很方便,比如: firebug/IE的开发者工具/chrome的 …
Windows平台下 如果以“文本”方式打开文件,当读取文件的时候,系统会将所有的”/r/n …
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
#include <iostream> #include <fstream> using namespace std; int dump(ifstream *, bool dump = false); int main(int ac, char** av) { string filename = "activeuser.bin"; time_t t = time(NULL); if (ac > 1) { filename = string(av[1]); } ifstream in("n.txt"); if (!in) { cout << "open file fail" <<endl; } cout << "count:" << dump(&in, false) <<endl; cout << "use time:" << time(NULL) - t << endl; in.close(); return 0; } int dump(ifstream *in, bool dump) { unsigned char* ch = new unsigned char[8]; int i = 0, j = 0, pos = 0, cnt = 0; char c; while (i < 8) { *(ch+i) = ('\x01' << (7 - i)); //cout << *(ch + i) << endl; //printf("%d\n", *(ch+i)); i++; } while(!in->eof()) { *in >> c; j = 0; while (j < 8) { if ((ch[j] & c) == ch[j]) { cnt++; if (dump) { cout << pos * 8 + j << endl; } } j++; } pos++; } return cnt; } |
http://fallabs.com/tokyocabinet/spex-en.html#fil …