Ray's playground

 
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 56 下一页

2010年12月22日

Building Your First Project(Chapter 2 of The iPhone™ Developer’s Cookbook)

摘要: [代码] 阅读全文

posted @ 2010-12-22 18:45 Ray Z 阅读(3735) 评论(0) 推荐(0) 编辑

2010年12月21日

Recipe 1.9. Simplifying Usage of Strings' translate Method(Python Cookbook)

摘要: [代码] 阅读全文

posted @ 2010-12-21 09:39 Ray Z 阅读(132) 评论(0) 推荐(0) 编辑

2010年12月20日

Recipe 1.8. Checking Whether a String Contains a Set of Characters(Python Cookbook)

摘要: maketransCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1intab="aeiou"2outtab="12345"3fromstringimportmaketrans4trantab=maketrans(intab,outtab)5s="thisisastringexample...wow!"6prints.translate(trantab)7th3s3s1str3ng2x1mpl2...w4w![代 阅读全文

posted @ 2010-12-20 22:18 Ray Z 阅读(359) 评论(0) 推荐(0) 编辑

Working with Characters and Strings(Chapter 3 of Windows Via C/C++)

摘要: Because kernel object handles are process-relative, performing these tasks is difficult. However, Microsoft had several good reasons for designing the handles to be process-relative. The most important reason was robustness. If kernel object handles were systemwide values, one process could easil 阅读全文

posted @ 2010-12-20 21:25 Ray Z 阅读(235) 评论(0) 推荐(0) 编辑

2010年12月19日

Recipe 1.7. Reversing a String by Words or Characters(Python Cookbook)

摘要: reverseCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1astring="helloray"2revwords=astring.split()3revwords4['hello','ray']5revwords.reverse()6revwords7['ray','hello']8revwords=''.join(revwords)9revwords10'rayhello'11importre 阅读全文

posted @ 2010-12-19 14:21 Ray Z 阅读(156) 评论(0) 推荐(0) 编辑

Recipe 1.6. Combining Strings(Python Cookbook)

摘要: stringCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1importoperator2pieces=['a','b','c']3largestring=reduce(operator.add,pieces)4largestring5'abc'6faststring=''.join(pieces)7faststring8'abc'9formatstring='%sis%s'%('ray','coding 阅读全文

posted @ 2010-12-19 11:43 Ray Z 阅读(140) 评论(0) 推荐(0) 编辑

2010年12月18日

Recipe 1.5. Trimming Space from the Ends of a String(Python Cookbook)

摘要: [代码] 阅读全文

posted @ 2010-12-18 23:05 Ray Z 阅读(125) 评论(0) 推荐(0) 编辑

Recipe 1.4. Aligning Strings(Python Cookbook)

摘要: alignCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1print'|','hej'.ljust(20),'|','hej'.rjust(20),'|','hej'.center(20),'|'2|hej|hej|hej|3print'hej'.center(2)4hej5print'hej'.center(20,'+')6++++++++hej+++++++++ 阅读全文

posted @ 2010-12-18 11:09 Ray Z 阅读(163) 评论(0) 推荐(0) 编辑

2010年12月17日

Recipe 1.3. Testing Whether an Object Is String-like(Python Cookbook)

摘要: isAStringCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1defisAString(anobj):2returnisinstance(anobj,basestring)34a="hello"5isAString(a)6True7b='t'8isAString(b)9True10c=[]11isAString(c)12False13classMyString(str):14pass1516 阅读全文

posted @ 2010-12-17 22:29 Ray Z 阅读(108) 评论(0) 推荐(0) 编辑

2010年12月16日

Working with Characters and Strings(Chapter 2 of Windows Via C/C++)

摘要: In Windows Vista, each Unicode character is encoded using UTF-16 (where UTF is an acronym for Unicode Transformation Format). UTF-16 encodes each character as 2 bytes (or 16 bits).  UTF-8 UTF-8 encodes some characters as 1 byte, some characters as 2 bytes, some characters as 3 bytes, and some cha 阅读全文

posted @ 2010-12-16 22:18 Ray Z 阅读(219) 评论(0) 推荐(0) 编辑

上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 56 下一页

导航