本机IP地址:192.168.1.163
[oracle@rtest ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.2.0 - Production on Sun May 4 19:32:13 2014
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
@...
分类:
数据库 时间:
2014-05-10 10:34:04
阅读次数:
392
生成器和普通函数有些区别,比如生成器不用return返回,而用yield来返回一系列元素
除非“召唤”生成器的next(),否则函数体里面不会执行任何代码块,上下文环境保存着。
虽然不需要明确定义__iter__()和next()方法,但是它本身包含这个方法。
当想要结束一个协程时,使用close()方法即可,close会在协程中引发GeneratorExit异常,这时候可以通过try/ex...
分类:
编程语言 时间:
2014-05-10 09:53:34
阅读次数:
317
The Chef likes to stay in touch with his staff. So, the Chef, the head server, and the sous-chef all carry two-way transceivers so they can stay in constant contact. Of course, these transceivers have...
分类:
其他好文 时间:
2014-05-10 09:11:21
阅读次数:
334
正常情况下,当我们定义了一个class,创建了一个class的实例后,我们可以给该实例绑定任何属性和方法,这就是动态语言的灵活性。先定义class:
>>> class Student(object):
... pass
...
然后,尝试给实例绑定一个属性:
>>> s = Student()
>>> s.name = 'Michael' # 动态给实例绑定一个属性
>>> pr...
分类:
其他好文 时间:
2014-05-10 09:10:48
阅读次数:
331
John is going on a fishing trip. He has h hours available (1 <= h <= 16), and there are n lakes in the area (2 <= n <= 25) all reachable along a single, one-way road. John starts at lake 1, but he can finish at any lake he wants. He can only travel from on...
分类:
其他好文 时间:
2014-05-07 08:48:52
阅读次数:
515
public class ArrayList {
Object[] objects = new Object[10];
int index = 0;
public void add(Object object) {
if (index == objects.length) {
Object[] newObjects = new Object[objects.length*2];
...
分类:
其他好文 时间:
2014-05-07 07:57:10
阅读次数:
257
Paint the Grid Reloaded
Time Limit: 2 Seconds
Memory Limit: 65536 KB
Leo has a grid with N rows and M columns. All cells are painted with either black or white initially.
Two cells A ...
分类:
其他好文 时间:
2014-05-07 07:28:35
阅读次数:
480
(转载请注明出处:http://blog.csdn.net/buptgshengod)
1.背景
上一节学习支持向量机,感觉公式都太难理解了,弄得我有点头大。不过这一章的Adaboost线比较起来就容易得多。Adaboost是用元算法的思想进行分类的。什么事元算法的思想呢?就是根据数据集的不同的特征在决定结果时所占的比重来划分数据集。就是要对每个特征值都构建决策树,并且赋予他们不同的...
分类:
编程语言 时间:
2014-05-07 06:48:25
阅读次数:
569
简单谈谈 Python 中容器的遍历和一下小技巧。
1、遍历单个容器
下面代码遍历一个 List 结构,同样适用于 Tuple、Set 结构类型
>>> x = [1, 2, 3, 'p' , 'y']
>>> for v in x:
... print(x)
...
1
2
3
p
y
遍历字典 Dict 结构也是...
分类:
编程语言 时间:
2014-05-07 04:12:39
阅读次数:
395
【Question】
Given an array S of n integers, are there elements a, b, c in S such
that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note:
Elements in ...
分类:
其他好文 时间:
2014-05-06 14:57:29
阅读次数:
318