原文 The plane was late and detectives were waiting at the airport all morning. They were expecting a valuable parcel of diamonds from South Africa. A few hours earlier, someone had told the police...
分类:
其他好文 时间:
2015-06-29 15:06:09
阅读次数:
162
最近由于需要大概研究了一下MYSQL的随机抽取实现方法。举个例子,要从tablename表中随机提取一条记录,大家一般的写法就是:SELECT * FROM tablename ORDER BY RAND() LIMIT 1。 ?? ? ?但是,后来我查了一下...
分类:
数据库 时间:
2015-06-29 15:03:54
阅读次数:
171
原题如下:
Given a binary tree, return the bottom-up level order traversal of its nodes’ values. (ie, from left to right, level by level from leaf to root).我的算法:
1. 首先获得树的高度
2. 层序递归遍历二叉树实现如下:package leet...
分类:
其他好文 时间:
2015-06-29 15:02:29
阅读次数:
130
一个简单的SELECT COUNT(*) 要6秒select count(*) from tb where status=1
#运行花费6-10秒吞吐能力 阿里云[root@aliyun ~]# cd /tmp && dd if=/dev/zero of=t.img bs=4096 count=10000 conv=
ync
10000+0 records in
10000+0 records ou...
分类:
其他好文 时间:
2015-06-29 14:58:18
阅读次数:
150
TFS API : 四、工作项查询本节将讲述如何查询工作项,将用户统计数据。 使用WorkItemStore.Query方法进行查询工作项,其使用的语法和SQL语法类似:Select [标题]from workitemswhere [工作项类型]='任务' and [指派给] = 'adminis....
生成sshkeyssh-keygen -t rsa -C "your-email@address.com" -f filename没有指定f选项或f选项为空时,生成的私钥和公钥为:id_rsa和id_rsa.pub为了同时连接多个源需要为不同的源设置不同的名称,否则会被覆盖掉PS1:Windows命...
代码:- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. [self vertiCal...
分类:
其他好文 时间:
2015-06-29 14:42:25
阅读次数:
96
最近刚接触git,简直就是一小白用户,所以决定自己记录一些东西,以备不时之需系统环境:Windows1.首先下载git,http://git-scm.com/download/2.正常安装git3.建一个自己的目录,然后右键点击git bash4.设置Git的你自己的user name和email:...
分类:
其他好文 时间:
2015-06-29 14:40:00
阅读次数:
119
对于Python中静态、类、抽象方法的使用,我是一直很迷糊的。最近看到一篇技术文章对这方面解释的很好,在此翻译一下,加深印象,也为有需要的同学提供一个方便。 Python中方法是如何工作的: 方法即函数,作为一个类的属性存储。你能像如下申明和访问一个函数:>>> class Pizza(objec....
分类:
编程语言 时间:
2015-06-29 14:38:21
阅读次数:
272
option=com_onlinejudge&Itemid=8&page=show_problem&problem=3142" target="_blank" style="">题目链接:uva 11991 - Easy Problem from Rujia Liu?题目大意:给出一个包括n个整数的...
分类:
其他好文 时间:
2015-06-29 14:38:00
阅读次数:
107