Skip to content

Instantly share code, notes, and snippets.

View bijay-shrestha's full-sized avatar
👨‍🎓
MSCS Compro

Bijay Shrestha bijay-shrestha

👨‍🎓
MSCS Compro
  • Bank of America
  • SF, CA
View GitHub Profile
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
 
@bijay-shrestha
bijay-shrestha / Minio.md
Last active February 16, 2020 07:15
Minio Server Setup configuration

Change Root Password

$ sudo -i passwd

Login as root

$ su -
@bijay-shrestha
bijay-shrestha / ServerSideIntegration.md
Last active May 27, 2020 10:13
Gist for Server side Integration
  1. Send integrationChannelId (eg. Backend channel, Frontend Channel) in Appointment Check-In datatable response.
  2. Create client-integration-connector module. (Middleware) 2.1-> because, if some changes needs to be reflected in bheri integrated apis .. only reflect change in bheri-integraiton-connector and not the entire application.
  3. For, integrationChannelId of Backend Channel for a provided 'client_id & feature_code', call it's corresponding integration module's service. 3.1 -> Perhaps a switch case.
  4. i.e., Call check-in service of bheri hospital
  5. Create a QueryCreator class in query package of client-integratoin-connector.
  6. Create a query to construct a requestBody as expected by Client's API and set the values in ClientCheckInRequestDTO. 6.1 -> Also, add hospitalNumber in the REQUEST DTO.
@bijay-shrestha
bijay-shrestha / Solution.java
Last active May 16, 2021 16:13
Question: Finding the Next Perfect Square with Vanilla Java
package com.maharshi.practice;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import java.util.Scanner;
@bijay-shrestha
bijay-shrestha / NUpCountProblem.java
Created May 17, 2021 15:15
Question: Find the n-upcount foa a given array.
package com.hawa;
import lombok.extern.slf4j.Slf4j;
@Slf4j
/**
* Define the n-upcount of an array to be the number of times the partial sum goes from less
* than or equal to 'n' to greater than 'n' during the calculation of the sum of the elements of the array.
*/
public class NUpCountProblem {
package com.hawa.practice;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class IsCentered15 {
public static void main(String[] args) {
int[] arrayOfNumbers = {3, 4, 2, 10, 4, 1, 6, 9, 1};
// int [] arrayOfNumbers = {1, 1, 15, -1, -1};
// int [] arrayOfNumbers = {5, 5, 5};
@bijay-shrestha
bijay-shrestha / NUnique.java
Created May 21, 2021 13:56
Find NUnique in the given array
package com.hawa.practice;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class NUnique {
public static void main(String[] args) {
int[] arrayOfNumbers = {2, 1, 3, 4};
int nUniqueNumber = 5;
@bijay-shrestha
bijay-shrestha / IsSquare.java
Last active May 21, 2021 14:06
Check if the given number is a square of an integer
package com.hawa.practice;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class IsSquare {
public static void main(String[] args) {
int number = 0;
log.info("Checking if {} has a square. Result: {}", number, isSquare(number));
}
@bijay-shrestha
bijay-shrestha / MinMaxDisjoint.java
Created May 22, 2021 09:51
Minmax Disjoint array has criterias and only if it fulfills those criterias they are minmax disjoint array.
package com.hawa.practice;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class MinMaxDisjoint {
public static void main(String[] args) {
// int[] arrayOfNumbers = {5, 4, 3, 2, 1};
int[] arrayOfNumbers = {18, -1, 3, 4, 0};
@bijay-shrestha
bijay-shrestha / VanillaArray.java
Created May 22, 2021 10:50
An array is called vanilla if all its elements are made up of the same digit.
package com.hawa.practice;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class VanillaArray {
public static void main(String[] args) {
// int[] arrayOfNumbers = {1};
// int[] arrayOfNumbers = {11, 22, 13, 34, 125};