现在位置: 首页 > affidavit发表的所有文章
  • 06月
  • 08日
综合 ⁄ 共 393字 评论关闭
转自网上资料: http://www.maeee.cn/article/it/Cjj/850/show/2009072708274542.shtml //获取系统的当前时间int main(){ time_t lTime;//  char timeBuf[128];//  _strtime(timeBuf);//  printf( "OS time://t//t//t//t%s//n", timeBuf);//  _strdate(timeBuf);//  printf( "OS date://t//t//t//t%s//n", timeBuf);//  return 0; //  ................. time(&lTime); int iTime = lTime; cout<<"the time is:"<<iTime<<endl; cout<<ctime(&lTime)<<endl; return 0;}  
阅读全文
  • 04月
  • 17日
综合 ⁄ 共 452字 评论关闭
  简单的入门,在命令行下跑了下Hadoop自带的Helloworld,word count。   具体步骤参考下面的Reference,在这里只是总结下几个关键步骤:   (1) 随便把某个测试文件拷贝到HDFS上去。一般利用命令: hadoop dfs - put [arg0] [arg1],或者hadoop dfs -copyFromLocal [arg0] [arg1]   (2)向hadoop提交作业(程序),利用命令 hadoop jar [arg0] [arg1] [arg2] [arg3]   (3)运行成功后,通过命令hadoop fs -ls 和hadoop fs -cat [arg0]来观测结果。 (4)当Hadoop结束时,可以通过bin/stop-all.sh脚本来关闭Hadoop的守护进程。   Refe......
阅读全文
  • 06月
  • 08日
综合 ⁄ 共 1806字 评论关闭
在用JSONObject.fromObject的时候,如果JavaBean中有Set等类型时,会报错hibernate的lazy的错,所以需要过虑掉那些无关的类型。直接贴代码: public class MagazineModel {     private int id;     private String name;     private int score;     private String descript;          private Set<PaperModel> papers;     private Set<MagazineModel> magazines;     private MagazineModel magazine;     get()  set()..... } 要过滤掉papers magazines  magazine public static String modelBeanToJSON(final L......
阅读全文
  • 05月
  • 27日
综合 ⁄ 共 162字 评论关闭
下载地址: http://download.sybase.com/eval/PowerDesigner/powerdesigner125_eval.exe 破解补丁: http://media-001.yo2cdn.com/wp-content/uploads/235/23551/2008/05/e7a0b4e8a7a3.rar
阅读全文
  • 04月
  • 25日
综合 ⁄ 共 660字 评论关闭
题目:http://pat.zju.edu.cn/contests/pat-a-practise/1047 题解: 代码: #include<cstdio> #include<iostream> #include<cstring> #include<cmath> #include<string> #include<vector> #include<map> #include<set> #include<algorithm> #include<sstream> using namespace std; vector<string>mapx[2505]; int main() { int n,k,c,x; char ch[10]; string s; scanf("%d%d",&n,&k); for(int i=0;i<n;++i) { sc......
阅读全文
  • 04月
  • 15日
综合 ⁄ 共 5886字 评论关闭
from: http://www.xkzzz.com/zz/ymzj/hostzs/201004/28-39564.html 摘要:  使用mod_gzip 和 mod_deflate对网页内容进行压缩    Gzip是一种流行的文件压缩算法,现在的应用十分广泛,尤其是在Linux平台。当应用Gzip压缩到一个纯文本文件时,效果是非常明显的,大约可以减少70%以上 ...   使用mod_gzip 和 mod_deflate对网页内容进行压缩     Gzip是一种流行的文件压缩算法,现在的应用十分广泛,尤其是在Linux平台。当应用Gzip压缩到一个纯文本文件时,效果是非常明显的,大约可以减少70%以上的文件大小。这取决......
阅读全文
  • 01月
  • 09日
综合 ⁄ 共 287字 评论关闭
./configure -qconfig -qvfb -depths 4,8,16,32后就出错出错no such file:/src/tools/qconfig-qvfb.h..   解决办法:   是提示找不到qconfig-qvfb.h文件configure 写法不对,-qconfig 后接 qvfb 时系统会以为你用的是qconfig-qvfb.h 配置. ./configure -qvfb -depths 4,8,16,32  -qconfig 应该这样写,把它放到最后就行了记住每个参数之间要加空格     转帖:http://zhidao.baidu.com/question/72052845.html
阅读全文
  • 12月
  • 15日
综合 ⁄ 共 488字 评论关闭
这题就是简单的模拟题,为了确保不越界,我使用了long long 要注意加入0的判断! #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { long long a, b; cin>>a>>b; if(a == 0) { cout<<"Yes"<<endl<<0<<endl; return 0; } vector<long long> v; while (a != 0) { v.push_back(a % b); a /= b; } bool flag = true; int tmp = v.size()/2; while (tmp--) { if(v[tmp] != v[v.size() - tmp - 1......
阅读全文
  • 11月
  • 25日
综合 ⁄ 共 8437字 评论关闭
Visual Studio 作为一种强大的开发平台,已经提供了非常多的调试手段。但这些调试手段相对来说还是停留在表面上,无非是设置断点、变量查看以及调用堆栈列表等。某些时候我们希望了解更多的东西,尤其是那些被隐藏到背后和运行期的东西,诸如对象运行状态、内存分布等等,这些相对底层的知识可以让我们更好地理解 .NET CLR / JIT 的一些行为。当然,并不是所有人都需要了解这些知识,毕竟汇编和高级调试器使用起来还是非常麻烦的。 SOS.dll 是 Microsoft 提供的一种调试扩展,全称是 Son of Strike,可用来调试托管代码。SOS.dll ......
阅读全文
  • 10月
  • 31日
综合 ⁄ 共 1391字 评论关闭
ios7下UIBarButtonItem 边距偏大,看起来感觉不是很舒服; 搜索方法,得到解决方案如下: //////////////////////////////// // @interface UINavigationItem (margin) @end @implementation UINavigationItem (margin) #if __IPHONE_OS_VERSION_MAX_ALLOWED > __IPHONE_6_1 - (void)setLeftBarButtonItem:(UIBarButtonItem *)_leftBarButtonItem { if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) { UIBarButtonItem *negativeSeperator = [[UIBarButtonItem alloc] initWithBarBu......
阅读全文
  • 10月
  • 29日
综合 ⁄ 共 774字 评论关闭
情景:        最近在公司遇到这样的问题,买了三台上网本,系统搞得不能用了,我不知道是怎么弄到,我拿到手的时候是不能开机正常运行的 报以下的错误 error 17的原定义是:Cannot rename across drives 不能跨驱动器改名,用通俗的解释就是分区表错误,找一张工具盘引导,启动后进入“DOS”系统,运行“fdisk/mbr”修复即可,一般这种现象是原来安装linux系统,mbr与fat不兼容所致。 或者下载“SFPDISK”是DOS下运行的,有一个选项有“修复启动mbr”然后选fat32支持,再装系统就没有问题了 不然LINUX转XP永远都会有ERROR17提示。 解决过......
阅读全文
  • 10月
  • 18日
综合 ⁄ 共 1535字 评论关闭
比赛的时候题目意思完全不对.....居然还有人1分钟就AC了...... NPY and FFT Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 132    Accepted Submission(s): 86 Problem Description A boy named NPY is learning FFT algorithm now.In that algorithm,he needs to do an operation called "reverse". For example,if the given number is 10.Its binary representaion is 1010.After reversing,the binary number will be 0101.And then we should ignore the......
阅读全文