队列节点
QueueNode.h
#pragma once
#include
using namespace std;
template class QueueNode
{
public:
T data;
QueueNode* next;
QueueNode():next(NULL){};
QueueNode(T val):data(val),next(NULL){}
};
链式队...
分类:
其他好文 时间:
2015-03-31 18:09:30
阅读次数:
107
http://www.360doc.com/content/13/0106/09/9171956_258497083.shtmlpthread_t pthr;pthread_create(&pthr, NULL, thread_handler, NULL);...void* thread_handl...
分类:
其他好文 时间:
2015-03-31 17:51:08
阅读次数:
145
#include #include #include main( ){ int i; int a,b,c,d,e; int count=0; srand( (unsigned)time( NULL ) ); for(i=1;i<31;i++) { a=rand()%10+1; ...
分类:
其他好文 时间:
2015-03-31 17:47:07
阅读次数:
104
出处:http://www.cnblogs.com/fishtreeyu/archive/2011/01/15/1936193.htmlint i = -1;bool b = int.TryParse(null, out i);执行完毕后,b等于false,i等于0,而不是等于-1,切记。int i...
分类:
其他好文 时间:
2015-03-31 17:31:15
阅读次数:
133
代码如下:
public class MyViewPagerAdapter extends PagerAdapter {
//显示的数据
private List datas = null;
private LinkedList mViewCache = null;
private Context mContext ;
private Layout...
分类:
其他好文 时间:
2015-03-31 16:06:54
阅读次数:
118
tepedef struct Node{
int date;
struct Node *next;
} List;
//创建一个链表
void CreatList(List **ptrl)
{
(**ptrl)=(List*)malloc(sizeof(List));
(*List)->next=NULL;
}
//求长度
int length(List *ptrl)
{
List *...
分类:
编程语言 时间:
2015-03-31 16:01:32
阅读次数:
274
判断一个脚本中的变量是否为空,我写了一个这样的shell脚本:
#!/bin/sh
#filename: test.sh
para1=
if [ ! -n $para1 ]; then
echo "IS NULL"
else
echo "NOT NULL"
fi
然后把该脚本:test.sh通过chmod +x 改为可以执行的脚本,执行后输出的结...
分类:
系统相关 时间:
2015-03-31 14:44:59
阅读次数:
133
一、数据类型概述: Undefined、Null、Boolean、Number 、String、Object(复杂数据类型)二、Undefined类型: Undefined 类型只有一个值,即特殊的 undefined。 在使用 var 声明变量,但没有对其初始化时,这个...
分类:
Web程序 时间:
2015-03-31 14:30:22
阅读次数:
330
//点击回车键//2015/3/11document.onkeydown = function (event) { var e = event ? event : (window.event ? window.event : null); if (e && e.keyCode == 13...
分类:
其他好文 时间:
2015-03-31 14:24:38
阅读次数:
119
char * strcpy ( char * destination, const char * source );
C语言标准库函数strcpy,把从src地址开始且含有NULL结束符的字符串复制到以dest开始的地址空间。
1 strcpy只能复制字符串。
2 strcpy不需要指定长度,它遇到被复制字符的串结束符"\0"才结束。
3 strcpy不仅复制字符串内容,还会制字符串的结束...
分类:
编程语言 时间:
2015-03-31 12:50:30
阅读次数:
201