Snippets created by toburger

  • Argu .env integration

    This example shows how to use .env files together with the awesome command line parsing capabilities of Argu.

    2 people like this

    Posted: 1 year ago by toburger

  • Request throttling agent

    Request throttling based on a time span and a request count. An `IDistributedCache` implementation is used which integrates nicely into ASP.NET Core. E.g. you can throttle requests from a specific IP address to allow fifty requests within a period of thirty seconds at most.

    3 people like this

    Posted: 2 months ago by toburger

  • The roller problem solved with a Constraint Programming Solver (CPS)

    This is the solution of a homework the son of a friend had to solve during homeschooling and he asked a couple of his friends on how to solve the following problem: Given a kickboard has three rolls and a city roller has two rolls we want to know *how many kickboards and how many city rollers are parked*. We know two things: * The sum of all the rolls combined is 37 * There are 15 rollers (kickboards and rollers) parked Now being a developer I wanted to solve it via programming. :-D I've used the Decider library which allows you to formulate and solve the problem as following.

    3 people like this

    Posted: 1 year ago by toburger