摘要: 1:配置 my.ini 文件 如下: [mysql] default-character-set=utf8[mysqld] port=3306basedir=D:\\Program Files\\databases\\mysql-5.7.24datadir=D:\\Program Files\\da 阅读全文
posted @ 2019-03-26 12:10 ForMeDream 阅读(186) 评论(0) 推荐(0) 编辑
摘要: /* * *EPOLL ET 触发必须使用非阻塞,LT触发可以阻塞/非阻塞。 *read 函数 非阻塞读需 忙轮寻 soket关闭返回0,循环读完数据 *如果已经读完再读read返回 -1,errno=11(EAGIAN)则退出轮循 * **/ #include #include #include #include #include #include #include #include #i... 阅读全文
posted @ 2019-03-25 16:49 ForMeDream 阅读(838) 评论(0) 推荐(0) 编辑
摘要: package com.Select; /** *select单线程 服务器 **/import java.io.IOException; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.nio.channels.ClosedChannelException; import java.nio.c... 阅读全文
posted @ 2019-03-24 15:39 ForMeDream 阅读(290) 评论(0) 推荐(0) 编辑
摘要: /**数组下面挂着链表*/#include #include #include #include #include #include #define uint32 unsigned int #define size_t unsigned int #define uchar unsigned char uint32 bucknum=16; typedef struct data{ ... 阅读全文
posted @ 2019-03-08 00:13 ForMeDream 阅读(255) 评论(0) 推荐(0) 编辑
摘要: /***********编译时要链接 -l dl 库************/#include #include #include #include"person.h" #include #include #include int main(){ typedef int (*SELECT)(PERSON*); typedef void (*ADD)(int ,PERSON*); voi... 阅读全文
posted @ 2019-03-06 13:32 ForMeDream 阅读(1990) 评论(0) 推荐(0) 编辑
摘要: gcc -shared -fPIC -o libname.so *.c //生成so库 gcc main.c -om -Lpath -lname //链接测试so 库 但是生成可执行程序执行时报,error while load....... 表示编译链接库的时后没有找到so库,可以 ldd 程序名 阅读全文
posted @ 2019-03-03 03:17 ForMeDream 阅读(892) 评论(0) 推荐(0) 编辑
摘要: /*****************************g++编译cpp 文件为库文件。编译C文件时gcc 要链接 -l stdc++ 这个库**(非常重要)*///定义c++ class 头文件#ifndef REGEX_H #define REGEX_H class Regex { public: Regex(); int add(int a,int b); }; ... 阅读全文
posted @ 2019-03-03 02:09 ForMeDream 阅读(2437) 评论(0) 推荐(0) 编辑
摘要: /* *gcc -o callpy callpy.cpp -I/usr/include/python3.5 -lpython3.5m */ #include #include int main(int argc, char** argv) { // 初始化Python //在使用Python系统前,必须使用Py_Initialize对其 //进行... 阅读全文
posted @ 2019-03-02 20:41 ForMeDream 阅读(695) 评论(0) 推荐(0) 编辑
摘要: deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial main restri 阅读全文
posted @ 2019-03-02 16:03 ForMeDream 阅读(1168) 评论(0) 推荐(0) 编辑
摘要: /***EPOLL ET 触发必须使用非阻塞,LT触发可以阻塞/非阻塞。*read 函数 非阻塞读需 忙轮寻 soket关闭返回0,循环读完数据*如果已经读完再读read返回 -1,errno=11(EAGIAN)则退出轮循***/#include #include #include #include #include #include #include #include #include #i... 阅读全文
posted @ 2019-03-02 14:20 ForMeDream 阅读(376) 评论(0) 推荐(0) 编辑