using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace linq_to_xml
{
internal class Program
...
分类:
其他好文 时间:
2014-07-24 12:23:55
阅读次数:
186
通过itertools模块,可以用各种方式对数据进行循环操作1, chain()from intertools import chainfor i in chain([1,2,3], ('a', 'b', 'c'), 'abcde'): print ichain将可迭代的对象链接在一起,iter1循...
分类:
编程语言 时间:
2014-07-24 12:20:55
阅读次数:
255
正在阅读最新版的《A byte of Python》。发现Python3.0在某些地方还是有些改变的。准备慢慢的体会,与老版本的《A byte of Python》做对比,最后再去查阅官方网站的文档。1.如果你下载的是最新版的Python,就会发现所有书中的Hello World例子将不再正确。Ol...
分类:
编程语言 时间:
2014-07-24 12:14:35
阅读次数:
290
Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,
Given n = 3, there are a total of 5 unique BST's.
1 3 3 2 1
\...
分类:
编程语言 时间:
2014-07-24 11:35:42
阅读次数:
245
从上一篇《PYTHON操作EXCEL》可以看到,Python 操作 Excel 已非常自如方便。但是 Python 和相关库毕竟是一个额外的依赖,若能从 Excel 自身解决此类问题,自然是更为易用。 1. VBA 中的哈希表 用 Python 的着眼点...
分类:
其他好文 时间:
2014-07-24 10:55:54
阅读次数:
326
Python有好多个GUI框架,wxPython比较流行,so just do it.....?? Win下各种不爽,又换Ubuntu ????跟着教程做个记事本。视频地址:http://www.pythoner.cn/course/topic/wxPython-gui/ (一)wxpyt...
分类:
编程语言 时间:
2014-07-24 10:55:44
阅读次数:
321
yieldreturn语句返回集合的一个元素yieldbreak可停止迭代------------------------------------------------------------------Student.csusingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
namespaceConsoleA..
分类:
其他好文 时间:
2014-07-24 10:52:36
阅读次数:
204
-----------------------------------------ListStu.csusingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Threading.Tasks;
usingSystem.Collections;
namespaceConsoleApplication3
{
publicclassListStu<T>
{
privateQu..
分类:
其他好文 时间:
2014-07-24 10:51:54
阅读次数:
228
LXC1.0最大的特性是非特权容器,通过巧妙的uidmap,将物理机的普通用户(uid和gid)映射成容器里的root(uid=0,gid=0),极大的提高了lxc的安全性。LXC1.0对内核和python版本有要求,故下文以ubuntu14.04为例,使用普通用户dell创建非特权的lxc容器。(以下操作,非特别说明,..
分类:
其他好文 时间:
2014-07-24 10:50:14
阅读次数:
327
一、安装配置Python
其实在开发python最好在ubuntu环境下,简单也便于扩展各个package。这次来讲一下如何在win7上搭建Python开发环境。由于python的跨平台性。在windows下和ubuntu下基本上没什么差别。下面从几个不步骤来搭建开发环境。
1.下载(https://www.python.org/downloads/)安装python.2.7.8. pytho...
分类:
编程语言 时间:
2014-07-24 10:42:38
阅读次数:
350