This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using TS3AudioBot.Audio; | |
| using TS3AudioBot.Helper; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Globalization; | |
| using System.Linq; | |
| using System.Text.RegularExpressions; | |
| using TS3Client; | |
| using TS3Client.Full; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //+ IPv4Mask {255.255.255.0} System.Net.IPAddress | |
| //+ Address {10.0.0.6} System.Net.IPAddress | |
| /// <summary> | |
| /// Get all IPAdresses which are in the current subnet | |
| /// </summary> | |
| /// <returns></returns> | |
| public static List<IPAddress> GetAllIp() | |
| { | |
| var retVar = new List<IPAddress>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Runtime.CompilerServices; | |
| namespace TestingEnv | |
| { | |
| internal class XoRCrypto | |
| { | |
| private readonly int[] _keyChain; | |
| private int _ckey; | |
| public XoRCrypto(int[] chain = null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Concurrent; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.Linq; | |
| using System.Runtime.CompilerServices; | |
| using System.Runtime.InteropServices; | |
| using System.Text; | |
| using System.Threading; | |
| using JSocket.Utilities.Extensions; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FastList<T> | |
| { | |
| private readonly List<T> _internalList = new List<T>(); | |
| public int Count => _count; | |
| private int _count; | |
| private int _freeIndex; | |
| public T this[int index] => _internalList[index]; | |
| public int Add(T input) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static void TestFifo(Stream cStream) | |
| { | |
| int readbytes; | |
| int crbytes; | |
| var buf = new byte[10 * 1024 * 1024]; | |
| var cBuf = new byte[255 * 1024]; | |
| var sInfo = new FileInfo(@"D:\Work\Video Editing\Raw\Overwatch\Overwatch 10.17.2017 - 23.59.39.01.mp4"); | |
| var dInfo = new FileInfo(@"D:\Work\Video Editing\Raw\dst.mp4"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FifoStream2 : Stream | |
| { | |
| private static readonly ConcurrentQueue<CByte> _ringBuffer = new ConcurrentQueue<CByte>(); | |
| static FifoStream2() | |
| { | |
| for (int i = 0; i < 1000; i++) | |
| _ringBuffer.Enqueue(new CByte()); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static byte[] Decrypt(byte[] Data, int Offset) | |
| { | |
| MemoryStream memoryStream = new MemoryStream(); | |
| int num = 0; | |
| byte b = 0; | |
| for (;;) | |
| { | |
| byte b2 = Data[num + Offset]; | |
| if (b2 == 0) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class FifoStream : Stream | |
| { | |
| private readonly Queue<byte[]> _localBuffer = new Queue<byte[]>(); | |
| private int _currentStreamOffset = 0; | |
| private long _length; | |
| public override void Flush() | |
| { | |
| throw new NotImplementedException(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Sample Usage for mahapps: | |
| //WpfDictionaries.AddDirectories("MahApps.Metro", "component/Styles", new string[] { "Controls", "Fonts", "Colors", "Accents/Blue", "Accents/BaseLight" }, "xaml"); | |
| internal class WpfDictionaries | |
| { | |
| public static void AddDirectories(string domain, string prefix, IEnumerable<string> fileNames, string suffix) | |
| { | |
| fileNames.ForEach(x => | |
| { | |
| Application.Current.Resources.MergedDictionaries.Add(new ResourceDictionary |