发布订阅(pub/sub)是一种消息通信模式,主要的目的是解耦消息发布者和消息订阅者之间的耦合,这点和设计模式中的观察者模式比较相似。pub /sub不仅仅解决发布者和订阅者直接代码级别耦合也解决两者在物理部署上的耦合。redis作为一个pub/sub server,在订阅者和发布者之间起到了消息路由的功能。订阅者可以通过subscribe和psubscribe命令向redis
server订...
分类:
其他好文 时间:
2015-06-03 17:46:33
阅读次数:
181
发布订阅(pub/sub)是一种消息通信模式,主要的目的是解耦消息发布者和消息订阅者之间的耦合,这点和设计模式中的观察者模式比较相似。pub /sub不仅仅解决发布者和订阅者直接代码级别耦合也解决两者在物理部署上的耦合。redis作为一个pub/sub server,在订阅者和发布者之间起到了消息路...
分类:
其他好文 时间:
2015-06-03 17:31:12
阅读次数:
231
点积又叫做点乘,叉乘,可以判断对象是否在自己前方后方,或者前方多少度。var sub = enemy.transform.position - transform.position;var dot = Vector3.Dot(transform.forward, sub);if (dot > 0.5...
分类:
其他好文 时间:
2015-06-03 11:30:21
阅读次数:
110
Problem Description
How many nondecreasing subsequences can you find in the sequence S = {s1, s2, s3, ...., sn} ? For example, we assume that S = {1, 2, 3}, and you can find seven nondecreasing sub...
分类:
其他好文 时间:
2015-06-02 20:11:09
阅读次数:
169
Sub csv() Dim Fs, myFile As Object Dim myfileline As String 'txtfile的行数据 Dim sht As Worksheet For Each sht In ThisWorkbook.Sheets ns = sht.Cells(1, 8....
分类:
编程语言 时间:
2015-05-31 10:46:35
阅读次数:
277
Dim Foldar As StringPrivate Sub btn(ByVal Target As Range) If Target.Row = 1 And Target.Column = 1 Then Search End IfEnd SubSub Search() With Applicat...
分类:
编程语言 时间:
2015-05-29 19:43:29
阅读次数:
122
场景:本地服务器上,用“localhost”方式访问网站;在某网站集(Site Collection)下的子网站(Sub Site)中,点击网站权限菜单(Site permissions)等关于调用Layout下文件的情况,就出现“File not found”异常;配置网站web.config的C...
分类:
Web程序 时间:
2015-05-29 00:43:41
阅读次数:
202
转自:http://benchmarks.ro/2011/02/str_replace-vs-preg_replace/事实证明str_replace确实比preg_replace快。If you find yourself handling strings and replacing sub-st...
分类:
其他好文 时间:
2015-05-27 18:51:53
阅读次数:
121
打开文档后,按Alt+F11,在左边Porject下找到ThisDocument,右键插入模块,贴上下面的Sub Macro()For Each iShape In ActiveDocument.InlineShapesiShape.Height = iShape.Height * 0.25iSha...
分类:
其他好文 时间:
2015-05-27 11:51:08
阅读次数:
149
1.定义子程序 使用sub关键字定义 ; 子程序名和标识符同要求, 但是有的特殊的可以用 &符号; 子程序是全局的, 不需要再使用前声明; 重名函数后者覆盖前者.sub roger{ $n += 1; #全局变量$n print "Hello , sailor number $n!...
分类:
其他好文 时间:
2015-05-27 11:34:47
阅读次数:
111