码迷,mamicode.com
首页 >  
搜索关键字:except    ( 6601个结果
cpu负载均衡(python)
chkconfig--level3irqbalanceoff#!/usr/bin/envpythonimportsocketimportfcntlimportstructimportarrayimportplatformimportosimportsysBYTES=4096buf=4096defget_cpu_core_num():try:importmultiprocessingreturnmultiprocessing.cpu_count()except(ImportError,NotImplemente..
分类:编程语言   时间:2015-05-05 16:49:09    阅读次数:230
python关键字
python有多少关键字?>>> import keyword>>> keyword.kwlist['and', 'as', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec',...
分类:编程语言   时间:2015-05-04 11:38:53    阅读次数:158
Python之异常处理
一、什么是异常? 异常即是一个事件,该事件会在程序执行过程中发生,影响了程序的正常执行。 一般情况下,在Python无法正常处理程序时就会发生一个异常。 异常是Python对象,表示一个错误。 当Python脚本发生异常时我们需要捕获处理它,否则程序会终止执行。 二、异常处理 捕捉异常可以使用try/except语句。 try/except语句用来检测try语句块中的错误,从而让ex...
分类:编程语言   时间:2015-04-30 12:36:59    阅读次数:177
leetcode || 137、Single Number II
problem: Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you impl...
分类:其他好文   时间:2015-04-30 10:49:00    阅读次数:126
IE低版本 canvas的支持
// Copyright 2006 Google Inc.//// Licensed under the Apache License, Version 2.0 (the "License");// you may not use this file except in compliance wit...
分类:其他好文   时间:2015-04-29 21:11:42    阅读次数:181
如何解决python中urlopen超时问题
看代码;利用urlopen中的超时参数设立一个循环while True: try: page = urllib.request.urlopen(url, timeout=3) break except: tracebake.print_exc()...
分类:编程语言   时间:2015-04-29 18:56:48    阅读次数:167
leetcode || 136、Single Number
problem: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement ...
分类:其他好文   时间:2015-04-29 17:09:50    阅读次数:112
数据库中的集合查询
数据库中的集合操作主要包括3个方面: 1. Union合并行     union的作用是为了合并两个查询结果,而且在合并的同时把相同的行去重。     例如: 如果我们需要显示全部的并集,即不去重,可以使用union all,如下:     我们只需要使用union来连接两个select-from-where语句块即可。     unio...
分类:数据库   时间:2015-04-28 16:21:14    阅读次数:384
【Single Num II】cpp
题目:Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime c...
分类:其他好文   时间:2015-04-27 21:25:23    阅读次数:116
SingleNumber python实现
Single Number Given an array of integers, every element appears twice except for one. Find that single one. Note:Your algorithm should have a linear r...
分类:编程语言   时间:2015-04-27 21:21:04    阅读次数:131
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!