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.Net.Mime; | |
using Xabe.FFmpeg; | |
var builder = WebApplication.CreateBuilder(args); | |
var app = builder.Build(); | |
FFmpeg.SetExecutablesPath(@"C:\Temp\Tools\ffmpeg\bin"); | |
app.MapGet("/thumbnail/{filename}", async (string filename, HttpContext context) => { | |
var i = await FFmpeg.GetMediaInfo($@"C:\Temp\files\{filename}"); |
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 BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using System; | |
using System.IO; | |
using System.Text; | |
namespace BensWordCounter | |
{ | |
public class Program | |
{ |
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; | |
namespace NumberCrazy | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("Number(1) == 1: {0}", new Number(1) == 1); | |
Console.WriteLine("Number(2) > 1: {0}", new Number(2) > 1); |
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
// POST api/values | |
[HttpPost] | |
[ActionName("Complex")] | |
public HttpResponseMessage PostComplex(TwoField twoField) | |
{ | |
List<string> list = new List<string>(); | |
var name = "undefined"; | |
if(ModelState.IsValid && twoField != null) |
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.Reflection; | |
using CommonDomain; | |
using CommonDomain.Core; | |
using CommonDomain.Persistence; | |
using CommonDomain.Persistence.EventStore; | |
using EventStore; | |
using EventStore.Dispatcher; |
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.Reflection; | |
using CommonDomain; | |
using CommonDomain.Core; | |
using CommonDomain.Persistence; | |
using CommonDomain.Persistence.EventStore; | |
using EventStore; | |
using EventStore.Dispatcher; |
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
function stringFormat (formatString) | |
{ | |
var builder = []; | |
var st = 0; | |
var j = 0; | |
for (var i = 0; i < formatString.length; i++) | |
{ | |
switch (st) |
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 parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
namespace ConsoleApplication3 | |
{ | |
class Program | |
{ | |
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 System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using NUnit.Framework; | |
namespace MyProject | |
{ | |
[TestFixture] |
NewerOlder