可以在这里下载:http://vimcolorschemetest.googlecode.com/svn/colors/desertEx.vim
使用方法:
将文件下载到vim目录下的colors。然后在vimrc里面加入colo desertEx就好了。
感觉比默认的desert清爽一点。
效果图:
(more…)
Tags: vim, 配色方案
I call it vertion 1.0:)
It create a ps file which can be opened by Gsview.
Here it is:
Class of Visual Tool
- class Draw {
- private:
- FILE * file;
- P base;
- double rate;
- void moveto(P a) {
- fprintf(file, "%f %f moveto\n", a.x, a.y);
- }
- void lineto(P a) {
- fprintf(file, "%f %f lineto\n", a.x, a.y);
- }
- void show(const char *s) {
- fprintf(file, "(%s) show\n", s);
- }
- P update(P a) {
- return (a + base) * rate;
- }
- void done() {
- fprintf(file, "stroke\nshowpage\n");
- fclose(file);
- }
- public:
- Draw (const char * filename, double minx, double maxx, double miny, double maxy) {
- //file name must be *.ps. The next four arguments form the boundary of the plane.
- base = P(-minx, -miny);
- rate = min(499 / (maxx – minx), 499 / (maxy – miny));
- file = fopen(filename, "w");
- fprintf(file, "/Times-Roman findfont\n");
- fprintf(file, "20 scalefont\n");
- fprintf(file, "setfont\n");
- fprintf(file, "newpath\n");
- }
- ~Draw() {
- done();
- }
- void draw_segment(P a, P b) { //draw a segment.
- moveto(update(a));
- lineto(update(b));
- }
- void draw_line(P a, P b) {//draw a line
- a = update(a);
- b = update(b);
- moveto(a + (b – a).trunc(1000));
- lineto(b + (a – b).trunc(1000));
- }
- void draw_arc(P mid, double r = -1, double deg1 = -180, double deg2 = 180) {
- //draw arc; mid is the center of the circle. r is the radius.
- //deg1, deg2 are the range of the angle. (counter-clockwise).
- //if you want to draw a point just call draw_arc(mid),
- // and if you want to draw a circle, call draw(mid, r).
- r = r == -1? 1: r * rate;
- mid = update(mid);
- moveto(mid + P(cos(deg1 * pi / 180), sin(deg1 * pi / 180)) * r);
- fprintf(file, "%f %f %f %f %f arc\n", mid.x, mid.y, r, deg1, deg2);
- }
- template <class T> void draw_polygon(T s, T t) {//draw a polygon, use it in a way like stl.
- moveto(update(*s));
- while (s != t–) {
- lineto(update(*t));
- }
- }
- void draw_word(P p, const char *s, double sita, double len = 15) {//draw a word.
- //len is the distance between point p and the center of the first letter of the word.
- //sita is the slope of vector (P, center of the first letter).
- sita = sita * pi / 180 – pi / 8;
- moveto(update(p) + P(18 * cos(sita), 18 * sin(sita)));
- show(s);
- }
- };
(more…)
Tags: Computational Geometry, visual tool
在这里发布一下我平时写竞赛小程序用的vimrc。
一是方便我自己备份,二是给有需要的人。
http://gaoyunxiang.com/wp-content/uploads/2010/02/vimrc.zip
使用方法:用上面的连接下载下来,里面有两个文件,一个是vimrc另一个_run.exe。
替换掉vimrc之后,把_run.exe放到和gvim.exe的同一个目录下。 (more…)
Tags: vimrc
自从装了Win7之后,电脑总是是不是的提醒我电脑里有病毒.
Remove the Trojan.PWS.Legmir.AD / W32.Ahlem.A@mm virus from your computer
This problem was caused by Trojan.PWS.Legmir.AD / W32.Ahlem.A@mm, a known computer virus.
To prevent this problem from occurring again, install and run an up-to-date antivirus program on your computer.
刚看到这个提示消息的时候特别奇怪,我用电脑的习惯一直很好,从来没有装过杀毒软件,Win7又是一个新系统,安全性也挺高的,怎么会有病毒呢? 想当年用Win98的时候我都是裸奔…怎么Win7会提示中了病毒呢…
思索半天无果…只好把这个消息无视了.
不过最近还是频繁提示这个消息,郁闷了我好久…
这几天突发灵感,实验良久终于找到了问题所在.
原来是因为我写的程序a.exe被系统当作这个病毒了…
估计经常写小程序的人会碰到这个问题…大家都无视之吧,这个是Win7的误判…
Tags: Windows 7, 病毒