Skip to content

Instantly share code, notes, and snippets.

View sandeepnegi1996's full-sized avatar
🎯
Focusing

sandeep singh negi sandeepnegi1996

🎯
Focusing
  • www.hashcodehub.com
  • india
View GitHub Profile
```java
// optional examples
// in this case if masterGroup is null we will return the orElse part -> if it is not null we will return the actual object
// return masterGroupEntityModel.orElse(MasterGroupEntityModel.builder().id(5).build());
// this call will check the getName in mastrGroup and if getName is not null it will return name if it is null it will return HSBC
return masterGroupEntityModel.map(MasterGroupEntityModel::getName)
.orElse("HSBC");
```
@sandeepnegi1996
sandeepnegi1996 / logback-spring.xml
Created September 29, 2024 06:39
logback-spring.xml with spring boot
```
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="LOG_ROOT" value="logs" />
<property name="LOG_FILE_NAME" value="esgapi" />
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
### 1. Notepad Tricks
1. Block Selection -> Alt Shift Arrow key we can modify multiple lines at once this is same that we have in intellj
2. Dark Mode
1. Settings preferences and Dark mode
3. Align Lines
1. Text Fx -> Text Fx Edit -> Line up multiple lines by
4. Format a json -> for this we need plugin - JSTool -> JSFormat -> this will format the json
Simple java program to read from files using FileReader
- reading from a file using FileReader
```java
File file=null;
FileReader fileReader=null;
StringBuilder sb=new StringBuilder();
try {
file = new File("src/main/java/com/vksviit/patterns/factorydesignpattern/streaming/sample.txt");
package io.vertx.example;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class ExecutorExample {
public static void main(String[] args) {
System.out.println("Inside : " + Thread.currentThread().getName());
@sandeepnegi1996
sandeepnegi1996 / README-Template.md
Created October 15, 2019 17:27 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites