码迷,mamicode.com
首页 >  
搜索关键字:awk sort    ( 17174个结果
python冒泡排序
def bubble_sort(list):     for i in range(len(list)):         for j in (range(i,len(list))):             if list[j]                 temp = list[j]                 list[j] = list[i]...
分类:编程语言   时间:2014-08-12 17:27:54    阅读次数:216
python选择排序
def select_sort(list): for i in range(len(list)): position = i for j in range(i,len(list)): if list[position] > list[j]: position = j temp = list[i] list[i] = list[position] list[pos...
分类:编程语言   时间:2014-08-12 17:25:34    阅读次数:236
python插入排序
def insert_sort(list): for i in range(len(list)): while i > 0 and list[i] < list[i-1]: temp = list[i] list[i] = list[i-1] list[i-1] = temp i = i-1...
分类:编程语言   时间:2014-08-12 17:25:24    阅读次数:269
【Linux 工具--AWK】
目录: 一、概述 二、awk基本语法格式 三、awk基本操作 四、awk条件及循环语句 五、awk函数 六、awk演示示例(源自于man手册) 一、概述 1. 产品概述: awk是一种编程语言,用于在linux/unix下对文本和数据进行扫描与处理。数据可以来自标准输入、文件、管道。 ...
分类:系统相关   时间:2014-08-12 16:59:54    阅读次数:296
c#中list sort排序
1、List.Sort(泛型Comparison)法此方法的参数是Comparison类型,其实是一个包含两个参数的委托,因此使用此方法,我们只需要定义一个委托,其两个参数均为Student类型,在委托实现的方法比较两个Student对象的Age属性即可。 usingSystem; usingSystem.Collections.Generic; usi..
分类:其他好文   时间:2014-08-12 13:51:55    阅读次数:229
Hadoop集群内存过高,HDFS存储慢
2014-08-12HDFS存储过慢,内存过高而且不释放网络方面:使用 netstat-n |awk'/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' 查看网络情况:情况如下: CLOSE_WAIT 102 FIN_WAIT2 2 ESTABLIS...
分类:其他好文   时间:2014-08-12 13:07:14    阅读次数:601
AWK
一直想好好了解一下awk的,不过以前总感觉看的资料太深了,找到两篇浅显易懂的:[1]http://blog.csdn.net/andyxm/article/details/5964071[2]http://blog.csdn.net/wklken/article/details/6555694
分类:其他好文   时间:2014-08-12 12:59:44    阅读次数:201
Directadmin每天获取所有用户资源------流量
流量超出后网站会被暂停,暂停后才会发邮件通知。此脚本可以加到计划任务,每天获取流量使用前十。及时查看流量是否会超出。#!/bin/baship=`ifconfig|grep"inetaddr"|grep-v127.0|cut-d:-f2|awk‘{print$1}‘`file=/opt/useage.bandwidthfind/usr/local/directadmin/data/users/-..
分类:其他好文   时间:2014-08-12 10:30:44    阅读次数:172
LeetCode:Sort List
Problem:       Sort a linked list in O(n log n) time using constant space complexity. 解题思路:     首先,时间复杂度能达到O(nlgn)的排序算法,常见的有3种:堆排序、归并排序和快速排序, 而对于链表,用堆排序显然不太可能,所以,我们可用归并或者是快排.由于合并...
分类:其他好文   时间:2014-08-12 00:45:13    阅读次数:217
[leetcode]Sort Colors
Sort ColorsGiven an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the or...
分类:其他好文   时间:2014-08-12 00:09:03    阅读次数:154
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!