解决emacs中cscope的定义键无效1、cscope的el插件为xcscope.el,通过“sudo find / -name xcscope.el”查找该文件所在的位置2、打开xcscope.el查找“(define-key cscope:map "\C-css" 'cscope-find-t...
分类:
其他好文 时间:
2014-07-02 18:32:30
阅读次数:
546
1 #include 2 #include 3 using namespace std; 4 int main(){ 5 string s1, s2; 6 getline(cin, s1); 7 getline(cin, s2); 8 while(s1.find(s...
分类:
其他好文 时间:
2014-07-02 17:17:29
阅读次数:
281
1 #include 2 #include 3 using namespace std; 4 int main(){ 5 string s; 6 char c; 7 getline(cin,s); 8 cin>>c; 9 if(s.find(c)!=stri...
分类:
其他好文 时间:
2014-07-02 15:02:48
阅读次数:
257
Requirement-Driven Linux Shell ProgrammingRequirement-Driven Linux Shell ProgrammingTable of Contents1. Where can I find the basic Material about Linu...
分类:
系统相关 时间:
2014-07-02 13:55:48
阅读次数:
410
1 类Process和ProcessBuilder的比较Process是一个抽象类,一般通过Runtime.exec()或ProcessBuilder.start()间接创建其实例 ;ProcessBuilder是一个最终类,可以通过构造方法来直接创建ProcessBuilder的对象。Proces...
分类:
其他好文 时间:
2014-07-02 10:30:15
阅读次数:
215
ps -ef|grep ./amplxe-gui|grep -v grep|cut -c 9-15|xargs kill -9
批量杀死包含关键字“./amplxe”的进程。
"ps -ef" ——查看所有进程
"grep ./amplxe-gui" ——列出所有含有关键字"./amplxe-gui"的进程
"grep -v grep" ——在列出的进程中去除含...
分类:
系统相关 时间:
2014-07-02 09:05:06
阅读次数:
335
#define FIND(struc,e) (int)&(((struc *)0)->e)...
分类:
编程语言 时间:
2014-07-02 08:13:52
阅读次数:
257
进入Ubuntu之后打开终端窗口的快捷键是:
ctrl + alt+T:通过这个命令可以打开终端。截图是:
关闭一个终端窗口的方式是:
Alt +F4,在Ubuntu下还可以是exit
对于terminal中的符号,其中的$标识,普通用户时显示的是$,超级管理员对应的符号是:#
截图如下:...
分类:
系统相关 时间:
2014-07-02 07:58:14
阅读次数:
788
Union-Find
动态连接问题描述:
给定一个n个序列的对象,有两种操作:
-Union command:连接两个对象;
-Find/connected query:两个对象是否连接(有路径)
算法实现方式
1.用一个数组保存着每个对象所在的connected component,这种方式可以快速进行FIND,但是在union操作时需要遍历整...
分类:
其他好文 时间:
2014-07-02 07:10:59
阅读次数:
287
【题目】
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.
【题意】
给定一堆点,要求找出一条之前上的最大点数
【思路】
没什么好的方法,从每个点P出发,遍历所有的情况
从每个点P出发,斜率相同的点即为统一之前上的点
注意两种特殊情况:
1. 两个点重合(即为同一个点)
...
分类:
其他好文 时间:
2014-07-02 06:52:06
阅读次数:
171