- 博客(8)
- 资源 (10)
- 收藏
- 关注
原创 cmake常用的命令
cmake 常见的命令类型调试函数控制流正则表达式targetfilepackage类型字符串 string基础格式 “…”,如 “dd${var}dd”,“a string”转义字符加双斜杠,如 “…\n…”特殊字符加单斜杠,如 “…”…"var不同于"{var} 不同于 "var不同于"{var}"set(specialStr "aaa;bbb")# example 1message(STATUS ${specialStr}) # aaabbbmessage(STATUS
2020-12-27 14:50:34 919
原创 c++ constexpr 关键字
先看一个简单的例子: class test{ public: constexpr test(){ } constexpr int operator + (const test& rhs){ return 1; }};int main() { test t; constexpr int b = t + test(); // 可以编译通过 int w = 10;
2020-12-27 00:52:46 279
原创 c++模版类特化
1. 提供一种能自动识别类和类构造函数参数类型,并进行warp的函数类,重新修改类内成员变量#include <iostream>#include <thread>// 提供一种能自动识别类和类构造函数参数类型,并进行warp的函数类,重新修改类内成员变量// Signature : T(Args...)// ->// void(*)(T*, Args...)template<class T>struct FuncAWrapper;templat
2020-12-27 00:30:36 221
原创 vscode基本配置
需要安装的插件Indenticator : 增加代码缩进的显示线会将同一级的深度用竖线对齐展示,这样很容易看出来块结构,比如下图中就for语句块内的代码就有一条竖线,而内部的if和else则分别还有一条竖线。这些竖线只是帮助你看代码更容易。GitLensc/c++Git BlameGitLensRemote-Containers : 使用sftp 链接远程服务器的代码shellman: 插件本质上是个插件模板。shell 的语法格式比较多,有时候多个空格,少个空格,就不能用了。对于不.
2020-12-26 11:46:02 367 1
原创 vim编辑器的定义
参考:https://missing-semester-cn.github.io/2020/editors/替换~/.vimrc" Comments in Vimscript start with a `"`." If you open this file in Vim, it'll be syntax highlighted for you." Vim is based on Vi. Setting `nocompatible` switches from the default" Vi
2020-12-20 20:42:38 307 1
原创 Centos Yum 更换源为清华源
[base]name=CentOS-$releasever - Base#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/baseurl=https://mirrors.tuna.tsinghua.edu
2020-12-16 08:12:54 3489
原创 修改bash 的前缀提示
参考:https://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.htmlif [ $(id -u) -eq 0 ];then # you are root, set red colour prompt PS1="\\[$(tput setaf 1)\\]\\[email protected]:\\w $\\[$(tput sgr0)\\]"else # normal PS1="[\\u@\\h:\\w] $"f
2020-12-15 09:35:38 324
原创 C++模板进阶指南:SFINAE
来自于 Substitution failure is not an error 的首字母缩写。Substitution,Failure和Error三个词构成。详细的参考:cpprefernceSFINAE保证了在编译时期对类型进行推断,如果你拥有一个模版函数。你有两种需求,第一种是模版函数只支持特定类型的参数。第二种需求是对于重复定义函数发生的编译错误,通过SFINE放在函数的参数列表中,以此避免参数重复定义报错。。第一种是模版函数只支持特定类型的参数#include <iostream
2020-12-05 17:38:27 334
McGrawHill_-_Machine_Learning_-Tom_Mitchell课后答案
2016-04-25
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人