- 博客(7)
- 收藏
- 关注
转载 算法题:覆盖前缀 The first covering prefix of array ---哈希表
A non-empty zero-indexed array A consisting of N integers is given. Thefirst covering prefixof array A is the smallest integer P such that 0≤P<N and such that every value that occurs in ar...
2013-08-29 15:10:00
135
转载 一道算法题:待解
You are given N round clocks.Every clock has M hands, and these hands can point to positions 1, 2, 3, ..., P (yes, these represent numbers around each face). The clocks are represented by the...
2013-08-23 20:10:00
155
转载 python 操作XML和自己实现的xml解析器
1.python的ElementTree的用法 这部分的内容主要来自对python 3.3.2的documentation的翻译 sample.xml: <?xml version="1.0"?><data> <country name="Liechtenstein"> <rank&...
2013-08-22 18:13:00
143
转载 设计原则笔记
1.针对接口编程 接口是一系列方法的声明,是一些方法特征的集合,一个接口只有方法的特征没有方法的实现. 接口是对抽象的抽象 针对接口编程也称为面向接口编程,将设计和实现分开,使用时只需引用借口即可,用于系统各部分的解耦合.2.单一职责原则 定义:一个类的功能要单一,只做与它相关的事情. 遵循单一职责原则会给测试带来极大的方便. 违背单...
2013-08-20 15:39:00
81
转载 python 过滤xml非法字符 :not well-formed (invalid token)错误处理
python处理xml报错:xml.etree.ElementTree.ParseError: not well-formed (invalid token):查询得知xml有不支持的字符范围出现这个错误的原因是,xml文件中含有非法字符,是一个bad xml,即不符合xml规范的.由于xml文件是第三方提供,只能自己这里处理掉xml中的非法字符python过滤方法:...
2013-08-13 19:46:00
8960
转载 qemu windows xp系统快照死机情况的处理
问题描述:guest系统为winxp ,主机为ubuntu 12.04qemu-system-i386 5g256mxpsp2.qcow2 -m 256 -net nic,nodel=rtl8139 -net user-rtc clock=vm启动镜像之后,xp系统开机运行良好monitor输入savevm test,然后loadvm之后系统处于死机态,monitor输入...
2013-07-23 13:30:00
229
转载 qemu 使用
一:基本使用1.创建镜像eg:qemu-img create -f raw xp.raw 8G命令格式:qemu-img create [-q] [-f fmt][-o options] filename [size]2.启动虚拟机,指定安装镜像文件eg:qemu-system-i386 xp.raw -boot d -cdrom xp.iso -m 512...
2013-07-19 14:36:00
244
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人