用户退出应用前给出一个提示是很有必要的,因为可能是用户并不真的想退出,而只是一不小心按下了返回键,大部分应用的做法是在应用退出去前给出一个Dialog,我觉得这样不太友好,用户还得移动手指去按dialog中的按钮。个人觉得“再按一次返回键退出程序”是best practice,实现也很简单,直接上代...
分类:
其他好文 时间:
2014-10-13 00:02:58
阅读次数:
257
问题: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may co...
分类:
其他好文 时间:
2014-10-12 00:58:36
阅读次数:
686
有一组数组代表股票的价格一次买一次卖如何得到最大利润? 1 public int maxProfit(int[] prices) { 2 if(prices.length==0)return 0; 3 int maxProfit=0; 4 in...
分类:
编程语言 时间:
2014-10-11 22:08:36
阅读次数:
174
求一个生成树,使得最大边权和最小边权之差最小。由于数据太小,暴力枚举下界,求出相应的上界。最后取min即可。 1 #include 2 #include 3 #include 4 using namespace std; 5 int n,m,fa[101],rank[101]; 6 void cle...
分类:
其他好文 时间:
2014-10-11 17:29:55
阅读次数:
146
1) Best Cross Platform IDE -
Brackets
Brackets是一个在前端Web开发和设计人员中最流行的开放源码IDE/代码编辑器之一。它拥有一些实用工具能够将HTML 和CSS推送至浏览,而不需要保存或重新加载页面。这是一个强大的工具,你将会爱上在Bracket中编写代码。
2) Best Cross Platform IDE -
Light Tab...
分类:
Web程序 时间:
2014-10-11 08:25:45
阅读次数:
281
用户退出应用前给出一个提示是很有必要的,因为可能是用户并不真的想退出,而只是一不小心按下了返回键,大部分应用的做法是在应用退出去前给出一个Dialog,我觉得这样不太友好,用户还得移动手指去按dialog中的按钮。个人觉得“再按一次返回键退出程序”是best practice,实现也很简单,直接上代...
分类:
移动开发 时间:
2014-10-11 01:47:44
阅读次数:
241
大道至简Any intelligent fool can make things bigger and more complex. It takes a touch of genius – and a lot of courage – to move in the opposite directio...
分类:
其他好文 时间:
2014-10-10 21:34:04
阅读次数:
174
#include#include#include#include#define MAX 102void read();using namespace std;int map[MAX][MAX],best[MAX],n;bool visit[MAX];int main(){ //freopen(...
分类:
其他好文 时间:
2014-10-10 12:47:34
阅读次数:
172
One of our best friends is getting married and we all
are nervous because he is the first of us who is doing
something similar. In fact, we have never assisted
to a wedding, so we have no clothes o...
分类:
其他好文 时间:
2014-10-10 01:16:33
阅读次数:
274
问题: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may co...
分类:
其他好文 时间:
2014-10-10 00:18:11
阅读次数:
398