Create PROC [GetPerformance]( @vp varchar(25), @range char(1) , @depetid int , @Q varchar(1), @QBe...
分类:
其他好文 时间:
2014-07-16 20:13:45
阅读次数:
171
题目:Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ...
分类:
其他好文 时间:
2014-07-16 19:48:18
阅读次数:
263
1.求1~100以内的素数prime=filter(lambda x: not [x%i for i in range(2,x) if x%i==0], range(2,101))#列表推导,一行搞定.print prime2.求字符串子串s='hauifnefldmfp'[s[i:i+n] for...
分类:
编程语言 时间:
2014-07-13 23:39:55
阅读次数:
296
基础数据表:select * from dbo.RecommendationChanelVersionRelation;数据如下:要求按照ChannelVersionID分组,对每组中的OrderId根据ID由小到大的顺序,更新为1,2,3,4,5...方法一(分组PARTITION BY):IF ...
分类:
其他好文 时间:
2014-07-13 11:30:35
阅读次数:
226
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s.
For example, given s = "aab",
Return
[
["aa","...
分类:
其他好文 时间:
2014-07-12 23:21:30
阅读次数:
215
ST算法即是sparse table算法,就是稀疏表的意思,就是利用二分法来划分一个表,划分为2的次方段,之后利用这个st表计算查询结果,可以使得预处理时间O(nlgn),而查询时间为O(1) ;
那么有人会有疑问,既然查询时间是O(1),那么为什么这个算法很多时候并不比线段树快多少,甚至根本没有快过呢?
因为其实查询时间为O(log(range)), range为查询区间的大小,因为...
分类:
其他好文 时间:
2014-07-12 20:35:55
阅读次数:
164
1.背景 无监督学习的定义就不多说了,不懂得可以google。因为项目需要,需要进行无监督的分类学习。 K-means里面的K指的是将数据分成的份数,基本上用的就是算距离的方法。 大致的思路就是给定一个矩阵,假设K的值是2,也就是分成两个部分,那么我们首先确定两个质心。一开始是找矩阵每一列的最大值max,最小值min,算出range=max-min,然后设...
分类:
编程语言 时间:
2014-07-12 20:04:16
阅读次数:
338
#nginx conf by linux kernel
net.ipv4.tcp_max_tw_buckets = 6000
net.ipv4.ip_local_port_range = 1024 65000
net.ipv4.tcp_tw_recycle=1
net_ipv4.tcp_tw_reuse=1
net_ipv4.tcp_syncookies=1
net.core.soma...
分类:
系统相关 时间:
2014-07-12 18:04:24
阅读次数:
212
在思科命令配置小技巧一中,我们谈到,使用range命令可以简化我们的配置但是如果我们经常对一组不连续的端口进行操作比如interface-rangefa1/1,fa1/3,fa1/5,fa1/7,fa1/11即使使用range命令也会显得很繁琐我们总想越简单越好(命令敲再多,工资还是那个数,要是按命令字数算工资..
分类:
其他好文 时间:
2014-07-10 19:20:25
阅读次数:
240
在交换机的配置中,经常会对一组端口进行相同的操作,为简化配置,提高设备性能可以在配置中使用range命令:suzhouxiaoniu(config)#interrangefa1/1-10对10个连续的端口同时进行操作suzhouxiaoniu(config-if-range)#swimoaccsuzhouxiaoniu(config-if-range)#swiaccvlan2suzhoux..
分类:
其他好文 时间:
2014-07-10 18:21:25
阅读次数:
1114