- 博客(6)
- 资源 (3)
- 收藏
- 关注
原创 rsyslog property replacer之Regular expression
rsyslog config中我们可以使用property replacer.一般格式如下。%propname:fromChar:toChar:options%在property replacer我们一般直接使用分隔符分割msg,抽取各个FIELD。"%msg:F,44:3%"F:抽取FIELD44:分隔符的ASCII码 (例:逗号:44,双引号:34)3:使用的FIELD的NUMBER。如果上述无法满足要求我们可以使用正则表达式进行匹配和抽取想要的FIELD。"%msg:R:.*Sev:. \(.*\)
2022-12-08 10:33:11
298
原创 插入排序算法实现
#include <stdio.h>#include <stdlib.h>#include <windows.h>void insertSort(int *a,int n){ int i; for(i=1;i<n;i++){ int j=i-1; int tmp=a[i]; //取出待插入元素 whil...
2018-05-09 17:31:49
269
原创 堆排序算法实现
#include <stdio.h>#include <stdlib.h>#include <windows.h>void swap(int *arr,int a,int b){ int temp=arr[a]; arr[a]=arr[b]; arr[b]=temp;}//按大小调整父子节点位置void adjustDown(int *arr,...
2018-05-09 16:45:02
209
原创 归并排序算法实现
#include <stdio.h>#include <stdlib.h>//合并有序数组void mergeArray(int *a,int first,int mid,int last,int *temp){ int i=first; int j=mid+1; int m=mid;int n=last; int k=0; while(i&l...
2018-05-08 15:41:13
139
原创 快速排序算法实现
#include <stdio.h>#include <stdlib.h>//计算中间值int keyValuePositionFunction(int *a,int low,int high){ int keyValue=a[low]; int i=low; int j=high; int temp=0; while(i<j){ ...
2018-05-07 17:23:56
205
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人