What Are The Possible States of Docker Container

States of Docker Container In this tutorial I will tell you what are the possible states of docker containers. Here I am going to tell you about all possible states of docker container. State generally refers to any changeable conditions including the results of internal operations, interactions with other applications.

Merge Two String Arrays and Produce Unique Values using Java

Unique elements by merging arrays In this tutorial, I will show you how to merge string values from two arrays and produce the final array with unique string values. I will use Set data structure to produce the unique results in final array. When passed two arrays of strings, it will return an array containing the string values that appear…

File Upload and File Download REST APIs Testing using Rest Assured in Java

Introduction In this tutorial I will show you how to test REST APIs used for file upload and file download. The file upload or download application might have been created using any server side technology. I am going to use here Rest Assured library with Junit 5 framework in Java programming language. I will use multipart for file upload test….

How to perform CRUD operations REST API testing using Rest Assured in Java

Introduction In this example we will see how to perform CRUD operations REST API testing using Rest Assured library in Java programming language. Testing and validating REST services in Java is harder than in dynamic languages such as Ruby and Groovy. REST Assured brings the simplicity of using these languages into the Java domain. This tutorial will show you how…

Work With IN, OUT And INOUT Parameters In Stored Procedures Using Spring Data JPA

IN, OUT, INOUT Params In this tutorial I will show you how to work with IN, OUT and INOUT parameters in Stored Procedure using Spring Data JPA. I will also call a stored procedure having no parameter at all. I am going to use MySQL server, so there may be some limitations on MySQL server or there may be some…

Find Closest Number from Array to the Given Number in Java

In this tutorial you will find closest number from array to the given number. Given an array of sorted integers, find the closest value to the given number. The array may contain duplicate values and negative numbers. Examples Array : 2,5,6,7,8,8,9Target number : 5Output : 5

How to check or make a number palindrome in Java

Here we will create an example on how to check a given number is palindrome or not. We will also make the given number palindrome if it is not palindrome. In our other tutorial we have seen how to check a string is palindrome or not. A string or number is palindrome if it is equal to its reversed counterpart….

How to read, write and compress text file in Python

In this tutorial we will create examples how to read text file and gzip file. We will also create a text file and compress or gzip file. The gzip file or compressed file extension is gz. Prerequisites Python 3.8.1 Import Module Import required module as a first step in the Python script. Read File The below function read either compressed…

Server Sent Events with CodeIgniter – Push Notifications

Introduction In this tutorial we will create an example on server sent events (SSE) with CodeIgniter – push notifications. Sometimes we face situations, where the application needs only one way communication, i.e., sending data from server to the client and for this Spring provides a simpler solution using Server Sent Events (SSE). SSE is a technology that allows you to…

How to map Custom Query Results into DTO in Spring Data JPA

Introduction In this tutorial I will show you how to map custom query results into DTO in Spring Data JPA. Situations may occur while you are unable to return the entity object(s) as results from your Spring Data JPA Repository and instead you need to write custom query or native query for your business requirements. So in such situations you…