Posts

Featured Post

Personal Expense Management Application using Ionic 4

Image
Hello Viewers, In this tutorial, we are going to see Personal Expense Management Application using Ionic 4, where the database will be SQLite. Let's start with this project. Install node.js in your system Go to link -  https://nodejs.org/en/  and install the latest version of ndoe.js After installing,    Check npm is working properly using the Command Prompt -    C:\Users\admin> npm -version    6.10.2 Install Ionic in your system Open Command Prompt and run below command.   npm install -g ionic Run below command before going ahead.   ionic start sqlliteApp sidemenu   cd sqlliteApp   ionic g service services/database   ionic g page pages/credit   npm install @ionic-native/sqlite @ionic-native/sqlite-porter   ionic cordova plugin add cordova-sqlite-storage   ionic cordova plugin add uk.co.workingedge.cordova.plugin.sqliteporter You need a SQL script file to create a database and table. Open your application in file explorer and create inputCr

How to read XLS and XLSX Excel files in Java

Image
Sometimes we get requirements like to load XLS or XLSX files in Java Project. Where need to convert each column and row values in Java Objects using POJO class. To make this project we need a POJO class of columns present in the CSV file. In this tutorial, we are going to use the Customer details XLS and XLSX file as below. Here we have a Customer ID, Name, City, Pincode, and State Code. We may have more than that data and might be there are multiple fields that are blank. So ID-103 having Customer Name - Geetha having blank City name, same with others as well for other fields. We are going to handle these scenarios as well using the try-catch block. In the beginning, we need to add some dependencies in pom.xml for XLS and XLSX files. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&q

How to Read CSV File in Java

Image
Sometimes we get requirements like to load CSV files in Java Project. Where need to convert each column and row values in Java Objects using POJO class. The CSV stands for Comma-Separated Values, this is a very simple file where each element are separated by comma(,). CSV can be directly open in any text editor or in Microsoft Excel. To make this project we need a POJO class of columns present in the CSV file. In this tutorial, we are going to use the Customer details CSV file as below. Here we have a Customer ID, Name, City, Pincode, and State Code. We may have more than that data and might be there are multiple fields that are blank. So ID-103 having Customer Name - Geetha having blank City name, same with others as well for other fields. We are going to handle these scenarios as well using the try-catch block. In the beginning, we will create a Customer Pojo class as below. File Location: src/com/slash/code/ Customer.java package com.slash.code; public

Spring Boot MVC Application - UI

Image
Here we are going to see UI part of the CRUD Project. In every project, we have the main header and footer file so that every time our header and footer will be the same, We will only change the middle part as per user performed operation. As we are going to use the Bootstrap file for UI design, You need to add bootstrap.min.css file from their official link. SpringMVCProject/src/main/webapp/views/ header.jsp <%@ taglib prefix = "c" uri = "http://java.sun.com/jsp/jstl/core" %> <%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <link rel="stylesheet" href="views/styles/bootstrap.min.css"> <title>Employee Management System</title> </head> <body> <nav class="navbar navbar-expand-lg navbar-dark bg-primary"> <a class="navbar-brand"

Spring Boot MVC Application

Image
We can do multiple things in Spring Boot, here we are going to make CRUD application using Spring. To start with this project we need to have Spring Boot in our system. We can use spring io ( https://start.spring.io/ ) or directly use Spring Boot to create a project. Tools used: - Spring Boot - Maven Dependencies - Oracle / MySql as Database - Bootstrap as frontend We are going to use the MVC approach to make this CRUD Application. Project Structure as below: Now create a new project in Spring Boot. Step 1: Create a Spring Strater Project. Step 2: Add Project Name, Artifact, Version. Here you can change the version and packing of the project. Step 3: Add Maven dependencies - Select Spring Web Click on the finish. It will take some time to update the project and set up a blank project for you. Now we come to our project part to add some maven dependencies in pom.xml file. <?xml version="1.0" encoding="UTF-8"

Registration of new user in CodeIgniter 3 PHP Framework

Image
In this Part, we will see the Registration of new users. For Registration of new users, We need a Registration page where users can enter details and get registered. Registration page UI looks. Before going ahead we need to add a link on the login page where whenever the user clicks, it will redirect to the Registration page. Create a link for registration as below on the login page. <p>Don't have an account? <a href="<?php echo base_url('index.php/users/registration'); ?>">Register</a></p> On click this link it will call the "registration" function of the "users" controller. So we need to define registration function in users controller as below. Update Code in the controller file: CRUDProject\application\controllers\ Users.php In the registration function, we have added code-Igniter form level validations. - For email, we are validating if the entered email is a valid email and at t

User Login and Logout with the session

Image
Now we are going to do the Login and Logout session part for this Project. Login Page: We will go one by one in each file and update some Code-Igniter files. So I am considering my Project directory name is "CRUD Project". Open file : CRUDProject\application\config\autoload.php $autoload['libraries'] = array('database','session'); $autoload['helper'] = array('url'); Open file : CRUDProject\application\config\config.php - configure base url of the project $config['base_url'] = 'http://localhost:8089/CRUDProject/'; Open file : CRUDProject\application\config\database.php - Here you need to provide your database related credentials. $db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'root', 'password' => '', 'database' => 'crudsession', 'dbdriv