查空行 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
                             
                         
                    
                        
                            
                            
                                
                    4 .表的约束 为了防止数据表中插入错误的数据 ,在MySQL中,定义了一些维护数据库完整性的规则,即表的约束。 我在这里列举一下约束条件和说明啊: 约束条件 说 明 PRIMARY KEY 主键约束,用于唯一标识对应的记录 FPREIGN KEY 外键约束 NOT NULL 非空约束 UNIQUE ...
                            
                            
                                分类:
其他好文   时间:
2021-05-24 17:06:38   
                                阅读次数:
0
                             
                         
                    
                        
                            
                            
                                
                    python k-means F:\PythonProject\K-Means import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler from sklearn.model_sel ...
                            
                            
                                分类:
编程语言   时间:
2021-05-24 16:18:04   
                                阅读次数:
0
                             
                         
                    
                        
                            
                            
                                
                    sort函数##### sort是c++STL标准库中提到的基于快速排序的排序函数,在做题的时候使用sort函数很方便,使用sort要使用#include<algorithm>#### 快速排序具有不稳定性 不稳定性是指,对于指定区域内相等的元素,sort函数可能无法保证数据的元素不发生相对位置不发 ...
                            
                            
                                分类:
其他好文   时间:
2021-05-24 16:00:18   
                                阅读次数:
0
                             
                         
                    
                        
                            
                            
                                
                    MySQL 支持丰富的日志类型,如下: 事务日志:transaction log 事务日志的写入类型为"追加",因此其操作为"顺序IO";通常也被称为:预写式日志 write ahead logging 事务日志文件: ib_logfile0, ib_logfile1 错误日志 error log  ...
                            
                            
                                分类:
数据库   时间:
2021-05-24 15:37:46   
                                阅读次数:
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