Ray's playground

 

2009年9月19日

C++ templates chapter 3(Class Templates)

摘要: A class template is a class that is implemented with one or more type parameters left open.To use a class template, you pass the open types as template arguments. The class template is then instantiat... 阅读全文

posted @ 2009-09-19 22:43 Ray Z 阅读(233) 评论(0) 推荐(0) 编辑

2009年9月18日

Recipe 1.2 Substituting variables into strings

摘要: [代码]output: The number is 5.The number after 5 is 6.true[代码]output: Here is some text.To avoid triggering string interpolation, escape the hash characters or put the string in single quotes."\#{foo}"#... 阅读全文

posted @ 2009-09-18 23:12 Ray Z 阅读(124) 评论(0) 推荐(0) 编辑

Recipe 1.1 Building a string from parts

摘要: [代码]output:key1 is val1key2 is val2[代码]output: 1 and a 2 and a 3 and a1 and a 2 and a 3[代码]output: 1|2|3 阅读全文

posted @ 2009-09-18 22:00 Ray Z 阅读(206) 评论(0) 推荐(0) 编辑

C++ templates chapter 2(Function Templates)

摘要: Templates are compiled twice: Without instantiation, the template code itself is checked for correct syntax. Syntax errors are discovered, such as missing semicolons.At the time of instantiation, the ... 阅读全文

posted @ 2009-09-18 16:11 Ray Z 阅读(207) 评论(0) 推荐(0) 编辑

2009年8月12日

C++ call sqlite3 interface

摘要: Note: Remember to include sqlite source code in your project.Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1#include"sqlite3.h"2#include<iostream... 阅读全文

posted @ 2009-08-12 22:53 Ray Z 阅读(296) 评论(0) 推荐(2) 编辑

2009年6月20日

Failed to find an AVD compatible with target

摘要: 下载Android SDK 1.5后,首先会遇到一个棘手问题,模拟器启动不了,控制台报“Failed to find an AVD compatible with target”错误。解决办法如下: 进入1.5 sdk目录下,->tools->敲入命令“android create avd -nMyAndroid -t 2再次运行程序,成功 阅读全文

posted @ 2009-06-20 09:40 Ray Z 阅读(1690) 评论(0) 推荐(0) 编辑

2009年5月2日

Radix

摘要: 问题描述6*9 = 42 对于十进制来说是错误的,但是对于13 进制来说是正确的。即, 6(13) * 9(13) = 42(13), 而 42(13) = 4 * 131 + 2 * 130 = 54(10)。 你的任务是写一段程序读入三个整数p、q 和 r,然后确定一个进制 B(2<=B<=16) 使得 p * q = r. 如果 B 有很多选择, 输出最小的一个。例如: p = ... 阅读全文

posted @ 2009-05-02 14:38 Ray Z 阅读(345) 评论(0) 推荐(0) 编辑

2009年2月28日

Priority

摘要: Top C++, WPF, WCF, WF, ASP.net, Ajax Python Medium Design Pattern Algorithm SQL Server Low Java 阅读全文

posted @ 2009-02-28 09:45 Ray Z 阅读(327) 评论(0) 推荐(0) 编辑

2009年2月27日

Using a C++-like iostream Syntax(Python cookbook 2-13)

摘要: Problem You like the C++ approach to I/O, based on ostreams and manipulators (special objects that cause special effects on a stream when inserted in it) and want to use it in your Python programs. So... 阅读全文

posted @ 2009-02-27 23:20 Ray Z 阅读(290) 评论(0) 推荐(0) 编辑

2009年2月24日

Computing the Relative Path from One Directory to Another(Python cookbook 2-22)

摘要: Problem You need to know the relative path from one directory to anotherfor example, to create a symbolic link or a relative reference in a URL. Solution Precondition itertools.izip(*iterables) Make ... 阅读全文

posted @ 2009-02-24 22:27 Ray Z 阅读(327) 评论(0) 推荐(0) 编辑

导航