SELECT o. *FROM hq_goods gLEFT JOIN hq_orders o ON
o.goods_id = g.idWHERE o.user_id =73AND o.state =1AND o.id not in( select
c.order_id from hq_comme....
分类:
数据库 时间:
2014-06-04 21:36:03
阅读次数:
297
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
关于index_hint
在mysql查询语句中可以通过指定index_hint来告诉优化器如何使用索引,详细可以参考这里index_hint: USE {INDEX|KEY} [FOR
{JOIN|ORDER BY|GROUP BY}] ([index_list]) | IGNO...
分类:
数据库 时间:
2014-06-03 13:05:59
阅读次数:
394
DescriptionGiven a set of sticks of various
lengths, is it possible to join them end-to-end to form a square?InputThe first
line of input contains N, ...
分类:
其他好文 时间:
2014-05-30 21:21:54
阅读次数:
284
最近在复习自己的linux笔记,看到cut和sort的时候突然想起一直遗忘做的一件事:给某文本文件去重。发现用这两条指令的组合可以很轻松的完成自己想做的工作。要处理的原文本文件一条数据的格式是:str1
# str2 #str3,每行一条这种格式的数据。我需要的只是str2去重后的数据,所以可以这么...
分类:
其他好文 时间:
2014-05-30 20:18:52
阅读次数:
410
1、归并排序 2、内排序和外排序 外排序的一个例子是外归并排序(External merge
sort),它读入一些能放在内存内的数据量,在内存中排序后输出为一个顺串(即是内部数据有序的临时文件),处理完所有的数据后再进行归并。比如,要对 900 MB
的数据进行排序,但机器上只有 100 MB 的...
分类:
其他好文 时间:
2014-05-30 00:13:46
阅读次数:
257
希尔排序一。个人理解希尔排序(Shell
Sort)是插入排序的一种。是针对直接插入排序算法的改进。该方法又称缩小增量排序,因DL.Shell于1959年提出而得名。其实,希尔排序本质也就是直接插入算法的升级,希尔的基本思想,就是先将整个待排元素序列分割成若干个子序列(由相隔某个“增量”的元素组成的...
分类:
其他好文 时间:
2014-05-29 21:49:30
阅读次数:
516
通过简单具体实例讲述连接查询之间的区别UNION(合并)、INNER
JOIN(内连接)外连接,包括左连接、右连接和全连接交叉连接,就是笛卡儿积,慎用!只有真正了解它们之间的区别,才能正确使用。
分类:
数据库 时间:
2014-05-29 19:40:37
阅读次数:
378
本篇文章介绍下redis排序命令.redis支持对list,set和sorted
set元素的排序。排序命令是sort 完整的命令格式如下:SORT key [BY pattern] [LIMIT start count] [GET
pattern] [ASC|DESC] [ALPHA] [STOR...
分类:
其他好文 时间:
2014-05-29 09:02:28
阅读次数:
318