
个人代码片段
文章平均质量分 65
varC
北漂
展开
-
实用常用shell命令组合
du . -m |grep -v -E '/[a-zA-Z0-9_\.-]+/'查看当前文件夹子文件夹的大小原创 2016-08-26 16:15:05 · 766 阅读 · 0 评论 -
bm搜索算法
bm是一种单模搜索算法下面给出一般性的代码,可运行#include "stdio.h"#include "string.h"/*基于二进制的bm搜索算法 区分大小写 可以 混杂二进制不可见字符*/typedef int (*lookback)(int pos,int times); //bm中搜索回调函数 第一个参数为匹配位置 ,第二个参数为匹配次数int InitBa原创 2016-09-01 18:03:09 · 599 阅读 · 0 评论 -
AC自动机简易版
一言不合就贴代码基于单字节流的二级制多模匹配算法效果截图#include "stdio.h"#include "stdlib.h"#include "string.h" const int kind = 256; /*主要ac结构体 */ struct node{ node *fail; node *next[kind];原创 2016-08-20 16:35:51 · 360 阅读 · 0 评论 -
vhdl呼吸灯源码
library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity led is port (clkin:in std_logic;clkout:out std_logic);end entity;architecture behave of led is signal mlow:s原创 2016-10-26 19:50:04 · 3010 阅读 · 0 评论 -
linux利用asound控制音量
#include #include #include #include int main(int argc ,char **argv){ int volume=99; if(argc>1) volume=atoi(argv[1]); if(volume volume=0; if(volume>100) volume=1原创 2017-03-06 17:29:52 · 2026 阅读 · 0 评论