2014年4月21日

摘要: 1./etc/inittab 修改启动级别 2./etc/init.d/ 存放着大连服务(rpm包)的启动脚本 3./etc/rc.d/rcX.d/ X代表运行级别,每个目录下都根据需要存放指向/etc/init.d/目录下的链接, 4./etc/rc.local -> /etc/... 阅读全文
posted @ 2014-04-21 14:52 makeup1122 阅读(163) 评论(0) 推荐(0) 编辑

2013年8月24日

摘要: inline void debugout(const char* fmt, ...){ char buf[512]; try{ va_list ap; va_start(ap,fmt); _vsnprintf(buf,sizeof(buf)-1,fmt,ap); va_end(ap); OutputDebugString(buf); } catch(...) { OutputDebugString("exception in construct debug message\n");... 阅读全文
posted @ 2013-08-24 17:26 makeup1122 阅读(227) 评论(0) 推荐(0) 编辑
摘要: #1251 -- (Client does not support authentication protocol requested by server; consider upgrading MySQL client )修改数据库用户密码格式1)MySQL->SET PASSWORD FOR 'some_user'@'some_host'=OLD_PASSWORD('new_password'); MySQL->FLUSH PRIVILEGES;2)MySQL->UPDATE MySQL.user SET Password= 阅读全文
posted @ 2013-08-24 17:26 makeup1122 阅读(4523) 评论(1) 推荐(0) 编辑

2013年3月25日

摘要: terminate called after throwing an instance of 'std::logic_error'what(): basic_string::_S_construct NULL not valid 已放弃 原因在于没搞清, char *型的变量和指向 c 风格的字符串... 阅读全文
posted @ 2013-03-25 16:02 makeup1122 阅读(321) 评论(0) 推荐(0) 编辑

2013年3月24日

摘要: gcc在链接时通常用到的链接选项“-l”和“-L”分别用来指明需要链接的动态库名字及搜索路径,但是当使用的“-l”选项指定的库还有另外的依赖关系时,“-L”选项的参数无法提供对依赖库路径的包含。 假设我们有如下文件和自定义库文件: ./main.c ./lib/libtest.so ./l... 阅读全文
posted @ 2013-03-24 20:11 makeup1122 阅读(4286) 评论(0) 推荐(0) 编辑

2013年3月21日

摘要: 今天遇到一个Mysql的问题:执行update时报错:MySQL server has gone away 由于是Linux后台服务程序,需要7*24运行,但程序在初始化时进行了DB的open操作之后,就进入了for(;;),遇到某个异常导致数据库操作句柄断开,却又没有相应的出错处理,导致程序一直报... 阅读全文
posted @ 2013-03-21 12:54 makeup1122 阅读(228) 评论(0) 推荐(0) 编辑

2012年12月17日

摘要: getopt(分析命令行参数) 相关函数 表头文件 #include<unistd.h> 定义函数 int getopt(int argc,char * const argv[ ],const char * optstring); extern char *optarg; extern int optind, opterr, optopt; 函数说明 getopt()用来分析命令行参数。参数argc和argv是由main()传递的参数个数和内容。参数 optstring为选项字符串, 告知 getopt()可以处理哪个选项以及哪个选项需要参数,如果选项字符串里的字母后接着冒号“:. 阅读全文
posted @ 2012-12-17 16:08 makeup1122 阅读(174) 评论(0) 推荐(0) 编辑

导航