I have summarized and compiled a list of React.JS best practices from various sources across the internet.
This file contains hidden or 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; | |
using Vim.Logger; | |
namespace Vim.DotNetUtilities | |
{ | |
/// <summary> | |
/// This interface is different from the IProgress<T> class in the system library | |
/// https://docs.microsoft.com/en-us/dotnet/api/system.iprogress-1?view=netframework-4.8 | |
/// It was designed to simplify the use case of percentage reporting where the number of steps |
This file contains hidden or 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 static byte[] NaivePack(IList<byte[]> buffers) | |
{ | |
using (var stream = new MemoryStream()) | |
using (var bw = new BinaryWriter(stream)) | |
{ | |
bw.Write(buffers.Count); | |
foreach (var b in buffers) | |
{ | |
bw.Write(b.Length); | |
bw.Write(b); |
This file contains hidden or 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
"use strict"; | |
function EvalArithmetic(exprNode) | |
{ | |
switch (exprNode.rule.name) | |
{ | |
case "expr": | |
{ | |
return EvalArithmetic(exprNode.children[0]); | |
} |
This file contains hidden or 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
"use strict"; | |
// Defines a grammar for basic arithmetic | |
function CreateArithmeticGrammar(myna) | |
{ | |
// Setup a shorthand for the Myna parsing library object | |
let m = myna; | |
// Construct a grammar | |
let g = new function() |
NewerOlder