1.
引用类型是类型安全的指针,它们的内存是分配在堆(保存指针地址)上的。String、数组、类、接口和委托都是引用类型。2.
强制类型转换与as类型转换的区别:当类型转换非法时,强制类型转换将抛出一个System.InvalidCastException异常,而as不会抛出异常,它返回一个null...
分类:
其他好文 时间:
2014-05-23 07:27:25
阅读次数:
408
序列序类是一个集合概念, Pthon包括六种内建序列: 列表, 元组, 字符串,
Unicode字符串, buffer对象和xrange对象. 其中, 我们最长用的要数前三个.通用序列操作 1.
索引(indexing)序列的所有元素都是有编号的(从0开始...), 这些元素可以通过编号访问, 如....
分类:
编程语言 时间:
2014-05-23 07:19:41
阅读次数:
347
getimagesize 函数取得图像大小 (PHP 4, PHP 5)array
getimagesize ( string filename [, array &imageinfo] ) //注意
¥imageinfo在使用的时候不在需要前面的&。说明getimagesize() 函数将测定任何...
分类:
Web程序 时间:
2014-05-23 06:38:23
阅读次数:
265
假设这三个目录三个文件放在rs_path=d:/gmz目录里面。那么要获取所有的文件路径,可以用如下方式for
parentpath, dirnames, filenames in os.walk(rs_path): for filename in filenames:
print "fileP.....
分类:
编程语言 时间:
2014-05-23 06:35:00
阅读次数:
875
之前用Python
2.7版本的httplib做接口测试时,运行代码都是正常的,最近开始用Python 3.3之后,再去看以前的代码,发现import
httplib出现错误:Unresolved import :httplib,运行代码时也报错:ImportError: No module nam...
分类:
编程语言 时间:
2014-05-23 06:25:34
阅读次数:
347
本文总结PageRank的原理,并提供了一种Python版本的Map-Reduce计算方法
分类:
其他好文 时间:
2014-05-23 06:23:31
阅读次数:
515
/** * * 加密参数 * @author tarylei * @version
2014年3月31日 17:57:14 * @param string $param * @return string $_...
分类:
其他好文 时间:
2014-05-23 06:21:42
阅读次数:
265
模板与泛型编程--类模板成员[续1]二、非类型形参的模板实参template
class Screen
{
public:
Screen():screen(hi * wid,'#'),
cursor(hi * wid),height(hi),width(wid) {}
//..
private:
std::string screen;
std:...
分类:
编程语言 时间:
2014-05-21 14:00:04
阅读次数:
332
【题目】
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note: The numbers can be arbitrarily large and are non-negative.
【题意】
给定用字符串表示的整数,返回两个数的乘积结果字符串。两个数字都非负,且能任意大。
【思路】
1. 考虑其中一个数是0的情况
2. 模拟乘法运算...
分类:
其他好文 时间:
2014-05-21 13:45:37
阅读次数:
214
Evolution is a long, long process with extreme complexity and involves many species. Dr. C. P. Lottery is currently investigating a simplified model of evolution: consider that we haveN (2
N N -1, a...
分类:
其他好文 时间:
2014-05-21 13:43:27
阅读次数:
444