一些小功能函数

2021-05-25
文件是否存在 bool file_exists(const std::string& name) { struct stat info; return (stat(name.c_str(), &info) == 0...
查看

整数转IP地址

2021-05-24
这个例子很巧妙的利用了联合体共享内存的特点。 union IPNode {   unsigned int addr;   struct   {     unsigned char s4,s3,s2,s1;   }; }; void Pri...
查看

Visual Studio 格式化配置 .clang-format

2021-05-15
# # 文档地址:https://clang.llvm.org/docs/ClangFormatStyleOptions.html # # 基础样式,用于所有没有特殊指定配置的选项 BasedOnStyle: Google # # 单行...
查看

noncopyable,不可拷贝的类

2021-05-14
class noncopyable { protected: noncopyable() = default; ~noncopyable() = default; private: noncopyable(const noncopy...
查看

const int* 与 int const*

2021-04-14
const默认作用于其左边的东西,否则作用于其右边的东西 const在*的左边,值不能修改。const在*的右边,地址不能修改 ...
查看

vue2-ace-editor

2021-04-13
https://www.npmjs.com/package/vue2-ace-editor4 var ace = require('brace'); module.exports = { render: function (h) ...
查看

vue 中使用 debounce

2021-04-08
import Vue from 'vue' import { debounce } from 'lodash' export default Vue.extend({ methods: { myDebounce: d...
查看

vue-iview使用技巧

2021-03-23
修改数据 this.items[1]='xxxx'; // 不能监听数据变的 this.$set(this.items,1,'xxxxxx'); // 可以监听数据变化 // 拷贝一份出来,修改后再赋值回去也可以监听 let te...
查看

VUE components 组件用法

2021-03-19
子组件给父组件传递数据 子组件中: this.showFaceDia = false this.$emit('showFaceDia',this.showFaceDia) //执行showFaceDia函数并把要改变的值作为参数带过去...
查看

VUE子组件向父组件传值

2021-03-19
子组件中: this.showFaceDia = false this.$emit('showFaceDia',this.showFaceDia) //执行showFaceDia函数并把要改变的值作为参数带过去 父组件: metho...
查看