Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment
Vibe Coding学习
环境部署NodeJS部署官方下载渠道直接下载 LTS(长期支持)版本: ·官方主站:https://nodejs.org/(或中文站 https://nodejs.org/zh-cn/)·历史版本归档:https://nodejs.org/en/download/archive/(如需旧版本) 验证安装打开命令行输入以下命令以验证安装: 12node -vnpm -v 若分别输出版本号(如v24.x.x和11.x.x),说明安装成功。 Python环境部署官方下载渠道:https://www.python.org/ 验证安装: 12python --versionpip --version 若分别输出对应版本号,说明安装成功。 git部署官方下载渠道:https://git-scm.com/install 验证安装: 1git --version 若输出对应版本号,说明安装成功。 Claude Code部署12345# 如果网络环境不太好可以先执行这条命令npm config set registry https://registry.npmmirror.com# 执行如下命令,...
虚函数底层原理
虚函数、多态靠虚函数表(vtable)和虚指针(vptr)实现。编译时,编译器自动生成查表代码,运行时查表跳转。以下以GCC/Linux平台为例(VS大体相同)。 对比没有虚函数的普通类12345class Base{public: void fun(){} int a;}; -对象内存:只有成员变量int a。-成员函数不在对象内,存放在代码段(.text),所有对象共用一份函数。-静态绑定:编译期直接确定函数地址。 有虚函数(virtual)的类123456789class Base{public: Base() { a=10; } virtual fun(){} int a;}; 1.对象内存分布对象最开头,编译器自动插入了一个隐藏成员变量:虚指针(vptr)。 123Base 对象内存(8字节,64位)0x00|vptr (8字节,指针,指向虚函数表首位)0x08|a (int,4字节,对齐后占8) -每一个...
