Combinations:Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example,If n = 4 and k = 2, a solution is:[ ...
分类:
其他好文 时间:
2014-07-01 12:58:20
阅读次数:
212
Sort colors:Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the...
分类:
其他好文 时间:
2014-07-01 12:57:43
阅读次数:
179
一、图形用户图面(GUI编程)1. wxpython下载和安装:下载url: http://wxpython.org/download.php2.创建示例GUI应用程序 :①开始需要导入wx 模块②初始化import wxapp = wx.App()3. 窗口和组件窗口(window) 也称为框架(...
分类:
编程语言 时间:
2014-07-01 12:51:14
阅读次数:
238
def recursive_multiply(x, y, n): if n==1: return x*y else: a = x/pow(10, n/2) b = x-a*pow(10, n/2) c = y/pow(10, n/2) d = y-c*pow(10, n/2) ac = re...
分类:
编程语言 时间:
2014-07-01 12:20:43
阅读次数:
273
NumPy提供了一个N维数组对象,即:ndarray。ndarray是一个通用的同构数据多维容器,也就是说,其中的所有元素必须是相同类型的。...
分类:
编程语言 时间:
2014-07-01 10:45:36
阅读次数:
258
疯狂的暑假学习之 Django学习笔记(一)
教材 书《The Django Book》
视频:csvt Django视频
1.创建项目
django‐admin.py startproject mysite。
2.运行开发服务器
python manage.py runserver
3.文件结构...
分类:
其他好文 时间:
2014-07-01 09:12:25
阅读次数:
196
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
回文字符串是指: 两个字符串的字符个数完全相同,这两个字符串是Anagrams。因此Anagrams至少指俩字符串。找出字符集合中的Anagrams组。...
分类:
其他好文 时间:
2014-07-01 08:42:11
阅读次数:
250
在看 networkx 源码的时候觉得疑惑,为什么外层 for 要注意 TypeError,里面就不用,同样是 in,
一直纠结 node 是不是有问题,比如 node 不可以被迭代什么的,那么里面应该也可能触发 TypeError 啊,
后来发现 n 若是不可以被哈希的,也会触发,作者目的其实是想针对 n 的性质。
比如:...
分类:
编程语言 时间:
2014-07-01 08:34:01
阅读次数:
257
#region File Header & Copyright Notice/* * Copyright (C) 2014 XXX, INC. All Rights Reserved. * THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MA...
分类:
数据库 时间:
2014-07-01 00:53:50
阅读次数:
252
Python官方网站:https://www.python.org/ Python 库windows平台安装包下载:http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-dateutil 简明Python教程:http://sebug.net/paper...
分类:
编程语言 时间:
2014-07-01 00:43:39
阅读次数:
309