摘要: • undefined means “no value” (neither primitive nor object). Uninitialized variables,missing parameters, and missing properties have that nonvalue. And functionsimplicitly return it if nothing has been explicitly returned.• null means “no object.” It is used as a nonvalue where an object is expecte. 阅读全文
posted @ 2014-04-12 15:14 LambdaTea 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 'use strict';var jane = { name: 'Jane', describe: function() { return 'Person named ' + this.name; }};var func = jane.describe;func(); //TypeError: Cannot read property 'name' of undefinedvar func2 = jane.describe.bind(jane); JS里的bind概念基本和C++是一样的,要有对象。 阅读全文
posted @ 2014-04-12 13:48 LambdaTea 阅读(503) 评论(0) 推荐(0) 编辑
摘要: http://curl.haxx.se/libcurl/ 阅读全文
posted @ 2013-12-12 15:05 LambdaTea 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 阅读书籍: >http://book.douban.com/subject/25735333/ 阅读全文
posted @ 2013-11-28 01:35 LambdaTea 阅读(154) 评论(0) 推荐(0) 编辑
摘要: T 阅读全文
posted @ 2013-11-16 15:55 LambdaTea 阅读(94) 评论(0) 推荐(0) 编辑
摘要: http://zh.wikipedia.org/wiki/%E4%BA%8C%E5%85%83%E6%90%9C%E5%B0%8B%E6%A8%B9二叉查找树(Binary Search Tree),或者是一棵空树,或者是具有下列性质的二叉树: 若它的左子树不空,则左子树上所有结点的值均小于它的根结点的值; 若它的右子树不空,则右子树上所有结点的值均大于它的根结点的值; 它的左、右子树也分别为二叉排序树。 阅读全文
posted @ 2013-11-09 17:28 LambdaTea 阅读(134) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include typedef boost::function ThreadFunc;void InvokeBackgroundThread(ThreadFunc f) { while(true) { try { boost::this_thread::interruption_point(); f(); } catch(boost::thread_interrupted const&) { std::cout thre... 阅读全文
posted @ 2013-11-05 14:47 LambdaTea 阅读(491) 评论(0) 推荐(0) 编辑
摘要: //模拟类式继承//Douglas CrockfordFunction.prototype.method = function(name,func) { this.prototype[name] = func; return this;};Function.method('inherits', function(parent) { var depth = 0; var proto = this.prototype = new parent(); this.method('uber', function uber(name)) { var func; ... 阅读全文
posted @ 2013-10-26 15:33 LambdaTea 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 感觉就是C++中的 functor+bind.http://stackoverflow.com/questions/5176313/javascript-curry// define the curry() functionfunction curry(fn, scope) { // set the scope to window (the default global object) if no scope was passed in. scope = scope || window; // Convert arguments into a plain array, bec... 阅读全文
posted @ 2013-10-25 17:18 LambdaTea 阅读(440) 评论(0) 推荐(0) 编辑
摘要: DWORD GetKernel32Base() { DWORD dwKernel32Addr = 0; __asm { push eax; mov eax,dword ptr fs:[0x30] //eax = address of peb mov eax,[eax+0x0C] //address of PEB_LDR_DATA mov eax,[eax+0x1C] // mov eax,[eax] mov eax,[eax+0x08] mov dwKernel32Addr,eax ... 阅读全文
posted @ 2013-10-24 19:22 LambdaTea 阅读(286) 评论(0) 推荐(0) 编辑