Test cases: Test cases Expected Result testOddEven(12) even OK testOddEven(3) odd OK testOddEven(-55) odd OK Java solution: package test; public class Program2 { public static void main(String[] args)...
Test cases: Test cases Expected Result sum(10,12) 22 OK sum(1,2) 3 OK sum(2147483647,1) 2147483648 OK Java solution: public class Sum { public static void main(String[] args) { Sum.sum(10, 12); Sum.sum(1...
Hey, guys in this, we will learn connecting the spring boot REST API that connects to the MongoDB database and we will perform the basic database operations like Create, Read, Update and Delete. Development steps Following are...
Hey guys, welcome to the javascript beginner project series. In this post, we will create a javascript project which changes the background color of the webpage on click of the button. This project is for absolute beginners, we...
Hey guys, in this post, we will be creating an end to end RESTful CRUD API with Node.js, Express, Mongoose, and MongoDB. Yes, we will use Mongoose for communicating with MongoDB. Express is a light-weight web application...
Hey guys, in this post, we will be creating an end to end RESTful CRUD API with Node.js, Express, Mongoose, and MongoDB. Yes, we will use Mongoose for communicating with MongoDB. Express is a light-weight web application...
Hey guys, in the previous post we discussed about reading the contents of Zip file without unzipping using ZipFile. In this post, we will discuss about reading the contents of .7z file without unzipping it. so let’s...
Hey guys in this post, we will discuss reading the contents of a zip file using ZipFile package in Java. ZipFile is a java.util.zip, it provides some really useful methods and constructor for reading the zip file. let’s...
Hey guys, in the previous post we discussed about updating the document with HTTP PATCH request. In this post, we will discuss about deleting document with HTTP DELETE request. let’s begin In order to delete the document...
Hey guys, in our previous post we discussed about retrieving the documents from mongodb using GET request. so in this post we will discuss that updating the document using PATCH request. let’s begin… To update the...
Hey guys, welcome back to my blog. In my previous post we discussed about saving the document to mongodb database using save() method. But there are 2 more methods available to for saving the documents which create() and...
Hey in this article, we will discuss how to make HTTP GET requests using NodeJS and Express. In the previous post, we discussed the HTTP POST request, where we saved the data to the database. So we will use the same example which...
Hey guys, recently I get a chance to explore Nodejs and Express, in my opinion, I think NodeJS and Express is a great option for building restful web services because its easy, fast and you don’t have to learn a new...
Hey in the previous post we discussed filtering expenses based on keyword, in this post, we will sort the expenses by expense name and amount. We will sort the expense name in ascending order and amount in descending order. So...
Hey in the previous post, we discussed deleting an expense, in this post let’s look at how to filter the expenses by keyword, meaning the user will enter the characters inside the textbox and we will filter the expenses...
Hey everyone, in the previous post we discussed updating the expense details, and in this post, we will discuss deleting an expense. we can delete expense from two different places, one is in the list expense page, where each...
Hey in the previous post we covered saving the expense details to the database, in this post we will cover updating the expense details. We will continue with the same example which we created in the previous post. Let’s...
Hey in this post, we will continue with the application which we created in our previous post. In this post, we will cover saving the expense record to the database. let’s begin… We will cover the following topics...
Hey in this post we will quickly create spring boot and angular 9 application and create rest endpoint to retrieve the list of records. We will also make HTTP GET requests from the angular application to the rest endpoint which...
Hey in this post, we will develop a full-stack web application using Angular 9 and Spring boot. We will connect this application to the MySQL database and perform the basic database operations like Create, Read, Update, and...
Hello, in this post we will display the list of expenses in the JSP view template. Let’s begin. First, we need to add the dependency for the JSTL tag library in...
Hello, in this post we will call the expense service method to get the list of expenses and print it in the console. let’s begin. Inside the MasterController modify the handler method...
Hello, in this post we will create Service and Repository for Expense. Let’s begin. First, create an ExpenseRepository under src/main/java/in/bushansirgur/expenseyoutube/repository...
Hello, in this post we will create an entity class for Expense. let’s begin. Create a class Expense under src/main/java/in/bushansirgur/expenseyoutube/model package We will use Lombok annotations @Setter, @Getter to...
In this post, we will configure the JSP view template in the Spring boot application. let’s begin. First, we need to add a dependency in pom.xml in order to use the JSP as a view template in Spring boot...
Hello in this post, we will set up the MySQL database and we configure the data source in the spring boot project. let’s begin. Create a MySQL database, CREATE DATABASE ecom; Execute the query to create the expense...
Hi in this post, we will create a Spring boot project using spring initializer Add the following dependencies to the pom.xml pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns=""...
Print matrix in Z form. Input: mat[][] = {1, 2, 3, 4, 5, 6, 7, 8, 9} Output: 1 2 3 5 7 8 9 public class PrintTheMatrixOrder { public static void printTheMatrix(int mat[][]) { for (int i = 0; i < mat.length; i++)...
Print all jumping numbers smaller than or equal to x. Input: x = 105 Output: 0 1 2 3 4 5 6 7 8 9 10 12 21 23 32 34 43 45 54 56 65 67 76 78 87 89 98 101 Note: A number is called as a jumping number if all adjacent digits in it...
Find if there is a rectangle in binary matrix with corners as 1. Input: mat[][] = {{1, 0, 0, 1, 0}, {0, 0, 1, 0, 1}, {0, 0, 0, 1, 0}, {1, 0, 1, 0, 1}} Output: YES Note: as there exists – 1 0 1 ...