# 1. python【字典】转json格式【str】 import json dic = {'a': 1, 'b': 2, 'c': 3} str1 = json.dumps(dic, sort_keys=True, indent=4, separators=(',', ':')) str2 = ...
分类:
编程语言 时间:
2020-12-30 11:14:48
阅读次数:
0
1、在本地新建一个文件夹 2、进入文件夹 3、右键 git Bash Here ,然后将github上面的仓库克隆到本地。(git clone 仓库地址) 4、完成之后,本地新建的文件夹下面就会多出个文件夹。该文件夹名即为你github上面新建的那个Repository 的名字。 5、把要上传的文件 ...
分类:
Web程序 时间:
2020-12-29 12:08:55
阅读次数:
0
一、定义 视图是虚拟的表。与包含数据的表不一样,视图只包含使用时动态检索 数据的查询。 二、语法 CREATE [OR REPLACE] [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}] [DEFINER = user] [SQL SECURITY { DE ...
分类:
数据库 时间:
2020-12-29 11:30:08
阅读次数:
0
题目链接 #解题思路 由于题目中的数都是互不相同的,所以每交换一对数字,序列的逆序数的奇偶性就会改变一次(可以证明序列的奇偶性变化只与交换的这对数的大小关系有关)。 #代码 int arr[maxn], tmp[maxn], n, m; ll cnt; void merge(int l, int r ...
分类:
其他好文 时间:
2020-12-29 11:09:53
阅读次数:
0
improt.org.springframework.data.domain.sort包Criterialcritel=newCriterial();criterl.and("createTime").is(req.getCreateTime())Sortsort=Sort.by(sort.Diretion.DESC,mongod库对应属性)mongoTempalate.fin
分类:
数据库 时间:
2020-12-29 11:05:45
阅读次数:
0
linux 看cpu、内存、虚拟内存、磁盘查、 查看物理cpu个数 cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l 查看物理cpu内核个数 cat /proc/cpuinfo | grep "cpu cores" | uniq ...
分类:
系统相关 时间:
2020-12-28 10:56:23
阅读次数:
0
考虑莫队。 如果是单纯的莫队的话,还需要一个树状数组来维护逆序对数,这样子的话复杂度是 \(O(n^{1.5}\log n)\),难以接受。 怎么将这个树状数组消除? 考虑当前区间为 \([l,r-1]\) ,需要将右端点向右移动,即加入 \(a_r\) ,并且将答案加上 \(a_{l,l+1,\c ...
分类:
其他好文 时间:
2020-12-25 12:28:35
阅读次数:
0
1.错误信息∶{"Message" : "必须至少有一个对象实现lComparable。" } 错误原因:lambda表达式多字段排序 OrderBy(m => new {m.CategoryType, m.Sort}) 正确写法:OrderBy(m => m.CategoryType).ThenB ...
分类:
其他好文 时间:
2020-12-23 12:14:26
阅读次数:
0
Codeforces Round #690 (Div. 3) A - Favorite Sequence 按着题意读入, 顺序输出完事 int main() { IOS; for (cin >> _; _; --_) { cin >> n; rep (i, 1, n) { if (i <= (n + ...
分类:
其他好文 时间:
2020-12-21 12:02:47
阅读次数:
0
1、显示统计占用系统内存最多的进程,并排序。ps-eopid,ppid,cmd,%mem--sort=-%mem2、编写脚本,使用for和while分别实现192.168.0.0/24网段内,地址是否能够ping通,若ping通则输出"success!",若ping不通则输出"fail!"#for循环版本1#!/bin/bashNET=192.168.0fo
分类:
系统相关 时间:
2020-12-18 13:10:27
阅读次数:
4