전체 글
-
[프로그래머스] 2021 KAKAO BLIND RECRUITMENT - 카드 짝 맞추 기 - 자바(JAVA)알고리즘/프로그래머스 2022. 7. 23. 00:01
https://programmers.co.kr/learn/courses/30/lessons/72415 코딩테스트 연습 - 카드 짝 맞추기 [[1,0,0,3],[2,0,0,0],[0,0,0,2],[3,0,1,0]] 1 0 14 [[3,0,0,2],[0,0,1,0],[0,1,0,0],[2,0,0,3]] 0 1 16 programmers.co.kr 문제 해석 4 x 4 크기의 격자 형태의 화면에 카드 16장이 뒷면으로 존재합니다. 16장의 카드는 8가지 캐릭터 그림이 무작위로 2장씩 존재합니다. 게임에서 카드를 선택하는 방법은 다음과 같습니다 방향키(상하좌우)로 이동하며 1칸씩 이동합니다. 이때 Ctrl 키를 누른 상태에서 방향키를 누르면 가장 가까운 카드로 한 번에 이동합니다. 이때 만약 해당 방향에 카드가..
-
Docker 설치해보기 + Docker에 Jenkins 설치(윈도우10 Home Edition)MSA & 쿠버네티스(Kubernetes) - k8s 2022. 7. 22. 21:35
도커란? 도커에 대해 잘 모르신다면 다음 글을 보고 오시면 좋습니다. https://junuuu.tistory.com/331?category=994008 도커란? +(도커 이미지란?) 도커란? 컨테이너 기반의 오픈소스 가상화 플랫폼입니다. 컨테이너와 가상 머신의 가장 큰 차이는 OS를 공유하느냐 하지 않느냐의 차이입니다. 컨테이너는 OS를 공유하기 때문에 가상 머신보다 junuuu.tistory.com WSL2 설치 및 활성화 방법 "나는 Docker를 설치하려고하는데 무슨.. WSL2?" 라고 생각할 수 있습니다. Docker는 리눅스를 기반으로 하기 때문에 리눅스 운영체제 위에서 돌아가야 합니다. Linux 계열 이외의 운영체제에서 도커를 사용하기 위해서는 다른 툴을 이용해야 합니다. 윈도우는 이전부..
-
ICMP 프로토콜이란?CS/네트워크 2022. 7. 22. 00:01
ICMP 프로토콜이란? ICMP는 Internet Control Message Protocol (인터넷 제어 메시지 프로토콜)입니다. 네트워크 컴퓨터 위에서 돌아가는 운영체제에서 오류 메시지를 전송받는데 주로 쓰입니다. 프로토콜 구조의 Type과 Code를 통해 오류 메시지를 전송받습니다. 보통 상대방과 통신이 되는지 안되는지 확인하는 데 사용됩니다. 통신 환경의 문제점에 대한 피드백을 제공하지만 IP가 신뢰 가능하도록 만들지는 않습니다. 네트워크 계층인 3 계층에 속하며 IP 프로토콜과 같이 사용됩니다. ICMP 프로토콜의 구조 Type 대분류의 개념으로 30개의 종류가 있습니다. 가장 많이 쓰이는 타입은 다음과 같습니다. 0번 : Echo Reply (응답) 3번 : Destinatnion Unrea..
-
스프링 부트 + Mysql 도커로 띄우기프로젝트/WebRTC 화상통화 프로젝트 2022. 7. 21. 11:20
(1) Window에서 도커로 MySQL + SpringBoot 띄우기 (2) Ubuntu에서 Spring,MySQL, Redis Docker Compose로 배포하기 (3) Jenkins로 Gitlab CI/CD 구축하기(Spring + MySQL + JenKins + Redis + Nginx) 개요 Spring Boot App과 Mysql을 띄워서 관리하고 싶은 상황입니다. 도커를 활용하여 작업을 수행해보려고 합니다. 도커 설치 윈도우에 도커 설치 springboot 설정 파일 예시 spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://db-mysql:3306/mydb?useSSL=false username:..
-
[백준] 2015번 : 수들의 합4 - 자바(JAVA)알고리즘/백준 2022. 7. 21. 00:01
https://www.acmicpc.net/problem/2015 2015번: 수들의 합 4 첫째 줄에 정수 N과 K가 주어진다. (1 ≤ N ≤ 200,000, |K| ≤ 2,000,000,000) N과 K 사이에는 빈칸이 하나 있다. 둘째 줄에는 배열 A를 이루는 N개의 정수가 빈 칸을 사이에 두고 A[1], A[2], ..., A[N]의 순서로 www.acmicpc.net 문제 해석 A [1], A [2],..... A [N]의 N개의 정수가 저장되어 있는 배열이 있습니다. 이 배열 A의 부분합이란 1
-
Spring Rest Docs 적용하기프로젝트/WebRTC 화상통화 프로젝트 2022. 7. 21. 00:01
개요 프런트엔드와 원활하게 소통하기 위해 API 명세서를 만드려고 합니다. 이때 코드를 기반으로 API 명세서를 만들어주는 Swagger와 Spring RestDocs가 있습니다. 이 둘에 대해 비교해보고 RestDocs를 선택하게 되었습니다. https://junuuu.tistory.com/318 API 문서화를 위한 Swagger와 Spring Rest Docs 비교 Swagger란? API 문서를 자동으로 만들어주는 라이브러리입니다. REST API를 편리하게 문서화해주고, 이를 통해 편리하게 API를 호출해보고 테스트할 수 있는 프로젝트입니다. 이를 활용하여 협업하는 junuuu.tistory.com 컨트롤러에 작성한 MockMvc 단위 테스트로 Spring Rest Docs를 만드는 법을 알아보..
-
Spring Security Oauth2.0 로그인 단위테스트프로젝트/WebRTC 화상통화 프로젝트 2022. 7. 20. 01:17
(1) OAuth2.0이란? (2) Spring Security와 OAuth 2.0으로 로그인 구현하기(SpringBoot + React) (3) Spring Security OAuth 2.0 단위테스트 (4) Spring Security가 OAuth 로그인을 처리하는 방법 개요 이전에 Spring Security를 활용하여 OAuth2.0으로 구글, 네이버, 카카오 로그인을 구현하였습니다. https://junuuu.tistory.com/415?category=1014988 Spring Security와 Oauth 2.0으로 로그인 구현하기 이해하는데 도움이 되는 개념 - Spring Boot - Oauth 2.0 - 인증 인가 - JPA 지식 다음과 같은 내용을 다루고 있습니다. - Spring Se..
-
[백준] 2448번 : 별 찍기 - 11 - 자바(JAVA)알고리즘/백준 2022. 7. 20. 00:01
https://www.acmicpc.net/problem/2448 2448번: 별 찍기 - 11 첫째 줄에 N이 주어진다. N은 항상 3×2k 수이다. (3, 6, 12, 24, 48, ...) (0 ≤ k ≤ 10, k는 정수) www.acmicpc.net 문제 해석 주어진 규칙에 따라 별을 찍는 문제입니다. 첫 번째 줄부터 N번째 줄까지 별을 출력합니다 다음은 N = 24일 때 예시입니다. 삼각형 모양이며 중앙에는 역삼각형으로 비어있습니다. 문제 풀이 전 설계 유의미한 규칙을 찾아보려고 합니다. 공백을 기준으로 마지막 줄에는 공백이 0개 N-1번째 줄에는 공백기 1개 N-2번째 줄에는 공백기 2개 .... 두번째줄에는 공백이 N-2개 첫 번째 줄에는 공백이 N-1개 삼각형을 기준으로 전체 삼각형에서 ..