上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 20 下一页
摘要: ${model.tip} model.tip是错误信息需要注意,使用ActionSupport的getText方法, 来处理国际化 public String regist() throws Exc... 阅读全文
posted @ 2013-10-11 14:41 holycrap 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-10-11 09:56 holycrap 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1. 写一个domain类来映射数据库表2. 写一个*.hbm.xml文件来配置映射 FORUM_MEMBER_ID_SEQ 3.applicationContext.xml文件中配置读取hbm.xml com/jforum/domain/Employee.hbm.xml --> com/ROCKY/domains/me... 阅读全文
posted @ 2013-10-10 16:39 holycrap 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 1. 数据库oracle安装2. 数据库用户创建,表空间创建,表创建#!/bin/bashcurrent_path=`pwd`create_tablespace=${current_path}/create_tablespace.sqlcreate_tables=${current_path}/create_tables.sqlinstall_log=${current_path}/installlog.logsqllog=${current_path}/sql.logfunction create_table_space{ if [ ! -f ${create_tablespace} ... 阅读全文
posted @ 2013-10-10 14:58 holycrap 阅读(237) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include "game.h"#include "engine.h"#include "message.h"#include "member.h"#include #include "timer.h"#include int gqid=0;int current_row=0;int current_col=0;int message_row=2;int message_col=2;WINDOW* message_win 阅读全文
posted @ 2013-09-30 15:58 holycrap 阅读(190) 评论(0) 推荐(0) 编辑
摘要: #include #include "member.h"STRUCT_MEMBER_LIST member_list;void init_member_list(){ //member_list.number=0; memset(&member_list, 0, sizeof(STRUCT_MEMBER_LIST));}int regist_member(STRUCT_MEMBER member){ if(member_list.number > MAX_MEMBER_NUM) return -1; if(isExist(member) == 0)... 阅读全文
posted @ 2013-09-27 17:14 holycrap 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 消息队列的系统限制作者:冯老师,华清远见嵌入式学院讲师。消息队列是System V的IPC对象的一种,用于进程间通信,会受到系统的限制,本文主要描述了三个限制。第一:议个消息的最大长度;第二:消息队列的最大容量;第三:最大消息队列数。一、 一个消息的最大长度示例程序如下:#include #include #include #include #include #include #define N 8192 typedef struct { ... 阅读全文
posted @ 2013-09-27 08:10 holycrap 阅读(2416) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include "message.h"int qid=0;int message_init(){ key_t key = ftok(MSG_PATH, MSG_PJID); if(key == -1) { perror("ftok failed"); exit(EXIT_FAILURE); } if((qid = msgget(key, IPC_CREAT | 0... 阅读全文
posted @ 2013-09-26 17:31 holycrap 阅读(414) 评论(0) 推荐(0) 编辑
摘要: 尝试写一个简单的守护进程/** @File daemon.c * * Build a daemon process for game * */#include #include #include #include "daemon.h"int create_daemon(){ pid_t pid; pid=fork(); switch(pid) { case -1: //fprintf(stderr, "fork child failed!\n"); exit(EXIT_FAILURE); break; case 0: //fprintf(stdout,& 阅读全文
posted @ 2013-09-25 16:34 holycrap 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 前言: 最好的ncurses教程是 ncurses HOWTO,网上有中文版编译ncurses引用的程序,需要加编译参数 -lncurses并在.c文件中包含 ncurses.h头文件1. 启动ncursesinitscr();结束ncurseendwin();2. 判断是否支持彩色has_color();3. 进入无缓存模式 raw(); noecho();4. 获取输入键值getch(); 例子:/** @file engine.c * created by xx, 2013-09-25 * * Definition of ncurses related functi... 阅读全文
posted @ 2013-09-25 11:09 holycrap 阅读(457) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 20 下一页