码迷,mamicode.com
首页 >  
搜索关键字:python sdk    ( 147311个结果
XML解析框架概览
iOS SDK 提供了两个XML框架:1、NSXML,基于Objective-C语言的SAX解析框架,他是iOS SDK默认的XML解析框架,他不支持DOM模式。2、libxml2,基于C语言的第三方提供的sax解析框架,他被苹果整合在iOS SDK中,它支持sax和dom模式。解析XML的其它第三...
分类:其他好文   时间:2014-05-08 12:15:27    阅读次数:431
通过输入方式在Android上进行微博OAuth登录
在微博认证方式里,基本的OAuth认证是必须要调整到跳转到第三方页面上进行授权的,例如下面的例子: 1、从http://open.weibo.com/wiki/index.php/SDK#Android下载SDK包。 2、在AndroidExample/src/weibo4android/Wei.....
分类:移动开发   时间:2014-05-08 12:12:04    阅读次数:503
python 向上取整ceil 向下取整floor 四舍五入round
#encoding:utf-8import math#向上取整print "math.ceil---"print "math.ceil(2.3) => ", math.ceil(2.3)print "math.ceil(2.6) => ", math.ceil(2.6)#向下取整print "\nm...
分类:编程语言   时间:2014-05-08 12:11:13    阅读次数:467
使用官方Android-support-v7在低版本上使用ActionBarActivity
昨天晚上更新了下Android SDK Manager,发现Extras下的Android Support Library已经更新到19.1了,上网一查原来是sdk\extras\android\support\v7中的android-support-v7目录又添加了新的内容。据官方介绍,and.....
分类:移动开发   时间:2014-05-08 11:57:12    阅读次数:426
转载Python中__getattr__ __getattribute__ __get__解释
来源:http://www.myexception.cn/perl-python/620096.htmlpython中__get__,__getattr__,__getattribute__的区别__get__,__getattr__和__getattribute都是访问属性的方法,但不太相同。ob...
分类:编程语言   时间:2014-05-08 11:51:14    阅读次数:277
python2.7.3 problem:no module name _ssl
本文章參考與:http://www.webtop.com.au/blog/compiling-python-with-ssl-support-fedora-10-2009020237。當我"修"好yum之後就開始修python的ssl問題。我的電腦有python的多個版本。在python2.6.6中...
分类:编程语言   时间:2014-05-08 11:46:52    阅读次数:507
AttributeError: 'module' object has no attribute 'handlers'--Python子模块导入问题
想使用python的logging模块记录日志,并使用RotatingFileHandler来处理日志以便于在日志文件超过指定的大小后会重新生成新的日志文件。 基本代码如下: import logging logger = logging.getLogger('mylogger') logger.setLevel(logging.INFO) fh=logging.handlers.Ro...
分类:编程语言   时间:2014-05-08 00:25:12    阅读次数:457
大整数乘法python3实现
由于python具有无限精度的int类型,所以用python实现大整数乘法是没意义的,但是思想是一样的。利用的规律是:第一个数的第i位和第二个数大第j位相乘,一定累加到结果的第i+j位上,这里是从0位置开始算的。代码如下: import sys def list2str(li): while li[0]==0: del li[0] res='' for i in li: res+...
分类:编程语言   时间:2014-05-07 23:13:21    阅读次数:453
一个有趣的现象(苹果的bug Or 坑?),关于区分真机和模拟器的预编译宏
TARGET_IPHONE_SIMULATOR和TARGET_OS_IPHONE 是苹果的两个宏定义, 在真机sdk中位于ios->usr/include/targetconditionals.h中, 在模拟器sdk中位于simulator->usr/include/targetconditionals.h中 (笔者此时使用的xcode版本为5.1,sdk版本是7.1) 仔细看其模...
分类:移动开发   时间:2014-05-07 23:02:07    阅读次数:450
python subprocess
defgetResult(cmd,timeout=2):#命令超时时间 deadline=time.time()+timeout r=subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE) whiletime.time()<deadlineandr.poll()isNone: time.sleep(0.1) ifr.poll()isNone:#检查子进程 r.kill() r.wait() return‘‘ r.wait() ..
分类:编程语言   时间:2014-05-07 22:30:17    阅读次数:504
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!