Manifest File A manifest file contains metadata for a group of accompanying files which are part of coherent unit. For example, the files of a computer program may have a manifest describing the name, version number, license and the constituent files of the program. Manifests provide consistency and reproducibility, and can help you automate deploying…

Posted in PCF

PCF (Pivotal Cloud Foundry) App Manifest File

PDF In this example I am going to show you how to add images to PDF documents or files. you may need to add or include images into pdf files along with text information. There are a number of advantages while using pdf as a document for various purposes, such as: PDF format reports allows…

Posted in Python

Python Add Images To PDF Documents

JenkinsFile In this tutorial I am going to show you how to read YAML/YML config file in JenkinsFile. The JenkinsFIle is used for Jenkins pipeline which is used to perform many steps such as, building, testing, deploying a job through Jenkins. The yaml/yml config file can be a PCF manifest file or any other config…

Posted in Jenkins PCF

How To Read YAML File Into JenkinsFile

Introduction In this example I am going to show you how to color HTML table’s cells based on condition. The condition may be a value range, for example, HTML table cells (<td/>) have certain values and based on values you can choose background color of the cells. I am using pure JavaScript to iterate through…

Posted in CSS HTML JavaScript

HTML Table Conditional Cell Color

Introduction Here I am going to show you how to write Junit test for Spring Boot main class. A class having main method in Spring boot application is called main class and the purpose of this class is to deploy the application into embedded Tomcat server without configuring deployment descriptor or generating war file for…

Posted in Junit Spring Boot

How To Write Junit Test For Spring Boot Main Class

Problem While you are building a Jenkins pipeline job through Jenkins for the first time, you may encounter such error “failed to find any usable tags for the pipeline in pipelineMode“. This error may arise due to the fact that you have created the branch recently and there is no tag version yet released for…

Posted in Git Jenkins

Jenkins – failed to find any usable tags for the pipeline in mode

Introduction In this example, I am going to show you how to solve Josephus problem using Python. The Josephus’ Problem can be stated as follows: There was a group of 41 Jewish soldiers surrounded by Roman army, and they didn’t want to get caught. So, they sat down in a circle and came up with…

Posted in Python

Solving Josephus Problem Using Python

Introduction In this example I am going to generate Van Eck sequence using Python programming language. Van Eck sequence is not used strictly for research purpose and it is actually application based professional activity. Van Eck sequence can be illustrated as follows: You start with a number 0 at the first position. Not necessarily you…

Posted in Python

Van Eck Sequence Using Python

Introduction Here I am going to show you how to insert line break in excel cell data using Apache POI in Java language. There may be requirements where you need to write long text in a cell or in multiple cells of excel file, but the long text is not fit within the view port…

Posted in Excel Java

Apache POI Insert Line Break In Excel Cell Data

Introduction In this example I will show you how to convert entity class to DTO (Data Transfer Object) class and DTO class to entity class using MapStruct. So, MapStruct will map entity class to DTO class or vice versa. This example will test both from RESTful webservices and standalone main class. Spring Boot provides CommandLineRunner…

Posted in Spring Boot Spring JPA

Spring Boot Data JPA Entity DTO Mapping Using MapStruct

Introduction In this example I am going to show you how to use Spring’s MultiValueMap in REST API. This MultiValueMap is similar to the Jersey’s MultivaluedMap. A MultiValueMap<K, V> or MultivaluedMap<K, V> is a map of key-values pairs. Each key can have zero or more values, where K – the type of keys maintained by this map and V – the…

Posted in Spring Boot Spring REST

Spring Boot REST API MultiValueMap Example

Introduction Servlet filters are Java classes that are invoked at pre and post processing of requests. So filters are used to intercept requests from clients before they access requests at backend (server). to manipulate responses from server before they are sent back to the client RequestContextFilter is also a servlet filter that extends OncePerRequestFilter that…

Posted in Spring Boot

Spring Boot Filters Example