- Head object只有一个,即window
- Global object为全局变量(函数也是变量),它们的上级是Head object
var name = 'jason chuh'; var title = 'Mr.';
| """ | |
| >>> char = 'a' | |
| >>> str = char * 3 | |
| >>> str | |
| 'aaa' | |
| >>> str[0] = 'b' | |
| Traceback (most recent call last): | |
| File "<stdin>", line 1, in <module> | |
| TypeError: 'str' object does not support item assignment | 
| // 传递Header | |
| using (WebChannelFactory<IService> wcf = new WebChannelFactory<IService>(new Uri("http://localhost:"+port+"/Web"))) | |
| { | |
| IService channel = wcf.CreateChannel(); | |
| // 首先创建OperationContextScope | |
| // ** 注意OperationContextScope只能使用在单个调用内,不能跨调用包裹 ** | |
| using ( OperationContextScope scope = new OperationContextScope((IContextChannel)channel)) | |
| { | |
| // 传递Header | 
| // 协议定义 | |
| [OperationContract] | |
| [WebInvoke | |
| ( | |
| // UriTemplate="/EchoWithPost", | |
| // Method="POST", 默认为POST | |
| // BodyStyle = WebMessageBodyStyle.Bare, 默认为Bare无包裹 | |
| RequestFormat=WebMessageFormat.Json, | |
| ResponseFormat=WebMessageFormat.Json | |
| ) | 
地址 = Protocal :// MachineName/DomainName/IP [:Port]
| class Panel extends Backbone.View | |
| el: $('#test') | |
| events: | |
| 'click #superZone': 'clickMyZone' | |
| initialize: -> | |
| $("#test").append '<span id="superZone">Panel initialized</span>, ' | |
| @foo = 'bar' | |
| render: -> | |
| $("#test").append 'super render' | |
| @ | 
| # 中文全文检索,使用mmseg | |
| ## 创建索引 | |
| PUT http://localhost:9200/index | |
| ## 设置mapping | |
| POST /index/fulltext/_mapping | |
| { | |
| "fulltext": { | |
| "_all": { |