码迷,mamicode.com
首页 >  
搜索关键字:awk sort    ( 17174个结果)
ex26 纠正练习
题目中给出的代码如下:def break_words(stuff): """This function will break up words for us.""" words = stuff.split(' ') return wordsdef sort_words(word...
分类:其他好文   时间:2014-11-06 23:24:25    阅读次数:271
MongoDB的分组统计 group
mongodb中的分组聚合用$group,它是不能进行sort的,使用格式如下:{ $group: { _id: , : { : }, ... } }其中_id属性是必须要有的,目的是用来指定分组的字段或依据,field1为自定义字段,accumulator为累加器,下面以统计每天用户注册数为列.....
分类:数据库   时间:2014-11-06 19:56:02    阅读次数:280
Atlassian Connector介绍
http://www.oschina.net/p/atlassian+ide+connector/similar_projects?sort=time&lang=19Atlassian IDE Connector (Atlassian Eclipse Connector) 可以让你在包括Eclips...
分类:其他好文   时间:2014-11-06 17:25:11    阅读次数:183
Sort Colors
Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, wh...
分类:其他好文   时间:2014-11-06 17:15:17    阅读次数:159
7,文本处理、重定向、管道、bash算术运算、脚本 输入
文本处理类命令:wc,tr,cut,sort,uniq,一共就这几个,都挺简单的,不过非常常用,1、wc:这个是做字符统计的命令,wc[选项][文件]...-l:统计行数-c:统计字节数-w:统计单词数(这里的单词指的是以空格分隔的字符串)2、tr:转换字符或删除字符,这个命令主要用于大小写..
分类:其他好文   时间:2014-11-06 15:08:15    阅读次数:263
《算法导论》习题2.3-4 插入排序的递归版本
伪代码:RECURSIVE-INSERT-SORT (A, n) if n>1 RECURSIVE-INSERT-SORT (A ,n-1) InsertLastNumber (A,n)InsertLastNumber (A,n) temp = A[n] i=n-1 whi...
分类:编程语言   时间:2014-11-06 00:26:59    阅读次数:270
使用grep、awk统计查询日志
日志样本: 囧,日志格式是我随便定得(莫喷,在明珠时有专门的数据组统计日志,日志都非常规范,在这完全乱套了),为了方便统计支付成功的总金额旁边都空了个空格,这样的话方便使用awk取出金额! [INFO] 2014-...
分类:其他好文   时间:2014-11-05 23:21:40    阅读次数:494
排序算法
八大排序算法分类:数据结构与算法c/c++2012-07-23 16:4545743人阅读评论(32)收藏举报算法mergepivot存储exchange目录(?)[-]概述插入排序直接插入排序Straight Insertion Sort插入排序希尔排序Shells Sort选择排序简单选择排序S...
分类:编程语言   时间:2014-11-05 22:58:52    阅读次数:311
《算法导论》merge-sort
伪代码请见《算法导论》2.3节merge-sort实现:public class MergeSort { public static void sort(double [] A,int p, int r) { if(p<r) { int q = (int) Math.floor( (p+...
分类:编程语言   时间:2014-11-05 22:57:59    阅读次数:259
插入排序--InsertSort
算法导论,插入排序public class InsertSort { public static double [] sort(double [] num) { for(int i =1; i=0 && temp < num[j]) { ...
分类:编程语言   时间:2014-11-05 21:11:10    阅读次数:187
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!