A list of useful commands for the ffmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
using System.Runtime.Intrinsics; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
public class ConvertToSamplesBenchmark | |
{ | |
private const int Count = 16000; | |
private readonly byte[] buffer; | |
private readonly float[] samplesBase; | |
private readonly float[] samplesUnrolled; |
using Models; | |
var slsSpecification = new Specification(C: 20.00f, N: 1.00f, P: 0.50f, K: 1.00f, Ca: 0.70f, Mg: 0.50f); | |
var pineapplePeel = new Sample(Name: "Pineapple Peel" , Seasonal: true , C: 59.43f, N: 0.80f, P: 0.21f, K: 2.00f, Ca: 0.39f, Mg: 0.23f); | |
var bananaStem = new Sample(Name: "Banana Stem" , Seasonal: false, C: 59.75f, N: 0.62f, P: 0.22f, K: 7.43f, Ca: 0.58f, Mg: 0.33f); | |
var bananaPeel = new Sample(Name: "Banana Peel" , Seasonal: false, C: 81.29f, N: 0.04f, P: 0.09f, K: 5.98f, Ca: 0.60f, Mg: 0.36f); | |
var breadfruit = new Sample(Name: "Breadfruit" , Seasonal: true , C: 82.36f, N: 1.06f, P: 0.06f, K: 1.58f, Ca: 1.12f, Mg: 0.25f); | |
var jackfruit = new Sample(Name: "Jackfruit" , Seasonal: true , C: 70.79f, N: 1.12f, P: 0.15f, K: 1.21f, Ca: 0.52f, Mg: 0.36f); | |
var tea = new Sample(Name: "Tea" , Seasonal: false, C: 86.04f, N: 3.14f, P: 0.13f, K: 0.38f, Ca: 0.76f, Mg: 0.38f); |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<style> | |
#div1, #div2, #div3, #div4 { | |
float: left; | |
width: 100px; | |
height: 35px; | |
margin: 10px; | |
padding: 10px; |
int x = Pipe<string>.Unit | |
| "Hello there..." | |
| (g => $"{g} General Kenobi") | |
| Console.WriteLine | |
| Pipe<string, int>.Select(s => s.Length) | |
| Console.WriteLine; | |
class Pipe<T> | |
{ | |
public Pipe(T item) |
using System.Reflection.Emit; | |
var dynamicMethod = new DynamicMethod("MethodA", typeof(void), Array.Empty<Type>()); | |
var methodIL = dynamicMethod.GetILGenerator(); | |
methodIL.Emit(OpCodes.Newobj, typeof(Random).GetConstructor(Array.Empty<Type>())!); | |
methodIL.EmitCall(OpCodes.Call, typeof(Test).GetMethod(nameof(Test.MethodB))!, null); | |
methodIL.Emit(OpCodes.Ret); | |
dynamicMethod.Invoke(null, null); |
class UberQueue<T> | |
{ | |
private readonly SemaphoreSlim _semaphore; | |
private readonly IAsyncQueue<T>[] _queues; | |
public UberQueue(IAsyncQueue<T>[] queues) | |
{ | |
_semaphore = new SemaphoreSlim(1, 1); | |
_queues = queues; | |
} |
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
service "api/v1/todo" TodoService; | |
csharp | |
{ | |
public record TodoItem(Guid Id, string Description); |
A list of useful commands for the ffmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
using System; | |
using System.Numerics; | |
using System.Reflection.Emit; | |
namespace TailCallElimination | |
{ | |
public class Program | |
{ | |
public static BigInteger Fibonacci(BigInteger n, BigInteger a, BigInteger b) | |
{ |
using System; | |
using System.Linq; | |
using System.Linq.Expressions; | |
namespace Extensions | |
{ | |
public static class PredicateBuilder | |
{ | |
public enum CombinationLogic | |
{ |