1.定义消息类型 package Common const ( LoginMesType = "LoginMes" LoginResType = "LoginResMes" ) type Message struct { Type string `json:"type"` //消息类型 Data s ...
分类:
其他好文 时间:
2021-01-05 10:59:42
阅读次数:
0
文档 是这样的 function useQuery() { return new URLSearchParams(useLocation().search); } 使用 function demo (){ const history = useHistory(); history.get('name ...
分类:
其他好文 时间:
2021-01-04 10:59:19
阅读次数:
0
在 ES6 中,Array 的原型上暴露了 3 个用于检索数组内容的方法:keys()、values()和 entries()。keys()返回数组索引的迭代器,values()返回数组元素的迭代器,而 entries()返回 索引/值对的迭代器: const a = ["foo", "bar", ...
分类:
编程语言 时间:
2021-01-04 10:46:28
阅读次数:
0
<body> <div id="app"> <!-- 3.使用组件 --> <my-cpn></my-cpn> </div> <script src='https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js'></script> <script> // ...
分类:
其他好文 时间:
2021-01-02 11:06:08
阅读次数:
0
checksec: main: int __cdecl main(int argc, const char **argv, const char **envp) { init(); vulnerable(); return 0; } vulnerable: int vulnerable() { in ...
分类:
其他好文 时间:
2021-01-02 10:38:32
阅读次数:
0
1创建变量的方式 ECMAScript 两大类 ES5 ES6 ES5 var F72; ES6 let F72; const F72; 两大类的区别 var声明的变量,可以重复 let 和const不可以重复声明 如果重复声明:会报错 Uncaught SyntaxError: Identifie ...
分类:
Web程序 时间:
2021-01-02 10:29:31
阅读次数:
0
// 事件(Event)机制 const EventEmitter = require('events'); const emitter = new EventEmitter(); // 侦听一个事件 emitter.on("a", (event) => { console.log(event + ...
分类:
其他好文 时间:
2021-01-01 12:51:35
阅读次数:
0
#include<iostream>using namespace std;int main(){ int oneInt =1; int & ref=oneInt; const int &refc=oneInt; ref=2; cout<<"oneInt="<<oneInt<<","<<"ref=" ...
分类:
其他好文 时间:
2021-01-01 12:35:39
阅读次数:
0
假如给定一个class,已知该class为一个枚举的class, 如果使用该class获取这个枚举的实例对象? 两步解决: 1. 要先判断是否是enum: class.isEnum() , 该方法返回boolean值,如果是enum,则返回true,否则是false; 2. 第一步得到true,再调 ...
分类:
编程语言 时间:
2021-01-01 12:30:15
阅读次数:
0
code: #include<bits/stdc++.h>//xfl using namespace std; const int N = 100007; typedef unsigned long long ull; ull mis[N],sum[N]; string s; int n,m,l1, ...