上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 21 下一页
摘要: JSON格式:http://www.json.org/python和JSON的关系请参考:http://docs.python.org/library/json.html JSON建构有两种结构: 1.“名称/值”对的集合(Acollectionofname/valuepairs)。不同的语言中,它被理解为对象(object),记录(record),结构(struct),字典(dictionary),哈希表(hashtable),有键列表(keyedlist),或者关联数组(associativearray)。 2.值的有序列表(Anorderedlistofvalues)。在大部分语言... 阅读全文
posted @ 2012-08-15 22:02 苍术厚朴 阅读(52524) 评论(6) 推荐(11) 编辑
摘要: Ajax的jquery的api和例子参考:http://api.jquery.com/jQuery.ajax/15.1. Scripting LanguagesSo far, pretty much everything we have done has been server-based. However, client-based code - client-side scripting is an alternative that can be used instead of, or (more commonly) as well as server side code.There ar 阅读全文
posted @ 2012-08-15 21:54 苍术厚朴 阅读(1402) 评论(0) 推荐(0) 编辑
摘要: jQuery API Documentation详细的API和例子说明,请参考文档:http://docs.jquery.com/Main_Page百度百科的解析:http://baike.baidu.com/view/1020297.htmCore$( expr , context )This function accepts a string containing a CSS or basic XPath selector which is then used to match a set of elements.The core functionality of jQuery cente 阅读全文
posted @ 2012-08-15 21:37 苍术厚朴 阅读(1591) 评论(0) 推荐(0) 编辑
摘要: #-*-coding:utf-8-*-from __future__ import with_statementimport ostry: import unittest2 as unittestexcept ImportError: import unittestimport time from splinter import Browserfrom random import randint class DbackupTestCase(unittest.TestCase): # support 2.7,but not support 2.6.all the testca... 阅读全文
posted @ 2012-08-15 18:26 苍术厚朴 阅读(1583) 评论(0) 推荐(1) 编辑
摘要: # -*- coding: utf-8 -*-# Copyright 2012 splinter authors. All rights reserved.# Use of this source code is governed by a BSD-style# license that can be found in the LICENSE file.class AsyncFinderTests(object): def test_find_by_css_should_found_an_async_element(self): "should find element b... 阅读全文
posted @ 2012-08-14 19:20 苍术厚朴 阅读(451) 评论(0) 推荐(0) 编辑
摘要: 来自 http://everet.org/# -*- coding:utf-8 -*-# 破解教务网密码# 作者:华亮from HTMLParser import HTMLParserfrom Queue import Emptyfrom Queue import Queuefrom re import matchfrom sys import exitfrom urllib import urlencodeimport osimport reimport socketimport threadingimport timeimport urllibimport urllib2import sh 阅读全文
posted @ 2012-08-14 00:34 苍术厚朴 阅读(2225) 评论(0) 推荐(0) 编辑
摘要: 当我基本能从事Django框架来对网站进行开发的时候,发现对Python的知识了解得太少了,甚至到了知识匮乏的阶段。看来,我得温习一下Python知识了。据我个人的理解,Python中有三种内置的数据类型。dictionary(字典)、List(列表)和tuple(元组)。下面我将对这几个内置的数据类型进行总结。Dictionary(字典)首先,什么是字典呢?通俗地来讲,字典无非就是很多的数据,但是它有一个目录,可以通过目录中的一个简单值来找到与之相对于的详细信息。换句话来说,目录就是内容的一个特殊标示,即目录中的每一个字段,都会在内容中有与之相对应的详细信息。也就是说,目录中的每一个信息都是 阅读全文
posted @ 2012-08-13 23:19 苍术厚朴 阅读(36615) 评论(1) 推荐(5) 编辑
摘要: select函数: 系统提供select函数来实现多路复用输入/输出模型。原型: #include <sys/time.h> #include <unistd.h> select函数: 系统提供select函数来实现多路复用输入/输出模型。原型: #include <sys/time.h> #include <unistd.h> int select(int maxfd,fd_set *rdset,fd_set *wrset,fd_set *exset,struct timeval *timeout); 参数maxfd是需要监视的最大的文件描述符 阅读全文
posted @ 2012-08-13 22:46 苍术厚朴 阅读(1803) 评论(1) 推荐(0) 编辑
摘要: 简介: 软件的测试是一件非常乏味的事情,在测试别人编写的软件时尤其如此,程序员通常都只对编写代码感兴趣,而不喜欢文档编写和软件测试这类"没有创新"的工作。既然如此,为什么不让程序员在编写软件时自己加入一些用于测试的代码,使测试过程自动化呢?在软件工程中,这一技术称为自动单元测试,本文介绍在用Python开发软件时如何实现这一目标。 一、软件测试大型软件系统的开发是一个很复杂的过程,其中因为人的因素而所产生的错误非常多,因此软件在开发过程必须要有相应的质量保证活动,而软件测试则是保证质量的关键措施。正像软件熵(software entropy)所描述的那样:一个程序从设计很好 阅读全文
posted @ 2012-08-13 21:44 苍术厚朴 阅读(3596) 评论(0) 推荐(1) 编辑
摘要: 正则表达式由一些普通字符和一些元字符(metacharacters)组成。普通字符包括大小写的字母和数字,而元字符则具有特殊的含义,我们下面会给予解释。 在最简单的情况下,一个正则表达式看上去就是一个普通的查找串。例如,正则表达式"testing"中没有包含任何元字符,它可以匹配"testing"和"123testing"等字符串,但是不能匹配"Testing"。 要想真正的用好正则表达式,正确的理解元字符是最重要的事情。下表列出了所有的元字符和对它们的一个简短的描述。元字符描述\将下一个字符标记为一个特殊字符、或 阅读全文
posted @ 2012-08-13 21:28 苍术厚朴 阅读(1771) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 21 下一页