본문 바로가기

IT

(85)
Spring security guide spring 에서 요구되는 로그인 보안 관련 정리 사이트 http://terasolunaorg.github.io/guideline/5.4.1.RELEASE/en/Security/SecureLoginDemo.html
Spring boot aws rds 로컬 연동 에러 AWS RDS 와 spirng boot 연동시 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'amazonRDS' 에러가 발생하는 경우가 있다. 찾아보니 로컬 환경에서는 region 값을 직접 설정해 줘야 한다.default로 cloud.aws.region.auto=true설정이지만 이는 실제 ec2 컨테이너에 배포된 환경에서만 정상 작동하는 것같다. 그래서 아래와 같이 application.properties 파일안에 리전 정보를 정적으로 삽입해 주었다. cloud.aws.region.static=ap-northeast-2 리전 표는 https://docs.aws.amazon.com/ko_kr/..
아이폰 XR, XS, XS MAX UDID 확인방법 Xcode에서 내 휴대폰을 연결 시킨 상태에서 상단 메뉴바 를 통해 window->devices and simulators 를 클릭하면 아래와 같은 화면이 나옴 identifier 에 나와있는 것이 udid가 된다.
백준 11723 집합 문제 링크 : https://www.acmicpc.net/problem/11723언어 : python3 import sys resultSet = 0 executeCount = sys.stdin.readline() for i in range(0, int(executeCount)): operatorStr = sys.stdin.readline() executeOperator = operatorStr.split(" ")[0] executeNumber = 0 if executeOperator != "all\n" and executeOperator != "empty\n": executeNumber = int(operatorStr.split(" ")[1]) - 1 if executeOperator == "add": ..
java8 병렬 스트림 효율적으로 사용하는 방법 1. 병렬 스트림이란 ?병렬 스트림이란 스트림에 각 요소를 청크(Chunk)로 분할한 스트림이다.따라서 병렬 스트림을 이용해 멀티코어 프로세스가 각각의 청크를 처리하도록 할당할 수 있다. 1.1 병렬 스트림 속도차이 확인하기 1.1.1 첫번째 시도 무한스트림 생성이 가능하다는 성질을 이용하여숫자 n 개를 받아 1부터 n 까지의 모든 숫자를 합계로 반환하는 메서드를 구현해보자 일반 스트림 연산 public static long sequentialSum(long n) { return Stream.iterate(1L, i -> i + 1).limit(n).reduce(0L, Long::sum); } 전통적인 자바 반복문을 통한 연산 public static long iterativeSum(long n) { l..
ES5 - Airbnb JavaScript 스타일 가이드 한국어 번역본 출처 : https://moonspam.github.io/ES5-Airbnb-JavaScript-Style-Guide-Korean/ 자바스크립트 스타일 가이드입니다
Java Stream & Reduce VS mapToInt Performance 비교 List numList = new ArrayList(); for(int i=0; i i).reduce(0, Integer::sum); long end1 = System.currentTimeMillis(); long start2= System.currentTimeMillis(); numList.stream().mapToInt(i -> i).sum(); long end2 = System.currentTimeMillis(); System.out.println("first : " + (end1 - start1)); System.out.println("second : " + (end2 - start2)); 결과first : 1489second : 40 이렇게 많은 시간이 차이나는 이유는 reduce 연산중 내부에..
JAVA 8 스트림 연산자 정리 1. 스트림 연산과정에 필요한 3가지1) 질의 대상이 되는 소스(컬렉션)2) 파이프 라인에 해당하는 중간 연산자3) 파이프 라인을 종료하고 결과를 출력하는 최종 연산자 중간 연산자 연산 반환값 연산 인수 함수 디스크립터 filterStream PredicateT -> boolean mapStreamFunction T -> R limitStream sorted StreamComparator (T, T) -> int distinct Stream 최종 연산자 연산 비고 forEach스트림에 각 요소를 람다를 통해 특정 작업을 실행한다. count스트림의 요소 개수를 반환한다. (long) collect 스트림을 컬렉션 형태로 반환한다.
Wilson's Algorithm 미로 만들기 MazePrinter.java import java.util.ArrayList; import java.util.List; import java.util.Random; public class MazePrinter { private Cell[][] cells; private int cellsRowCount; private int cellsColCount; private int totalBlankCount; public MazePrinter() { cells = new Cell[25 + 2][25 + 2]; initCells(); } public MazePrinter(int row, int col) { cells = new Cell[row + 2][col + 2]; initCells(); } public vo..
sqldeveloper 자동정렬 sqldeveloper 에서 자동정렬은Ctrl + F7 입니다.