列表推导式(list
comprehension)是利用其他列表创建新列表(类似于数学术语中的集合推导式)的一种方法。它的工作方式类似于for循环,也很简单:In [39]:
[x*x for x in range(10)]Out[39]: [0, 1, 4, 9, 16, 25, 36, 49, ...
分类:
编程语言 时间:
2014-05-05 22:21:48
阅读次数:
422
Materialise 3-Matic v6.1.1.0 Win64 1CD
3-matic基于数字化CAD(STL)的正向工程软件。
3-matic是产品设计到产品制造的快捷方式。3-matic的所有操作都是基于数字化的形式(基于三角片)进行处理,可以直接减少逆向工程和传统CA...
分类:
其他好文 时间:
2014-05-05 22:00:38
阅读次数:
340
Materialise 3-Matic v6.1.1.0 Win64 1CD
3-matic基于数字化CAD(STL)的正向工程软件。
3-matic是产品设计到产品制造的快捷方式。3-matic的所有操作都是基于数字化的形式(基于三角片)进行处理,可以直接减少逆向工程和传统CA...
Author:DriverMonkey
Mail:bookworepeng@Hotmail.com
Phone:13410905075
QQ:196568501
测试环境:Win7 64 bit
编译器:gcc 4.81
测试代码-
/*************************************************...
分类:
编程语言 时间:
2014-05-05 21:22:48
阅读次数:
358
1.sgi STL"标准"的空间适配器: 该适配器很简单,只是对new
delete等内存分配释放函数的一层简单封装而已,所以sgi stl几乎没用上它(效率太低),代码位于defalloc.h.2.sgi stl特殊适配器
std::alloc: 该版本作为stl中的默认适配器,主要分成两个部分:...
分类:
其他好文 时间:
2014-05-04 12:41:42
阅读次数:
381
Input
t – the number of numbers in list, then t lines follow [t
Each line contains one integer: N [0 N
Output
Output given numbers in non decreasing order.
Example
Input:
5
5
3
...
分类:
其他好文 时间:
2014-05-04 00:04:09
阅读次数:
376
list1 = [ 4, 7, 7, 3, 3, 3, 2, 1 ]
list2 = [ 5, 4, 3, 3, 2, 2, 2, 1, 1, 1 ]
def havel_hakimi_algo( degree_list ):
degree_list.sort( reverse = True )
print degree_list
for degr...
分类:
编程语言 时间:
2014-05-03 17:13:49
阅读次数:
426
转战单调队列,争取省赛前做完。。。。
这个题是很裸的单调队列。
不能用stl让人很蛋疼。。。。
就是用一个队列保存当前队伍的信息,如果来了一个大的,就把前面的小的挤掉。
#include
#include
#include
#include
#include
#include
using namespace std;
#define maxn 55000
#define INF 99999...
分类:
其他好文 时间:
2014-05-03 16:28:35
阅读次数:
342
C++开发的项目难免会用到STL的string,使用管理都比char数组(指针)方便的多,但在得心应手的使用过程中也要警惕几个小陷阱,避免我们项目出bug却迟迟找不到原因。
1. 结构体中的string赋值问题
直接通过一个例子说明,下面的例子会输出什么:
#include
#include
#include
using namespace std;
stru...
分类:
编程语言 时间:
2014-05-03 16:09:23
阅读次数:
289
RDD的依赖关系
Rdd之间的依赖关系通过rdd中的getDependencies来进行表示,
在提交job后,会通过在DAGShuduler.submitStage-->getMissingParentStages
privatedefgetMissingParentStages(stage:
Stage): List[Stage] = {
valmissing
=newHash...
分类:
其他好文 时间:
2014-05-03 15:56:22
阅读次数:
282