上一页 1 2 3 4 5 6 ··· 11 下一页
摘要: #TitleSolutionAcceptanceDifficulty备注 2 Add Two Numbers 34.7% Medium 无聊 3 Longest Substring Without Repeating Characters 30.9% Medium pass 5 Longest Pa 阅读全文
posted @ 2020-12-04 20:26 newbird2017 阅读(62) 评论(0) 推荐(0) 编辑
摘要: 1、他们用有限的数位,表示无限扩张的数。 (lldb) print 1e20 + (-1e20 + 3.14) (double) $3 = 0 阅读全文
posted @ 2020-06-19 10:46 newbird2017 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 这半年的目标-深度学习推理优化专家 一、CSAPP 深入理解计算机系统公开课 - 1个月 https://www.bilibili.com/video/BV1iW411d7hd?from=search&seid=10019327483576582110 二、计算机体系结构公开课 - 1个月 http 阅读全文
posted @ 2020-06-19 09:11 newbird2017 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1、多线程间共享数据存在什么问题? 不变式。比如:is_empty()接口返回的永远是接口是否为空。比如,size()接口返回的是这个list中的节点个数。 比如 这个双向list的每个节点都持有指向它前后节点的指针。 当多线程操作这些共享数据的时候,这个不变式有时候会遭到破坏。 比如,你在删除一个 阅读全文
posted @ 2020-05-01 18:47 newbird2017 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 顶层和底层的翻译很容易让人误解为就只有两层,实际上当然是不是的。首先我们假设有这样的代码: template<typename T> using Const = const T; template<typename T> using Ptr = T*; 然后 const int *** const 阅读全文
posted @ 2020-04-20 17:12 newbird2017 阅读(285) 评论(0) 推荐(0) 编辑
摘要: struct Registry::Manager { // map storing the functions. // We delibrately used raw pointer // This is because PackedFunc can contain callbacks into t 阅读全文
posted @ 2019-12-10 19:21 newbird2017 阅读(436) 评论(0) 推荐(0) 编辑
摘要: 一、Overloading Rules for Rvalue and Lvalue References 左值引用和右值引用的优先级问题 1、如果只实现了左值引用,那么不能传入右值和const。 void f(X& x); 2、如果只实现了void f(const X& x); 可以接收左值和右值。 阅读全文
posted @ 2019-11-28 15:46 newbird2017 阅读(181) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> class A{ public: A(){f();} virtual void f(){printf("in class A\n");} }; class B:public A{ public: void f(){printf("in class B\n");} 阅读全文
posted @ 2019-11-15 19:16 newbird2017 阅读(86) 评论(0) 推荐(0) 编辑
摘要: POD: 结构体内的成员,必须按声明的先后顺序存储。粗略的是这样。 但是 栈又是从高到低增长的。 所以,一个变量在获得一个栈的一片内存后,不同的object之间,定义先后的object,内存地址是相反的。 但是在一个object内部,是从低到高的。 继承是以追加的方式。 阅读全文
posted @ 2019-11-15 15:40 newbird2017 阅读(200) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <stdio.h> using std::cout; using std::endl; class A{ public: A(int a):r(a){printf("A::r %p\n", &r);} int & r; }; int main 阅读全文
posted @ 2019-11-15 11:29 newbird2017 阅读(437) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页