1.
引用类型是类型安全的指针,它们的内存是分配在堆(保存指针地址)上的。String、数组、类、接口和委托都是引用类型。2.
强制类型转换与as类型转换的区别:当类型转换非法时,强制类型转换将抛出一个System.InvalidCastException异常,而as不会抛出异常,它返回一个null...
分类:
其他好文 时间:
2014-05-23 07:27:25
阅读次数:
408
getimagesize 函数取得图像大小 (PHP 4, PHP 5)array
getimagesize ( string filename [, array &imageinfo] ) //注意
¥imageinfo在使用的时候不在需要前面的&。说明getimagesize() 函数将测定任何...
分类:
Web程序 时间:
2014-05-23 06:38:23
阅读次数:
265
/** * * 加密参数 * @author tarylei * @version
2014年3月31日 17:57:14 * @param string $param * @return string $_...
分类:
其他好文 时间:
2014-05-23 06:21:42
阅读次数:
265
1. 截取GB2312中文字符串 0xa0) {$tmpstr .= substr($str, $i,
2);$i++;} else$tmpstr .= substr($str, $i, 1);}return $tmpstr;}?>2.
截取utf8编码的多字节字符串3. UTF-8、GB2312都...
分类:
Web程序 时间:
2014-05-23 05:44:36
阅读次数:
358
从一个List中移除重复的数据使用迭代方法会报异常:java.util.ConcurrentModificationExceptionMap
temp = new HashMap();for (GroupRule rule : ruleList) { String ruleName =
rule.....
分类:
其他好文 时间:
2014-05-23 05:41:56
阅读次数:
187
18:22 2013/9/21attr(name|properties|key,value|fn)
概述 设置或返回被选元素的属性值。在jquery中[]表示可选参数,你可以不选,| 表示参数可以是多种,|相当于或参数
nameStringV1.0属性名称properties MapV1.0作为属性...
分类:
Web程序 时间:
2014-05-23 05:21:40
阅读次数:
272
模板与泛型编程--类模板成员[续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
String到底创建了几个对象的自己的理解。(字节码层面上)...
分类:
其他好文 时间:
2014-05-21 13:21:13
阅读次数:
266
析构函数和构造函数是一对,就像C语言中的malloc和free,C++中的new和delete一样
先从一个实例说起:
#include
#include
using namespace std;
class Student
{
public:
Student(int n, string nam, char s)
{
num = n;
name = nam;
sex...
分类:
其他好文 时间:
2014-05-21 12:33:43
阅读次数:
259