This file contains 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 enum FontAwesomeIcons { | |
Adjust = 0xf042, | |
Adn = 0xf170, | |
AlignCenter = 0xf037, | |
AlignJustify = 0xf039, | |
AlignLeft = 0xf036, | |
AlignRight = 0xf038, | |
Ambulance = 0xf0f9, | |
Anchor = 0xf13d, | |
Android = 0xf17b, |
This file contains 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
//TODO: debug (check for mismatches in counting in bits/bytes/ints) | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Runtime.Serialization; | |
[Serializable] | |
public class BitList : IList<bool>, ICloneable | |
{ |
This file contains 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
Deserializing objects using Json.NET first calls a constructor, and then a OnDeserialized callback if defined. | |
If an object has a property that has the OnDeserialized callback, | |
then first both objects (parent and property) are constructed and then the callback is called on both. | |
ReactiveUI has several classes that define a OnDeserialized callback. | |
These classes, however, were not designed to use Json.NET but rather the build in serializer. | |
The difference between the two is that the latter does not first call the constructor on deserialization, but rather only the callback. | |
This means that deserializing ReactiveUI objects using Json.NET leads to unexpected behaviour, such as properties getting set twice, getting reset, ... | |
Bindings, observers, ... that were made in constructors get overriden. | |
A solution should be: |
This file contains 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
# Like https://github.com/toprakkeskin/clang-8-update-alternatives-script/blob/master/clang-update-alternatives.sh | |
# but for LLVM/Clang 12 | |
# llvm | |
sudo update-alternatives \ | |
--install /usr/lib/llvm llvm /usr/lib/llvm-12 20 \ | |
--slave /usr/bin/llvm-addr2line llvm-addr2line /usr/bin/llvm-addr2line-12 \ | |
--slave /usr/bin/llvm-ar llvm-ar /usr/bin/llvm-ar-12 \ | |
--slave /usr/bin/llvm-as llvm-as /usr/bin/llvm-as-12 \ | |
--slave /usr/bin/llvm-bcanalyzer llvm-bcanalyzer /usr/bin/llvm-bcanalyzer-12 \ |
This file contains 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; | |
/// <summary> | |
/// Provides a boolean value for each value in an enum, | |
/// but setting the same flag twice means the flags needs to be unset twice to be false | |
/// </summary> | |
/// <typeparam name="T">An enum type (optionally with [Flags]) backed by a 32bit int</typeparam> | |
public unsafe struct RefCountedFlags<T> where T : Enum //T must be backed by a 32bit int | |
{ | |
fixed byte counts[32]; |