Dhruvdeep Singh Saini

howto · 2024-02-02

How to Set Attributes of a Class in Python

This article provides a comprehensive guide to using the set attribute in Python, the recursion problem that occurs while using set attributes, and various methods to avoid it.

howto · 2024-02-02

How to Datetime Objects With Timezone in Python

This guide helps you understand Python's datetime module, how you can use it to work with dates and times, and how to spot and create timezone-aware objects in Python.

howto · 2024-02-02

How to Sort a List Using stream.orted() in Java

This article explains how to use the Stream sorted() method in Java. This also demonstrates how to use comparator for stream sorting user-defined lists.

howto · 2024-02-02

How to Read Text File Into 2-D Array in C++

This article explains how you can read text files into 2-D arrays in C++. It also highlights fstream library, along with vectors, and how to read text input into 2-D vectors.

howto · 2024-02-02

How to Convert Collection to List in Java

This article provides and explains various methods of converting a collection into a list in Java.

howto · 2024-02-02

How to Join List of Lists in Python

This article explains flattening, why a list is better than nested lists, and discusses various ways to join a list of lists in python.

howto · 2023-10-12

Logical Operators and Short Circuit in Java

This article explains java's logical operators, what short-circuiting is in java and how it occurs. It further explains the difference between logical and bitwise operators and explains the advantages and disadvantages of short-circuiting in java.

howto · 2023-10-12

Forward Declaration in C++

This guide helps you understand how to use forward declarations of functions and classes in C++. This explains why forward declarations are important and shares their advantages.

howto · 2023-10-10

Type Hints in Python

This article shares type hints in Python and the implementation of type hints and type comments in Python functions and variables. It further discusses Python's typing module and mypy library and provides the advantages and drawbacks of type hints.

howto · 2023-10-10

Diagonal Matrix in Python

This article explains matrices in Python, their different types, what diagonal matrices are, how to convert vector matrices to diagonal matrices in Python. It also discusses where diagonal matrices are used in programming.