Akka 设置延迟执行的Future_Patterns. after akka.pattern.Patterns.after makes it easy to complete a Future with a value or exception after a timeout. 代码如下, package?com.usoft;
import?akka.acto...
分类:
其他好文 时间:
2015-01-09 21:04:52
阅读次数:
272
Akka working with Future functionally_map方法 看代码, package?com.usoft;
import?akka.dispatch.ExecutionContexts;
import?akka.dispatch.Futures;
import?akka.dispatch.Mapper;
import?akka.dispat...
分类:
其他好文 时间:
2015-01-08 20:19:42
阅读次数:
182
Akka Actor_Future的使用 常见的是通过Actor的tell方法给另外一个actor发送消息,但是actor 和 future怎么交互,发送消息,如下, Future<Object>?future?=?Patterns.ask(a,?"are?you?ready?",?timeout);...
分类:
其他好文 时间:
2015-01-08 18:19:36
阅读次数:
261
Python中分为3种除法:传统除法、精确除法、地板除。传统除法:如果是整数除法则执行地板除,如果是浮点数除法则执行精确除法。>>>1/20>>>1.0/2.00.5精确除法:除法总是会返回真实的商,不管操作数是整形还是浮点型。执行from __future__ import division 指令...
分类:
其他好文 时间:
2015-01-07 23:22:26
阅读次数:
249
Java并发编程实践 目录并发编程 01—— ConcurrentHashMap并发编程 02—— 阻塞队列和生产者-消费者模式并发编程 03—— 闭锁CountDownLatch 与 栅栏CyclicBarrier并发编程 04—— Callable和Future并发编程 05—— Complet...
分类:
其他好文 时间:
2015-01-07 20:36:07
阅读次数:
167
controller中调用find()操作数据库时报错:Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instea...
分类:
Web程序 时间:
2014-12-30 13:18:30
阅读次数:
137
The Wideman Comparative Glossary of Common Project Management Terms describes estimating cost as, "the process of forecasting a future result in terms...
分类:
其他好文 时间:
2014-12-29 10:23:53
阅读次数:
132
一、Future模式简介Future有道翻译:n.未来;前途;期货;将来时。我觉得用期货来解释比较合适。举个实际生活中例子来说吧,今天我女朋友过生日,我去蛋糕店准备给女朋友定个大蛋糕,超级大的那种。“老板,我要个最大最漂亮的蛋糕”“好,999元,先付款吧”“这么贵!!!”想想还是买了吧,掏了钱,付了...
分类:
其他好文 时间:
2014-12-26 18:08:23
阅读次数:
174
【Fundamentals of Garbage Collection】1、Reclaims objects that are no longer being used, clears their memory, and keeps the memory available for future a...
分类:
其他好文 时间:
2014-12-26 14:22:18
阅读次数:
192
#!/usr/bin/envpython#-*-coding:utf8-*-#someimports:from__future__importprint_functionimportsys#displayinfos:PYTHONVERSION=sys.version_info[0]*10+sys.v...
分类:
其他好文 时间:
2014-12-24 20:07:06
阅读次数:
167