wcf通过xml文件配置终结点什么的感觉有点小麻烦,个人还是觉得用代码形式配置比较好,当然在发布的时候可能会比较麻烦,需要重新编译。。。下面将wcf
service寄宿在控制台应用程序中并配置终结点:using (var host = new ServiceHost(typeof(Service1)...
分类:
其他好文 时间:
2014-06-06 09:49:18
阅读次数:
245
for(var i =0;i<100;i++) {
}alert(i);//100if(true){ var i="91d"; } alert(i);//91d function add(ad1,ad2){
sum=ad1+ad2; return sum;//如果没有用...
分类:
Web程序 时间:
2014-06-06 09:25:07
阅读次数:
256
概览 Swift
的条件语句包含if和switch,循环语句包含for-in、for、while和do-while,循环/判断条件不需要括号,但循环/判断体(body)必需括号:1
let individualScores = [75, 43, 103, 87, 12]2 var teamScor....
分类:
其他好文 时间:
2014-06-06 09:15:21
阅读次数:
192
function &m($model_name, $params = array(),
$is_new = false){ static $models = array(); $model_hash = md5($model_name .
var_export($params, true...
分类:
其他好文 时间:
2014-06-06 09:14:04
阅读次数:
292
创建和使用类 Swift 使用class创建一个类,类可以包含字段和方法:1 class
Shape {2 var numberOfSides = 03 func simpleDescription () -> String {4 return
"A shape w...
分类:
其他好文 时间:
2014-06-06 09:12:07
阅读次数:
217
给一个HTML元素设置css属性,如var head=
document.getElementById("head");head.style.width = "200px";head.style.height =
"70px";head.style.display = "block";这样写太罗嗦了...
分类:
Web程序 时间:
2014-06-06 08:38:08
阅读次数:
277
Hello, world 类似于脚本语言,下面的代码即是一个完整的 Swift 程序。1
println ("Hello, world")变量与常量 Swift 使用var声明变量,let声明常量。1 var myVariable = 422
myVariable = 503 let myCon.....
分类:
其他好文 时间:
2014-06-06 08:25:46
阅读次数:
240
Swift 使用来声明泛型函数或泛型类型:1 func repeat(item: ItemType,
times: Int) -> ItemType[] {2 var result = ItemType[]()3 for i in 0..times {4
result...
分类:
其他好文 时间:
2014-06-06 07:52:02
阅读次数:
299
协议 Swift 使用protocol定义协议:1 protocol
ExampleProtocol {2 var simpleDescription: String { get }3 mutating func adjust
()4 }类型、枚举和结构都可以实现(adopt)协议...
分类:
其他好文 时间:
2014-06-06 07:48:38
阅读次数:
302
只用一个循环,就可以找出被选中的checkbox的值 var s; $("[name =
b]:checkbox").each(function () { if (this.checked) { s += $(this).val() + "|"; }
});alert(s); 这样就可以了
分类:
Web程序 时间:
2014-06-06 07:27:29
阅读次数:
286