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 struct BackshiftHashMap<TKey, TValue> where TKey : IEquatable<TKey> | |
{ | |
public struct Entry | |
{ | |
public int Hash; // 0 == empty | |
public int Dib; // distance-to-initial-bucket for this slot (0 for home) | |
public TKey Key; | |
public TValue Value; | |
} |
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; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Runtime.CompilerServices; | |
using System.Runtime.InteropServices; | |
using System.Runtime.Serialization; | |
using System.Threading; | |
using Unity.Burst; |
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.Generic; | |
using System.Diagnostics; | |
using Sirenix.OdinInspector; | |
using UnityEngine; | |
using UnityEngine.Assertions; | |
using Debug = UnityEngine.Debug; | |
namespace SolidAlloy | |
{ |
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
#Requires AutoHotkey v2.0 | |
; Makes Shift+Alt skip Japanese | |
~+Alt:: | |
{ | |
sleep(150) | |
if (GetKeyboardLanguage(WinExist("A")) = 1041) { | |
Send "{Shift Down}{Alt}{Shift Up}" | |
} | |
} |
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.Generic; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEditor.SceneManagement; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
using vietlabs.fr2; | |
// I was frustrated with the fact that RectTransform fields are often marked as overriden when prefab instances |
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.IO; | |
using JetBrains.Annotations; | |
using NUnit.Framework; | |
using UnityEditor; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
/// <summary> | |
/// Unit tests that show how AssetDatabase operates. |
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.Runtime.CompilerServices; | |
using JetBrains.Annotations; | |
// Reduced-down and slightly refactored version of https://gist.github.com/LordJZ/92b7decebe52178a445a0b82f63e585a | |
// It exposes only (T separator) overload of the Split method which was enough for my needs. | |
public static class SpanExtensions | |
{ | |
public readonly ref struct Enumerable<T> | |
where T : IEquatable<T> |
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.IO; | |
using System.Text.RegularExpressions; | |
using UnityEditor; | |
using UnityEngine; | |
[InitializeOnLoad] | |
internal static class RoslynDirectoryCreator | |
{ | |
static RoslynDirectoryCreator() => Application.logMessageReceived += OnLogMessageReceived; |
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.Linq; | |
using System.Text.RegularExpressions; | |
public static class IdentifierExtensions | |
{ | |
// definition of a valid C# identifier: http://msdn.microsoft.com/en-us/library/aa664670(v=vs.71).aspx | |
private const string FORMATTING_CHARACTER = @"\p{Cf}"; | |
private const string CONNECTING_CHARACTER = @"\p{Pc}"; | |
private const string DECIMAL_DIGIT_CHARACTER = @"\p{Nd}"; |
NewerOlder