See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| 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]; |
| 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 class BoyerMoore | |
| { | |
| private int[] _jumpTable; | |
| private byte[] _pattern; | |
| private int _patternLength; | |
| public BoyerMoore() | |
| { | |
| } | |
| public BoyerMoore(byte[] pattern) | |
| { |
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
| 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", |
| // 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; |
| public static Func<float,float> Line(PointF a, PointF b) | |
| { | |
| return x => | |
| { | |
| var k = (b.Y - a.Y) / (b.X - a.X); | |
| return k * (x - a.X) + a.Y; | |
| }; | |
| } |
| using System; | |
| using System.Data; | |
| using System.Globalization; | |
| using System.Reflection; | |
| using DevExpress.Xpo.DB; | |
| using DevExpress.Xpo.DB.Helpers; | |
| // ReSharper disable InconsistentNaming | |
| namespace SN.Instrument.DataAccess.Xpo.ConnectionProviders | |
| { |
| # Add these entries to your `tools.yml` to be able to right-click to open | |
| # things in VSCode (files and folders) and Windows Terminal (folders only) and Visual Studio(sln files). | |
| # Make sure to change `YOUR_USERNAME` in the VSCode path. | |
| tools: | |
| - name: Open in VSCode | |
| fileStarter: {command: 'C:\Users\YOUR_USERNAME\AppData\Local\Programs\Microsoft VS Code\Code.exe', | |
| parameters: '"${filePath}"'} | |
| useForOpen: true | |
| waitUntilFinished: false |