上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 21 下一页
摘要: 数据库名、实例名、数据库域名、全局数据库名、服务名 ,这是几个令很多初学者容易混淆的概念。相信很多初学者都与我一样被标题上这些个概念搞得一头雾水。我们现在就来把它们弄个明白。一、数据库名什么是数据库名?数据库名就是一个数据库的标识,就像人的身份证号一样。他用参数DB_NAME表示,如果一台机器上装了多全数据库,那么每一个数据库都有一个数据库名。在数据库安装或创建完成之后,参数DB_NAME被写入参数文件之中。格式如下:DB_NAME=myorcl...在创建数据库时就应考虑好数据库名,并且在创建完数据库之后,数据库名不宜修改,即使要修改也会很麻烦。因为,数据库名还被写入控制文件中,控制文件是以 阅读全文
posted @ 2012-08-29 18:04 苍术厚朴 阅读(777) 评论(0) 推荐(0) 编辑
摘要: 限于作者水平有限,以下内容可能是管窥之见,希望大家高抬贵手,且让我斗胆抛砖引玉。公司产品迪备主要是通过网页操作来进行数据库的备份与恢复,监控与管理,因此在测试的过程中,可以用python测试脚本来模拟用户的操作,这样的测试对于回归测试效果尤佳,减少了人工操作,极大地提高了效率。据网上资料得知,python的web测试开源世界,存在splinter,它是自动化测试web的框架,这是最为基本的Web-driver。然后加上selenium,两者并用,才能支持主流的浏览器的firefox, chrome 和IE ,到目前为止,支持chrome浏览器的最为齐全,连鼠标的模拟的API都存在,同时对其余两 阅读全文
posted @ 2012-08-28 23:21 苍术厚朴 阅读(11599) 评论(2) 推荐(2) 编辑
摘要: #能够将XML文档转换为字典和列表的组合,是一个不错的主意from xml.parsers import expatclass Element(object): '''analyze a element''' def __init__(self, name, attributes): #record tag and attribute dictionary self.name = name self.attributes = attributes #clear the element cdata and its childre... 阅读全文
posted @ 2012-08-25 14:17 苍术厚朴 阅读(3011) 评论(0) 推荐(1) 编辑
摘要: import xml.dom.minidomdocument = """\<slideshow><title>Demo slideshow</title><slide><title>Slide title</title><point>This is a demo</point><point>Of a program for processing slides</point></slide><slide><title& 阅读全文
posted @ 2012-08-25 11:20 苍术厚朴 阅读(490) 评论(0) 推荐(0) 编辑
摘要: #需要使用SSH协议登录本地或远程计算机,并发送命令# use ssh to control remote computersimport os, sys, paramikofrom getpass import getpassparamiko.util.log_to_file('auto_ssh.log',0)def parse_user(user,default_host, default_port): '''given name [@host[:port]],return name,host,port,if not, return default 阅读全文
posted @ 2012-08-25 10:47 苍术厚朴 阅读(793) 评论(0) 推荐(0) 编辑
摘要: 需要你的主线程把处理任务托付给一个工作线程池Queue.Queue是用来协调工作线程池的最简单和最有效率的方法。因为它已经有了全局变量的保护(加锁和解锁)#-*-coding:utf-8-*-import threading, Queue, time, sys#global varialbesQin = Queue.Queue()Qout = Queue.Queue()Qerr = Queue.Queue()Pool = [ ]def report_error(): '''put error information into Qerr to report the err 阅读全文
posted @ 2012-08-25 08:50 苍术厚朴 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 需要将某个网络端口转发到另外一个主机(forwarding),但可能会是不同的端口(redirecting)import sys, socket, time, threadingLOGGING = Trueloglock = threading.Lock()def log(s, *a): if LOGGING: loglock.acquire() try: print '%s:%s' %(time.ctime(), (s%a)) sys.stdout.flush() finally: ... 阅读全文
posted @ 2012-08-25 08:41 苍术厚朴 阅读(2504) 评论(0) 推荐(0) 编辑
摘要: import BaseHTTPServer, shutil, osfrom cStringIO import StringIOclass MyHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): #The http path we service and the command we service cmds = {'/ping':'ping www.thinkware.se', '/netstat': 'netstat -a', '/tracert' 阅读全文
posted @ 2012-08-25 01:17 苍术厚朴 阅读(1836) 评论(0) 推荐(0) 编辑
摘要: 吾尝终日而思矣,不如须臾之所学也;吾尝跂而望矣,不如登高之博见也。登高而招,臂非加长也,而见者远;顺风而呼,声非加疾也,而闻者彰。假舆马者,非利足也,而致千里;假舟楫者,非能水也,而绝江河。君子生非异也,善假于物也。—-《劝学》学而不思则罔,思而不学则殆。温故而知新,可以为师矣。—- 《论语·为政第二》学而时习之,不亦说乎?有朋自远方来,不亦乐乎?人不知而不愠,不亦君子乎?—- 《论语·学而第一》KISS. Keep It Simple,Stupid.—- UnkownA designer knows he has arrived at perfection not whe 阅读全文
posted @ 2012-08-22 17:01 苍术厚朴 阅读(345) 评论(0) 推荐(0) 编辑
摘要: """Loading unittests."""import osimport reimport sysimport tracebackimport typesfrom functools import cmp_to_key as _CmpToKeyfrom fnmatch import fnmatchfrom . import case, suite__unittest = True# what about .pyc or .pyo (etc)# we would need to avoid loading the same tes 阅读全文
posted @ 2012-08-22 09:27 苍术厚朴 阅读(4225) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 21 下一页