摘要: 一.首先安装MGLtools,autogrid4,和autodock41)安装MGLtools:在www.mgltools.scripps.edu/downloads下载mgltools_Linux-x86_1.5.6_Install(这个是32位的,mgltools_Linux-x86_64_1.5.6_Install则是64位的)双击mgltools_Linux-x86_1.5.6_Install弹出如下窗口然后按照提示下一步即可(如果在32位linux系统中双击64位版本则无任何反应)。安装完MGLtools后还需要配置环境变量。命令行输入vim ~/.bashrc,在文件末尾处输入语句 阅读全文
posted @ 2013-11-20 17:38 IT_cnblogs 阅读(5548) 评论(0) 推荐(0) 编辑
摘要: BPEL designer是bpel设计工具,内置在eclipse中。bpel process manager是bpel测试工具,这里不使用。1)安装bpel designer:eclipse中Help --> Install New Software然后安装即可。 2)下载安装apache ODE(BPEL解析器): 下载ODE(如apache-ode-war-1.3.5.zip),解压,将ode.war拷贝到tomcat的webapps目录下。然后启动tomcat(双击\bin\startup),在浏览器中输入地址localhost:8080/ode出现如下界面说明ODE安装成功:同 阅读全文
posted @ 2013-11-20 17:13 IT_cnblogs 阅读(1212) 评论(0) 推荐(0) 编辑
摘要: 1. win7下cmd命令进入其他磁盘2. 查看修改文件夹权限命令caclsCmd文件夹下有test.txt1)首先使其无法打开:效果:2)赋予完全控制权限效果:3. net start/stop命令启动关闭服务问题:如何知道服务名?4. net share命令启动关闭共享5. net use命令显示已存在的网络映射6. net user命令使用:增加/删除用户netstat命令使用netstat –anb显示所有已开发的端口与对应的进程计划任务和at命令使用控制面板中的任务计划和at命令都是依赖于task scheduler服务的,不过任务计划可以自动启动task scheduler服务(除 阅读全文
posted @ 2013-11-20 16:05 IT_cnblogs 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 写于2012方法一:#include "stdafx.h"#include using namespace std;int _tmain(int argc, _TCHAR* argv[]){ FILE *fp; if ((fp=fopen("D:\\C++\\project\\string.in","r"))==NULL) { printf("cannot open the file."); } double a1=0,a2=0; fscanf(fp,"%lf",&a1); fscanf 阅读全文
posted @ 2013-11-20 14:12 IT_cnblogs 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 在群里有人问了这么个问题,下面这段程序运行会报错int main(){ int *p1="abc",*p2="ABC",p3[8]="XYZ"; strcpy(p3+2,strcat(p1,p2)); printf("%s\n",p3);}看了一眼没发现问题,自己运行了下,果然报错,明显是那种指针类型的错误简单调试了下发现问题出在strcat这里,难道是函数使用不对??确认下没有问题群里有人提示说可能是字符常量的问题,马上意识到应该就是这问题了,想起曾经琢磨过的内存分配的问题,这种指针是仅仅指针在栈上,而数组则是指 阅读全文
posted @ 2013-11-20 14:11 IT_cnblogs 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 先帖段代码class A{public: virtual void f1(){puts("A");} virtual void f2(){f1();}};class B:public A{public : void f1(){puts("B");} void f2(){f1();}};class C:public A{public: void f1(){puts("C");}};int _tmain(int argc, _TCHAR* argv[]){ A a; B b; C c; a.f2(); b.f2(); c.f2(); pr 阅读全文
posted @ 2013-11-20 14:10 IT_cnblogs 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 要求:读取一段字符串中的括号,检测括号的左右括号是否匹配,同时还要优先级也要匹配,如小括号内如果有中括号就属于优先级不匹配// project1.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include#includeusing namespace std;int priority(char bracket){ switch(bracket){ case '(': return 1; case '[': return 2; c 阅读全文
posted @ 2013-11-20 14:09 IT_cnblogs 阅读(1565) 评论(0) 推荐(0) 编辑
摘要: 先帖段代码,再慢慢分析吧// project1.cpp : Defines the entry point for the console application.//#include "stdafx.h"#includestruct A{ A(){puts("A()");};//默认构造函数 A(int v){puts("A(int)");};//重载构造函数 A(const A&){puts("A(A&)");};//拷贝或复制构造函数 A& operator=(const A & 阅读全文
posted @ 2013-11-20 14:08 IT_cnblogs 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 没什么好说的,采用分治法,算法复杂度O(nlgn),帖个代码先// project1.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include#define LENGTH 100//合并//str[beg..mid]和str[mid+1..end]已有序//现str[beg..end]合并成有序,使用辅助数组assistint merge(char* str,char* assist,int beg,int mid,int end){ int reverse 阅读全文
posted @ 2013-11-20 14:07 IT_cnblogs 阅读(639) 评论(0) 推荐(0) 编辑
摘要: 还是直接贴代码// project1.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include#include#include#include#define LENGTH 1000using namespace std;int priority(char op){ switch(op){ case '(': return 0; case '+': case '-': return 1; case '*& 阅读全文
posted @ 2013-11-20 14:06 IT_cnblogs 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 说明:有一条语句,如"Life is painting a picture, not doing a sum",要求语句中的单词左右对换,但每个单词不变,即变换后的串应该为"sum a doing not, picture a painting is Life"两种方法:1.分治法,将字符串变成一个单词和一个新的字符串然后对换,递归处理字符串。2.先整体反转,再每个单词反转,类似数组右移K位的方法// project1.cpp : Defines the entry point for the console application.//#include 阅读全文
posted @ 2013-11-20 14:05 IT_cnblogs 阅读(576) 评论(0) 推荐(0) 编辑
摘要: 说明:最大不重复串Longest not repeat string,简称LNRS,即在一个字符串中寻找连续的,没有重复字符的最长子串如"banana",LNRS为"ban"本文实现方法均是在别人的基础上,由本人实现,在此非常感谢大家的无私分享。方法1::暴力查找法,复杂度O(N^2)方法2:由于暴力查找时会有重复查找,所以使用动态规划法提高效率方法3:针对方法2进行空间优化方法4:动态规划+hash法// project1.cpp : Defines the entry point for the console application.//#incl 阅读全文
posted @ 2013-11-20 14:04 IT_cnblogs 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 说明:最大重复子串Longest repeat string,简称LRS,即在一个字符串中寻找最长的重复子串例如"banana",则最大重复子串为"ana"三种方法方法1:暴力搜索法,复杂度O(N^2)方法2:使用后缀数组的方法方法3:利用KMP方法中的next数组同时补充了个KMP的代码,与本题无关// project1.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include#include#define LENG 阅读全文
posted @ 2013-11-20 14:03 IT_cnblogs 阅读(682) 评论(0) 推荐(0) 编辑
摘要: 参考网上的实现// project1.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include#define LENGTH 100//两个字符串的编辑距离//编辑距离就是将两个字符串变成相同字符串所需要的最小操作次数//纯暴力搜索法,复杂度O(N*M)int calEditDist(char strX[],int begX,int endX,char *strY,int begY,int endY){ if(endX==0){ if(endY==0) ... 阅读全文
posted @ 2013-11-20 14:02 IT_cnblogs 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 先帖个代码// project1.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include#define LENGTH 1000//最大回文串,动态规划法:对暴力搜索的改进//暴力搜索O(N^2)个子串,每次O(N),总开销O(N^3)//通过动态规划法复杂度可以降到O(N^2)int LPS_dp(char *str){ int len=strlen(str); bool dp[LENGTH][LENGTH];//dp[i][j]记录子串[i..j]是否回 阅读全文
posted @ 2013-11-20 14:01 IT_cnblogs 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 说明:本文使用邻接矩阵表示一个无向图,在此基础上尝试了三种搜索方法,广度优先,深度优先和非递归的深度优先发现博客还是挺难写的// project1.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include#include#include#include#define MAX 100//邻接矩阵表示法typedef struct{ char vexs[MAX];//定点数组 int edges[MAX][MAX];//边的数组 int vexnum,edgen 阅读全文
posted @ 2013-11-20 14:00 IT_cnblogs 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 本代码完全来自于http://blog.chinaunix.net/uid-24774106-id-3505579.html代码写的非常专业,同时也有一些非常巧妙的思想,例如如何在不确定图顶点数目的情况动态分配,同时还能二分查找贴上全部代码,供大家赏阅代码包含两个文件,头文件graph.h和一个cpp文件graph.h内容如下#ifndef __GRAPH_H__#define __GRAPH_H__typedef struct graph *Graph;Graph graph_create(int n);void graph_destroy(Graph);void graph_add_edg 阅读全文
posted @ 2013-11-20 13:59 IT_cnblogs 阅读(594) 评论(0) 推荐(0) 编辑
摘要: CppUnit[1]是Micheal Feathers由JUnit移植过来的一个在GNULGPL条约下的并在sourcefogre网站上开源的C++单元测试框架。(转自百度)本文是对cppunit的一个初步体验,将分别在windows 7和ubuntu 12上进行尝试文章本着极端细致的原则,力求让每个第一次接触的人都能按照教程完整实现,同时文章也贴出了在这过程中所遇到的问题及其解决方法本文写于几个月以前,现整理发表于本博客,有点粗糙,还烦见谅如果影响阅读,还请指出1.首先来段windows版cppunit安装教程:1)首先下载cppunit最新版本(cppunit-1.12.1.tar.gz) 阅读全文
posted @ 2013-11-20 13:53 IT_cnblogs 阅读(2163) 评论(0) 推荐(1) 编辑