- 博客(24)
- 资源 (3)
- 收藏
- 关注
转载 Ubuntu 12.04 LTS安装VMware Tools无法找到kernel header path的问题 (转
Ubuntu 12.04 安装 VMware Tools,运行vmware-config-tools.pl 时,总是提示The path "" is not valid.What is the location of the directory of C header files that match your runningkernel?输入 /usr/src/linux-h
2014-03-12 13:11:13 566
原创 UVAOJ 537字符串处理
注意有小数点的字符串的处理熟悉字符串操作#include #include #include #include #include #include #include #include using namespace std;double getNum(string k){ int find = k.find("."); double res =0, xs
2013-09-05 20:17:33 545
原创 UVAOJ 156字符串查找
学习 sort, multimap, freopen, string 中C++的函数和用法表示STL功能好强大啊!!#include #include #include #include #include #include #include #include using namespace std;int main(){// freopen("testin.txt
2013-09-05 15:26:44 492
原创 JAVA奇葩语法:maker interface
Java Marker Interface(在java与模式一书中翻译作 标识接口)是一个用来给编译器提供标记的接口,是个空接口。比如说JDK里面的Java Marker Interface Examplesjava.lang.Cloneablejava.io.Serializablejava.util.EventListener作用:Marker interface i
2013-09-03 22:11:45 1604
原创 UVA Oj 409
原本是一道很简单的题目么。结果对于C++的IO函数,string的函数不熟悉,结果造成做了很长时间!!!!!#include #include #include #include #include #include using namespace std;int hasKey(vector keys, string f){ for(int i=0; i<keys.size
2013-09-03 11:34:21 487
原创 UvaOJ 102 放瓶子
动态规划?是不是瓶子的颜色数目在减少?问题一:字符 数组拷贝注意初始化问题二:注意CBG的出现顺序,问题三:注意最后输出字母顺序#include #include #include /* bin struct*/struct bin{ int packs[3]; };/* compare two bins for i,j colors:res */in
2013-09-02 20:36:50 458
转载 E:Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
from: http://blog.csdn.net/zyxlinux888/article/details/6358615出现这个问题的原因可能是有另外一个程序正在运行,导致资源被锁不可用。而导致资源被锁的原因,可能是上次安装时没正常完成,而导致出现此状况。解决方法:输入以下命令sudo rm /var/cache/apt/archives/locksudo rm /
2013-09-01 14:15:35 438
原创 UVAOJ 101 移动木块
#include #include #include #define MAX 30struct node{ int k; struct node* next;};struct node* li[MAX];struct node block[MAX];/* move block to their initial position from p to all the to
2013-08-31 20:31:10 729
原创 UVaOj 101 3n+1
问题: 没有理解正确,误认为输入的两个数字是从小到大排列。#include #include int calc(int n){ int res = 1; while(n!=1){ if(n%2==1) n = 3*n + 1; else n = n/2; res += 1; } return res;}int main(void){ int p,q;
2013-08-30 22:07:58 547
原创 UVAOj 127 纸牌游戏
#include #include struct page{ char ty; char nu; };struct pnode{ struct page* p; struct pnode* n; };struct pnode* packs[52];struct page cards[52];int l = 0;/* copy page */void coPa(str
2013-08-30 21:24:29 596
原创 UVAOJ 253-cube painting
这道题的难点在于 如何思考方块的旋转每个方块不管如何旋转组合最后都只有24种可能。求出每种可能然后遍历即可。注意 1与6对,2与5对,3与4对。而且当某两组(如1,6 跟2,5)固定时,第三组也就固定了,因为有对应关系存在。所以 3*2*2*2*1*1 = 24#include #include #include #define ERROR -1#define OK
2013-08-29 21:33:35 696
原创 MAT 安装URL 利用eclipse的update功能
http://download.eclipse.org/mat/1.3/update-site/
2013-08-29 20:15:50 643
转载 使用 Eclipse Memory Analyzer 检测内存泄漏问题
转自 http://blog.csdn.net/moneyice/article/details/2644503本文是关于在开发Talend RCP 过程中碰到一个内存溢出问题的解决方案。使用的检测软件为Eclipse Memory Analyzer (http://www.eclipse.org/mat/),是一个开源免费的内存分析工具,目前为eclipse的孵化项目,也是一个e
2013-08-29 19:46:15 668
转载 eclipse不自动弹出提示(alt+/快捷键失效)
转自http://www.apkbus.com/android-104663-1-1.html 最近公司电脑上的Eclipse没有了自动提示功能,也不是全部不提示,大多数情况下按下“alt+/”键还会产生提示,但是当我在java项目中邪main方法和syso的时候,“alt+/”则会失效,今天在网上搜索了一下结果,主要有一下几种方法: 1.次方法用于没有一点提示的情况:依次打
2013-08-29 19:45:31 608
转载 java静态类
转自:http://klcwt.iteye.com/blog/452834一般情况下是不可以用static修饰类的。如果一定要用static修饰类的话,通常static修饰的是匿名内部类。在一个类中创建另外一个类,叫做成员内部类。这个成员内部类可以静态的(利用static关键字修饰),也可以是非静态的。由于静态的内部类在定义、使用的时候会有种种的限制。所以在实际工作
2013-08-29 19:28:14 454
原创 UVa OJ 152 排序?
#include #include #include #include typedef struct{ int x; int y; int z;}point;point ps[5001];void func(int len){ float res[5001] = {0}; int dis[5001] = {0}; int fin[10] = {0}; int i,
2013-08-23 21:56:43 488
原创 人类和上帝
有这么一句话,“人类一思考,上帝就发笑”。我第一次看见它是在高中语文作文题目上,好在不是高考,只是平常的练习。更好的是,考卷上还有另外一道可选的话题作文,所以那次没有死得太惨。但考试后才发现全班同学都选择了比较容易的话题作文,而不是上帝和人类的命题作文。我当时就有一种感觉,这还真是标准化考试,连造出的“产品”都有一样的思维。 大学期间学了很多数学,学的时候我跟其他人一样抱怨,“这都有
2013-08-23 20:49:15 648
原创 UVa OJ 424大整数相加
问题一: 在main方法中,如果有返回值类型int,则必须写return 0; 写return 1; 会产生 Runtime Error错误。#include #include #include #define MAX 130int res[MAX] = {0};int fin[MAX] = {0};char in[MAX] = {0};intgetLen(int num[
2013-08-22 13:26:06 570
原创 UVa OJ 401回文字符串
#include #include #include char *total = "A 3 HIL JM O 2TUVWXY5";char *dig = "O1SE Z 8 ";int isParlin(char* s){ int len = strlen(s); int i = 0; char nepu[30] = {0}; for(;i<len;i++)
2013-08-22 11:58:08 513
原创 ubuntu networking disabled 的解决方法
根据网络上的查找,大多是重启服务命令如下1:sudo service network-manager stop2:sudo rm /var/lib/NetworkManager/NetworkManager.state3:sudo service network-manager start英文判断方法来自 http://www.e
2013-05-03 14:07:21 1618 1
高性能嵌入式计算
2013-02-25
用TCP/IP进行网际互连
2010-12-12
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人