sh bin/zookeeper-server-start.sh config/zookeeper.properties
sh bin/kafka-server-start.sh config/server.properties
| # DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties) | |
| #spring.datasource.driverClassName=com.mysql.jdbc.Driver | |
| #spring.datasource.url=jdbc:mysql://localhost/test | |
| #spring.datasource.driverClassName=org.h2.Driver | |
| #spring.datasource.url=jdbc:mysql://localhost:3306/test | |
| #spring.datasource.username=user | |
| #spring.datasource.password=user | |
| #spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect | |
| #spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect |
| spring: | |
| datasource: | |
| url: jdbc:h2:mem:testdb | |
| h2: | |
| console: | |
| enabled: true |
| package edu.miu.annapurnabe; | |
| import edu.miu.annapurnabe.dto.response.MealResponseDetailDTO; | |
| import java.time.LocalDate; | |
| import java.time.format.DateTimeFormatter; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.function.Function; |
| /** | |
| * * An array is defined to be odd-heavy if it contains at least one odd element and every odd | |
| * * element is greater than every even element. So {11, 4, 9, 2, 8} is odd-heavy because the two odd elements (11 and 9) | |
| * * are greater than all the even elements. | |
| * * | |
| * * And {11, 4, 9, 2, 3, 10} is not odd-heavy because the even element | |
| * * 10 is greater than the odd element 9. Write a function called isOddHeavy that accepts an integer array and | |
| * * returns 1 if the array is odd-heavy; otherwise it returns 0. | |
| * * | |
| * * Some other examples: {1} is odd-heavy, {2} is not |
| /** | |
| * | |
| * Print numbered Flag | |
| * 1 | |
| * 2 3 | |
| * 4 5 6 | |
| * 7 8 9 10 | |
| * 11 12 13 14 15 | |
| * | |
| */ |
| /** | |
| * * Print a numbered flag | |
| * * 1 | |
| * * 12 | |
| * * 123 | |
| * * 1234 | |
| * * 12345 | |
| */ | |
| package com.basic.practice; |
| /** | |
| * * Write a function sumIsPower with signature boolean sumIsPower(int[] arr) | |
| * * which outputs true if the sum of the elements in the input array arr is a power of 2, false otherwise. | |
| * * | |
| * * Recall that the powers of 2 are 1, 2, 4, 8, 16, and so on. | |
| * * In general a number is a power of 2 if and only if it is of the form 2^n for some non-negative integer n. | |
| * * | |
| * * You may assume (without verifying in your code) that all elements in the array | |
| * * are positive integers. | |
| * * |
| /** | |
| * | |
| * Print Nepal Flag in your console. | |
| */ | |
| package com.basic.practice; | |
| public class NepalFlag { | |
| public static void main(String[] args) { | |
| printFlag(); |