C# – Stopwatch

By | 05/04/2023

In this post, we will see what StopWatch is and how we can use it.But first of all, what is StopWatch?The Stopwatch class is a high-resolution timer provided by the .NET Framework, designed to measure the elapsed time for an operation or a block of code. It’s part of the System.Diagnostics namespace and offers greater… Read More »

Category: C#

C# – The fastest ways to iterate a List

By | 22/03/2023

In this post, we will see the fastest ways to iterate a List. We start creating a Console Application called ReadList and then, we add a Class called Core: [CORE.CS] Now, we will add four methods to iterate the List using the statements For, Foreach, List<T>.Foreach and Foreach with CollectionsMarshal.AsSpan: FOR(We are not sure that… Read More »

Category: C#

Git – Commands

By | 08/03/2023

In this post, we will see some Git commands that can help us to manage our projects. git init:It is used to start a new repository. git config:It is used to set the name and the email to use with our commits. git add:It is used to add files to the staging area. git commit:It… Read More »

Category: Git

Multithreading – SemaphoreSlim

By | 01/03/2023

In this post, we will see what is SemaphoreSlim and how we can use it.But first of all, what is SemaphoreSlim?From Microsoft web site:“The SemaphoreSlim class represents a lightweight, fast semaphore that can be used for waiting within a single process when wait times are expected to be very short. SemaphoreSlim relies as much as possible… Read More »

Python – Random values

By | 22/02/2023

In this post, we will see how to generate random values in Python. GENERATING INT NUMBERS GENERATING FLOAT NUMBERS USING SEED TO HAVE THE SAME RANDOM VALUES USING RANDOM TO GET ITEMS FROM A LIST SHUFFLING A LIST

SwiftUI – AnyLayout

By | 15/02/2023

In this post, we will see how to use the new component AnyLayout introduced in SwiftUI 4.But first of all, what is AnyLayout? From Apple developer web site:“Use an AnyLayout instance to enable dynamically changing the type of a layout container without destroying the state of the subviews”In a nutshell, with AnyLayout we can switch for example… Read More »

C# – Big O notation

By | 08/02/2023

In this post, we will see what Big O notation is and how to use it to optimize our algorithms.But first of all, what is Big O notation?From Wikipedia:“Big O notation is a mathematical notation that describes the limiting behaviour of a function when the argument tends towards a particular value or infinity. Big O is a member of a family of notations invented by Paul Bachmann,… Read More »

Category: C#