摘要: 测试智能指针是否为 NULL 在Qt的项目中,osg里有智能指针 然后可能和C++标准库不同 ,在判断智能指针是否为空的时候 以下来自与《More Effective C++》 ,读了觉得很有收获 文尾有我看VS2019的MSVC2017中的头文件 和 osg的 但是有一件我们做不到的事情是“发现灵 阅读全文
posted @ 2020-02-20 14:34 Yan_Hao 阅读(4740) 评论(0) 推荐(0) 编辑
摘要: Inheritance继承 JavaScript使用基于原型的继承。 每个对象都有一个原型,并且当调用该对象的方法时,JavaScript会尝试从原型对象中查找要执行的正确函数。 The prototype attribute Without using the prototype object, 阅读全文
posted @ 2020-02-20 14:30 Yan_Hao 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Function Context函数下文bind &call Functions in JavaScript run in a specific context, and using the variable we have access to it. 浏览器中的所有标准功能都在Window上下文下 阅读全文
posted @ 2020-02-20 14:29 Yan_Hao 阅读(172) 评论(0) 推荐(0) 编辑
摘要: Object Oriented JavaScript面向对象 JavaScript uses functions as classes to create objects using the keyword. Here is an example: Creating an object using 阅读全文
posted @ 2020-02-20 14:28 Yan_Hao 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Callbacks回调函数 这是我比较感兴趣的部分,因为我的主要语言就是C++ 而在C++里面,回调函数常常伴随着函数指针,C形式的函数指针比较复杂,所以想看看JavaScript是怎么实现的; Callbacks in JavaScript are functions that are passe 阅读全文
posted @ 2020-02-20 14:26 Yan_Hao 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 从0开始学Javascript 这是网址,我摘了几个觉得重要的部分 Javascript一天就能学完 https://www.learn js.org/en/Hello%2C_World%21 "然后是回调函数" "然后是Javascript里面的面向对象" "函数上下文,bind&call" "继 阅读全文
posted @ 2020-02-20 14:25 Yan_Hao 阅读(282) 评论(0) 推荐(0) 编辑