先看到下面的代码你肯定就明白了一些:-(CGRect)frame{ return CGRectMake(self.frame.origin.x,self.frame.origin.y,self.frame.size.width,self.frame.size.height);}-(CGRect)b....
分类:
其他好文 时间:
2014-12-27 12:40:11
阅读次数:
125
/**
* 后缀表达式的计算
*
* 使用栈来保存结果
*
* 1.从左向右逐一检查后缀表达式中的每一个字符
* 2.遇到数字直接push入栈
* 3.遇到操作符,就从栈中弹出两个数参与运算,将结果保留在栈中,如果操作符是 /,-或者^
* 号,则后弹出的数是第一个运算数
* 4.最后的结果保留在栈中**/
import java.util.Stack;
public cl...
分类:
其他好文 时间:
2014-12-27 08:58:48
阅读次数:
150
The app structure:Front-end: app.js/** * Created by Answer1215 on 12/9/2014. */'use strict';function MainCtrl(PeopleService) { var vm = this; vm...
栈遵循LIFO ( last in first out) 即后入先出原则栈结构类似于叠盘子 后叠上去的要先拿走 才能拿到下面的盘子因此stack是一种访问受限的线性存储结构用单向链表的结构来存储stack类1 class stack2 {3 stack();4 bool empty(...
分类:
其他好文 时间:
2014-12-27 00:17:41
阅读次数:
288
1 assume cs:codesg 2 3 data segment 4 ;yellow 5 db 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1 6 data ends 7 8 stack segment 9 dw 16 dup ...
分类:
编程语言 时间:
2014-12-26 21:38:50
阅读次数:
127
该题目主要考察了堆栈和深度优先搜索的知识点。在递归深度太深导致运行出错是,可以采用栈保存结果,减小递归的深度。详细代码如下:class Solution {public: stack> data; void solve(vector> &board) { if(board...
分类:
其他好文 时间:
2014-12-26 21:38:20
阅读次数:
129
比起双连通的Tarjan我倒是觉得反而简单多了。思想和双连通分量是同一个模式。
#include
#include
#include
#include
using namespace std;
const int N = 1e5;
int dfn[N], scc_id[N];
int deep, scc_cnt;
stack s;
int dfs(int u)
{
int ...
分类:
其他好文 时间:
2014-12-26 18:40:43
阅读次数:
172
为什么需要Adapter? 简短回答:简化【事件源】 能注册(addxxxListener)监听对象并发送事件对象WindowListener listener = .....;frame.addWindowListener(listener);特定事件 对应 特定的监听器接口(listener i...
分类:
其他好文 时间:
2014-12-26 18:20:06
阅读次数:
194
code as below:f_read = fopen("records/frame_read.ini", "r");fclose(f_read);in fact, records/frame_read.ini is not exist.when I used gdb to debug it, a...
分类:
其他好文 时间:
2014-12-26 18:18:15
阅读次数:
181
1. android单实例运行方法我们都知道Android平台没有任务管理器,而内部App维护者一个Activity history stack来实现窗口显示和销毁,对于常规从快捷方式运行来看都是startActivity可能会使用FLAG_ACTIVITY_NEW_TASK标记来打开一个新窗口,比...
分类:
移动开发 时间:
2014-12-26 18:06:24
阅读次数:
246