- 博客(9)
- 资源 (11)
- 收藏
- 关注
原创 re2正则表达式匹配引擎的c接口版本cre2的中文使用手册
1 基本类型定义不透明类型:cre2_regexp_t 正则表达式对象的不透明类型; 它用于 声明指向对象的指针。此类型的实例可用于 任意数量的匹配操作,并且对于多个线程并发使用是安全的。Struct Typedef:cre2_string_t 用于引用另一个 字符串的一部分的简单数据结构。它有以下领域: 'const char * data'...
2018-07-13 20:37:02 8865
原创 TCP三次握手和四次挥手的解释
基础知识在TCP层,有个FLAGS字段,这个字段有以下几个标识:SYN, FIN, ACK, PSH, RST, URG.其中,对于我们日常的分析有用的就是前面的五个字段。它们的含义是:SYN表示建立连接(synchronous建立联机)FIN表示关闭连接(finish结束) ACK表示响应(acknowledgement 确认) PSH表示DATA数据传输 (push...
2018-07-31 17:35:18 5609
原创 hadoop 添加删除机器以及设置免密登录
添加hadoop机器先在slaves中添加机器然后启动datanode$: ./usr/hadoop-0.20.2-cdh3u4/bin/hadoop-daemon.sh start datanode查看是否启动$: jps4696 DataNode4765 Jps启动tasktrack$: ./usr/hadoop-0.20.2-cdh3...
2018-07-27 09:35:33 7019
原创 建议使用更加安全的ast.literal_eval去替代eval
前言如果大家想要在python中将字符串转换成列表,数字,字典等操作,都会想到使用eval(),确实这个函数很好用,但是它却存在一定的安全性eval的漏洞如果用户使用如下的代码open(r'D://filename.txt', 'r').read()__import__('os').system('dir')__import__('os').system('rm -...
2018-07-24 09:16:12 6833
原创 使用python建立简单的单链表
import sysclass ListNode: def __init__(self, x): self.val = x self.next = None# 将列表转换成链表def list_to_listnode(numbers): dummy_root = ListNode(0) ptr = dummy_root ...
2018-07-21 11:57:34 5834
原创 LeetCode19. Remove Nth Node From End of List 删除链表中的倒数第n个位置的元素
前言本文使用LeetCode19. Remove Nth Node From End of List作为例子来演示,这个题目需要删除链表中的倒数第n个位置的元素代码# -*- coding: utf-8 -*-# !/usr/bin/env python# Time: 2018/6/27 23:44# Author: sty# File: 19. Remove Nt...
2018-07-21 11:40:57 5348
原创 Linux下 C语言统计时间差
前言主要是为了统计下某段程序的运行时间代码实现主要调用了linux c下的<sys/time.h>#include<stdio.h>#include<sys/time.h>double tick(void){ struct timeval t; gettimeofday(&t, 0); return ...
2018-07-13 10:42:55 8515
原创 re2的c接口版本cre2的使用手册
This is cre2.info, produced by makeinfo version 6.3 from cre2.texi.This document describes version 0.3.4 of CRE2, a C language wrapper for the C++ library RE2: a fast, safe, thread-friendly alterna...
2018-07-04 15:02:00 7386
原创 centos 非root用户(普通用户)替换yum安装软件方法
1 查看yum中是否有你需要的包比如想安装graphviz,可以这样查看yum list 'graphviz*'2 下载rpm包然后我们从仓库中下载rpm包,比如我们要下载graphviz.x86_64,我们可以这样下载:yumdownloader graphviz.x86_64 3 解压RPM包rpm2cpio graphviz-2.30.1-19.el7.x86_6...
2018-07-02 19:38:09 26902
item_seleted
2019-01-22
python画小猪佩奇
2019-01-20
Box2D_v2.1.2已经编译好的文件
2018-11-07
Box2D_v2.1.2
2018-11-07
2018 Google kickstart Problem A. Planet Distance 输入数据
2018-05-27
笨方法学python3 Learn Python 3 the Hard Way
2018-04-06
用python进行数据分析 第二版 Python for Data Analysis, 2nd Edition
2018-04-06
SQL与关系数据库理论:如何编写健壮的SQL代码 第二版
2018-02-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人