C plus plus
一、数据类型123456#include <iostream> //引用标准输入输出库using namespace std; //使用命名空间int main(){ cout << "Hello,World!"; return 0;}
数据类型:
基本数据类型:短整型(short)、整型(int)、长整型(long)
构造类型:布尔型、枚举类型、数组类型、结构体类型、公用体类型、类类型
指针类型
引用类型
空类型
其他常量:
布尔常量:布尔类型只有两个,一个true(真),一个false(假)
枚举常量:枚举型数据中定义的成语也是常量
宏定义常量:通过#define宏定义的一些值也是常量。例如:define PI 3.14
字符变量:
123456789101112#include <iostream>using namespace std;void main(){ char c1,c2; c1 = 'a'; c2 = 'b ...
Hexo 命令操作
清除缓存
1hexo clean
生成静态文件
1hexo g
本地查看效果
1hexo s //或者 hexo s -p 5555
部署
1hexo d
一般发布文章或者修改博客后需要如此操作:
清除缓存->生成静态文件->启动服务器,测试没问题后再去部署
1hexo clean && hexo g && hexo s
1hexo d
编写文章的工具
Markdown
写博客文章我们会使用Markdown来排版,它通过一些简单的标记语法让文本具有一定的格式。写作体验和Word这种机械式的排版工具比起来完全不是一个level的。
Typora
接下来要介绍的主角是一个Markdown编辑器,它能让我们的写作体验达到顶峰。它就是Typora
常用快捷键和语法
标题:Ctrl + 1、2、3…对应一、二、三…级标题(光标定位到需要设置为标题的行,按快捷键)
加粗:Ctrl + B(选中要加粗的文本,按快捷键)
斜体:Ctrl + I(选中要设置斜体的文本,按快捷键)
下划线:Ctrl + U(选中要加下划线的文本,按快 ...
KQEvent
KQEvent
KQEvent是一个LINUX下的Reactor网络库,使用C++11实现。意图展示一个基本的异步非阻塞网络库的实现,最终会在此基础上实现一个Http Server和一个RPC框架。
编译1./build.sh
编译之后会看到build目录下面有samples文件夹,里面是一些示例。
###示例:
TCPServer示例1234567891011121314151617181920212223242526272829303132333435363738void TestServer(void){ auto server = TCPServer::newInstance("127.0.0.1:12000"); server->setConnectionNewHandler([](ConnectionPtr conn){ std::cout << "new connection from " << conn->get ...
Server
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
CentLabs
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
