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
### Keybase proof | |
I hereby claim: | |
* I am nug700 on github. | |
* I am nug700 (https://keybase.io/nug700) on keybase. | |
* I have a public key whose fingerprint is EEAC 9017 F78D 7EA4 9FE4 9900 9856 97B7 46FE 00C4 | |
To claim this, I am signing this object: |
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
MemoryStream memStream = new MemoryStream(); | |
StreamWriter writer = new StreamWriter(memStream); | |
Console.SetOut(writer); | |
Console.WriteLine("Hello"); | |
StreamReader reader = new StreamReader(memStream); | |
DConsole.Log(reader.ReadToEnd()); |
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
class SelectedUnits : Monobehavior | |
{ | |
public List<Transform> selectedList; | |
private Static SelectedUnits _instance; | |
public Static SelectedUnits Instance { get { return _instance;}} | |
public void AddTransform(Transform trans) | |
{ | |
selectedList.Add(trans); |
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 Vector3 CenterOfVectors( Vector3[] vectors ) | |
{ | |
Vector3 sum = Vector3.zero; | |
if( vectors == null || vectors.Length == 0 ) | |
{ | |
return sum; | |
} | |
foreach( Vector3 vec in vectors ) | |
{ |
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
[Serializable] | |
public struct REPLInfo | |
{ | |
public int ID; | |
public string Name; | |
public List<string> Text; | |
public Vector2 ScrollPos; | |
public REPLInfo(int id, string name) | |
{ |
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
NameSpaces = new Dictionary<string, NamespaceItem>(); | |
Type[] types = module.GetTypes(); | |
foreach (Type type in types) | |
{ | |
if (type != null && NameSpaces != null) | |
{ | |
string spaceStr = type.Namespace; | |
if (!NameSpaces.ContainsKey(spaceStr)) | |
{ |
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 class Maze | |
{ | |
public enum Direction | |
{ | |
N = 1, | |
W = 2 | |
} | |
Stack s_stack; | |
Random rand; |
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 enum Direction{ | |
N ((byte)1), | |
W ((byte)2); | |
private final byte index; | |
Direction(byte _index){ | |
index = _index; | |
} | |
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
MemoryStream stream = new MemoryStream(); | |
WebClient client = new WebClient(); | |
byte[] bytes = client.DownloadData("http://nug700.github.io"); | |
stream.Write(bytes, 0, bytes.Length); | |
Console.WriteLine(Encoding.ASCII.GetString(stream.ToArray())); | |
HtmlDocument doc = new HtmlDocument(); | |
doc.Load(stream, Encoding.ASCII); | |
doc.Save("test.html"); // nothing written to file. |
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 void Flush() | |
{ | |
try | |
{ | |
unsafe | |
{ | |
fixed (float* pVert = vertexBuffer, pTex = texCoordBuffer, pCol = ColorBuffer) | |
{ | |
GL.VertexPointer(3, 0, 0, (IntPtr)pVert); | |
if (hasTexture) |
OlderNewer