29 thoughts on “Today I Learned (TIL)”

  1. How to copy code from Visual Studio to MS Word with EVERY highlight exactly as it is?

    So I was looking for an answer to this and this is what i found. Go to Extensions (manager) -> look for: Productivity Power Tools -> install & restart VS. Now when i copy/paste from VS to Word, literally all syntax colors are being copied over 1:1. even the background color is matched.

    I use VS 2019 preview these days.

    https://stackoverflow.com/a/55211462

  2. I have never worked with firebase. However i’m 99% sure that your dictionary should be

    Dictionary <string, object > or Dictionary<string, System.Object>

    instead of

    Dictionary<string, Object> which actually is Dictionary<string, UnityEngine.Object>

    Keep in mind that the compiler will use classes from the namespaces you are “using”. There is no “Object” class in the global namespace. Since most Unity scripts have a using UnityEngine; at the top, “Object” will refer to UnityEngine.Object.

    The C# base class for every type (System.Object) has an alias name in the global namespace: object. Note the lower case “o”. There are several alias names for built-in fundamental types, like string (System.String), int (System.Int32), long (System.Int64), ...

    http://answers.unity.com/comments/1560625/view.html

  3. Functional programming:
    1. Keep data immutable
    2. Keep functions pure-accept at least one argument, return data or another function.
    3. Use recursion over looping.

Leave a Reply