Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). Y ...
分类:
其他好文 时间:
2018-11-03 13:56:29
阅读次数:
124
一、行转列 1、测试数据准备 执行结果: 2、行转列sql 执行结果: 二、列转行 1、测试数据准备 执行结果: 2、列转行的sql 执行结果: ...
分类:
数据库 时间:
2018-10-30 13:09:54
阅读次数:
159
1. 前提 排序算法(六) —— 归并排序 排序算法(七) —— 快速排序 排序算法杂谈(四) —— 快速排序的非递归实现 2. 优化策略1:主元(Pivot)的选取 归并排序(Merge Sort)有一个很大的优势,就是每一次的递归都能够将数组平均二分,从而大大减少了总递归的次数。 而快速排序(Q ...
分类:
编程语言 时间:
2018-10-28 16:03:59
阅读次数:
268
问: create table test(id int,name varchar(20),quarter int,profile int) insert into test values(1,'a',1,1000)insert into test values(1,'a',2,2000)insert ...
分类:
其他好文 时间:
2018-10-26 17:43:11
阅读次数:
370
本机环境 1、win7 64 旗舰版 2、Qt 5.9.1(MSVC 2015,32 bit) 3、Python 3.7.1 (32-bit),二进制包安装的,即Windows x86 executable installer 4、PythonQt 3.2 使用上面的环境,源码编译 5、2018年1 ...
分类:
编程语言 时间:
2018-10-26 12:10:23
阅读次数:
320
[TOC] Pwn 10月25 Hitcon(三) 一天一天慢慢来,?? lab6 migration 这个题目涉及到栈迁移(stack pivot),在 "ctf wiki" 上面是有这个例题和解释的。 该技巧就是劫持栈指针指向攻击者所能控制的内存处,然后再在相应的位置进行 ROP。一般来说,我们 ...
分类:
其他好文 时间:
2018-10-25 21:41:31
阅读次数:
177
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1,2]). Y ...
分类:
其他好文 时间:
2018-10-24 20:12:51
阅读次数:
139
seaborn是基于plt的封装好的库。有很强的作图功能。 1、布局风格设置(图形的style)and 细节设置 用matplotlib作图: 输出: 用seaborn的默认系统风格: 输出: 下面介绍seaborn的五种作图风格: darkgrid whitegrid dark white tic ...
分类:
其他好文 时间:
2018-10-20 23:46:39
阅读次数:
408
int partition2(int[] arr,int Begin,int End,int Pivot) { int i = Begin; int j = End; while(i=Pivot)--j; while(iPivot) i = i-1; return i; } int Select(i... ...
分类:
其他好文 时间:
2018-10-15 18:25:44
阅读次数:
229
1、选主元 如果每次都选取第一个元素为主元,则时间复杂度为O(n^2)。 所以建议主元选取方法为:选头中尾元素的中位数。(三数中值分割法) 2、代码实现(三数中值分割法) 注意: ( 1 ) 不能把a, b处的程序改为 否则将出错,因为当A[ i ] = A[ j ] = pivot 的时候,会产生 ...
分类:
编程语言 时间:
2018-10-13 11:43:48
阅读次数:
175