C++模板实现的单向队列的元素添加,元素删除,元素清除功能
//Queues.h
#ifndef DDXX_QUEUES_H
#define DDXX_QUEUES_H
#include
using namespace std;
template
class Queues
{
public:
Queues();
~Queues();
public:
struct Node
{
...
分类:
编程语言 时间:
2014-02-28 12:47:03
收藏:
0 评论:
0 赞:
0 阅读:
483
对于windows程序 ,无非是消息循环 和 窗口过程的消息处理。
无论是MFC 或者是WTL ,都只是内部封装,搞清楚这个过程 对于掌握框架,甚至自己制作框架都有好处。
前段时间已经分析了一下WTL的, 关于MFC的框架,侯杰的 深入浅出MFC讲的比较细致。很到位,作为想把MFC彻底搞清楚的人 ,不应该去拒绝这本书。
MFC实现了自己的RTTI, 当...
分类:
其他 时间:
2014-02-28 11:53:48
收藏:
0 评论:
0 赞:
0 阅读:
461
Problem B: Throwing cards away I
Given is an ordered deck of n cards
numbered 1 to n with card 1 at the top and card n at
the bottom. The following operation is performed as long as there are at ...
分类:
Windows开发 时间:
2014-02-28 13:37:26
收藏:
0 评论:
0 赞:
0 阅读:
472
Problem A
Fractal
Input: Standard Input
Output: Standard Output
Time Limit: 3 Seconds
A fractal is a rough or fragmented geometric shape that can be subdivided in parts, each of which is (at l...
分类:
其他 时间:
2014-02-28 14:31:20
收藏:
0 评论:
0 赞:
0 阅读:
413
js实现百度搜索结果翻页效果...
分类:
Web开发 时间:
2014-02-28 12:19:09
收藏:
0 评论:
0 赞:
0 阅读:
488
摘要:详细介绍oracle数据库中关于游标的定义和使用。通过实例操作来深入了解cursor的用法和用处。...
分类:
数据库技术 时间:
2014-02-28 12:18:36
收藏:
0 评论:
0 赞:
0 阅读:
575
WinSock网络编程学习笔记(七):协议查询程序(getprotobyname和getprotobynumber函数)...
分类:
Windows开发 时间:
2014-02-28 14:25:58
收藏:
0 评论:
0 赞:
0 阅读:
638
Rails
There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It...
分类:
其他 时间:
2014-02-28 13:36:57
收藏:
0 评论:
0 赞:
0 阅读:
579
IOS学习笔记(六)之IOS开发-UISlider的概念和使用方法(博客地址:http://blog.csdn.net/developer_jiangqq)
Author:hmjiangqq
Email:jiangqqlmj@163.com
UISlider视图:
作用:控制系统声音,或者表示播放进度。
类的继承图如下:...
分类:
其他 时间:
2014-02-28 13:08:38
收藏:
0 评论:
0 赞:
0 阅读:
359
Loops循环
在java中有两种循环语句, for 和while.
For语句
for循环有三个部分,用分号隔开:
for (int i = 0; i < 3; i++) {}
第一部分在我们进入这段话(循环体)时执行 .
第二部分是一个判断语句, 当返回 true, 我们就执行括号里(循环体)的内容,
如果返回 false, 我们就退出循环....
分类:
其他 时间:
2014-02-28 14:02:28
收藏:
0 评论:
0 赞:
0 阅读:
422
数据清洗工具OpenRefine作者:chszs,转载需注明。博客主页:http://blog.csdn.net/chszs数据经常被称为一座金矿,尤其是在当今数据驱动的经济环境下更是如此。怎样把数据集在OpenRefine中进行转换,优化数据的质量以便于在真实场景下重用它们。一、介绍OpenRefine我们来看一个残酷的现实:你的数据是杂乱无章的。错误会散步到你的大数据集中,无论你有多么细心,错...
分类:
其他 时间:
2014-02-28 11:46:28
收藏:
0 评论:
0 赞:
0 阅读:
856
题目链接:Codeforces 397B On Corruption and Numbers
题目大意:给出n,l,r,表示用l~r中间任何数的面值若干个组成n,可以输出Yes,不可以输出No。
解题思路:一开想到dp的一道题,当l*k ≤r*(k-1)的时候,l*(k-1)往上就可以全部可行,但是超时了。
起始可以换个简单的想法, 找到最接近n的f,f为l的倍数,即l*k ...
分类:
其他 时间:
2014-02-28 13:31:40
收藏:
0 评论:
0 赞:
0 阅读:
445
K链表翻转
版权所有, 禁止转载, 如有需要, 请站内联系.
本文地址: http://blog.csdn.net/caroline_wendy
题目: 给出一个链表和一个数k, 比如链表1→2→3→4→5→6;
若k=2, 则翻转后2→1→4→3→6→5;
若k=3, 则翻转后3→2→1→6→5→4;
若k=4, 则翻转后4→3→2→1→5→6;
用程序实现....
分类:
其他 时间:
2014-02-28 12:10:20
收藏:
0 评论:
0 赞:
0 阅读:
537
/*
Main idea:
This is a good Dynamic programming problem;
dp[i]=min{dp[i-value[j]]}+1 // (j=1..n and i-value[j]>=0)
dp[i] means that to make up postage i,we need dp[i] stamps at least;
So, we increa...
分类:
其他 时间:
2014-02-28 13:31:12
收藏:
0 评论:
0 赞:
0 阅读:
418
/*
F[i] denote the 5 digits from rightmost non-zero digit of i! ;
There is a trap, we can't just store the rightmost non-zero digit of i!
Eg: 15 * 2 = 30 may affect the second last digit;
Since N is 4...
分类:
其他 时间:
2014-02-28 12:16:48
收藏:
0 评论:
0 赞:
0 阅读:
427
关于Java异常处理的一个面试题
自己设计的一套关于Java异常处理的面试题。
1.System.out与System.err的区别?
2.描述一下final finally finalize的区别?
3.为什么不该将类的finalize()方法作为通用的清理方法?
4.为什么尽量不在finally块中使用return?
5.Java的异常匹配机制是什么?
在我的其它文章...
分类:
其他 时间:
2014-02-28 14:23:26
收藏:
0 评论:
0 赞:
0 阅读:
371
/*
动态规划。尝试暴搜,但是超时了
分析:
设长度为n的01串,1的个数不大于v的个数为dp[n,v]
方程:dp[n,v]=dp[n-1,v]+dp[n-1,v-1]; //分别表示在当前位加上0和加上1时的两种状况
边界:dp[i,0]=dp[0,j]=1;
这样我们得到了所有的dp[n,v],需要做的就是据此构造出所求字符串.
设所求串为S,假设S的位中最高位的1在自右向左第K+1位,那...
分类:
其他 时间:
2014-02-28 13:05:39
收藏:
0 评论:
0 赞:
0 阅读:
254
方法一:
对应工程中选择Project facets,选择下面的3个。点击确定我的eclipse报错,所以我使用的方法二。
方法二:直接拷贝下面的文件到 .setting目录,重启tomcat即可...
分类:
Web开发 时间:
2014-02-28 11:56:39
收藏:
0 评论:
0 赞:
0 阅读:
451
/*
Main idea
The key point of this problem is you should note the fact that at 360 second,
all 5 wheels will go back to his initial state; see 360 * speed is a full period;
So only the time [0,360) i...
分类:
其他 时间:
2014-02-28 13:59:31
收藏:
0 评论:
0 赞:
0 阅读:
422
/*
Main idea
Enumeration, because there are 100^3 cases;
Note the case where ratios may be 0;
*/
/*
ID: haolink1
PROG: ratios
LANG: C++
*/
//#include
#include
using namespace std;
int goal[3];
in...
分类:
其他 时间:
2014-02-28 14:45:55
收藏:
0 评论:
0 赞:
0 阅读:
445