上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 70 下一页
摘要: 在linux下装了svn后,用svn co http://subversion.tigris.org/ /temp 时出现could not resolve hostname 错误,需要在/etc/hosts 增加 192.168.1.195 debian.localdomain debian 这种域名与ip地址的映射,这样svn就可以正常co了。 阅读全文
posted @ 2009-09-08 18:44 MXi4oyu 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 看到很多朋友对这些概念有些混淆,我来发表下我自己的观点。内存表:1. 参数控制:max_heap_table_size2. 到达上线后报错。3. 表定义保存在磁盘上,数据和索引保存在内存里面。4. 不能包含TEXT,BLOB等字段。临时表:1. 参数控制:tmp_table_size。2. 到达上线后创建文件在磁盘上。3. 表定义和数据都在内存里。4. 可以包含TEXT, BLOB等字段。而且tmp_table_size和max_heap_table_size的范围挺复杂。有三个范围: global, session, table。 而且都适用。 阅读全文
posted @ 2009-09-07 02:21 MXi4oyu 阅读(175) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3322最小区间覆盖,排序加上贪心。#include <iostream> #include <algorithm> #include <cstdio>using namespace std;struct SetNode{ int a; int b;}mySet[5010];int n;int minPoint;int maxPoint;bool cmp(SetNode a, SetNode b){ if(a.a != b.a) return 阅读全文
posted @ 2009-09-06 00:14 MXi4oyu 阅读(192) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3321回溯,dfs实现,注意要用long long, 9个100相乘最大数需要long long表示。#include <iostream>#include <cstdio>using namespace std;long long a[20];int n;int k;long long ans;const long long inf = 1000000000000000LL;long long myabs(long long nn){ return 阅读全文
posted @ 2009-09-05 23:31 MXi4oyu 阅读(197) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1875#include <vector>#include <iostream>#include<algorithm>#include <string>#include <cstring>using namespace std;int main(){ vector<string> phonelist; int testcast; cin >> testcast; while(testcast-- 阅读全文
posted @ 2009-09-05 16:28 MXi4oyu 阅读(161) 评论(0) 推荐(0) 编辑
摘要: //设计一个支持大数运算的计算器,其中乘法使用分治法求解。该计算器支持加减乘除还有开方根运算。#include <iostream>#include <list>#include <string>#include <cstdio>#include <cctype>#include <cmath>using namespace std;list<char> Add(list<char> s, list<char> t);list<char> Sub(list<char&g 阅读全文
posted @ 2009-09-03 23:22 MXi4oyu 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 对于每一行 ,都要从某一位置分成两段 ,由于不能切出0长度的一段,所 以有n - 1个选择 ,一共m行 ,就是(n - 1)m种方案 。由于问题的规模很 小 ,暴力枚举所有情况取最优解就可以了。直接用dfs即可。#include <iostream>#include <cstdlib>#include <string>#include <cctype>using namespace std;const int MAXSIZE = 8;long nutrition[MAXSIZE][MAXSIZE];int m, n;long mindiff = 阅读全文
posted @ 2009-09-03 22:16 MXi4oyu 阅读(225) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string>#include <stack>#include <fstream>using namespace std;char *pSrc = NULL;char *pDest = NULL;stack<char> s1;char res[1000];int cnt = 0;void work(){ if(*pDest == '/0'){ for(int i = 0; i < cnt; i++){ cout << res[i] <&l 阅读全文
posted @ 2009-09-01 23:06 MXi4oyu 阅读(161) 评论(0) 推荐(0) 编辑
摘要: java io写文件时写到文件的中文都成乱码,在windows是没问题的,主要是linux下默认字符集是utf-8,而windows默认编码是gbk,所以java 往文件里面写入中文时是根据系统默认字符集来写的。可以有两种方法,1.在java io往文件写时强制用系统编码写,StringfileEncode=System.getProperty("file.encoding");FileoutFile=newFile(path+separator+fileName);if(!outFile.exists()){outFile.createNewFile();}else{ou 阅读全文
posted @ 2009-09-01 13:09 MXi4oyu 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 用jfreechart时,jfreechart图表已经生成,生成的图片在tomcat目录下是正常的,但是页面无法显示该图片。给DisplayChart传的filename参数必须准确。通过查看jfreechart源代码,发现必须给文件加个前缀"public-",这样生成的图片对所有客户端可见。这个问题也已经解决。 也就是在filename = ServletUtilities.saveChartAsPNG(chart, 600, 400, info, session);加上ServletUtilities.setTempFilePrefix("public-jfr 阅读全文
posted @ 2009-08-31 17:17 MXi4oyu 阅读(252) 评论(0) 推荐(0) 编辑
上一页 1 ··· 52 53 54 55 56 57 58 59 60 ··· 70 下一页