摘要: 转自:http://joy2everyone.iteye.com/blog/910950@property 可以将python定义的函数“当做”属性访问,从而提供更加友好访问方式,但是有时候setter/getter也是需要的,我们视具体情况吧请注意以下代码场景:代码片段1:Python2.6代码c... 阅读全文
posted @ 2014-04-28 15:33 sheeta 阅读(141) 评论(0) 推荐(0)
摘要: 1 var page = require('webpage').create(); 2 var system = require('system'); 3 4 if ( system.args.length == 1 ) 5 { 6 console.log('Usage: phantom... 阅读全文
posted @ 2014-04-28 09:08 sheeta 阅读(741) 评论(0) 推荐(0)
摘要: ubuntu自带的bochs不能调试,所以选择编译bochs源码安装.1.安装依赖库sudo apt-get install build-essential xorg xorg-dev gnome-core-devel2.编译bochs./configure --enable-debugger --... 阅读全文
posted @ 2014-04-23 11:31 sheeta 阅读(825) 评论(0) 推荐(0)
摘要: 1 import subprocess, hashlib 2 3 def fileSha1(filepath): 4 with open(filepath,'rb') as f: 5 sha1obj = hashlib.sha1() 6 sha1obj.upd... 阅读全文
posted @ 2014-04-22 15:54 sheeta 阅读(245) 评论(0) 推荐(0)
摘要: 如何在Linux上使用Bochs作者:王聪引言最近在做操作系统方面的研究,不得不去下一个虚拟机 来用。由于我不使用Windows,所以选择很少了。因为在Linux上,差不多就只有两款好的 虚拟机——Bochs和Qemu。这两个之中,Bochs是用C++编写,能在很多平台上使用,而且不论什么平台, 它... 阅读全文
posted @ 2014-04-22 11:05 sheeta 阅读(277) 评论(0) 推荐(0)
摘要: 题目描述Given an array withNintegers where all elements appear three times except for one. Find out the one which appears only once.输入格式Several test cases are given, terminated by EOF.Each test case consists of two lines. The first line gives the length of arrayN(1≤N≤105), and the other line describes t 阅读全文
posted @ 2014-03-26 17:03 sheeta 阅读(610) 评论(0) 推荐(0)