问题:
多activity中退出整个程序,例如从A->B->C->D,这时我需要从D直接退出程序。
网上资料:{
finish()和system(0)都只能退出单个activity。杀进程等的等方式都不行~~~
解决问题:
我们知道Android的窗口类提供了历史栈,我们可以通过stack的原理来巧妙的实现,这里我们在D窗口打开A窗口时在Intent中直接加入标志Intent....
分类:
其他好文 时间:
2015-01-20 15:41:18
阅读次数:
122
//提交打印 function sbumitPrint() { printHidden("AppsDSPrintDoub.aspx?type=print"); } function printFrame(frame, onfinish) { if (!f...
分类:
Web程序 时间:
2015-01-20 10:08:59
阅读次数:
218
1 void postOrder3(BinTree *root) //非递归后序遍历 2 { 3 stack s; 4 BinTree *cur; //当前结点 5 BinTree *pre=NULL; ...
分类:
其他好文 时间:
2015-01-20 08:56:05
阅读次数:
243
不会输,超碉!井字棋这个游戏真是太无聊啦!算法大概就是,有一个给状况进行估价的函数,深搜每种状况,假设每个人都按对自己最有利的方式走(假设玩家也是不傻),最后让电脑走出最有利的一步。代码: 1 //#pragma comment(linker, "/STACK:102400000,10240000....
分类:
编程语言 时间:
2015-01-20 06:11:29
阅读次数:
557
第一次提交时runtime error ,错误串是“]”,而在code blocks (g++)下编译运行结果都是对的。后来发现时code blocks 下当栈为空时,stack.top()访问时没报错。而OJ认为是指针错误,修改再提交就OK了。 1 class Solution { 2 publi...
分类:
其他好文 时间:
2015-01-19 22:31:41
阅读次数:
115
//创建图片视图时就设定Frame的属性和大小 UIImageView *img = [[UIImageView alloc] initWithFrame:CGRectMake(60, 20, 80, 100)]; [img setImage:[UIImage imageNamed:@"mtxx.....
分类:
移动开发 时间:
2015-01-19 22:16:04
阅读次数:
270
终于编译OK了。。可链接就是一大堆错误问题1:boot/head.o: In function `startup_32':(.text+0x10): undefined reference to `_stack_start'boot/head.o: In function `startup_32':...
分类:
系统相关 时间:
2015-01-19 15:35:26
阅读次数:
594
UIScrollView UIPageControl 的使用2011-11-19 16:484690人阅读评论(0)收藏举报imagescrollspringiphone// // scrollView.contentSize = CGSizeMake(self.view.frame.s...
分类:
其他好文 时间:
2015-01-19 10:46:11
阅读次数:
125
A string S consisting of N characters is considered to be properly nested if any of the following conditions is true:S is empty; S has the form "(U)" ...
分类:
其他好文 时间:
2015-01-19 10:40:09
阅读次数:
217
1.遇到UI控件没有显示的问题,可以给这个控件设置背景色假设这个控件是UIBUtton如果背景色能显示,那问题就出在image和title值为空如果背景色不能显示,重写控件的description方法,把控件的frame打印出来分析2.以下是打印UIView的frame的分类#import @int...
分类:
移动开发 时间:
2015-01-17 23:19:02
阅读次数:
212