Skip to content

Instantly share code, notes, and snippets.

@light0x00
light0x00 / MyHashMap.java
Last active March 5, 2022 14:53
HashMap 简化版实现
package com.light.practice.algorithm.collections;
import lombok.extern.slf4j.Slf4j;
import java.util.Objects;
/**
* @author light
* @since 2019/9/8
*/
@light0x00
light0x00 / subset_construct.js
Last active February 28, 2020 07:43
《编译原理》子集构造算法
const _ = require("lodash");
/**
* 使用子集构造法,将NFA转为DFA. 基于《编译原理》P97的伪代码的实现.
* @param charset NFA所接受的字符集
* @param Ntran NFA转换表
*/
module.exports = function subset_construct(charset, Ntran) {
let cursor = 0; //区分Dstates中的状态集是否访问过. cursor之前的为已访问, cursor之后为未访问.
@light0x00
light0x00 / IPushbackReader.java
Last active February 28, 2020 07:39
《编译原理》 带有哨兵标记的forward指针移动算法
package practice1;
/**
* <p>
*
* </p>
*
* @author light
* @since 2019/10/26
*/
@light0x00
light0x00 / bash.md
Last active February 28, 2020 07:39
shell 备忘

移除除指定文件外的文件

ls | grep -v logs | xargs rm -rf

模糊匹配的方式批量终止进程