Hexo底部站长统计
注册账号https://www.umeng.com/
添加站点https://web.umeng.com/main.php?c=site&a=show
开启数据形式复制横排数据显示代码
Butterfly 开启Pjax使用下面代码12345{%raw%}<div class="js-pjax"><script type="text/javascript">document.write(unescape("%3Cspan id='cnzz_stat_icon_1279395259'%3E%3C/span%3E%3Cscript src='https://s4.cnzz.com/z_stat.php%3Fid%3D1279395259%26online%3D1%26show%3Dline' type='text/javascript ...
Linux服务器后台长期运行Hexo
安装screen1yum install screen -y
运行1234#新建一个名为hexo的session,并且自动进入screen -S hexo#运行hexo到4000端口,这里你可以设置为80端口hexo s -p 4000
参考https://yremp.live/linux-run-hexo/
hexo butterfly 添加樱花飘落效果
配置_configy.butterfly.yml相应位置修改
1234inject: head: bottom: - <script async data-pjax src="https://cdn.jsdelivr.net/gh/Yafine/cdn@3.3.4/source/js/sakura.js"></script>
参考https://yafine-blog.cn/posts/4ab2.html#12-%E6%B7%BB%E5%8A%A0%E6%A8%B1%E8%8A%B1%E9%A3%98%E8%90%BD%E6%95%88%E6%9E%9C
归并排序递归和非递归实现
分析例子:{3,1,5,4},升序排列
{3}{1}{5}{4}为有序序列,因为序列中只有一个元素;
序列长度为1:{3}和{1}这两个有序序列合并成一个有序序列{1,3},同理{4,5}
序列长度为1*2:{1,3}和{4,5}这两个有序序列合并,{1,3,4,5}
序列长度为1*2*2:{1,3,4,5}
上面例子,能得出我们要解决两个有序序列合并,并处理有序序列长度从1到1*2*2。
两个有序序列的合并算法分析归并排序是建立在归并操作上的一种有效的排序算法。该算法是采用分治法(Divide and Conquer)的一个非常典型的应用。
首先考虑下如何将将二个有序数列合并。这个非常简单,只要从比较二个数列的第一个数,谁小就先取谁,取了后就在对应数列中删除这个数。然后再进行比较,如果有数列为空,那直接将另一个数列的数据依次取出即可。
代码实现12345678910111213141516171819202122//将有二个有序数列a[first...mid]和a[mid...last]合并。void mergeArray(int a[], int first, int mid, ...
驼峰命名规范
驼峰命名前后端大部分规范都一样。一般的规范是:
常量不变的全大写加下划线。
类名大驼峰。
变量名和函数名用小驼峰。
参考https://www.zhihu.com/question/298883375/answer/1328933911
CLion 格式化代码
macOS快捷键option + command + l
CLion 上手体验
环境123456789101112CLion 2020.3Build #CL-203.5981.166, built on December 2, 2020Licensed to wei liningSubscription is active until April 11, 2021For educational use only.Runtime version: 11.0.9+11-b1145.21 x86_64VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.macOS 10.16GC: ParNew, ConcurrentMarkSweepMemory: 1987MCores: 4Registry: run.processes.with.pty=TRUE
Hello Worldnew project -> 选择C++ 14 executable(如果选择了library, 将.c文件内的函数名改为main .)
填写项目存放路径
1234567#include<bits/stdc++.h>using ...
域名邮箱
自定义域名邮箱
Forwardemail
自定义域名邮箱
forwardemail.net
网易邮
自定义域名邮箱
163.com
Zoho
自定义域名邮箱
zoho.com
Fastmail
自定义域名邮箱
fastmail.com
我用yandex注册 Yandex 邮箱传送门:https://passport.yandex.com/registration
可以选择用电话号码或者设置安全问题两种方式注册,我用手机号注册。
注册域名邮箱个人域名邮箱申请入口:Connect Yandex,点击右上角Try out,留空直接点击Sign up
配置域名https://admin.yandex.ru/domains
输入你的顶级域名注册,配置DNS,MX,点击Usershttps://admin.yandex.ru/users
点击Add users,加入admin@weilining.c ...
Hexo 最有效跳过 pjax
pjax官网https://github.com/MoOx/pjax
单页跳过pjax一般主题里会有exclude,这是整个页面跳过pjax
1234pjax: enable: false exclude: # - xxxx
举例:跳过 test 页面
1234pjax: enable: true exclude: - \test\
div跳过pjaxbutterfly 3.4.1找到blog/node_modules/hexo-theme-butterfly/layout/includes/third-party/pjax.pug
selectors对pjaxSelectors,下面这些class、id,都是能跳过pjax。
123456789script. let pjaxSelectors = [ 'title', '#config_change', '#body-wrap', '#rightside-config-hide', ' ...
vscode 最有效的压缩代码
html、css、js专用压缩用minify,让代码都变成一行,去除所有的空格,变得更精简用代码合并
html、css、js压缩min安装模块
command + shift + x输入minify并安装第一个
快捷键command+shift+p,调出命令窗口,输入minify,*.css会在当前目录下会生成*.min.css
效果源代码
123456789* { /*系统默认菜单被禁用*/ -webkit-touch-callout: none; /*webkit浏览器*/ -webkit-user-select: none; /*早期浏览器*/ -khtml-user-select: none; /*火狐*/ -moz-user-select: none; /*IE10*/ -ms-user-select: none; user-select: none;}
压缩后代码
1*{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz ...