# consumer URL, should be in one line, for readability added new lines
kafka.url=kafka://
${kafka.topic}
?
brokers=${kafka.broker}&
&groupId=${kafka.groupId}
serializerClass=org.apache.kafka.common.serialization.StringSerializer&
keySerializerClass=org.apache.kafka.common.serialization.StringSerializer&
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in testing module | |
package com.example.demo; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.test.context.SpringBootTest; | |
import org.springframework.kafka.core.KafkaTemplate; | |
import org.springframework.kafka.test.EmbeddedKafkaBroker; | |
import org.springframework.kafka.test.context.EmbeddedKafka; |
/**
ABC
x AA
------
AACC
/*
for (int i = 1; i <= 9; i++) {
Get builds from here: https://builds.shipilev.net/
if it is not found for your platform, you can build it from source:
Download source code from here
follow steps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install zsh; | |
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"; | |
cd $ZSH/custom/plugins; | |
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git && git clone https://github.com/zsh-users/zsh-autosuggestions && git clone https://github.com/zsh-users/zsh-completions; | |
# from now on your default shell is zsh, customize by editing ~/.zshrc file | |
brew tap homebrew/cask-fonts; | |
brew install --cask font-hack-nerd-font; | |
brew install coreutils | |
cd ~/Desktop; |
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import com.google.gson.reflect.TypeToken;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZigZag-Encoding | |
--------------- | |
Maps negative values to positive values while going back and | |
forth (0 = 0, -1 = 1, 1 = 2, -2 = 3, 2 = 4, -3 = 5, 3 = 6 ...) | |
(i >> bitlength-1) ^ (i << 1) | |
with "i" being the number to be encoded, "^" being | |
XOR-operation and ">>" would be arithemtic shifting-operation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PascalTriangle { | |
// Ref: https://leetcode.com/submissions/detail/293484403/ | |
// if you do not see "hello" as output in console, it means 2311 is prime number: | |
// Ref: https://www.youtube.com/watch?v=D7AHbyAlgIA&list=PL5KkMZvBpo5CdoOxa3dqll2n6KsXqerYO&index=11 | |
// https://en.wikipedia.org/wiki/AKS_primality_test | |
public static void main(String[] args) throws Exception { | |
List<BigInteger> generate = generate(2311); | |
System.out.println(generate); | |
for (int i = 0; i < generate.size(); i++) { |
resilience4j.circuitbreaker.metrics.enabled=true
resilience4j.circuitbreaker.metrics.legacy.enabled=true
# following properties can be added for individual circuit breakers (CB-name is one of the circuit breaker, replace it)
resilience4j.circuitbreaker.instances.<CB-name>.sliding-window-type=TIME_BASED
resilience4j.circuitbreaker.instances.<CB-name>.sliding-window-size=100
resilience4j.circuitbreaker.instances.<CB-name>.minimum-number-of-calls=100
resilience4j.circuitbreaker.instances.<CB-name>.failure-rate-threshold=10
OlderNewer