摘要: public class SingletonProvider<T> where T : new() { SingletonProvider() { } public static T Instance { get { return SingletonCreator.instance; } } class SingletonCreator { static SingletonCreato...
阅读全文
摘要: 1. return (a&&b) || (b&&c) || (a&&c);2. int count = 0; if(a) count++; if(b) count++; if(c) count++; return count >= 2;3. 卡诺图 return a?(b||c):(b&&c);4. retu...
阅读全文
摘要: <script type="text/javascript"> var test = { numA: 10, objB: {}, arrC: [], init: function(){ alert(this.numA); }, sayHi: function(name){ alert("hello " + name); }, sayHelloWorld: function(){ th...
阅读全文
摘要: var Z = "constructor";Z[Z][Z]("alert('wtf js!')")();// alert wtfjs!点解?发生什么了?Z[Z]// function String(){[native code]}Z[Z][Z]// function Function(){[native code]}解释: Z[Z]-->string["constructor"]-->...
阅读全文