1.to_proc
class Array
def to_proc
proc { |receiver| receiver.send *self }
end
end
[ 'Hello', 'Goodbye' ].map &[ :+, ' BeiJing!' ]
#=> ["Hello BeiJing!", "Goodbye BeiJing!"]
recei...
分类:
其他好文 时间:
2014-08-29 18:18:48
阅读次数:
165
Description
When a radio station is broadcasting over a very large area, repeaters are used to retransmit the signal so that every receiver has a strong signal. However, the channels used by each rep...
分类:
其他好文 时间:
2014-08-28 16:15:57
阅读次数:
163
Foundation Framework 定义了 NSObject(NSKeyValueCoding),- (void)setValue:(id)value forKey:(NSString *)key;该接口的说明1. 先在message receiver的class中搜索方法 -set:2. 如...
分类:
移动开发 时间:
2014-08-27 23:12:58
阅读次数:
258
在Objective-C中,message与方法的真正实现是在执行阶段绑定的,而非编译阶段。编译器会将消息发送转换成对objc_msgSend方法的调用。objc_msgSend方法含两个必要参数:receiver、方法名(即:selector),如:[receiver message];将被转换为...
分类:
其他好文 时间:
2014-08-27 10:37:57
阅读次数:
205
If the receiver is a fault, calling this method does not cause it to fire. ////这句话真心不明白?还请大虾赐教@@...
分类:
移动开发 时间:
2014-08-22 13:03:38
阅读次数:
260
Broadcast Receiver用于接收并处理广播通知(broadcast announcements)。多数的广播是系统发起的,如地域变换、电量不足、来电来信等。程序也可以播放一个广播。程序可以有任意数量的 broadcast receivers来响应它觉得重要的通知。broadcast re...
分类:
其他好文 时间:
2014-08-21 18:55:24
阅读次数:
255
pip install
UC浏览器插件是个什么玩意?
如图所示,便是UC的插件面板。 UC通过开放浏览器插件api, 使开发者能够进行插件的开发。
插件种类:
1 : extension。 就是上图中显示的button 。 实际上也确实就是button, 通过点击来触发事件。
2 : receiver: 通过对各种浏览器事件进行监听来触发事件。
插件定义:
...
分类:
其他好文 时间:
2014-08-19 20:51:15
阅读次数:
248
android在屏幕打开和关闭的时候会发出广播,但是如果receiver配置在AndroidManifest.xml中时,receiver是接受不到任何广播的。 只能在代码中...
分类:
移动开发 时间:
2014-08-18 17:50:22
阅读次数:
240
跨应用发送和接收广播,与同应用下的情况差不多,只需要添加一个权限,以及配置一下receiver的android:process属性即可发送广播的应用中:Java代码Intentintent=newIntent("info.zhegui.receiver.interprocess");sendBroa...
分类:
其他好文 时间:
2014-08-18 12:59:12
阅读次数:
181
广播接受者是作为系统的监听者存在着的,它可以监听系统或系统中其他应用发生的事件来做出响应。如设备开机时,应用要检查数据的变化状况,此时就可以通过广播来把消息通知给用户。又如网络状态改变时,电量变化时都可以通过广播来通知用户。要做比喻的话,广播就像是我们的感官,能够有效且快速的从外界获取信息来反馈给自...
分类:
移动开发 时间:
2014-08-18 10:37:54
阅读次数:
337