通过stat函数获取文件的大小,单位bytes;无需将文件读入内存,可以计算大文件; #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stdio.h> int stat(const char *pa ...
分类:
编程语言 时间:
2021-06-05 17:44:27
阅读次数:
0
一、数组扁平化 有数组:let arr = [[2, 3, 1],[4, 3, 6, 5],[6, 2, 4, 9, [4, 11, 12, [12, 13, [10], 15]]], 20]1. reduce //若值为数组则递归遍历,否则concat function flatten(arr) ...
分类:
编程语言 时间:
2021-06-05 17:40:20
阅读次数:
0
补题链接:Here 经典状压DP问题 坑点,注意多组输入。。。 const int N = 16, mod = 100000000; int f[N][1 << N]; int a[N]; void solve() { int n, m; while (cin >> n >> m) { memset ...
分类:
其他好文 时间:
2021-06-05 17:40:05
阅读次数:
0
安装axios npm install axios 封装 import axios from 'axios' // 创建axios实例 const service = axios.create({ baseURL: 'http://localhost:9001', // api的base_url t ...
分类:
移动开发 时间:
2021-06-04 19:39:19
阅读次数:
0
直接上代码 void Add(int a, double b, short c, const char * f) { std::cout << f << a << ", " << b << ", " << c << ";\n"; } void *p = nullptr; template <type ...
分类:
编程语言 时间:
2021-06-04 19:35:50
阅读次数:
0
广义javascript ECMAScript + DOM + BOM DOM0 DOM1 DOM2 狭义javascript ECMAScript ES6 ES5 ES3 1. html事件 <div onclik="fn()"></div> function fn() { alert("hell ...
分类:
其他好文 时间:
2021-06-04 19:23:51
阅读次数:
0
LeetCode 83. Remove Duplicates from Sorted List(删除排序链表中的重复元素) 题目 链接 https://leetcode-cn.com/problems/remove-duplicates-from-sorted-list 问题描述 存在一个按升序排列 ...
分类:
编程语言 时间:
2021-06-04 19:14:00
阅读次数:
0
现有对象obj和空对象copy,想将obj的每一项都复制到copy对象中 let obj = { name:'aaa', age: 18 } let copy = {} 方法1:使用for...in... for(let key in obj){ copy[key] = obj[key] } con ...
分类:
其他好文 时间:
2021-06-04 19:11:44
阅读次数:
0
K次圆覆盖问题 模板 #include<bits/stdc++.h> using namespace std; const int maxn=1009; const double eps=1e-8; const double pi=acos(-1); int dcmp(double x) {retu ...
分类:
其他好文 时间:
2021-06-04 19:11:31
阅读次数:
0
node模块 模块化本质:就是一个实现特定功能的js文件。 模块化开发:是一个管理方法,是一种生产方式,解决问题的方案 node 模块分为三种 自定义模块 定义模块: 通过module.exports = {} 导出模块 通过exports.属性名 = value 导出模块 引入模块: const ...
分类:
其他好文 时间:
2021-06-04 18:57:24
阅读次数:
0