网站首页 站内搜索

搜索结果

查询Tags标签: LHS,共有 11条记录
  • modint自动取模

    modint 自动取模类模板简单的一种 constexpr int mod = 1e9 + 7; template <typename T> T inv(T a, T m) {T u = 0, v = 1;while (a != 0) {T t = m / a;swap(a, m -= t * a);swap(u -= t * v, v);}assert(m == 1);return u; } struct modint {int n;modint() : n(…

    2022/8/30 6:23:13 人评论 次浏览
  • js编译器相关概念

    一、执行上下文:所谓执行上下文就是js代码的执行环境。js引擎先编译,再解释执行代码。编译时会找到所有的标识符,做变量和函数声明提升。我们习惯将var a = 2; 看作一个声明,而实际上JavaScript 引擎并不这么认为。它将var a 和a = 2 当作两个单独的声明,第一个是编译…

    2022/3/10 23:14:44 人评论 次浏览
  • 《你不知道的JavaScript 上卷》笔记 (每天更新)

    第一章 作用域是什么 作用域:用来存储变量,并且之后可以方便地找到这些变量 JS 代码片段:编译 -> 执行引擎:负责 JS 程序的编译及执行过程 编译器:负责 语法分析、代码生成 作用域:负责 收集并维护由所有标识符(变量)组成的一系列查询,并确定当前执行的代码对…

    2021/12/1 17:06:49 人评论 次浏览
  • 《你不知道的JavaScript 上卷》笔记 (每天更新)

    第一章 作用域是什么 作用域:用来存储变量,并且之后可以方便地找到这些变量 JS 代码片段:编译 -> 执行引擎:负责 JS 程序的编译及执行过程 编译器:负责 语法分析、代码生成 作用域:负责 收集并维护由所有标识符(变量)组成的一系列查询,并确定当前执行的代码对…

    2021/12/1 17:06:49 人评论 次浏览
  • 【c++】C++自定义类注意事项

    #ifndef SALESITEM_H // were here only if SALESITEM_H has not yet been defined #define SALESITEM_H// Definition of Sales_item class and related functions goes here #include <iostream> #include <string>class Sales_item {// these declaration…

    2021/9/18 22:09:14 人评论 次浏览
  • 【c++】C++自定义类注意事项

    #ifndef SALESITEM_H // were here only if SALESITEM_H has not yet been defined #define SALESITEM_H// Definition of Sales_item class and related functions goes here #include <iostream> #include <string>class Sales_item {// these declaration…

    2021/9/18 22:09:14 人评论 次浏览
  • 智能指针中C++重载'->'符号是怎么实现的

    例如下面的代码:class StrPtr{ public:StrPtr() : _ptr(nullptr){}//拷贝构造函数等省略...std::string* operator->(){return _ptr;} private:std::string *_ptr; };std::string* operator->()/*这句代码的格式不是类似于前导运算符吗?类似于std::string operato…

    2021/8/26 14:36:02 人评论 次浏览
  • 智能指针中C++重载'->'符号是怎么实现的

    例如下面的代码:class StrPtr{ public:StrPtr() : _ptr(nullptr){}//拷贝构造函数等省略...std::string* operator->(){return _ptr;} private:std::string *_ptr; };std::string* operator->()/*这句代码的格式不是类似于前导运算符吗?类似于std::string operato…

    2021/8/26 14:36:02 人评论 次浏览
  • leetcode 692. 前K个高频单词 (百度)2021-08-03

    https://leetcode-cn.com/problems/top-k-frequent-words/ class Solution { public:class cmp{public:bool operator()(const pair<string, int>& lhs, const pair<string, int>& rhs){return lhs.second == rhs.second ? lhs.first < rhs.first…

    2021/8/3 23:36:59 人评论 次浏览
  • leetcode 692. 前K个高频单词 (百度)2021-08-03

    https://leetcode-cn.com/problems/top-k-frequent-words/ class Solution { public:class cmp{public:bool operator()(const pair<string, int>& lhs, const pair<string, int>& rhs){return lhs.second == rhs.second ? lhs.first < rhs.first…

    2021/8/3 23:36:59 人评论 次浏览
  • 《你不知道的JavaScript》读书笔记(一):JS是如何查找变量的

    这本书之前囫囵地看了一遍,确实点明了很多以前不清不楚的点,但是仅仅看一遍是没什么用的,最近面试遇到不少原理相关的题感觉答得不理想,回头看下其实以前都理解过,但是没有记下来,正好结合实际的问题来再学习一下书上的内容。 第一个问题:JavaScript是如何查找变量…

    2021/4/12 22:27:16 人评论 次浏览
扫一扫关注最新编程教程