
Linux开发
kaifengchen
这个作者很懒,什么都没留下…
展开
-
linux文件传输方法
1、scpscp -p root@remote_host:/remote_dir/remot_file /local_dir将remote_host上的文件/remote_dir/remot_file拷贝到本地目录/local_dir。2、利用sendfile系统调用,开发发送及接收的传输程序。适合海量数据的快速传输。原创 2011-01-11 15:29:00 · 312 阅读 · 0 评论 -
多关键字匹配算法
http://en.wikipedia.org/wiki/Aho–Corasick_string_matching_algorithmAho–Corasick算法http://multifast.sourceforge.net/开源实现原创 2015-05-11 10:20:02 · 1817 阅读 · 0 评论 -
应用层协议分析模型
以五元组为基础的请求响应对(子会话)原创 2014-09-11 10:46:07 · 507 阅读 · 0 评论 -
GTK+显示中文字符串
使用 g_locale_to_utf8 函数。原创 2014-03-28 11:10:20 · 1468 阅读 · 0 评论 -
Linux C多线程异常处理
#include #include #include #include #include #include #include #include jmp_buf jmp_buf_main, jmp_buf_thread;int main_id, thread_id;void exception_handler_main(int sig){原创 2014-01-20 10:59:07 · 1086 阅读 · 0 评论 -
C语言调用Lua函数
参考《Programming in Lua》第25章的内容,主要是call_va通用调用函数,整理了如下的例子:/* * gcc -o c_lua c_lua.c liblua.a -lm -ldl */#include #include #include #include #include "lua.h"#include "lauxlib.原创 2013-10-23 20:21:16 · 1154 阅读 · 0 评论 -
char 与 u_char类型指针
如果期望用字符值与某一个数字进行比较,p是char类型指针,p[i]方式是有符号数,up是u_char类型指针,up[i]是无符号数。需要根据逻辑要求,确定函数定义接口,是需要char*还是u_char*参数。原创 2013-05-04 13:02:27 · 3181 阅读 · 0 评论 -
开源项目
https://github.com/bumptech/studThe Scalable TLS Unwrapping Daemon http://www.gnome-db.org/gnome-db https://github.com/ideatic/NetDasmA tool to disassemble and patch .NET assemblies原创 2013-05-03 00:50:02 · 512 阅读 · 0 评论 -
vim环境配置
在vim里进行编译编辑文件 /usr/share/vim/vim70/syntax/c.vim增加如下代码:function Build() cd .. make cd ./src copen "list the errorsendfunctionmap :call Build()在命令模式下,按F5进行编译。Cltr + w在窗口间切换。原创 2011-03-21 19:04:00 · 427 阅读 · 0 评论 -
gcc/g++ error: crosses initialization of
<br />如果在goto语句之后、switch case分支里定义并同时初始化,如 int i = 0; 会出现如下的错误<br /> <br />error: crosses initialization of 'int i'<br /> <br />解决方法是将变量定义与初始化分开,即int i; i = 0; 或者将变量定义初始化放到goto之前,switch语句块之外。原创 2011-02-18 10:28:00 · 1124 阅读 · 0 评论 -
MySQL存储过程
DROP PROCEDURE if exists test.filldata;delimiter //CREATE PROCEDURE test.filldata()BEGINDECLARE num int;DECLARE t int;SET num = 0;SET t=1451577600;WHILE num 1000 DOinsert into test.telnet(原创 2016-07-30 21:00:54 · 337 阅读 · 0 评论