noncopyable.h #ifndef __WD_NONCOPYABLE_H__ #define __WD_NONCOPYABLE_H__ namespace wd { class Noncopyable { protected: Noncopyable(){} ~Noncopyable(){} ...
分类:
编程语言 时间:
2020-10-06 20:12:15
阅读次数:
20
#include <iostream> #include <string> #define MAX 500 using namespace std; struct person { string name; int age; }; struct contact { person persons[MA ...
分类:
编程语言 时间:
2020-10-05 22:33:17
阅读次数:
48
函数:1:库函数-C语言自己提供给我们的strcpy:字符串拷贝,对应#include<string.h>的头文件包括里面的\n,也要被拷贝进去#define_CRT_SECURE_NO_WARNINGS#include<stdio.h>#include<string.h>intmain(){chararr[]={"你是猪"};chararr
分类:
其他好文 时间:
2020-10-05 21:44:51
阅读次数:
22
;(function(global,factory){ typeof exports 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define 'function' && define ...
分类:
其他好文 时间:
2020-09-24 22:08:52
阅读次数:
79
#include <windows.h> #define BUFFER(x,y) *(pBuffer + y*cxBuffer + x) LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); int min(int a, int b) { ret ...
分类:
其他好文 时间:
2020-09-24 21:56:40
阅读次数:
47
模板特例化也叫模板偏特化,乍听起可能有点摸不着头脑,实际上字如其名,他就是模板的一种特例存在;比如在一个类中,模板参数接受指针类型的时候需要特殊处理,则我们可以将指针版本的那一份专门抽调出来;话不多说直接上代码 //头文件 #ifndef __Template_Hpp_ #define __Temp ...
分类:
编程语言 时间:
2020-09-23 23:51:32
阅读次数:
33
在前端页面交互中,鼠标拖拽是一个体验良好的功能,实现鼠标拖拽需要了解鼠标行为坐标系和涉及到的许多兼容性写法。本文介绍鼠标位置的获取和、拽功能的实现以及拖拽函数的封装 鼠标行为坐标系 鼠标行为触发事件时,事件对象上会有一些属性提供鼠标的位置信息 属性功能兼容性 clientX/Y 鼠标相对可视区域的坐 ...
分类:
编程语言 时间:
2020-09-23 23:21:35
阅读次数:
38
桥接模式 定义: “Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the ...
分类:
编程语言 时间:
2020-09-18 17:19:54
阅读次数:
50
KVM 虚拟机 第1章 KVM介绍 虚拟化架构分类 寄居虚拟化架构:指在宿主操作系统之上安装和运行虚拟化程序,依赖于宿主操作系统对设备的支持和物理资源的管理。 裸金属虚拟化架构:指直接在硬件上面安装虚拟化软件,再在其上安装操作系统和应用,依赖虚拟层内核和服务器控制台进行管理。 操作系统虚拟化架构:在 ...
分类:
其他好文 时间:
2020-09-18 12:08:47
阅读次数:
39
###数据结构2-顺序表的建立、删除、遍历和插入操作 #include<stdio.h> #include<iostream> #define MaxSize 10 using namespace std; typedef struct //定义顺序表结构体 { int data[MaxSize]; ...
分类:
其他好文 时间:
2020-09-18 03:31:08
阅读次数:
37