昨天晚上回去路上一直觉得很饿, 到轮子宿舍后然后突然想起来晚上好像没吃饭, 飞流直下三千尺般的瀑布汗啊, 居然会忘记吃饭, 我这么猪的人居然会忘记吃饭…
不过事情还是都做好了的, 今天去把 http://acm.whu.edu.cn/
加油加油, 都快考试了呢. 自己还准备弄其他的, 好多事情, 有好多方向都可以好好努力的, fighting~
昨天晚上回去路上一直觉得很饿, 到轮子宿舍后然后突然想起来晚上好像没吃饭, 飞流直下三千尺般的瀑布汗啊, 居然会忘记吃饭, 我这么猪的人居然会忘记吃饭…
不过事情还是都做好了的, 今天去把 http://acm.whu.edu.cn/
加油加油, 都快考试了呢. 自己还准备弄其他的, 好多事情, 有好多方向都可以好好努力的, fighting~
从上周四开始我就在折腾系统, 一直到现在, 期间装了两次Solaris, 一次失败, 然后发现不会用也不好用(我要能快速上手), 用虚拟机装Fedora Coer 6, 编译系统的时候因为libtool的问题无法继续(怀疑是1.3.x跟1.4.x/1.5.x的兼容问题), 放弃后用Ubuntu, 与Ubuntu奇怪的更新方式斗争了n久之后搞定Apache和php, 编译系统的时候gcc版本问题(4.0的要求更严格), 重新定义到3.4, 现在的问题是为灭一个leonlux不需要编译的东西我要编译… cashcat写的那个用户排名的程序, extrafun.c, 引用的bbs.h在那个目录下根本找不到, 并且从那个目录的名字fb2k2smth来看, 似乎也是老系统的东西, 就卡在这里动不了了, ll也不理我了 :(
今天中午接到通知, 开始准备入党的材料, 一份2000字的申请, 一份5000字的自传, 四份1500字的思想汇报, 以及其他种种材料若干, 初步估算我要写15000字, 现在完成的只有自传, 就差最后一点了. 要求下个周二交… omg
%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;C:Program FilesJavajdk1.5.0_02bin;C:MinGWbin;C:Program FilesVimvim70
最近突然很多人要用Eclipse, 不仅仅是写Java, 也要使用C/C++, 很多问题, 一起写出来吧 :)
实验室的配置是WindowsXP SP2 + Eclipse3.2 with CDT Embedded for Win32 + MinGW 3.0.0.1 + JDK 1.5.02, 本次讨论最重要的Eclipse3.2withCDT却没找到合适的下载, 官方给的没有集成版的, 只有自己去找一下,我有上传过到 药学院 的FTP, 可惜好像被删了. MinGW和JDK都可以在官方主页上找下载, 或者你可以点 MinGW 来从台湾的镜像下载MinGW, 访问 Java 2 SDK 来从yaguo下载JDK.
首先安装JDK, 假设你安装到了默认目录, 然后将bin目录加入到环境变量中. 然后安装MinGW, 将bin目录加入到环境变量中, 并且把bin目录下的mingw32-make.exe改名为make.exe. 最后解压Eclipse到任何你喜欢的地方, Eclipse是一个基于Java编写的绿色软件, 不用担心安装问题, 打开后配置好WorkSpace的位置, 就可以任意使用了. 关于Eclipse的具体使用方法, 这就是另一个话题了…
附: 关于环境变量, 在桌面上打开[我的电脑], 选[属性], 选[高级]标签页, 点开下面的[环境变量], 双击下面系统变量中的Path, 要加入的就是在原始的后面加;和要添加的目录了, 比如我的在装了JDK和MinGW以及gVIM后的环境变量为
%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;C:Program FilesJavajdk1.5.0_02bin;C:MinGWbin;C:Program FilesVimvim70
A 14 lines only .vimrc files for the vim under linux, I can use it everywhere as I used to be.
set nocompatible " get out of horrible vi-compatible mode syntax on " syntax highlight on set ruler " Always show current positions along the bottom set number " trun on line number set showmatch " show matching brackets set ai " autoindent set si " smartindent set cindent " do c-style indenting set tabstop=4 " tab spacing set softtabstop=4 " tab spacing set shiftwidth=4 " tab spacing set expandtab " not real tabs please! set smarttab " use tabs at the start of a line, spaces elsewhere set so=5 " Keep 5 lines (top/bottom) for scope
自己用的vimrc配置文件, 这篇文章随时可能会更新以符合最新的使用习惯 :P
vimrc使用”来注释到行末, 类似C++里面的//, 我能理解的选项我都会添加部分中文注释的
我觉得比较有用的有以下几个:
autocmd GUIEnter * :simalt ~x " 启动时全屏 set nocompatible " 不使用vi兼容模式 set helplang=Cn " 帮助语言为中文 set background=dark " 黑色背景(我喜欢的) syntax on " 语法高亮显示 colorscheme torte " torte颜色主题(我喜欢的) set ruler " 显示按钮位置(一个我不是很明白的配置,但是一般都加上) set number " 显示行号 set backspace=2 " 退格键工作模式, 2为一般 set showmatch " 显示匹配的括号 set so=5 " 翻页时屏幕上下各留5行缓冲区 set ai " 自动缩进 set si " 智能缩进 set cindent " 使用C的语法模式缩进 set tabstop=4 " tab键宽度 set softtabstop=4 " 同上 set shiftwidth=4 " 同上 set expandtab " 使用tab, 一个tab键产生一个真实的/t set nowrap " 不要跨行 set smarttab " 智能tab
一个非常好的vimrc文件样例,有英文注释,上面一个是彩色高亮的,下面一个是纯文本的:
http://www.vi-improved.org/vimrc.php
http://www.vi-improved.org/_vimrc
我的_vimrc文件,有修改,基于Windows下的gVIM7.0(前一小部分)和上面提到的那个. 添加了几个快捷键, F2保存, F3保存退出, F10编译, F11运行. 同时注意要使用此文件请在VIM的安装目录下的vimfiles目录下建立backup和temp两个临时文件夹. 有很多冗余的, 因为不知道具体规则, 还没敢删. 本blog系统只能上传.rar文件, 大家自己解压到原来的目录吧.
Thinking in Java is a book’s name, a good book. This afternoon, I did a hard work to find a method which can check that a char is a letter or not, but got no answer. I complained that Java is too hard to learn if I don’t know any class library and its method, everything I need to deal by myself, then MagicPig advise us to read the book Thinking in Java, said that it will be the best book to learn Java.
I spent nearly the hole day to type some simple code of the text book, and get many errors some seems strange, there may be a good experiences and wealth, because it can make me not to do the stupid thing again and again. But there is still a little problem need to fixed, which I can’t use Ant in Eclipse to compile a .jar file and to run the .jar file by double-click, there is always a error hint break out when I try to run the .jar file by double-click, I doubt there is something wrong in the build.xml file, but I don’t know how to correct it also I used Baidu and Google for a solution.
For the course, and for learning a useful skill, start coding in Java. Java is the third programming language I learned strictly, before it are Pascal and C. There is more easy that when you have used a programming language skilled to study another, because the ideas are the same, only the method to get the result are different. The last words may be wrong, because Java is an OO(Object Oriented) language, which is different to the Process-Oriented language likes Pascal/C, and I said I learned C only as I didn’t know the ideas of OO in C++.
In Java, everything is long, the name of class, function, variable, too long to type… I love C, I love VIM, which can do anything use keyboard only. Our Java text book used the Hungarian notation ordinary, so it’s a good way to make my coding habit standardization.
VIM的中文手册,好东西,记录一下
// ** Start of PerfectMatch *******************************
// Name: PerfectMatch by Kuhn_Munkras O(n^3)
// Description: w is the adjacency matrix, nx,ny are the size of x and y,
// lx, ly are the lables of x and y, fx[i], fy[i] is used for marking
// whether the i-th node is visited, matx[x] means x match matx[x],
// maty[y] means y match maty[y], actually, matx[x] is useless,
// all the arrays are start at 1
int nx,ny,w[MAXN][MAXN],lx[MAXN],ly[MAXN];
int fx[MAXN],fy[MAXN],matx[MAXN],maty[MAXN];
int path(int u)
{
int v;
fx[u]=1;
for(v=1;v<=ny;v++)
if((lx[u]+ly[v]==w[u][v])&&(fy[v]<0)) {
fy[v]=1;
if((maty[v]<0)||(path(maty[v]))) {
matx[u]=v;
maty[v]=u;
return(1);
} // end of if((maty[v]...
} // end of if((lx[u]...
return(0);
} // end of int path()
int PerfectMatch()
{
int ret=0,i,j,k,p;
memset(ly,0,sizeof(ly));
for(i=1;i<=nx;i++) {
lx[i]=-INF;
for(j=1;j<=ny;j++)
if(w[i][j]>lx[i])
lx[i]=w[i][j];
} // end of for(i...
memset(matx,-1,sizeof(matx));
memset(maty,-1,sizeof(maty));
for(i=1;i<=nx;i++) {
memset(fx,-1,sizeof(fx));
memset(fy,-1,sizeof(fy));
if(!path(i)) {
i--;
p=INF;
for(k=1;k<=nx;k++)
if(fx[k]>0)
for(j=1;j<=ny;j++)
if((fy[j]<0)&&(lx[k]+ly[j]-w[k][j]<p))
p=lx[k]+ly[j]-w[k][j];
for(j=1;j<=ny;j++) ly[j]+=(fy[j]<0?0:p);
for(k=1;k<=nx;k++) lx[k]-=(fx[k]<0?0:p);
} // end of if(!path(i))
} // end of for(i...
for(i=1;i<=ny;i++) ret+=w[maty[i]][i];
return ret;
} // end of int PerfectMatch()
// ** End of PerfectMatch *********************************