摘要:参考: https://blog.csdn.net/lyqzzy/article/details/59849252 https://baike.baidu.com/item/二叉堆 二叉堆是一种特殊的堆,二叉堆是完全二元树(二叉树)或者是近似完全二元树(二叉树)。 二叉堆有两种:最大堆和最小堆。最大
阅读全文
摘要:1.vscode 安装 JavaScript Debugger (Nightly) 2.修改launch.json里面端口的值 端口号是cocos creator运行打开网页的端口号, vscode launch.json修改好后, 保存, 按F5就要吧启动调试了, 原typescript文件里面打
阅读全文
摘要:原文地址:https://blog.csdn.net/gao1440156051/article/details/45670715 父类使用虚函数是为了让子类重写,那子类重写的时候也需要带virtual关键字吗?比如:class Base{virtual bool init();};class De
阅读全文
摘要:#include <iostream> #include <unordered_map> using namespace std; class TestClass { public: std::unordered_map<int, int>& GetData() { return m_data; }
阅读全文
摘要:例子1: class User { public: int32_t m_fight_power; private: int32_t m_level; }; bool CenterData::compare(const User *left, const User *right) { if(left-
阅读全文
摘要:static_cast: 指针强转, 如果某个基类有多个子类, 基类的指针实际是指向A类的对象, 但使用强转为B类对象, 运行时会报错, 静态强转没做检测dynamic_cast: 只能用于虚函数类, 子类与父类指针互转, 会检测, 转换失败为返回空, 不会崩const_cast: 用于转换常量,
阅读全文
摘要:原理: 系统已运行时间是不断增长的, 用户修改系统自带的时钟, 这个值不会变. 利用这个固定值加上自定义的时间长度, 计算出当前时间. C++ 98, windows使用 GetTickCount64()取固定时间, linux使用clock_gettime(CLOCK_MONOTONIC, &tp
阅读全文
摘要:原帖:https://blog.csdn.net/myRealization/article/details/111189651 cppreference https://en.cppreference.com/w/cpp/utility/functional/function boost源码剖析之
阅读全文
摘要:#include <iostream> #include <thread> #include <vector> #include <chrono> #include <atomic> using namespace std; int num = 0; //volatile int num = 0;
阅读全文
摘要:package main import "fmt" //全局变量不使用, 不报错, 局部变量会 var n1 = 1 var n2 = 2 var ( n3 = 3 n4 = "netty" ) var abc uint = 15 // ab := 3 //non-declaration state
阅读全文
摘要:原文地址 https://www.cnblogs.com/Joke-Jay/p/8215295.html virualbox里面设置nat模式(我这儿配置virtual时, 第一张网卡是NAT模式, 还加了一张网卡, 选择了host-only模式, 估计不是必须) 修改centos里面文件: vi
阅读全文
摘要:[原]https://www.cnblogs.com/yzlsthl/p/15193756.html 1 cpu、内存、io进程排查,使用 top、iotop、nethogs、iostat -x 1等命令2 慢sql优化,加索引,sql逻辑3 接口响应慢的,缓存4 执行时间长的定时任务,异步5 对3
阅读全文
摘要:原文:https://www.cnblogs.com/opensmarty/p/10936315.html lsb_release -a 查看发行版本 lsb表示 linux standard base, -a表示显示全部 cat /proc/version 看内核版本
阅读全文
摘要:原文: https://blog.csdn.net/cw_hello1/article/details/105968359 1.在window中,进行端口转发时,使用portproxy模式下进行配置。必须使用管理员身份运行下面的命令。 2.创建一个端口转发: netsh interface port
阅读全文