HDU 3065,模板(备忘录)#include#include#include#include#includeusing namespace std;#define M 2222222char sx[1111][128];int n;char s[M];struct Trie{ ...
分类:
其他好文 时间:
2014-07-08 22:48:34
阅读次数:
192
代码注释比较详细:
#include
#include
using namespace std;
struct Node{
int data;
Node* next;
};
Node* head = NULL;
bool create() {
head = (Node*)malloc(sizeof(Node));
if(NULL == head) return false;...
分类:
其他好文 时间:
2014-07-08 21:05:05
阅读次数:
238
区间颜色不一致就更新到底,否则lazy标记
#include
#include
#include
#include
using namespace std;
#define lc l,m,index<<1
#define rc m+1,r,index<<1|1
#define N 100005
#define ll __int64
struct node
{
bool same;
ll c...
分类:
其他好文 时间:
2014-07-08 18:00:56
阅读次数:
226
public class SchoolServiceImpl {
private static SchoolServiceImpl instance = new SchoolServiceImpl();
private static ClassServiceImpl classServiceImpl = ClassServiceImpl.getInstanse();
public stat...
分类:
其他好文 时间:
2014-07-08 16:53:05
阅读次数:
166
通用标签和控制标签
第一部分;代码
//前端
Insert title here
访问属性
/tags.action?username=u&password=p">tags
//struct.xml
/tags.jsp
//类包
package com.struts2.tags;
import com.opensymphony.xwork2.Action...
分类:
Web程序 时间:
2014-07-08 16:21:33
阅读次数:
251
C语言中的函数指针
函数指针的概念: 函数指针是一个指向位于代码段的函数代码的指针。
函数指针的使用:
#include
typedef struct (*fun_t) (int,int);
fun_t pf;
int add(int a, int b)
{
return a+b;
}
int sub(int a,int b)
{
retu...
分类:
编程语言 时间:
2014-07-08 14:40:05
阅读次数:
217
基于《Linux设备驱动程序》书中的sbull程序以对Linux块设备驱动总结分析。
开始之前先来了解这个块设备中的核心数据结构:
struct sbull_dev {
int size; /* Device size in sectors */
u8 *data; ...
分类:
系统相关 时间:
2014-07-06 12:36:10
阅读次数:
250
我知道typedef是类型别名的意思,也知道结构体如何定义。
但下面的代码:
typedef struct node{
struct node*lchild;
char data;
struct node*rchild;
}bitnode,*bitree;
那这样结构体后面的是对象还是别名呢?我感觉应该是对象,但typedef又无从说起。
然后接着有
bitree crea...
分类:
编程语言 时间:
2014-07-06 12:25:16
阅读次数:
179
在运行某个程序的时候,我们通常使用命令行参数来进行配置其行为。命令行选项和参数控制 UNIX 程序,告知它们如何动作。当 gcc的程序启动代码调用我们的入口函数 main(int argc,char *argv[]) 时,已经对命令行进行了处理。argc 参数包含程序参数的个数,而
argv 包含指向这些参数的指针数组。
程序的参数可以分为三种:选项,选项的关联值,非选项参数。例如:...
分类:
其他好文 时间:
2014-07-06 11:13:55
阅读次数:
301
在.net中的struct与class有很多相似之处,比如可以直接new,对于成员可以直接XX.field,以至于有不少程序员在用时,将其混在一起,分不清有何区别。这两者有何区别呢?
1.类型不同
我们先来看一段代码
static void Main(string[] args)
{
TypeDemo();...
分类:
Web程序 时间:
2014-07-06 08:43:17
阅读次数:
214