摘要: class Program { static void Main() { Thread t = new Thread(ShowMessage); t.Start(); Console.WriteLine("Start For"); for (var i = 0; i < 10; i++) { Con 阅读全文
posted @ 2016-06-20 10:16 shidengyun 阅读(246) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { Console.WriteLine("Increment counter"); var c = new Counter(); var t1 = new Thread(() => TestCounter 阅读全文
posted @ 2016-06-20 09:55 shidengyun 阅读(1870) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections;using System.Collections.Generic;using System.ComponentModel;using System.Linq;using System.Net.NetworkInformati 阅读全文
posted @ 2016-06-12 11:10 shidengyun 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 时间 2016-05-17 12:43:59 OurJS原文 http://ourjs.com/detail/573a9cec88feaf2d031d24fc主题 jQuery这是一篇使用原生JavaScript代替jQuery实践的文章, GitHub 原文前端发展很快,现代浏览器原生 API 已 阅读全文
posted @ 2016-05-17 13:11 shidengyun 阅读(984) 评论(0) 推荐(0) 编辑
摘要: var db = openDatabase('mydb', '1.0', 'Test DB', 2 * 1024 * 1024); var msg; db.transaction(function (tx) { tx.executeSql('CREATE TABLE IF NOT EXISTS LO 阅读全文
posted @ 2016-05-16 13:45 shidengyun 阅读(120) 评论(0) 推荐(0) 编辑
摘要: var img = document.createElement('A'); img.src = "/img/weixin.jpg"; // 设置相对路径给Image, 此时会发送出请求 url = img.src; // 此时相对路径已经变成绝对路径 img.src = null; // 取消请求 阅读全文
posted @ 2016-05-03 09:47 shidengyun 阅读(135) 评论(0) 推荐(0) 编辑
摘要: function strMapToObj(strMap) { let obj = Object.create(null); for (let [k,v] of strMap) { obj[k] = v; } return obj;}function objToStrMap(obj) { let st 阅读全文
posted @ 2016-05-03 08:49 shidengyun 阅读(218) 评论(0) 推荐(0) 编辑
摘要: JavaScript实现的发布/订阅(Pub/Sub)模式时间 2016-05-02 18:47:58 GiantMing's blog原文 http://giantming.net/javascriptshi-xian-de-fa-bu-ding-yue-pub-sub-mo-shi/主题 Jav 阅读全文
posted @ 2016-05-03 07:16 shidengyun 阅读(4026) 评论(0) 推荐(2) 编辑
摘要: function convertArray(nodeList){ var arr = [] if(Array.prototype.slice){ arr = [].slice.call(nodeList); }else{ for(var i=0,len = nodeList.length;i<len 阅读全文
posted @ 2016-05-03 07:05 shidengyun 阅读(636) 评论(0) 推荐(0) 编辑
摘要: "use strict";(function(InjectedScriptHost, inspectedGlobalObject, injectedScriptId) { var Object = ({}.constructor); function push(array, var_args) { 阅读全文
posted @ 2016-04-29 09:25 shidengyun 阅读(759) 评论(0) 推荐(0) 编辑