history.back();
这段代码有天然的缺陷,使用过的都知道,在H5的应用,特别是模仿手机应用的时候,这个不够用。
特写了一段js来实现类似的功能,如有重复和不喜请轻喷。
不多说,上代码:
/**
* Created by piggsoft@163.com on 2015/5/28.
*/
var historyUtils = {
add : function ...
分类:
Web程序 时间:
2015-06-03 21:33:07
阅读次数:
151
// CTest.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include #include using namespace std;typedef int ElemType;struct Stack{ ElemType data; ...
分类:
编程语言 时间:
2015-06-03 19:11:31
阅读次数:
123
题目传送门 1 /* 2 题意:宽度为1,高度不等,求最大矩形面积 3 stack(数组模拟):对于每个a[i]有L[i],R[i]坐标位置 表示a[L[i]] 7 #include 8 #include 9 #include 10 #include 11 using name...
分类:
编程语言 时间:
2015-06-03 17:31:22
阅读次数:
125
题目传送门 1 /* 2 题意:求最长括号匹配的长度和它的个数 3 贪心+stack:用栈存放最近的左括号的位置,若是有右括号匹配,则记录它们的长度,更新最大值,可以在O (n)解决 4 详细解释:http://blog.csdn.net/taoxin52/article/d...
分类:
其他好文 时间:
2015-06-03 15:11:51
阅读次数:
130
Git
- How to use netrc file on windows - Stack Overflow
这就是正确答案,我们已经验证过了,下面详细描述一下解决方法:
1. 在Windows中添加一个HOME环境变量,值为%USERPROFILE%,如下图:
2. 在“开始》运行”中打开%Home%,新建一个名为“_netrc”的文件。
3. ...
前言之前流行过一种图片展示视图——photo stack,即照片叠放视图。大致上是这个样子的:
(图片出自code4app)
现在我们已经能够使用UICollectionViewLayout来实现这种视图了。Apple给的示例代码中就有这样一个layout,并且示例代码中不仅仅是展示这样的视图,还有非常棒的layout过度动画(结合手势)。在这之前,也有非常多的开源代码能实现这样的效果。本文...
分类:
编程语言 时间:
2015-06-03 09:59:14
阅读次数:
164
首先我们来看下Task的定义,Google是这样定义Task的:a task is what the user experiences as an "application." It's a group of related activities, arranged in a stack. A task is a stack
of activities, not a class or an e...
分类:
移动开发 时间:
2015-06-03 09:45:58
阅读次数:
1948
Part 82 Generic queue collection classPart 83 Generic stack collection class
This is a fundamental and yet classic problem. I share my three solutions here:Iterative solution using stack ---O(n)time andO(n)space;Recursive solut...
分类:
其他好文 时间:
2015-06-03 00:54:17
阅读次数:
101
( ! ) Warning: printf(): Too few arguments in D:\wamp\www\wp-content\themes\arcadexls\games-play.php on line 97Call Stack# Time Memory Functi...
分类:
Web程序 时间:
2015-06-03 00:47:50
阅读次数:
231