In this post, we will see what a Dynamic Type is and how to use it. Dynamic Type was introduced in C# 4.0 and it avoids compile-time type checking.It escapes type checking at compile-time and it resolves type a run time.A dynamic type variable is defined using the dynamic keyword.Let see some examples: DEFINING A […]
Read MoreIn this post, we will see how to display an Enum in a Picker.First of all, we start creating a new project called ViewEnum where we will add a file called LstCars, used to define an Enum consisting of a list of car brands: [LstCars.swift] Finally, we define a Picker in the file ContentView where […]
Read MoreIn this post, we will see what Delegates are and how to use them.First of all, what is a Delegate?From Microsoft web site: “A delegate is a type that safely encapsulates a method, similar to a function pointer in C and C++. Unlike C function pointers, delegates are object-oriented, type safe, and secure. The type of a […]
Read MoreIn this post, we will see how to implement an Alert in SwiftUI. We create a project called AlertTest and add this code in the file ContentView: [ContentView.swift] This is all and now, if we run the application, this will be the result:
Read MoreIn this post, we will see how to install and configure MongoDB on macOS. First of all, we open the Terminal and run the command /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)” , in order to install Homebrew brew. Then, we run the command brew tap mongodb/brew, in order to download the official Homebrew formulae for MongoDB and […]
Read MoreIn this post, we will see how to manage Try/Except in Python. Just to remember what try/except is: Try/Except is a statement marks a block of statements to try and specifies a response should an exception be thrown.In detail, in Try/Except we have three blocks:Try, used to test a block of code for errors.Except, used […]
Read MoreIn this post, we will see three tips that might help us to create buttons in our applications. First of all, we open Xcode, we create an iOS project called TestButton and we add three buttons: Then, we create a new Swift file called ButtonStyleCustom where we will define the style that we will use […]
Read MoreIn this post, we will see how to create a simple Console application (a calculator), using TDD.But first of all, what is TDD?From Wikipedia:“Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the code is improved […]
Read MoreI am very happy starting the 2021 with the new version of TheWordClock.In these release, I have fixed some bugs and I have introduced the alarm clock. If you want to download it, find “Thewordclock” in the App Store or go to:https://apps.apple.com/it/app/thewordclock/id1533151993?l=en
Read MoreIn this post, we will see how to show an image in a Flutter application. First of all, we open Android Studio and we create a new Flutter application called showdog: Then, we create a folder in the project called images and we put inside a picture of our dog (this is my wonderful dog!): […]
Read More