Articles by Azka Iftikhar
Sort List in Reverse Alphabetical Order in Python
Learn how to sort a Python list in reverse alphabetical order using sort(reverse=True) and sorted(reverse=True). Also see how to solve the short_names exercise and choose between in-place sorting and creating a new list.
NumPy Shuffle Array
Learn how to shuffle a NumPy array using np.random.shuffle(), Generator.shuffle(), and permutation(). Also see how to shuffle two arrays or lists together in the same random order.
Get GPS Coordinates in Python
Learn how to get latitude and longitude in Python from an address using geopy, and how to get approximate current location from an IP address.
Python Password Input with Asterisks
Learn how to take password input in Python and show asterisks while typing using getpass echo_char, pwinput, and stdiomask, with examples and common mistakes.
Install a Python Package from GitHub with pip: branches, tags, SSH, and requirements.txt
Install Python packages from GitHub using pip: PEP 508 git URLs, branches, tags, commits, editable installs, requirements.txt, private repos over HTTPS or SSH, subdirectory packages, verification, upgrades, and common …
Python Measure Execution Time: time, perf_counter, and timeit
Learn how to measure execution time in Python using time.perf_counter(), timeit, process_time(), and decorators, with examples in seconds, milliseconds, and nanoseconds.
Golang Check If String Is Empty: Empty vs Blank String
Check if a string is empty in Go with s == "" or len(s) == 0, tell empty from whitespace-only strings, use strings.TrimSpace for blank input, and remember string is never nil.
Fix "Setting an Array Element with a Sequence" in Python (NumPy ValueError Explained + Examples)
Learn how to fix the "ValueError: setting an array element with a sequence" in Python and NumPy. Understand inhomogeneous shape errors, causes, real examples, and step-by-step solutions to resolve array shape mismatch …
Convert entire dataframe to lower case
There are multiple methods to convert lower case entire dataframe in Python Pandas.
How to remove vector nth element in C++?
In this article we will learn c++ vector remove nth element. Vectors are a part of the c++ STL library. They are containers but can change memory at runtime.
Java WatchService Examples [Monitor Directory and Files]
The Java WatchService can monitor a Path for changes to any file or directory in the hierarchy. We can choose to receive events when files or directories are added, modified, or deleted.
Print a list in reverse order with range()?
In this article we will learn how we can print a list in reverse order with range() in Python for which first we need to know what range() is and how it works.
How to use cin for an array in C++
In c++ cin array is not performed in one cin statement. In this article we will learn about array input in c++. To understand array input, we first need to
Matplotlib.pyplot.vlines() - Draw vertical lines
Use matplotlib.pyplot.vlines to draw vertical lines in Python with examples.
Python calculate 6 months ago from today
In this article we have shared multiple ways to calculate date and time of 6 months ago from today in Python
Java Boolean Operator Explained
There are multiple java boolean operators such as logical operators that include logical operators, like the logical AND and logical OR as discussed above, unary operators like NOT and bitwise operators
Java DecimalFormat Explained
The java DecimalFormat class is used to apply decimal formats that are user- defined, to apply java DecimalFormat we use the class java.text.DecimalFormat.
8 different Escape Sequence in Java with Examples
An escape sequence in java refers to a character proceeded by a backslash(), the escape sequences have special meanings. In java, while declaring a string, a
SOLVED: Mask password with asterisk from console in Java
2 different ways to mask password with asterisk from console input in Java. Hide password with asterisk in Java. Display asterisk instead of password in Java input
2 ways to add fractions in Java [Practical Examples]
Multiple code examples to show how to add fractions in Java. Add two or multiple fractions.
How to initialize List in Java
Following methods can be used in Java to initialize list. The list interface can be initialized through 4 list classes: ArrayList, LinkedList, Stack, Vector
4 programs that shows how Java global variables work
A Java global variable is a variable that is declared outside a method or at the start of a code is a global variable, there are no access restrictions on a global variable. A Java global variable is mostly declared in …
3 ways to convert CHAR to INT in Java
There are 3 methods to convert char to int in java i.e ASCII values, getNumericalValue, ParseInt using ValueOf method.
Java Predicate Explained
Java predicate function is a pre-defined user interface. Predicate is a function that returns a boolean value. And the function test(T t) evaluates the predicate for the argument given.
Java ListIterator Explained
In this article, we will discuss how we can traverse forward through a list and traverse backward through a list using java ListIterator. This iterator is one of the most powerful cursors in java, it is a bidirectional …
Java Arrays.asList Explained
The java Arrays.asList function returns a fixed-size list that contains a java Array. It acts like a list wrapped around an array, it provides a list view to an array.
Java XOR (^) Operator Explained
In this article we will discuss the Java xor (^) operator, this logical operator is used in many conditional statements, it is also used as a bitwise operator to perform tasks with efficient logic

