Skip to content

Instantly share code, notes, and snippets.

View arekbal's full-sized avatar
🤡
random

doix arekbal

🤡
random
View GitHub Profile
@arekbal
arekbal / examples.ts
Last active August 18, 2023 06:02
injectable-functions by DOIX Arkadiusz Damian Bal
import 'reflect-metadata'
import { Exe, executable, registerExecutable } from './executable'
import { Container, interfaces, injectable, inject } from 'inversify'
//! EXAMPLE !!!
const c = new Container({ autoBindInjectable: true })
@injectable()
struct ProductOrderedDTO
{
IntPtr _ptr;
int _byteSize;
public int ByteSize => _byteSize;
const int QUANTITY_OFFSET = 0;
const int QUANTITY_SIZEOF = sizeof(int);
public class list_vs_array
{
int[] data;
List<int> list;
int calcSum;
public list_vs_array()
{
data = Enumerable.Range(1, 999).ToArray();
public class vectorization_locality
{
int[] data;
int baseSum;
public vectorization_locality()
{
data = Enumerable.Range(1, 999).ToArray();
@arekbal
arekbal / OptionResult.cs
Last active October 20, 2018 20:13
some code to show how - well done - non-verbose options and results are
using static LangExt;
namespace OptionResultDemo
{
enum ErrorCodes
{
AllIsFine,
Happens,
DidNotHappenOops,