Posts

Showing posts from March, 2022

UNIX Startup Script

Image
Have you seen some scenario when the server on which your application is hosted shut down due to any reason, be it Power Outage where the server exists or as per schedule. If it is as per schedule then definitely you would have planned to start the hosted applications. What if, the server shutdowns without your knowledge and the Server maintenance technicians start them up without having knowledge of starting your application residing in it? Here we go with the Startup Script that can help you do anything you want to start along with making the server live. You would also get the term Bootstrap or Bootstraping scripts for scripts that run on booting the machine. Prepare Bootstrap Script  Let's first prepare a script that you want to run: # !/bin/sh echo "Vishesh : $(date)" > /etc/motd This piece of code sets the message of the day to be the last reboot time so that each user can see it after their first login. This command sets the date of server getting started when

Next-Generation PON

Image
  Next-Generation PON: Eliminating physical constraints from the access network  ABSTRACT  In response to the voracious consumer demand for bandwidth, two new next-generation passive optical network (PON) technologies have been standardized and are ready for deployment: XGS-PON and NG-PON2. Like previous PON technologies, both transmit data through fiber-optic cables, offering very high-capacity connections to multiple subscribers. Intentionally designed to use different wavelengths than GPON, XGS-PON, and NG-PON2 can co-exist on the same fiber, allowing for the re-use of many portions of the optical distribution network (ODN). XGS-PON is the most recent standard (ITU G.9807.1) and can deliver up to 10 Gbps of symmetrical bandwidth. NG-PON2 (ITU-T G.989) utilizes multiple wavelengths and can deliver 40 Gbps — with 80 Gbps possible in the future — on a single fiber. "As we look toward 2020, one thing is clear: bandwidth demands will grow at a faster pace than ever before" MEET

Spring Boot Export Data to Excel Example

Image
  Exporting data to Excel documents is a common feature of almost any applications. Through this article, I’m very glad to share with you guys my experience in implementing Excel export function in a Spring Boot application with the help of Apache POI Excel library. Suppose that we have an existing Spring Boot project using Spring Data JPA and Hibernate to access data, Thymeleaf to render the view and MySQL as the database. The code examples below demonstrate how to retrieve information about users from the database, and generate an Excel file which the users can download onto their computers.   1. Code of Entity Classes and Repositories Interfaces We have the  User   entity class that maps to the  users  table in the database, as shown below: And the  Role   entity class that maps to the  roles  table in the database: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 package com.vishesh ;   import javax.persistence.*;   @Entity @Table (name =  "roles" ) public class Role {