Note: This is the guide for v 2.x.
For the v3, please follow this url: https://blog.csdn.net/sam_shan/article/details/80585240 Thanks @liy-cn for contributing.
Download: StarUML.io
Source: jorgeancal
| // required packages: | |
| // System.Runtime.CompilerServices.Unsafe | |
| // System.Numerics.Vectors | |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Numerics; | |
| using System.Runtime.CompilerServices; |
| private static readonly string[] _base16CharTable = new[] | |
| { | |
| "00", "01", "02", "03", "04", "05", "06", "07", | |
| "08", "09", "0A", "0B", "0C", "0D", "0E", "0F", | |
| "10", "11", "12", "13", "14", "15", "16", "17", | |
| "18", "19", "1A", "1B", "1C", "1D", "1E", "1F", | |
| "20", "21", "22", "23", "24", "25", "26", "27", | |
| "28", "29", "2A", "2B", "2C", "2D", "2E", "2F", | |
| "30", "31", "32", "33", "34", "35", "36", "37", | |
| "38", "39", "3A", "3B", "3C", "3D", "3E", "3F", |
Note: This is the guide for v 2.x.
For the v3, please follow this url: https://blog.csdn.net/sam_shan/article/details/80585240 Thanks @liy-cn for contributing.
Download: StarUML.io
Source: jorgeancal
| public class BoyerMoore | |
| { | |
| private int[] _jumpTable; | |
| private byte[] _pattern; | |
| private int _patternLength; | |
| public BoyerMoore() | |
| { | |
| } | |
| public BoyerMoore(byte[] pattern) | |
| { |
| public class Keyboard | |
| { | |
| public void Send(ScanCodeShort a) | |
| { | |
| INPUT[] Inputs = new INPUT[1]; | |
| INPUT Input = new INPUT(); | |
| Input.type = 1; // 1 = Keyboard Input | |
| Input.U.ki.wScan = a; | |
| Input.U.ki.dwFlags = KEYEVENTF.SCANCODE; | |
| Inputs[0] = Input; |
| public static class ExtensionMethods { | |
| public static string ToHex(this byte[] data) { | |
| return ToHex(data, ""); | |
| } | |
| public static string ToHex(this byte[] data, string prefix) { | |
| char[] lookup = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; | |
| int i = 0, p = prefix.Length, l = data.Length; | |
| char[] c = new char[l * 2 + p]; | |
| byte d; | |
| for(; i < p; ++i) c[i] = prefix[i]; |