- apt update
- apt-get update
- apt upgrade
- apt-get upgrade
- apt-get install unzip zip bash apt-transport-https ca-certificates nano curl gnupg-agent software-properties-common gcc g++ make htop git
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
import com.fasterxml.jackson.databind.DeserializationFeature | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import com.fasterxml.jackson.module.kotlin.readValue | |
import org.junit.jupiter.api.Assertions.* | |
import org.junit.jupiter.api.BeforeAll | |
import org.junit.jupiter.api.Disabled | |
import org.junit.jupiter.api.Test | |
import org.junit.jupiter.api.TestInstance | |
import org.junit.jupiter.api.extension.ExtendWith |
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
package com.javarush.task.task31.task3102; | |
import java.io.File; | |
import java.io.IOException; | |
import java.nio.file.*; | |
import java.nio.file.attribute.BasicFileAttributes; | |
import java.util.*; | |
/* | |
Находим все файлы |
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
import lombok.EqualsAndHashCode; | |
import lombok.Getter; | |
import lombok.NoArgsConstructor; | |
import lombok.Setter; | |
import lombok.ToString; | |
import javax.validation.constraints.NotNull; | |
import javax.validation.constraints.Pattern; | |
@NoArgsConstructor |
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
import java.util.List; | |
import java.util.UUID; | |
public interface AbstractMapper<T, R> { | |
R map(T source); | |
List<R> map(List<T> sourceList); | |
default UUID stringToUUID(String string) { |
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
@Data | |
@Validated | |
@ConfigurationProperties("registration.kafka") | |
public class KafkaProperties { | |
@NotEmpty(message = "Parameter 'bootstrap-servers' can not be empty") | |
private String bootstrapServers; | |
@NestedConfigurationProperty | |
@NotNull(message = "Parameter 'some-activate' can not be null") |
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
version: "3.7" | |
# docker-compose up --d --build --force-recreate redis | |
services: | |
redis: | |
image: redis:alpine | |
container_name: redis | |
hostname: redis | |
command: redis-server --requirepass 123456 | |
restart: unless-stopped |
select h.id as hacker_id, name, sum(m_score) as total_score from(
select h.id, h.name, nvl(max(s.score),0) m_score from hackers h
left join submissions s on
s.hacker_id=h.id
group by h.id, s.challenge_id
)
where m_score > 0
order by total_score desc, name asc;
Windows
- zookeeper-server-start.bat config/zookeeper.properties
- kafka-server-start.bat config/server.properties
kafka-topics.bat --bootstrap-server localhost:9092 --topic first --create --partitions 6 --replication-factor 1
kafka-topics.bat --bootstrap-server localhost:9092 --list
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
import org.junit.jupiter.api.Test; | |
import org.junit.jupiter.api.TestInstance; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; | |
import static org.junit.jupiter.api.Assertions.assertEquals; | |
// Написать функцию, которая получает на вход массив и искомое число и возвращает 2 элемента в массиве, которые в сумме дадут это число (за n^2 решать не надо). |
NewerOlder