官方定义:
Otto is an event bus designed to decouple different parts of your application while still allowing them to communicate efficiently.
原理
观察者模式 + 注解 + 反射
Otto实现篇
这里要注意几...
分类:
移动开发 时间:
2015-05-04 18:10:43
阅读次数:
261
SD驱动框架:
wince系统中sd驱动框架如下图所示,软件部分总体上可以分为3个层。最底层的是SD Host Controller Driver(sdhc.dll),这一层就是对硬件SD控制器直接操作的驱动层。在系统移植时,这一层驱动就需要根据实际处理器的SD控制器做修改。中间一层是SD Bus Driver(sdbus.dll),顾名思义是SD总线的驱动代码,负责SD HOS...
对于每个输入的站点求出所有点到这个站点的最短路。用anss数组存下来,然后就可以用anss数组求出答案了。题目分析清楚了 还是比较水的,折腾了一早上。。#include#include#include#include#include#includeusing namespace std;struct...
分类:
其他好文 时间:
2015-05-01 10:31:37
阅读次数:
135
方法一:TextView文字过多,显示不全,怎么办?我们可以为Textview添加滚动条。Activity添加的代码为busDetailContent=(TextView)findViewById(R.id.bus_detail_content);busDetailContent.setMoveme...
分类:
移动开发 时间:
2015-04-30 17:41:45
阅读次数:
337
题意:n个点m条边的图,求至少摧毁多少点可以使得从1到n的路径大于k。
思路:先预处理求出最短路,还要拆点,i与i‘之间连一条权为1的边,若边(u,v)满足dist1[u]+dist1[v]<k则添加 u‘ 到 v 的边,权为INF,求一次最大流即可。...
分类:
其他好文 时间:
2015-04-29 10:02:06
阅读次数:
154
#一个最简单的事件总线实现 [MicroBus](https://github.com/konmik/MicroBus) ##使用 注册 class Receiver implements MicroBus.BusEventReceiver { public onCreate() { bus.register(this, String.class); } pu...
分类:
编程语言 时间:
2015-04-26 16:55:20
阅读次数:
150
题意:给出n队人坐车,车每次只能装载m人,并且同一队的人必须坐同一辆车,问最少需要多少辆车自己写的时候想的是从前往后扫,看多少队的人的和小于m为同一辆车,再接着扫不过写出来不对后来发现把每一队的人装走之后,储存下这辆车还能装载的人数,每一次再判断 1 #include 2 #include ...
分类:
其他好文 时间:
2015-04-21 00:20:31
阅读次数:
183
P3P Header is present:CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"Compact Policy token is present. A trailing...
分类:
Web程序 时间:
2015-04-20 14:40:18
阅读次数:
166
In Berland a bus travels along the main street of the capital. The street begins from the main square and looks like a very long segment. There are n bus
stops located along the street, the i-th of ...
分类:
其他好文 时间:
2015-04-18 20:38:14
阅读次数:
196
Sightseeing
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 7421
Accepted: 2659
Description
Tour operator Your Personal Holiday organises guided bus trips ...
分类:
其他好文 时间:
2015-04-17 11:45:15
阅读次数:
136