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
# 3D models | |
*.3dm filter=lfs diff=lfs merge=lfs -text | |
*.3ds filter=lfs diff=lfs merge=lfs -text | |
*.blend filter=lfs diff=lfs merge=lfs -text | |
*.c4d filter=lfs diff=lfs merge=lfs -text | |
*.collada filter=lfs diff=lfs merge=lfs -text | |
*.dae filter=lfs diff=lfs merge=lfs -text | |
*.dxf filter=lfs diff=lfs merge=lfs -text | |
*.fbx filter=lfs diff=lfs merge=lfs -text |
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 bool WritingFinished { get; private set; } | |
public void CloseWrite() | |
{ | |
WritingFinished = true; | |
_readWait.Set(); | |
} | |
public override int Read(byte[] buffer, int offset, int count) | |
{ |
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
bool WritingFinished { get; private set; } | |
public void CloseWrite() | |
{ | |
WritingFinished = true; | |
} |
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 ContinuousStream : Stream | |
{ | |
private readonly IProducerConsumerCollection<byte> _buffer; | |
public ContinuousStream() => _buffer = new ConcurrentQueue<byte>(); | |
public override int Read(byte[] buffer, int offset, int count) | |
{ | |
var maxByteCount = offset + count > buffer.Length ? buffer.Length : count; | |
var actualBytesRead = 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
var bufferInput = new byte[] {1, 2, 3}; | |
var bufferOutput = new byte[bufferInput.Length]; | |
Console.WriteLine("bufferInput = {0,-2}", string.Join(", ", bufferInput)); | |
Console.WriteLine("bufferOutput = {0,-2}", string.Join(", ", bufferOutput)); | |
var memoryStream = new MemoryStream(); | |
memoryStream.Write(bufferInput, 0, bufferInput.Length); | |
memoryStream.Position = 0; | |
memoryStream.Read(bufferOutput, 0, bufferInput.Length); |
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
var bufferInput = new byte[] {1, 2, 3}; | |
var bufferOutput = new byte[bufferInput.Length]; | |
Console.WriteLine("bufferInput = {0,-2}", string.Join(", ", bufferInput)); | |
Console.WriteLine("bufferOutput = {0,-2}", string.Join(", ", bufferOutput)); | |
var memoryStream = new MemoryStream(); | |
memoryStream.Write(bufferInput, 0, bufferInput.Length); | |
memoryStream.Read(bufferOutput, 0, bufferInput.Length); |
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
var memoryStream = new MemoryStream(); | |
Console.WriteLine("CanRead = " + memoryStream.CanRead); | |
Console.WriteLine("CanWrite = " + memoryStream.CanWrite); | |
Console.WriteLine("CanSeek = " + memoryStream.CanSeek); |
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
var foo = {id: 'Foo'}; | |
var bar = Object.create(foo) | |
console.log(`bar.id = ${bar.id}`); |
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 (var connection = new SqlConnection(CONNECTION_STRING)) | |
{ | |
const int WIDTH = 15; | |
const string COMMAND_TEXT = | |
@"SELECT [Id],[Description] | |
FROM [dbo].[Table1]; | |
SELECT [Id],[Description] | |
FROM [dbo].[Table2];"; | |
using (var command = connection.CreateCommand()) |
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
SELECT [Id],[Description] | |
FROM [dbo].[Table1]; | |
SELECT [Id],[Description] | |
FROM [dbo].[Table2]; |