a new post for new pc
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 Start
Create a new post
1 | $ hexo new "My New Post" |
More info: Writing
Run server
1 | $ hexo server |
More info: Server
Generate static files
1 | $ hexo generate |
More info: Generating
Deploy to remote sites
1 | $ hexo deploy |
More info: Deployment
hexo 部署到github pages关键步骤
1.hexo工程文件,博客内容的markdown文件,需要保存在一个分支。而生成的静态网站,需要存放在另外分支。
2.生成的静态网站并且发布到另外一个分支,可以通过hexo的插件完成。
步骤1:
修改_config.yml文件,在最后加入以下配置:
deploy:
type: git
repository: https://github.com/username/username.github.io
branch: main
需要注意的发布分支bran需要和归档分支不同,发布分支需要和git仓pages设置中的分支一致
步骤2:
安装
npm install hexo-deployer-git –save
步骤3:
生成和发布
hexo clean
hexo g
hexo d
gcc多版本切换
执行以下命令
sudo apt install build-essential
$ sudo apt -y install gcc-7 g++-7 gcc-8 g++-8 gcc-9 g++-9
sudo update-alternatives –install /usr/bin/gcc gcc /usr/bin/gcc-7 7
sudo update-alternatives –install /usr/bin/g++ g++ /usr/bin/g++-7 7
sudo update-alternatives –install /usr/bin/gcc gcc /usr/bin/gcc-8 8
sudo update-alternatives –install /usr/bin/g++ g++ /usr/bin/g++-8 8
sudo update-alternatives –install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives –install /usr/bin/g++ g++ /usr/bin/g++-9 9
$ sudo update-alternatives –config gcc
There are 3 choices for the alternative gcc (providing /usr/bin/gcc).
Selection Path Priority Status————————————————————
0 /usr/bin/gcc-9 9 auto mode
1 /usr/bin/gcc-7 7 manual mode*
2 /usr/bin/gcc-8 8 manual mode
3 /usr/bin/gcc-9 9 manual mode
Press to keep the current choice[*], or type selection number:
$ sudo update-alternatives –config g++
There are 3 choices for the alternative g++ (providing /usr/bin/g++).
Selection Path Priority Status————————————————————*
0 /usr/bin/g++-9 9 auto mode
1 /usr/bin/g++-7 7 manual mode
2 /usr/bin/g++-8 8 manual mode
3 /usr/bin/g++-9 9 manual mode
Press to keep the current choice[*], or type selection number:
$ gcc –version
$ g++ –version
fftw编译
fftw 3.3.10版本,目前支持cmake编译
windows编译过程如下
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DENABLE_FLOAT=ON -DENABLE_SSE=ON -DENABLE_SSE2=ON -DENABLE_AVX=ON -DENABLE_AVX=ON -A x64 ..
1)去掉-A X64,就会编译x86架构
2) 会生成visual studio工程,然后用IDE编译或者通过命令行触发编译即可