码迷,mamicode.com
首页 >  
搜索关键字:python objects all    ( 160304个结果)
快速排序的python多种实现
问题 快速排序,这是一个经典的算法,本文给出几种python的写法,供参考。 特别是python能用一句话实现快速排序。 思路说明 快速排序是C.R.A.Hoare于1962年提出的一种划分交换排序。它采用了一种分治的策略,通常称其为分治法(Divide-and-ConquerMethod)。 (1) 分治法的基本思想 分治法的基本思想是:将原问题分解为若干个规模更小但结构与原...
分类:编程语言   时间:2014-06-25 09:02:20    阅读次数:289
python基础教程_学习笔记14:标准库:一些最爱——re
标准库:一些最爱 re re模块包含对正则表达式的支持,因为曾经系统学习过正则表达式,所以基础内容略过,直接看python对于正则表达式的支持。 正则表达式的学习,见《Mastering Regular Expressions》(精通正则表达式)   re模块的内容 最重要的一些函数   函数 描述 compile(pattern[,fl...
分类:编程语言   时间:2014-06-25 08:28:05    阅读次数:304
在Windows2012下配置Mercurial
安装文件: xampp-win32-1.8.3-4-VC11-installer.exe tortoisehg-3.0.1-x64.msi python-2.7.7.amd64.msi server-jre-8u5-windows-x64.tar.gz...
分类:Windows程序   时间:2014-06-25 08:13:49    阅读次数:382
[Python]通过websocket与js客户端通信
网站大多使用HTTP协议通信,而HTTP是无连接的协议。只有客户端请求时,服务器端才能发出相应的应答,HTTP请求的包也比较大,如果只是很小的数据通信,开销过大。于是,我们可以使用websocket这个协议,用最小的开销实现面向连接的通信。具体的websocket介绍可见http://zh.wikipedia.org/wiki/WebSocket  这里,介绍如何使用Python,使用websocket与前端js进行通信...
分类:编程语言   时间:2014-06-25 08:07:51    阅读次数:431
LeetCode: Surrounded Regions [130]
【题目】 Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O's into 'X's in that surrounded region. For example, X X X X X O O X X X O X X O X X After running your function, the board shou...
分类:其他好文   时间:2014-06-25 08:02:30    阅读次数:205
orcal数据库基本操作
1、连接   SQL*Plus system/manager   2、显示当前连接用户   SQL> show user   3、查看系统拥有哪些用户   SQL> select * from all_users;   4、新建用户并授权   SQL> create user a identified by a;(...
分类:数据库   时间:2014-06-25 07:33:46    阅读次数:365
LeetCode: Sum Root to Leaf Numbers [129]
【题目】 Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find the total sum of all root-to-leaf numbers. For example, 1 ...
分类:其他好文   时间:2014-06-25 07:32:27    阅读次数:209
oracle 11g 中 (oracle 10g) crsctl 的 替换命令
oracle 11g 中 (oracle 10g) crsctl 的 替换命令 Deprecated Command Replacement Commands crs_stat crsctl check cluster -all crsctl stat re...
分类:数据库   时间:2014-06-25 07:15:02    阅读次数:379
Python中文编码过程中遇到的一些问题
首先,要明白encode()和decode()的区别。 encode()的作用是将Unicode编码的字符串转换为其他编码格式。 例如:st1.encode("utf-8")  这句话的作用是将Unicode编码的st1编码为utf-8编码的字符串 decode()的作用是把其他编码格式的字符串转换成Unicode编码的字符串。 例如:st2.decode("utf-8") 这句话的作用是...
分类:编程语言   时间:2014-06-25 07:09:04    阅读次数:283
Flask框架:(一、安装)
Flask 依赖于两个外部库:Werkzeug 和 Jinja2 。 Werkzeug 是一个 WSGI (在 web 应用和多种服务器之间开发和部署的标准 Python 接口) 的工具集,Jinja2 负责渲染模板。 1.安装 参考:http://blog.csdn.net/qwiwuqo/article/details/8970621 Fl...
分类:其他好文   时间:2014-06-25 06:48:22    阅读次数:349
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!