Python – Random values
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
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
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 »
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 »
In this post, we will see how to manage a string in Python. SLICING FROM STRING TO LIST AND VICE VERSA COUNT AND FIND LJUST, RJUST, STRIP, LSTRP AND RSTRIP
In this post, we will see how to use the new NavigationStack that has substituted the old NavigationView. We start creating an iOS project and then, we add three Swift files called User, Core and UserType.The first one is our Model, the second one is the Business layer and finally UserType is the UI: [USER.SWIFT]… Read More »
In this post, we will see how and when using Task.CompletedTask and Task.FromResult. WHENWe can use both of them when we need to return a Task object from a method that don’t have any async operations. HOWTask.CompletedTaskWhen we need to return a Task: [CORE.CS] [PROGRAM.CS] If we run the application, this will be the result:… Read More »
In this post, we will see how to create a Linux Virtual Machine on Windows 11, using Hyper-V. First of all, we have to enable Hyper-V Manager.In order to do this, we open Windows Features: We check the “Hyper-V” features: Then, we restart Windows: Finally, we download the latest version of Ubuntu from the web… Read More »
In this post, we will see how to create, read and write an Excel file using the module openpyxl. First of all, we need to install the module, using the command: Then, we create an Excel file called TestExcel.xlsx, so defined: HOW TO READ AND WRITE AN EXCEL FILEWe create a file called main.py where… Read More »
In this post, we will see some code snippets that can help us to manage date in Python. HOW TO CONVERT A STRING IN A DATEIn this code, we will see how to convert a string in a date: If we run the code, this will be the result: HOW TO GET TODAY DATEIn this… Read More »