#include#includeusing namespace std;#define size 5class zhan{public: zhan() { number=0; } void push(int c) { if(number==size) { cout>str1; while(str1[...
分类:
编程语言 时间:
2014-10-24 16:13:54
阅读次数:
134
由于最近曝出linux的bash漏洞,想更新下bash,于是 想到了配置CentOS yum source。测试bash漏洞的命令:env x='() { :;}; echo "Your bash version is vulnerable"' bash -c "echo This is a tes...
分类:
其他好文 时间:
2014-10-24 16:05:26
阅读次数:
233
以下内容搜集整理于MDL,经WIN10x64企业版测试通过 去除搜索按钮 复制粘贴一下内容,保存为reg文件,双击,确定(注意导入后需要重新启动资源管理器)Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microso...
部分参考http://www.cnblogs.com/ios8/p/ios-version-com.html
下面举个简单的例子来说明在iOS7.0和iOS6.1(以及更低版本)之间的适配问题(用的是xcode5.0,里边有6.1和7.0两个版本的sdk)
新建一个工程,默认的development target,base sdk以及模拟器的版本都是7.0,在AppDelegate中的...
分类:
移动开发 时间:
2014-10-24 14:45:21
阅读次数:
183
Flexviewer调用特定的widget: 之前一直是自己添加个固定的key来调用widget 但是后来发现框架早就为你写好啦调用widget的方法 在WidgetManager中有个public function getWidgetId(widgetLabel:String):Number方法其...
分类:
其他好文 时间:
2014-10-24 14:19:39
阅读次数:
193
问题描述:
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without ...
分类:
其他好文 时间:
2014-10-24 13:08:49
阅读次数:
221
题目描述:
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
解题思路:直接DFS。
代码:
/**...
分类:
其他好文 时间:
2014-10-24 13:04:21
阅读次数:
147
先找到是在哪个集合内,再找到是集合内的哪个元素,最后找到元素的第几位数
#include
#include
#include
#include
using namespace std;
long long table[100010];
long long psum[100010];
int n=100000;
void maketable()
{
int i,flag=1,x=0;
...
分类:
其他好文 时间:
2014-10-24 13:02:56
阅读次数:
204
Find the contiguous subarray within an array (containing at least one number) which has the largest product.
For example, given the array [2,3,-2,4],
the contiguous subarray [2,3] has the largest pr...
分类:
编程语言 时间:
2014-10-24 13:01:16
阅读次数:
222
public int Compare(Product first, Product second) { return PartialComparer.RefernceCompare(first, second) ?? PartialComparer.Comare...