Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Threading;
namespace Common
{
/// <summary>
/// Inspired by <see href="https://github.com/aspnet/AspNetCore/blob/master/src/Servers/Kestrel/shared/CorrelationIdGenerator.cs"/>,
/// this class generates an efficient 20-bytes ID which is the concatenation of a <c>base36</c> encoded
/// machine name and <c>base32</c> encoded <see cref="long"/> using the alphabet <c>0-9</c> and <c>A-V</c>.
@ifle
ifle / PaymentsAPI.json
Last active January 27, 2021 15:21
Zooz PaymentsOS API
{
"openapi": "3.0.0",
"servers": [
{
"url": "https://api.paymentsos.com/"
}
],
"info": {
"x-logo": {
"url": "payos_logo_blue_pad.png",
@ifle
ifle / jsprit-pickup-delivery-sample1.java
Last active March 22, 2018 12:46
jsprit pickup\delivery problem
package com.graphhopper.jsprit.examples;
import com.graphhopper.jsprit.analysis.toolbox.GraphStreamViewer;
import com.graphhopper.jsprit.analysis.toolbox.GraphStreamViewer.Label;
import com.graphhopper.jsprit.analysis.toolbox.Plotter;
import com.graphhopper.jsprit.core.algorithm.VehicleRoutingAlgorithm;
import com.graphhopper.jsprit.core.algorithm.box.Jsprit;
import com.graphhopper.jsprit.core.problem.Location;
import com.graphhopper.jsprit.core.problem.VehicleRoutingProblem;