Shriansh Kumar has Published 173 Articles

Getting Synchronized Map from Java TreeMap

Shriansh Kumar

Shriansh Kumar

Updated on 21-Jul-2023 20:28:31

245 Views

To get the synchronized Map from a TreeMap in Java, we can use an in-built method of Collection interface called ‘synchronizedMap()’. Here, TreeMap is a class that is used to implement NavigableMap Interface. It stores the elements of the map in a tree structure. It provides an efficient alternative to ... Read More

How Objects Can an ArrayList Hold in Java?

Shriansh Kumar

Shriansh Kumar

Updated on 21-Jul-2023 20:25:30

98 Views

ArrayList is a class of Java Collection Framework that implements List Interface. It is a linear structure that stores and accesses each object in a sequential manner. It allows the storage of duplicate values. Always remember, each class of the collection framework can hold instances of wrapper classes or custom ... Read More

Different Approaches to Concurrent Programming in Java

Shriansh Kumar

Shriansh Kumar

Updated on 21-Jul-2023 20:07:38

158 Views

In Java, concurrent programming is a technique that allows multiple tasks or processes to run simultaneously on a single processor or multiple processors. It can improve the performance and responsiveness of applications. However, it also introduces new challenges and complexities to the Java developers, such as synchronization and deadlock. In ... Read More

Different Ways to Achieve Pass By Reference in Java

Shriansh Kumar

Shriansh Kumar

Updated on 21-Jul-2023 19:56:29

554 Views

The most frequent query asked by beginner programmers, especially those who have already worked with C and C++ in the past, is whether Java supports pass-by-referenceor pass-by-value. Generally, programming languages use pass-by-value and pass-byreferencefor passing parameters to a method. However, Java does not support both approaches rather it uses pass-by-value ... Read More

How Java filter() Method Works in Background?

Shriansh Kumar

Shriansh Kumar

Updated on 21-Jul-2023 19:52:32

208 Views

The Java filter() method allows us to strain elements of the stream based on the specified condition. It is a part of higher-order function that is used to apply a certain behavior on stream items. This method takes a predicate as an argument and returns a list of elements that ... Read More

Parallelizing a Numpy Vector Operation

Shriansh Kumar

Shriansh Kumar

Updated on 21-Jul-2023 19:17:50

221 Views

Numpy is a powerful Python library that serves to store and manipulate large, multi-dimensional arrays. Although it is fast and more efficient than other similar collections like lists, we can further enhance its performance by using the parallelizing mechanism. Parallelizing means splitting the tasks into multiple processes to achieve one ... Read More

Plot the Size of each Group in a Groupby object in Pandas

Shriansh Kumar

Shriansh Kumar

Updated on 21-Jul-2023 19:14:37

907 Views

Pandas is a powerful Python library mainly used for data analysis. Since it contains large and complicated numeric datasets that are difficult to understand, we need to plot these datasets which makes it easy to visualize relationships within the given dataset. Python provides several libraries such as Matplotlib, Plotly and ... Read More

Plotting Geospatial Data using GeoPandas

Shriansh Kumar

Shriansh Kumar

Updated on 21-Jul-2023 19:07:58

211 Views

GeoPandas, a widely used Python library build on top of the Pandas library to include the support of geospatial data. Here, geospatial data or geodata describes the information related to the various locations on Earth's surface. These datasets have many use cases including visualization of maps, urban planning, analysis of ... Read More

Plotting A Square Wave Using Matplotlib, Numpy And Scipy

Shriansh Kumar

Shriansh Kumar

Updated on 21-Jul-2023 18:45:53

859 Views

A square wave is a type of non-sinusoidal waveform that is widely used in electric and digital circuits to show signals. Basically, these circuits use a square wave to represent input and output or on and off. Python provides several ways to plot square waves including Matplotlib, NumPy and Scipy ... Read More

Print Full Numpy Array without Truncation

Shriansh Kumar

Shriansh Kumar

Updated on 21-Jul-2023 18:31:39

5K+ Views

Numpy is a powerful Python library that serves to handle large, multi-dimensional arrays. However, when printing large numpy arrays, the interpreter often truncates the output to save space and shows only a few elements of that array. In this article, we will show how to print a full Numpy array ... Read More

Advertisements