Description
Problem D: Airport Express
In a small city called Iokh, a train service, Airport-Express, takes residents to the airport more quickly than other transports. There are...
分类:
其他好文 时间:
2014-07-22 22:49:34
阅读次数:
262
一 ?准备 ????此文假设你已经安装如下 openstack 的其他组件 1.?nova?-------?compute?service
2.?keystone?---?identity?service
3.?glance?-----?image?service
4.?neutron?----?network?...
分类:
其他好文 时间:
2014-07-22 08:37:35
阅读次数:
422
一、 Service简单介绍Service是android 系统中的四大组件之中的一个(Activity、Service、BroadcastReceiver、ContentProvider),它跟Activity的级别差点儿相同,但不能自己执行仅仅能后台执行,而且能够和其它组件进行交互。servic...
分类:
移动开发 时间:
2014-07-21 08:28:32
阅读次数:
291
需要加一个权限: ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); List runningTasks = manager .getRunningTasks(1);...
分类:
其他好文 时间:
2014-07-21 00:15:59
阅读次数:
212
1.Binder通信机制介绍这篇文章会先对照Binder机制与Linux的通信机制的区别,了解为什么Android会另起炉灶,採用Binder。接着,会依据Binder的机制,去理解什么是Service Manager,在C/S模型中扮演什么角色。最后,会从一次完整的通信活动中,去理解Binder通...
分类:
其他好文 时间:
2014-07-20 22:39:48
阅读次数:
349
《Kivy A to Z -- 如何从python代码中直接访问Android的Service》 一文中讲到了如何从python访问java的service,这一篇再来讲下如何创建一个基于Binder的Python Service以及如何从Java代码中访问这个Python创建的Service。...
分类:
编程语言 时间:
2014-07-20 22:12:03
阅读次数:
312
接着上一篇:《ASP.NET SignalR系列》第三课 SignalR的支持平台一、概述 SignalR常常依托于ASP.NET应用程序运行于IIS中,但它还可以自我托管(比如作为consolewinform、Windows service).只要我们使用self-host库就可以了.该库向所有....
分类:
Web程序 时间:
2014-07-20 21:33:59
阅读次数:
531
目的:利用shell脚本每小时检测数据库是否在运行,当检测到库宕掉时发邮件告警。
1.检查sendmail是否在运行
servicesendmailstatus
没有在运行则启动或安装。
如果是linux6,则检查postfix是否在运行servicepostfixstatus
2.pmon是oracle五大关键进程之一,如果pmon进..
分类:
其他好文 时间:
2014-07-20 10:36:28
阅读次数:
234
这个也是昨天学习的,做下总结。
检查服务是否开启要写成一个工具类,方便使用,传服务的名字返回Boolean值,当然,因为需要,还要传一个上下文context。
说一下这个工具类的几个关键点:
1.方法要传context和serviceName,context用来getSystemService()操作获得ActivityManager。注意,这个方法参数要用大写的Context中的参数:Context.ACTIVITY_SERVICE,要不然会出错,还不知道哪错的,花了我10分钟的时间才知道,谨记下。
2....
分类:
移动开发 时间:
2014-07-20 10:28:16
阅读次数:
200
服务端如何暴露IBinder接口对象:
package com.example.mydownload;
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
public class MyService extends Se...
分类:
其他好文 时间:
2014-07-20 09:34:28
阅读次数:
201