【题目链接】click here~~
【题目大意】:
You are given string s. Your task is to determine if the given string s contains two non-overlapping substrings “AB” and “BA” (the substrings can go in any order).
Inp...
分类:
其他好文 时间:
2015-06-27 16:44:19
阅读次数:
145
//Class WechatOfferExcutor 此类为微信触发类,属于上层调用类,其中有用到用静态变量缓存offer信息,Task异步执行发送方法等using Newtonsoft.Json.Linq;using System;using System.Collections.Generic;...
分类:
微信 时间:
2015-06-26 17:38:28
阅读次数:
350
Ansibleplaybook的使用playbooks概念task:任务:使用各模块所执行的特性操作任务,比如:-muser-a‘name=password=‘Variables:变量:Templates:模板在定义模板后可以实现各节点对应的变量来取代,表达式自身会根据当前节点所赋值做运算,之后生成的值则赋予这个参数,用于生产不..
分类:
其他好文 时间:
2015-06-26 13:10:23
阅读次数:
293
运行错误:Activity not started, its current task has been brought to the front 。原因分析:因为你的模拟器中还有东西在运行,也就是你要运行的activity已经有一个在模拟器中运行了。不要以认为模拟器退出到桌面了就没有东西在跑了。在...
分类:
其他好文 时间:
2015-06-26 10:30:42
阅读次数:
102
1.dawn是单线程的:
为什么单线程?现实中很多程序都是单线程的,比如redis,memcache,nodejs,mmorpg服务器。。。。。。采用单线程有两大好处,首先,不需要使用锁,逻辑更容易理解,不易出错,其次,减少了切换线程时的调度成本。
2.什么是Task
dawn中使用了Task,这其实是kilim中的协程,协程最基本的功能是挂起和恢复,这点和线程是一致的。所有的Tas...
分类:
其他好文 时间:
2015-06-26 09:16:37
阅读次数:
119
Java代码? ?/** ?* 打开文件 ?* @param file ?*/? private void openFile(File file){? ????? ??? Intent intent = new Intent();? ??? intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);? ...
分类:
移动开发 时间:
2015-06-26 06:57:55
阅读次数:
209
僵尸进程:本质是进程描述符task_struct;维护子进程的状态,包括子进程ID,终止状态以及进程的资源利用情况(cpu时间,内存)int wait(int*stat_loc):成功之后返回终止子进程的pid,失败返回-1,并设置errno1、wait调用堵塞进程直到有任一一个子进程终止,则立刻返...
分类:
系统相关 时间:
2015-06-25 22:40:56
阅读次数:
320
apue中:其中进程表项内部的数组又称为 进程打开文件表 另外一个角度:从linux内核角度开:task_struct是进程描述符对应上面的进程表项,在task_struct描述符中有struct file_struct*类型的变量file,指向struct file_struct结构。1.file...
分类:
系统相关 时间:
2015-06-25 19:28:18
阅读次数:
216
1.包装线程对象class task : public std::tr1::enable_shared_from_this{public: task():exit_(false){} task( const task & ) = delete; ~task(){} task & operator =...
分类:
编程语言 时间:
2015-06-25 15:19:04
阅读次数:
188
Android获取Activity(应用)的运行状态及其他信息
检测某Activity是否在当前Task的栈顶
判断Android应用是否在前台
获取Android手机内安装的所有桌面
Android 判断程序前后台状态...
分类:
移动开发 时间:
2015-06-25 12:26:01
阅读次数:
155