码迷,mamicode.com
首页 > 其他好文
两个jre"和"三个lib"的功能简单扼要的解释
安装JDK后,Java目录下有jdk和jre两个文件夹,但jdk下还有一个jre文件夹,而且这个jre比前面那个jre在bin目录下多了个server文件夹!? ??? 普通用户装jre即可。开发人员需要安装jdk,其中包括jre。所以...
分类:其他好文   时间:2015-08-16 18:30:29    阅读次数:126
装饰设计模式
装饰设计模式解决:对一组类进行功能的增强。 包装:写一个类(包装类)对被包装对象进行包装。 *1.包装类和被包装对象要实现同样的接口。 *2.包装类要持有一个被包装对象。 *3.包装类在实现接口时,大部分方法是靠调用被包装对象来实现的,对于需要修改的方法自己实现。 【通俗一点:就是,当想要对已有的对象进行功能增强时,可以定义类,将已有对象传入,基于已有功能,并提供加强功能,那么自定义...
分类:其他好文   时间:2015-08-16 18:28:47    阅读次数:168
2016年 成渝校招软件上机练习
第一题: 代码: /* * 老师想知道从某某同学到某某同学当中,分数最高的是多少。 * 现在请你编程模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 */ #include #include #define N 30000 #define M 5000 /* * 定义一个数组,这个数组成员包括学生的编号,以及成绩 */ s...
分类:其他好文   时间:2015-08-16 18:27:57    阅读次数:132
Qt中如何用指针返回参数
问题:在qt中写一个方法,用指针做返回值,编译没有问题,但执行的时候程序会报错。 我的操作步骤: 1.新建一个Test的测试类,内容如下: Test.h Test.cpp 2.main方法去调用Test类中void fun(QString* pStr)方法,如下,程序编译执行一下,没有问题 3.接下来,打印一下main方法中参数pStr1的内容,理论下*pStr1的值会是”1...
分类:其他好文   时间:2015-08-16 18:29:22    阅读次数:305
Google APAC 2016 University Graduates Test(google校招笔试)
Problem A. Bad Horse 题意:给n个关系,每个关系有两个人,要求把这些人分成两组,每组里的人之间都没有关系。 二分图染色即可。关系=边,人=点。 #include #include #include #include #include #include #include #include #include #include #define ll __int64 #def...
分类:其他好文   时间:2015-08-16 18:28:33    阅读次数:229
POJ 3087-Shuffle'm Up(map+模拟)
题目地址:POJ 3087 题意:已知两堆牌数均为n的纸牌堆a和b的初始状态, 按给定规则能将他们相互交叉组合成一堆牌str,再将str的最底下的n张牌归为a,最顶的n张牌归为b,依此循环下去。现在输入a和b的初始状态 以及 预想的最终状态c,问a, b经过多少次洗牌之后,最终能达到状态c,若永远不可能相同,则输出”-1”。 思路:用map记录一下当前str出现的状态,如果当前的str在前面出现...
分类:其他好文   时间:2015-08-16 18:26:16    阅读次数:166
npm模块管理器
一、npm简介npm有两层含义。一层含义是Node.js的开放式模块登记和管理系统,网址为http://npmjs.org。另一层含义是Node.js默认的模块管理器,是一个命令行下的软件,用来安装和管理node模块。 npm不需要单独安装。在安装node的时候,会连带一起安装npm。但是,node附带的npm可能不是最新版本,最好用下面的命令,更新到最新版本。 npm采用”语义版本“管理软件包...
分类:其他好文   时间:2015-08-16 18:28:29    阅读次数:183
BZOJ 2005 [Noi2010]能量采集 (容斥)
BZOJ 2005 [Noi2010]能量采集 (容斥)...
分类:其他好文   时间:2015-08-16 18:27:39    阅读次数:164
UVa 1584 - Circular Sequence
https://uva.onlinejudge.org/external/15/1584.pdfSome DNA sequences exist in circular forms as in the following figure, which shows a circular sequence CGAGTCAGCT", that is, the last symbol“T” in CGAGT...
分类:其他好文   时间:2015-08-16 18:27:35    阅读次数:137
LeetCode解题报告--3 Sum
题目: 3 个数和问题 Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.Note: Elements in a triplet (a,b...
分类:其他好文   时间:2015-08-16 18:25:29    阅读次数:173
和矩形相关的操作
#include #include #include #include #define PI 3.141592654 #define eps 1e-7 using namespace std; /*********************************************************************/ struct point { int x,y;...
分类:其他好文   时间:2015-08-16 18:24:56    阅读次数:77
HDU 1012.u Calculate e【水】【8月16】
u Calculate e Problem Description A simple mathematical formula for e is where n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively...
分类:其他好文   时间:2015-08-16 18:26:14    阅读次数:107
断其一指------异步任务(AsyncTask)
AsyncTask 异步处理 解决的问题:在子线程中,有的时候也需要多次动态更新UI,此时,除了使用Handler之外,用AsyncTask也是一种相对比较简洁的方式:AsyncTask 是一个抽象类,用来被继承的。 1.三个参数 Params 启动任务执行输入参数的类型 Progress 后台任务完成...
分类:其他好文   时间:2015-08-16 18:26:32    阅读次数:109
LeetCode解题报告--3Sum Closest
题目:与3数和最接近的和 Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would...
分类:其他好文   时间:2015-08-16 18:25:25    阅读次数:126
【HashMap】深入原理解析
equals与== 1,基本数据类型(byte,short,char,int,long,float,double,boolean)使用== 对比的是值是否相等2,复合数据类型== 对比的是内存中存放的地址object中的equals初始行为是比较内存中的地址,但在一些类库中被覆盖掉了如(String,Integer,Date等) 故对于复合数据类型使用equals进行比较,未进行覆写的比较的是内存...
分类:其他好文   时间:2015-08-16 18:25:32    阅读次数:199
codeforces 250 div2 A B C D
A. 模拟 #include using namespace std; #define LL long long #define INF 0x3f3f3f3f #define maxn 100 + 10 char s[4][maxn]; int len[4]; int main() { int t1, t2; int Min = INF, Max = -INF; ...
分类:其他好文   时间:2015-08-16 18:25:50    阅读次数:99
hdu 3371 Connect the Cities 最小生成树
。。。...
分类:其他好文   时间:2015-08-16 18:23:31    阅读次数:101
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!