#include<stdio.h> const char*name = "hello audio"; char*usb_name = "ac usb string descriptor"; int main() { name = usb_name; // name[0] = 'a'; printf( ...
分类:
编程语言 时间:
2020-10-14 20:06:07
阅读次数:
34
C 库函数 - getenv() C 标准库 - <stdlib.h> 描述 C 库函数 char *getenv(const char *name) 搜索 name 所指向的环境字符串,并返回相关的值给字符串。 声明 下面是 getenv() 函数的声明。 char *getenv(const c ...
分类:
其他好文 时间:
2020-10-13 17:52:55
阅读次数:
41
const int GB = 1024 * 1024 * 1024;//定义GB的计算常量 const int MB = 1024 * 1024;//定义MB的计算常量 const int KB = 1024;//定义KB的计算常量 public string ByteConversionGBMBK ...
最短路变形题,加一维状态就好啦 $dist[i][j]$表示到达第$i$号点,到达时间为第$j$天的最短距离 判重数组要和$dist$数组一致 直接跑$dijkstra$即可 const int N=1010; vector<PII> g[N]; struct Node { int dis,u,da ...
分类:
其他好文 时间:
2020-10-10 17:45:26
阅读次数:
19
1, set类型去重 SET 数据类型是 ES6 新增的语法形式 集合类型 是一个类似于数组的数据类型 特点:不会存储重复数据 const arr = [1,2,3,1,2,3,4,1,2,3,4,5,1,2,3,4,5,6]; const newArr = [...new Set(arr)]; 2 ...
分类:
编程语言 时间:
2020-10-10 16:44:43
阅读次数:
23
概述 今天我无意中看到了只执行一次事件的简便方法,记录下来,供以后工作时参考,相信对其他人也有用。 一般方法 先来回顾一下一般方法: const $once = function (target, event, fn) { const that = this; function newFn (... ...
分类:
其他好文 时间:
2020-10-09 20:41:01
阅读次数:
20
实验方法 //输出运行时间 #include <bits/stdc++.h> using namespace std; const int MODE = 10000; int main(){ freopen("a1.txt", "w", stdout); int k = 100; while(k-- ...
分类:
其他好文 时间:
2020-10-09 20:18:04
阅读次数:
24
1.let 变量声明以及特性 声明变量 let a; let b, c, d; let e = 1; let f = 2, g = 3; 特性 1.不能重复声明 2.块级作用域 只在块级作用域有效 3.没有变量提升 4.不影响作用域链 2.const 常量声明以及特性 特性 1.必须有初始值 2.一 ...
分类:
其他好文 时间:
2020-10-08 19:52:58
阅读次数:
44
MongoDB增删改查操作 MongoDB数据库服务启动和关闭 net start mongodb net stop mongodb 数据库连接 先使用npm install mongoose安装mongoose依赖,之后使用mongoose提供的connect方法即可连接数据库。 const mo ...
分类:
数据库 时间:
2020-10-08 18:21:12
阅读次数:
25
模板 \(Problem:\) 求 \(n\) 个模式串在文本串中出现的次数 \(templete:\) \(Luogu5357\) \(Code\) #include<cstdio> #include<cstring> using namespace std; const int N = 2e5 ...
分类:
其他好文 时间:
2020-10-08 18:13:37
阅读次数:
17