下面说说split函数的用法
def break_words(stuff):
"""This function will break up words for us."""
words = stuff.split(' ')#split('.',1) use '.' split one time
return words
def sort_words(wo...
分类:
编程语言 时间:
2014-06-08 18:19:21
阅读次数:
336
1.首先需要在linux系统tomcat/bin目录下配置catalina.sh这个文件中增加:
CATALINA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
参数说明:
-Xdebug : 启用调试模式
-X...
分类:
Web程序 时间:
2014-06-08 15:09:35
阅读次数:
290
1.Socket类
(1)常用属性
AddressFamily 获取Socket的地址族
Available 获取已经从网络接收且可供读取的数据量
Connected 获取一个值,该值只是Socket是在上次Send还是Receive操作 时链接到远程主机...
# -*- coding: utf-8 -*- import socket import
sys port = 80 host = sys.argv[1] filename = sys.argv[2] soc =
socket.socket(socket.AF_INET, socket....
分类:
编程语言 时间:
2014-06-07 23:43:22
阅读次数:
320
LuaSocket 基于Lua平台开发的一套socket的lua接口库程序, 为lua程序的扩展
,http://w3.impa.br/~diego/software/luasocket/home.html包括两部分: c核心库(支持windows 和
unix系统),和 Lua脚本实现的Lua脚....
分类:
其他好文 时间:
2014-06-07 23:02:10
阅读次数:
310
查了一大堆网上的资料全都没用,Google得知,是Windows 7 的socket泄漏
:https://supportkb.riverbed.com/support/index?page=content&id=S23580&actp=LIST_RECENT补丁下载地址:
http://suppo...
分类:
编程语言 时间:
2014-06-07 22:19:32
阅读次数:
857
接上一篇Linux 内核 链表 的简单模拟(1) 第五章:Linux内核链表的遍历/***
list_for_each - iterate over a list* @pos: the &struct list_head to use as a
loop cursor.* @...
分类:
系统相关 时间:
2014-06-07 22:09:58
阅读次数:
451
Although apply and call can implement same
function. However, there is a litter different between them.Please pay attention
to look at the examples be...
分类:
移动开发 时间:
2014-06-07 21:53:15
阅读次数:
331
The usage of bind is to define a specified
scope for called function. Because the key this is easy to refer another objet,
experically window, instead...
分类:
其他好文 时间:
2014-06-07 21:28:07
阅读次数:
307
server: # -*- coding:gb2312 -*-import socketimport
timeimport structif __name__ == "__main__":
s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM) host=...
分类:
其他好文 时间:
2014-06-07 21:09:54
阅读次数:
254