Problem Description Now you are back,and have a task to do: Given you a string s consist of lower-case English letters only,denote f(s) as the nu...
分类:
其他好文 时间:
2015-01-12 23:44:24
阅读次数:
272
在做安卓应用是我们经常要判断用户对返回键的操作,一般为了防止误操作都是在用户连续按下两次返回键的时候提示用户是否退出应用程序。 第一种实现的基本原理就是,当按下BACK键时,会被onKeyDown捕获,判断是BACK键,则执行exit方法。在exit方法中,会首先判断isExit的值,如果为fals...
分类:
移动开发 时间:
2015-01-12 15:56:23
阅读次数:
255
输入字符串单词,将单词小写全部变为大写。
#include
#include
#include
using namespace std;
int main()
{
vector ss;
string s;
while(cin>>s)
ss.push_back(s);
for(int i=0;i<ss.size();i++)
{
for(int j=0;j<ss[i]....
分类:
其他好文 时间:
2015-01-12 09:21:51
阅读次数:
135
在c++中,vector是一个十分有用的容器,下面对这个容器做一下总结。1 基本操作(1)头文件#include.(2)创建vector对象,vector vec;(3)尾部插入数字:vec.push_back(a);(4)使用下标访问元素,cout::iterator it;for(it=vec....
分类:
编程语言 时间:
2015-01-11 16:09:23
阅读次数:
237
One of my friend came to me with an Android phone. She saild somehting wrong with the hardware of her friend's phone, and her friend are eager to back...
分类:
移动开发 时间:
2015-01-11 10:53:14
阅读次数:
1312
Doing Homework
Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
Ignatius has just come back school from the 30th ACM/ICPC. Now he ...
分类:
其他好文 时间:
2015-01-10 22:25:36
阅读次数:
208
当一个APP启动时,系统会为这个APP创建一个回退栈(任务),用于保存APP所有已经创建的额Activity。当应用启动时,主窗口将第一个被压入回退栈,当显示本应用的其他窗口时,也会按显示顺序创建窗口压入回退栈。回退栈的顶层窗口将会获得焦点,可以与用户交互。当执行Activity的finish方法或者按Back键时,顶层窗口将出栈被销毁,下一个窗户获得焦点同用户交互。例如一个APP有3个窗口,分别...
分类:
其他好文 时间:
2015-01-10 21:03:01
阅读次数:
209
/**
* 屏蔽back键
*/
@Override
public boolean dispatchKeyEvent(android.view.KeyEvent event) {
switch(event.getKeyCode())
{
case KeyEvent.KEYCODE_BACK:
return false;
}...
分类:
移动开发 时间:
2015-01-10 18:14:03
阅读次数:
169
cocos2dx 监听android设备按键响应的方法很简单,直接上代码
注册一个Listener,方法跟触摸监听一样,3.x以后做法都是这样...
分类:
移动开发 时间:
2015-01-10 16:43:25
阅读次数:
217