- 博客(7)
- 资源 (6)
- 收藏
- 关注
转载 gettimeofday
#include #include #include #include int main(void){ char buffer[30];
2009-11-29 12:26:00 854
转载 哈弗大学 图书馆 管训
1.现在睡觉的话会做梦而现在学习的话会让梦实现This moment will nap, you will have a dream; But this moment study,you will interpret a dream.2.我无所事事地度过的今天是昨天死去的人们所奢望的明天I leave uncultivated today, was precisely y
2009-11-28 21:43:00 908
原创 自己写的 container_of & offset_of 的原理
struct A{ int c; char b;} a_st;int main(){ char* t = &a_st.b; a_st.c = 9; struct A* pA = (struct A*)((char*)t - &((struct A*)(0))->b); pr
2009-11-21 11:54:00 980
原创 计算循环使用的数组的index
通常我们会使用一个数组 来buffer一些数据。这个数组时循环利用的。 那么这个index 就是要计算出来的了。 这里列出一个比较快的方法。 /* modulo inc/dec, bound = 2^k */#define MODDEC_POW2(x, bound) (((x) - 1) & ((bound) - 1))#define MODINC_POW2(x, bo
2009-11-18 10:54:00 1160
原创 Random Numbers in Linux
------------------------------------------------------------#include #include #include #include #include #include "head.h" #define RANG 3600.0 int m
2009-11-17 08:47:00 897
原创 Hello World(Java) in Eclipse
第一步:新建Java项目 选择“File→New→Project...”,选择“Java Project”,点击“Next”,便打开了“New JavaProject”向导。在“Project name”中填入“HelloWorld”,不需要进行其他设置,直接左击“Finish”按钮。 第二步:新建HelloWorldApp类 选择“File→New→Class”,在“
2009-11-11 22:27:00 1114
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人