#include <stdio.h> const int N=3; int main() { int a[N] = {1, 2, 3}; int i; printf("通过数组名和下标直接访问数组元素:\n"); for(i=0; i<N; i++) printf("%d: %d\n", &a[i] ...
分类:
其他好文 时间:
2021-06-02 12:09:15
阅读次数:
0
1、docker安装wget -P /etc/yum.repos.d/ https://download.docker.com/linux/centos/docker-ce.repoyum list docker-ce --showduplicates | sort -r #查看可以安装的版本yum ...
分类:
其他好文 时间:
2021-06-02 11:38:46
阅读次数:
0
查空行 awk '/^$/{print NR}' demo1.txt 求某一列的和 awk '{sum+=$2} END {print "求和:"sum}' demo2.txt 数字排序 sort -n -t ' ' -k 2 demo3.txt sort -t ' ' -k 2nr demo3.t ...
分类:
系统相关 时间:
2021-06-02 11:35:11
阅读次数:
0
看了网上的许多博客,然后自己总结了下,谢谢大神们的贡献 public class MergeSort { public void sort(int[] arr, int lo, int hi) { if (lo >= hi) return; int mid = lo + (hi - lo)/2; s ...
分类:
编程语言 时间:
2021-06-02 11:26:03
阅读次数:
0
往常使用options.Find().SetSort(bson.D{{"a", -1},{"b", -1}})结果报错,感觉使用方法没问题,排查之后发现是import的包错了导致。 cannot transform type bson.D to a BSON Document: WriteArray ...
分类:
数据库 时间:
2021-05-25 18:10:59
阅读次数:
0
在复习归并排序的时候,使用到了递归,我一直以为是递归函数没写对,导致了Maximum call stack size exceeded 栈溢出,但是其实是JavaScript浮点数的自动转换的问题! function sort(arry,left,right){ if(left right){ re ...
分类:
编程语言 时间:
2021-05-25 17:48:06
阅读次数:
0
In 1953, David A. Huffman published his paper "A Method for the Construction of Minimum-Redundancy Codes", and hence printed his name in the history o ...
分类:
其他好文 时间:
2021-05-24 17:00:26
阅读次数:
0
sort函数##### sort是c++STL标准库中提到的基于快速排序的排序函数,在做题的时候使用sort函数很方便,使用sort要使用#include<algorithm>#### 快速排序具有不稳定性 不稳定性是指,对于指定区域内相等的元素,sort函数可能无法保证数据的元素不发生相对位置不发 ...
分类:
其他好文 时间:
2021-05-24 16:00:18
阅读次数:
0
用DataFrame的操作或SQL语句完成以下数据分析要求,并和用RDD操作的实现进行对比: 每个分数+5分。 df_scs.select('name', 'course', df_scs.score+5).show() 总共有多少学生? 总共开设了哪些课程? df_scs.select('name ...
分类:
数据库 时间:
2021-05-24 15:33:34
阅读次数:
0
f = open(r'data6_1.txt') f1=open('data6_2.txt','w') a = list(f) a.sort(key=lambda x : x[8:]) a.reverse() for i in a: i=i.strip('\n') f1.write(''.join( ...
分类:
其他好文 时间:
2021-05-24 14:43:52
阅读次数:
0