码迷,mamicode.com
首页 >  
搜索关键字:sort    ( 12890个结果
Mongodb的索引
1. 简单介绍索引是为了加速查询。假设没有索引,mongodb在查询时会做表扫描,假设集合非常大时,这个查询会非常慢。一般对创建查询时的键都建立索引。为排序字段建立索引,假设对未建立索引的字段sort,mongodb会将全部的数据取到内存中来排序,假设集合大到不能在内存中排序,则mongodb会报错...
分类:数据库   时间:2014-07-10 13:39:36    阅读次数:383
委托的例子,from C# advanced program
class BubbleSorter { static public void Sort(IList sortArray, Func comparison) { bool swapped = true; do ...
分类:其他好文   时间:2014-07-10 12:34:06    阅读次数:159
Swift TableView
代码来源 cocoachina推荐源码 26日上面这些是一些基本的设置,然后提前补充几个知识点!类后面的!作用是强制类型转换NSCoder是一个抽象类,是字节流的抽象类,我们可以把数据写入一个coder也可以从coder中读出数据!as也可以类型为类型转换Swift中sort函数有两种用法,在编译器...
分类:其他好文   时间:2014-07-10 11:11:05    阅读次数:387
LeetCode-Sort List(Python)
【问题】 Sort a linked list in O(n log n) time using constant space complexity. 【代码】 # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # ...
分类:编程语言   时间:2014-06-28 08:29:23    阅读次数:222
LeetCode-Insertion Sort List (Python)
【问题】 Sort a linked list using insertion sort. 【代码】 # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Sol...
分类:编程语言   时间:2014-06-28 07:55:49    阅读次数:199
自己写的sql排序
create function dbo.Fn_Sort ( @str varchar(1024) )returns nvarchar(100)asbegindeclare @tb table(num int)declare @strtemp varchar(100)declare @cID varc...
分类:数据库   时间:2014-06-27 20:37:28    阅读次数:255
Java面试试题之插入法排序
import javax.print.attribute.standard.MediaSize.Other;public class Sort { public static void main(String[] args) { int[] arr = new int[] { 9, 8, 7, 5....
分类:编程语言   时间:2014-06-27 14:12:19    阅读次数:197
Linux之sort
sort是在Linux里非常常用的一个命令,管排序的,集中精力,五分钟搞定sort,现在开始!1 sort的工作原理sort将文件的每一行作为一个单位,相互比较,比较原则是从首字符向后,依次按ASCII码值进行比较,最后将他们按升序输出。[rocrocket@rocrocket programmin...
分类:系统相关   时间:2014-06-27 13:13:52    阅读次数:336
[LeetCode] 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-06-27 12:55:53    阅读次数:235
归并排序:二路归并
归并排序(Merge Sort)是将两个(或两个以上)有序表合并成一个新的有序表,即把待排序序列分为若干个有序的子序列,再把有序的子序列合并为整体有序序列。 归并排序的具体做法: 把原序列不断地递归等分,直至每等份只有一个元素,此时每等份都是有序的。 相邻等份合并,不断合并,直至合并完全。 二路归并 归并排序是建立在归并操作上的一种有效的排序算法。该算法是采用分治法(Divide and Conquer)的一个非常典型的应用。归并排序最常用的是二路归并,即把两个小的有序的序列和并成一个大的有序序列:合二为一...
分类:其他好文   时间:2014-06-27 10:16:41    阅读次数:315
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!