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 static System.Linq.Enumerable; | |
using static System.Console; | |
using static System.String; | |
using static System.IO.Path; | |
Write(Join('\n',Range(0,4).Select(i=>Concat(((long[])[0xF0449,0x420,0x8FE2E1441,0x8356AF71C4D,0x420,0x8FE2E1441,0x420,0x7642E1447,0x7A185E184F,0x7C62F1444]).SelectMany(n=>(char[])[..Range(0,(byte)(n>>8)/4).Select(o=>(((int)(n>>16)>>(o+(byte)(n>>8)/4*i))&1)==1?(char)(byte)n:' '),' ']))))); |
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 attbr = new CustomAttribute(module.Import(/*Ctor of UnmanagedCallersOnlyAttribute*/)); | |
attbr.NamedArguments.Add(new(true, module.CorLibTypes.String, "EntryPoint", new(module.CorLibTypes.String, /*entrypoint name, just string*/))); | |
attbr.NamedArguments.Add(new(true, /*System.Type[] TypeSig*/, "CallConvs", new(/*System.Type[] TypeSig*/, /*CallConv types, just Type[]*/.Select(t => new CAArgument(/*System.Type TypeSig*/, module.ImportAsTypeSig(t))).ToList()))); |
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
void Main() | |
{ | |
AllocConsole(); | |
SetupIn(); | |
SetupOut(); | |
Console.WriteLine("Output something"); | |
var input = Console.ReadLine(); | |
} |
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.Runtime.InteropServices; | |
/* Example start */ | |
var data = new short[240000]; | |
for (var i = 0; i < data.Length; i++) | |
data[i] = (short)((i % short.MaxValue) * 20); | |
var path = @"C:\a.wav"; | |
var bytes = WAV.GetBytes(ChannelType.Mono, 44000, data); |