This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MAX_BUFFER 1024 ///< read buf size | |
unsigned char g_buf[MAX_BUFFER+1]; /// read buf 缓冲区 | |
int g_bufLen; /// 缓冲区内数据长度 | |
static int DATASIZE = 64; /// hid读写数据长度,Report Length | |
IOHIDDeviceRef hidDev; /// hid设备 | |
pthread_t pthreadID; ///input read thread | |
static pthread_mutex_t g_mutex; /// 读写锁 | |
static pthread_cond_t g_cond; /// 读写信号量 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
int main() | |
{ | |
double x,y,a,b; | |
double m,n; | |
freopen("data.txt", "r", stdin); | |
while(scanf("%lf %lf %lf %lf", &a, &b, &x, &y) !=EOF) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <iostream> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <errno.h> | |
#include <arpa/inet.h> | |
#include <openssl/ssl.h> | |
#include <event2/event.h> | |
#include <event2/util.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
一、生成用于签发client和server证书的ca根证书。 | |
mkdir -p ca | |
#生成CA私钥,1024位RSA私钥,这里简单起见,没有对私钥进行加密。 | |
openssl genrsa -out ca/ca.key 1024 | |
#生成ca的证书请求文件 | |
openssl req -new -out ca/ca.csr -key ca/ca.key | |
#用CA私钥进行自签名,生成ca的证书文件 |
NewerOlder