Is this your sudden foray into Rust? Although not totally for beginners, this post shows how to connect to a PostgreSQL database from Rust. Note that we have updated the content of this post to use a newer version of
Rust – How to check for NULL values
Rust does not support NULL; therefore, we don’t perform NULL checks on values. It does not even have keywords for NULL. However, it provides an enum Option that we can use similarly to Java 8 Optional. No NULL Check because
docker-compose.yml YAML for MariaDB Docker Container
This post shows how to create and use a docker-compose YAML file to generate a MariaDB Docker container with initial user accounts. First, we need to install Docker for Windows. Then, use its docker-compose to process our YAML file. We
Java – Convert LocalDateTime to OffsetDateTime in any timezone
This post shows how to convert a Java LocalDateTime object to an OffsetDateTime object at the current zone offset. For example, let’s say we are in Singapore and want to convert the current LocalDateTime to a string value. This string
Rust – Convert Integer to String Or Format Numeric Values
We can use the Rust functions to_string(), and format functions to format or convert integer values to string values. This post shows how to use these functions on each of Rust’s integer types. Rust Integer Types There are six (6)
Rust – Check if key exists in HashMap Examples
This post shows how to check if a key exists in a HashMap in Rust. As we know, Rust has the HashMap struct, which is part of its Collections library that we can use to store key-value pairs. Rust HashMap
Rust – How to get Keys and Values from HashMap
In Rust, we can store key and value pairs using HashMap. This post shows how to store and extract the keys and values from a HashMap using the functions iter(), keys(), values(), get(), and unwrap(). Store Test Data Into a
Rust – How to Declare and Initialize an Array
Rust is a strange language for some. However, it is a fun programming language to play (or work) with. When we need arrays in Rust, we declare and initialize an array simultaneously with size and default values. Declare And Initialize
Rust – How to create Two-Dimensional Array Example
An array is an important construct in most programming languages. This post shows how to create one- and two-dimensional arrays in Rust. Although Rust has different ways of creating arrays, the following examples demonstrate some of them. One-Dimensional Arrays Before
Rust – How to Create a List Using Vec, VecDeque, and LinkedList
In Rust, we may refer to any list as a sequence of items. A list can be fixed size like an array or resizeable collection types – Vec, VecDeque, and LinkedList. Meaning the list can grow or shrink at runtime.