- 博客(0)
- 资源 (11)
- 收藏
- 关注
word进行文件版本控制的宏代码(原创)
自己写的一段宏代码,可以实现将word 文件命名为:文件名_YYYY_MM_DD_V1.0.docx(word2003或2007或2010),以及保存新版本,即保存后,原文件自动移动到当前目录的历史版本文件夹(若没有,可自动新建),最新版本保存在当前文件夹内,以及接收他人转发的文件时刻根据填写对话框,保存为:文件名(来自xxx)_YYYY_MM_DD_V1.0.doc(文件名和收到日期为默认,弹出对话框时可修改)。宏代码加入后,可在word中将此三个函数设置为快捷键,本人设置的是新建ctrl+q,新版本ctrl+w,保存转发ctrl+e。
可以将代码直接粘到word宏编辑界面中保存即可。
2014-03-18
喝酒玩的游戏(789)
平时和朋友们喝酒,总玩的一个游戏,后来就写到手机上了。玩法:两个色子,一个令杯。
每个人轮流摇色子,数字为7就添酒,为8就喝一半,为9就喝完。两个数字一样,让谁喝就谁喝!
2010-02-24
实现java3d的即时刷新技术
实现java3d的即时刷新技术
private Geometry createGeometry() {
int nx = 21 * 2 - 1;
int ny = 21 * 2 - 1;
Point3f coords[] = new Point3f[nx * ny];
float z;
int count = 0;
for (float y = -10f; y <= 10f; y += 0.5f) {
for (float x = -10f; x 0), lim (sin(n) / n) --> 1
} else {
double r = Math.sqrt(x * x + y * y);
z = (float) (Math.sin(r) / r);
}
coords[count++] = new Point3f(x / 10f, y / 10f, z);
}
}
int[] indices = new int[(nx - 1) * (ny - 1) * 4];
count = 0;
for (int y = 0, endY = ny - 1; y < endY; y++) {
for (int x = 0, endX = nx - 1; x < endX; x++) {
int v = nx * y + x;
indices[count++] = v;
indices[count++] = v + 1;
v += nx;
indices[count++] = v + 1;
indices[count++] = v;
}
}
IndexedQuadArray iqa = new IndexedQuadArray(coords.length, IndexedQuadArray.COORDINATES, indices.length);
iqa.setCoordinates(0, coords);
iqa.setCoordinateIndices(0, indices);
return iqa;
}
2009-06-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人