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
private LineRenderer _lineRendererComponent; | |
public LineRenderer LineRendererComponent | |
{ | |
get | |
{ | |
if (_lineRendererComponent == null) | |
{ | |
_lineRendererComponent = GetComponent<LineRenderer>(); |
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.Collections; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.IO; | |
using Alpha; | |
using Beta.Alpha; | |
using Beta.Beta; | |
namespace Example | |
{ |
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
#define NON_IDIOMATIC | |
#undef NON_IDIOMATIC //comment this line out to compile idiomatic code. | |
#if NON_IDIOMATIC | |
using System; | |
#else | |
using static System.Console; |
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 UnityEngine; | |
[ExecuteInEditMode] | |
public class BezierTension : MonoBehaviour | |
{ | |
#region Pretend you never saw this | |
public Transform Initial; | |
public Transform Mid; | |
public Transform End; |
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; | |
using System.Diagnostics; | |
internal class Program | |
{ | |
public const int Range = 100000000; | |
public const int Input = 2; | |
private static void Main(string[] args) | |
{ |
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 UnityEngine; | |
using System; | |
using System.Collections.Generic; | |
public class InputFun : MonoBehaviour | |
{ | |
void Start() | |
{ | |
// Log Generate Code | |
Debug.Log(GenerateCode("") + "\n\n" + GenerateCode("Down") + "\n\n" + GenerateCode("Up")); |
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
#!bin/bash | |
# Formats bash prompt to look like this (»# is job count): | |
# ~ »0 | |
# $ | |
PS1='\n\e[1;37m\w\e[m \e[0;34m»\j\e[m\n$ ' |
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
% This is an example of something like a linear data flow machine. The demo | |
% illustrates how to clearly implement a sequence of linear steps so that each | |
% step is is similarly handled. This pattern is useful for orchestrating a high | |
% level steps, such as a sequence of calls to other services in a "serverless" | |
% application. | |
-module(data_sequence). | |
-export([demo/0]). |
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 UnityEngine; | |
namespace SS.Aspects | |
{ | |
public enum AspectStatus | |
{ | |
Foreground, Background, Frozen, Off | |
} |
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
/* | |
Question: | |
------------------------------------------------------------------------ | |
In the function FooUtil.Bang(), will Java delete objects a and b? | |
Answer: | |
------------------------------------------------------------------------ | |
Yes. Java garbage collector sees that it is unreachable. GC is not | |
simply a reference counter. | |
src: http://stackoverflow.com/questions/1910194/how-does-java-garbage-collection-work-with-circular-references#1910203 |
OlderNewer