翔如菲菲

其实天很蓝,阴云总会散;其实海不宽,此岸连彼岸.

导航

上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 30 下一页

2010年6月6日 #

Python简单IF,WHILE语句

摘要: IF,WHILE语句体直接使用缩进(当然也可以用{}括起来,不过不建议): IF语句: #IF,ELSEif(True): print "Hello,Jeriffe"else: print "Error!" WHILE语句:#WHILEcount=0while(count<10): print count count=count+1 #PYTHON及IRONPYTHON中没有类似C,C#... 阅读全文

posted @ 2010-06-06 23:14 翔如飞飞 阅读(454) 评论(0) 推荐(0) 编辑

2010年5月28日 #

Python中的列表

摘要: 列表主要属性: 任意有序对象的集合 可以通过偏移读取 可变长度,异构及嵌套 对象引用数组 列表基本操作; lists=[123,'test',1.54]print len(lists) #:3print lists+[5,6] #[123, 'test', 1.54, 5, 6]lists.append('TT') print lists #[123, 'test', 1.54, 'TT']p... 阅读全文

posted @ 2010-05-28 01:35 翔如飞飞 阅读(232) 评论(0) 推荐(0) 编辑

2010年5月25日 #

Python中的字典

摘要: 概要介绍: Python中的字典是一种映射,字典映射是一个通过键来存储对象的集合,字典是Python核心对象集合中的唯一一种映射类型,其也具有可变性-可以随需求增大或者减小 映射操作: 为常量来写时,字典写在大括号中,并包含了一系列的“键值”对: dic={'a':'A','b':'B'} 我们可以通过键来对字典进行索引的读取或者变更键对应值的值: dic={'a':'A','b':'B'}p... 阅读全文

posted @ 2010-05-25 01:23 翔如飞飞 阅读(450) 评论(0) 推荐(0) 编辑

定义Python编码方式

摘要: # coding=gbkprint '中文' #中文 示例2: #!/usr/bin/python# -*- coding: GBK -*-s = "中文"print s #中文示例3:#!/usr/bin/python# vim: set fileencoding=gbk :s = "中文"print s #中文 阅读全文

posted @ 2010-05-25 00:22 翔如飞飞 阅读(293) 评论(0) 推荐(0) 编辑

2010年5月24日 #

Python中文全攻略

摘要: 1. 在Python中使用中文 在Python中有两种默认的字符串:str和unicode。在Python中一定要注意区分“Unicode字符串”和“unicode对象”的区别。后面所有的“unicode字符串”指的都是python里的“unicode对象”。 事实上在Python中并没有“Unicode字符串”这样的东西,只有“unicode”对象。一个传统意义上的unicode字符串完全可... 阅读全文

posted @ 2010-05-24 23:59 翔如飞飞 阅读(458) 评论(0) 推荐(0) 编辑

2010年5月17日 #

IOCP Thread Pooling in C# Part 2

摘要: 摘自:http://www.devarticles.com/c/a/C-Sharp/IOCP-Thread-Pooling-in-C-sharp-Part-II/Defining the SolutionWe will build a class that encapsulates a single IOCP thread pool. The application developer will ... 阅读全文

posted @ 2010-05-17 00:06 翔如飞飞 阅读(474) 评论(0) 推荐(1) 编辑

IOCP Thread Pooling in C# Part 1

摘要: 摘自:http://www.theukwebdesigncompany.com/articles/iocp-thread-pooling.phpPart One: Introduction When building server based applications in C#, it is important to have the ability to create thread pool... 阅读全文

posted @ 2010-05-17 00:05 翔如飞飞 阅读(456) 评论(0) 推荐(0) 编辑

2010年5月12日 #

C#和Java的闭包-Jon谈《The Beauty of Closures》

摘要: 第一段略。。。大多数讲闭包的文章都是说函数式语言,因为它们往往对闭包的支持最完善。当你在使用函数式语言时,很可能已经清楚了解了什么是闭包,所以我想写一篇在经典OO语言出现的闭包有什么用处应该也是很合适的事情。这篇文章我准备讲一下C#(1、2、3)和JAVA(7以前版本)的闭包。什么是闭包?简单来讲,闭包允许你将一些行为封装,将它像一个对象一样传来递去,而且它依然能够访问到原来第一次声明时的上下文。这样可以使控制结构、逻辑操作等从调用细节中分离出来。访问原来上下文的能力是闭包区别一般对象的重要特征,尽管在实现上只是多了一些编译器技巧。利用例子来观察闭包的好处(和实现)会比较容易, 下面大部份内容 阅读全文

posted @ 2010-05-12 08:48 翔如飞飞 阅读(383) 评论(0) 推荐(0) 编辑

2010年5月11日 #

High Performance Multi-threaded Work Item / Event Scheduling Engine

摘要: 此文转自代码工程:http://www.codeproject.com/KB/threads/SchedulingEngine.aspxIntroduction This article is the first of a multi-part series that will cover the architecture and implementation of components nee... 阅读全文

posted @ 2010-05-11 00:16 翔如飞飞 阅读(528) 评论(0) 推荐(0) 编辑

Design and Implementation of a High-performance TCP/IP Communications Library

摘要: 此文转自代码工程:http://www.codeproject.com/KB/IP/CommLibrary.aspxIntroduction This article is the second of a multi-part series that will cover the architecture and implementation of components needed to cr... 阅读全文

posted @ 2010-05-11 00:12 翔如飞飞 阅读(355) 评论(0) 推荐(0) 编辑

上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 30 下一页