一、if else:#!/usr/bin/pythonx = int(raw_input('please input:'))if x >= 90: if x >= 95: print 'a+' else: print 'a'elif x >= 80: i...
分类:
编程语言 时间:
2014-12-22 16:12:37
阅读次数:
213
转自:http://www.robotium.cn/archives/799am instrument [flags] -r: print raw results (otherwise decode REPORT_KEY_STREAMRESULT),打印的原始结果。收集有用的原始性能数据。-e :....
分类:
其他好文 时间:
2014-12-22 16:09:29
阅读次数:
258
wget http://python-distribute.org/distribute_setup.pypython distribute_setup.pywget https://raw.github.com/pypa/pip/master/contrib/get-pip.pypython ge...
分类:
其他好文 时间:
2014-12-21 23:31:30
阅读次数:
205
contentType: "application/json", data: JSON.stringify( { org: org, worksite_info: info ...
分类:
Web程序 时间:
2014-12-21 19:20:36
阅读次数:
252
一、kvm虚拟机镜像格式转换1、KVM中磁盘镜像有哪些格式?kvm从qemu继承了丰富的磁盘格式,包括裸映象(rawp_w_picpaths),原始qemu格式(qcow),VMware格式和更多2、KVM中raw格式和qcow2格式的比较?kvm虚拟机默认使用raw格式的镜像格式,性能最好,速度最快,它的缺点就是不支持一..
分类:
其他好文 时间:
2014-12-21 01:59:49
阅读次数:
843
简单的实例:写输入内容到创建的文件中:import osls = os.linesep #Win is '\r\n' and Linux is '\n'fileName = raw_input('Please enter your file name here:')while True: ...
分类:
编程语言 时间:
2014-12-21 00:38:01
阅读次数:
213
先说明一下操作系统的引导流程:
主引导记录(MBR,Main Boot Record)是位于磁盘最前边的一段引导(Loader)代码
分区引导记录(PBR,Partition Boot Record)是各个分区自己的引导记录,写在各个分区开始处第一个扇区
DOS引导记录(DOS Boot Record)应称为OBR(OS Boot Record),意思是活动分区的PBR,即操作系统引导记录
...
1. 泛型概念 顾名思义,类型参数化(Generics)2.未检查的类型转换 给一个原生类型赋值一个泛型类型Box rawBox = new Box(); // rawBox is a raw type of BoxBox intBox = rawBox; // warn...
分类:
编程语言 时间:
2014-12-19 17:18:52
阅读次数:
237
测试环境:Ubuntu12.04python-pexpect安装:apt-getinstallpython-pexpect测试脚本:#!/usr/bin/envpython
importpxssh
importgetpass
try:
s=pxssh.pxssh()
hostname=raw_input(‘hostname:‘)
username=raw_input(‘username:‘)
password=getpass.getpass(‘pleaseinputpassword:..
分类:
其他好文 时间:
2014-12-19 15:59:04
阅读次数:
201
在开发中,有时需要使用db文件数据库,所以就需要将其导入项目,再将其使用程序写入到应用的db文件下使用。
代码很简单,可以拿来直接使用。
要使用需要两个步骤:
1.创建raw文件,导入db文件,如下:
2.代码
public class DBOpenHelper {
private final int BUFFER_SIZE = 400000;
public static f...
分类:
移动开发 时间:
2014-12-18 00:18:48
阅读次数:
190