public void Update(byte[] buffer){if ( buffer ==
null ) {throw new ArgumentNullException("buffer"); //判断参数为空,抛出异常,而非try
catch捕获}Update(buffer, 0, buf....
分类:
其他好文 时间:
2014-05-26 07:03:27
阅读次数:
268
using System.IO; public string
UpdatePic(HttpPostedFileBase pic) { string filePath = null; string filename =
null; ...
分类:
其他好文 时间:
2014-05-26 06:45:48
阅读次数:
186
之前使用过cocos2d-x获取系统时间,毫秒级的
[cpp] view
plaincopy
long getCurrentTime()
{
struct timeval tv;
gettimeofday(&tv,NULL);
return tv.tv_sec * 10...
分类:
其他好文 时间:
2014-05-26 05:37:49
阅读次数:
358
code如下:
//Longest common sequence, dynamic programming method
void FindLCS(char *str1, char *str2)
{
if(str1 == NULL || str2 == NULL)
return;
int length1 = strlen(str1)+1;
int length2 = strlen(...
分类:
其他好文 时间:
2014-05-26 04:56:50
阅读次数:
215
Set集合的配置
数据表的创建:
create table EMPLOYEE ( id INT NOT NULL auto_increment, first_name VARCHAR(20) default NULL, last_name VARCHAR(20) default NULL, salary INT default NULL, PRIMARY KEY (id) );
c...
分类:
系统相关 时间:
2014-05-26 03:43:18
阅读次数:
365
1、C++编成求二叉树的深度;int binTreeDepth(link *head){ int
depthl=0,depthr=0; if(head==null) return 0; else{ if ((head->left)!=null)
depthl = 1 + binTreeDepth(h...
分类:
其他好文 时间:
2014-05-26 02:48:07
阅读次数:
266
import java.io.*;class Test{ public static void
main(String args[]){ FileInputStream fin =null; FileOutputStream fout = null;
...
分类:
编程语言 时间:
2014-05-26 02:13:16
阅读次数:
333
问题:我抛出ApplicationException如果FirstName值是null或空,我试图显示错误消息的TextBlock
ErrorTemplate的一部分。但它总是显示“异常被抛出在调用的目标”。代码如下:ublic string FirstName { ...
分类:
其他好文 时间:
2014-05-26 01:05:38
阅读次数:
187
致谢原文: 通过ID得到element: Document.getElementById(id
string) 返回element object, 如果失败,得到null
注意id在页面内应该是唯一的,但在iframe的看作是另一个html页面通过TagName得到element ...
分类:
Web程序 时间:
2014-05-26 00:08:18
阅读次数:
679
int cnt = 0;
while(1) {
++cnt;
ptr = (char *)malloc(1024*1024*128);
if(ptr == NULL) {
printf("%s\n", "is null");
break;
}
}
printf("%d\n", cnt);
这个程序会有怎样的输出呢?...
分类:
系统相关 时间:
2014-05-24 21:59:47
阅读次数:
479