Skip to main content

Posts

Showing posts from August, 2022

Integrate GitHub Repository to Jenkins Project | Jenkins Pipeline using Jenkinsfile

Creating Jenkins Pipeline with Jenkinsfile on Git SCM (Source Code Management)  In this tutorial we will see how we can create and build Jenkins pipeline with Git SCM. We will use Jenkinsfile for build our pipeline. Learn how we can create our first Jenkins Pipeline : Create first Jenkins Pipeline | Hello World in Jenkins Pipeline Lets follow below given steps and you have your Jenkins pipeline with Git SCM. Step 1 : Download Git  Git Download   Step 2 : Add git.exe file location in Jenkins Git Section Click on Manage Jenkins on Dashboard page Click on Global Tool Configuration  Go to Git section and enter your git.exe path into Path to Git executable textbox Save above configuration. Step 3 : Create new Jenkins Pipeline  Click on New Item, You will redirect to bellowed page. Select Pipeline and enter name of your pipeline. Click on Ok button to create your Pipeline. Step 4 : Select Pipeline Script form SCM In Pipeline drop-down, we will have following selection. Pipeline script Pipeli

Create first Jenkins Pipeline | Hello World in Jenkins Pipeline

Jenkins Declarative Pipeline with Example | Step by Step process for creating Jenkins Pipeline Jenkins is a powerful application that allows continuous integration and continuous delivery of projects. Jenkins is open source and can handle any kind of build or continuous integration. In this tutorial, we will see how we can create our first Jenkins Pipeline with single and multiple. Let's follow step by step and you have your first Jenkins Pipeline project. Jenkins Pipeline with Single Stage Step 1 : Create new Item Select + New Item button on Jenkins dashboard Step 2 : Select Pipeline Project and Name Select Pipeline from given listed projects and enter any name you want to give your first pipeline project. After click on OK you will land on configure page of our pipeline.  Step 3 : Creating Pipeline Script Here in Definition drop down select Pipeline script. You will get another drop down at right side in Script section, select Hello World from that and It will automatically gener

How to Create Nested ArrayList in Java | 2D ArrayList - BlogonCode

Multi-Dimensional ArrayList in Java | Creating and Store Elements in Nested ArrayList In Java, ArrayList is Class of Java Collections framework that stores elements with resizable arrays. ArrayList is also called Dynamic Arrays. Often times, We need to store data in dynamic array rather than static array. So in this tutorial we will seen how we can create, store and print nested or two dimensional arraylist elements. We will seen two approach for storing nested elements in ArrayList. Creating Nested ArrayList with Static Elements Creating Nested ArrayList with Dynamic Elements using Scanner Class Learn more about ArrayList class : ArrayList Class in Java   Example 1 : Nested ArrayList with Static Elements import java.util.ArrayList; import java.util.List; public class NestedArrayList {     public static void main(String[] args) {                 List<ArrayList<Integer>> outerList = new ArrayList<>();         ArrayList<Integer> al1 = new ArrayList<Integer>(

Flipping the Matrix HackerRank Solution in Java with Explanation

Java Solution for Flipping the Matrix | Find Highest Sum of Upper-Left Quadrant of Matrix Problem Description : Sean invented a game involving a 2n * 2n matrix where each cell of the matrix contains an integer. He can reverse any of its rows or columns any number of times. The goal of the game is to maximize the sum of the elements in the n *n submatrix located in the upper-left quadrant of the matrix. Given the initial configurations for q matrices, help Sean reverse the rows and columns of each matrix in the best possible way so that the sum of the elements in the matrix's upper-left quadrant is maximal.  Input : matrix = [[1, 2], [3, 4]] Output : 4 Input : matrix = [[112, 42, 83, 119], [56, 125, 56, 49], [15, 78, 101, 43], [62, 98, 114, 108]] Output : 119 + 114 + 56 + 125 = 414 Full Problem Description : Flipping the Matrix Problem Description   Here we can find solution using following pattern, So simply we have to find Max of same number of box like (1,1,1,1). And last