2015年12月19日
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=4870题意:用两个账号去參加一种比赛,初始状态下两个账号都是零分,每次比赛都用分数低的账号去比赛。有P的概率取胜,相应账号分数上涨50分,否则相应账号分数下降100分,问当有一个账号分数达到1000分时參加比... 阅读全文
posted @ 2015-12-19 20:54 gcczhongduan 阅读(211) 评论(0) 推荐(0)
摘要: Description鸡腿具有无穷魅力,每一个经历军训的人都对他有特别的感情。当无数鸡腿摆在我们面前时。我们该何去何从。如今嘴馋的KG就面临着这样的问题。如今他的面前有M个鸡腿,N个盘子。他要将这些鸡腿放在这N个盘子中。他一共同拥有多少种不同分法。(如5,2和2,5是同样分法)Input第一行是測试... 阅读全文
posted @ 2015-12-19 19:23 gcczhongduan 阅读(370) 评论(0) 推荐(0)
摘要: 从存储空间角度看虚函数相应一个指向vtable虚函数表的指针,这大家都知道,但是这个指向vtable的指针事实上是存储在对象的内存空间的。问题出来了,假设构造函数是虚的。就须要通过 vtable来调用。但是对象还没有实例化,也就是内存空间还没有,怎么找vtable呢?所以构造函数不能... 阅读全文
posted @ 2015-12-19 18:50 gcczhongduan 阅读(5166) 评论(0) 推荐(1)
摘要: mplement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see ... 阅读全文
posted @ 2015-12-19 18:09 gcczhongduan 阅读(175) 评论(0) 推荐(0)
摘要: 一.需求分析在寻常的android开发过程中。ListView、GridView适配的编写是一件非常麻烦并且非常反复的事情,每次都须要考虑性能的优化、item的编写、获取网络图片时候信息的错乱等问题。因此考虑写实现一个通用的适配器,主要考虑的功能:(1)自适应item布局文件,每次使用的时候仅仅须要... 阅读全文
posted @ 2015-12-19 17:32 gcczhongduan 阅读(229) 评论(0) 推荐(0)
摘要: 本篇讲述使用C语言编写静态链接库,而且使用C和C++的方式来调用等. 一、静态库程序:执行时不独立存在,链接到可执行文件或者动态库中,目标程序的归档。1、用C编写静态库步骤a.建立项目(Win32 Static Library) b.加入库程序,源文件使用C文件(Win32 Static Lib... 阅读全文
posted @ 2015-12-19 16:14 gcczhongduan 阅读(4123) 评论(0) 推荐(0)
摘要: 在ubuntu下首先:在unpv13e文件加下./configurecd libmakecd ../libfreemakecd ../liggaimakecd ..vim lib/nup.h // 改动 #include "../config.h" 为 #include "config.h"/ 拷... 阅读全文
posted @ 2015-12-19 15:24 gcczhongduan 阅读(363) 评论(0) 推荐(0)
摘要: 依据周次获取周次的日期范围 /** * 返回某年某月周次范围 * @param year 年份 * @param weeks 周次 * @return 返回周次的日期范围 */ function getXDate(year,weeks){ var date = ne... 阅读全文
posted @ 2015-12-19 14:20 gcczhongduan 阅读(499) 评论(0) 推荐(0)
摘要: 相关类Executor,Executors。AbstractExecutorService。ExecutorServiceExecutor:整个线程池运行者框架的顶层接口。定义了一个execute方法。整个线程运行者框架的核心方法。public interface Executor { voi... 阅读全文
posted @ 2015-12-19 13:34 gcczhongduan 阅读(249) 评论(0) 推荐(0)
摘要: 1.unix时间戳转时间函数语法: from_unixtime(bigint unixtime[, string format])返回值: string说明: 转化UNIX时间戳(从1970-01-01 00:00:00 UTC到指定时间的秒数)到当前时区的时间格式举例:hive> select f... 阅读全文
posted @ 2015-12-19 12:02 gcczhongduan 阅读(464) 评论(0) 推荐(0)
摘要: Peter's HobbyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 56Accepted Submission(s): 17Problem D... 阅读全文
posted @ 2015-12-19 11:16 gcczhongduan 阅读(113) 评论(0) 推荐(0)
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文
posted @ 2015-12-19 10:41 gcczhongduan 阅读(155) 评论(0) 推荐(0)
摘要: DescriptionWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence,ifsis a regul... 阅读全文
posted @ 2015-12-19 09:44 gcczhongduan 阅读(123) 评论(0) 推荐(0)
摘要: 先给大家来个干货^~^,学习Python的一个好站点,http://learnpythonthehardway.org/book/经典样例以下是几个老经典的样例喽,刚接触Python的能够敲一敲,看看结果喽!my_name='Zed A. Shaw'my_age=35#not a liemy_hei... 阅读全文
posted @ 2015-12-19 08:44 gcczhongduan 阅读(230) 评论(0) 推荐(0)