Skip to content

Instantly share code, notes, and snippets.

View paillave's full-sized avatar
📦
Beta version of Scheduler.NET is released, check it out!

Stéphane Royer paillave

📦
Beta version of Scheduler.NET is released, check it out!
View GitHub Profile
@paillave
paillave / EnumerableEx.cs
Last active May 5, 2023 08:07
Topological sort
using System.Collections.Generic;
using Gambit.BatchEndpoint.Api.Exceptions;
namespace System.Linq;
public static class EnumerableEx
{
public static IEnumerable<T> TSort<T, K>(this IEnumerable<T> source, Func<T, K> getKey, Func<T, IEnumerable<K>> getDependencyKeys) where K : notnull
{
var sorted = new List<T>();
@paillave
paillave / Program.cs
Created November 11, 2022 10:57
Parse an Xml file with ETL.NET
// See https://aka.ms/new-console-template for more information
using System.Text;
using Paillave.Etl.Core;
using Paillave.Etl.XmlFile;
using Paillave.Etl.XmlFile.Core;
var testXmlContent = @"<root>
<elt1 v1=""qwe""><v2>asd</v2></elt1>
<elt2 v3=""yxc""><v4>rtz</v4></elt2>
<elt1 v1=""mnb""><v2>poi</v2></elt1>
@paillave
paillave / ActionColumns.tsx
Created July 24, 2019 19:34
Dev extreme react grid action column
import autobind from "autobind-decorator";
import * as React from 'react';
import {
Template,
Plugin,
TemplateConnector,
Getter,
Getters,
} from '@devexpress/dx-react-core';
import { TableCell, IconButton, Tooltip } from '@material-ui/core';