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-06-04 20:49:33
阅读次数:
276
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-06-03 13:13:50
阅读次数:
537
ls -lr反向排序结果==============================ls
${PATH//:/\ } | grep ==============================echo
$RANDOM==============================[[ $# -ne 3 ...
分类:
其他好文 时间:
2014-05-30 21:35:51
阅读次数:
335
文章版权:http://www.cnblogs.com/linux-super-meng/环境变量路径:[root@localhost ~]# set
//查看到的是局部变量和全局变量2种[root@localhost ~]# env //查看系统的全局环境变量[root@localhost ~]#...
分类:
系统相关 时间:
2014-05-30 08:29:57
阅读次数:
445
1、归并排序 2、内排序和外排序 外排序的一个例子是外归并排序(External merge
sort),它读入一些能放在内存内的数据量,在内存中排序后输出为一个顺串(即是内部数据有序的临时文件),处理完所有的数据后再进行归并。比如,要对 900 MB
的数据进行排序,但机器上只有 100 MB 的...
分类:
其他好文 时间:
2014-05-30 00:13:46
阅读次数:
257
重装Windows时,Windows的启动菜单会覆盖Linux启动菜单。Ubuntu找回比较容易,CentOS相对比较麻烦。步骤如下:1.
用UltraISO制作CentOS 6的启动盘。2. U盘启动CetnOS,从启动菜单选择"Rescue installed system"3.
启动shell...
分类:
其他好文 时间:
2014-05-29 22:08:01
阅读次数:
307
希尔排序一。个人理解希尔排序(Shell
Sort)是插入排序的一种。是针对直接插入排序算法的改进。该方法又称缩小增量排序,因DL.Shell于1959年提出而得名。其实,希尔排序本质也就是直接插入算法的升级,希尔的基本思想,就是先将整个待排元素序列分割成若干个子序列(由相隔某个“增量”的元素组成的...
分类:
其他好文 时间:
2014-05-29 21:49:30
阅读次数:
516
ifconfig |grep "inet addr"|cut -f 2 -d":"|cut
-f 1 -d " "|head -n 1ifconfigeth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.1.100 ....
分类:
系统相关 时间:
2014-05-29 20:55:58
阅读次数:
435
写法一:----------------------------------------------------------------------------#!/bin/bashwhile
read linedo echo $linedone < filename(待读取的文件)--------...
分类:
其他好文 时间:
2014-05-29 18:01:41
阅读次数:
230
Linux下很多命令用起来真相当方便,尤其是进行批处理操作时。(话说感觉这种程序也不复杂,windows咋一直不搞一个好用的shell呢)这里列出一些常用shell操作的应用,具体命令的用法与解释就不列了,网上有很多很好的教程。###
批量重命名 假如当前目录下有若干.wma文件,我希望把它们批量转...
分类:
系统相关 时间:
2014-05-29 16:24:52
阅读次数:
327