Light Blue Pointer
본문 바로가기

Developing159

2023-11-28, Today I Learned A. -1을 %하면 6이 나오지 않고 -1이 나온다 ⚠️-1을 %하면 -1이 나오니까 주의하자 return dayName[((days%7)-1)%7]; → int days = b-1 return dayName[days%7] 2023. 11. 28.
[내일배움캠프][Spring Team Project]뉴스피드 프로젝트 개발일지 프로젝트 링크 : GitHub - minisundev/Gamelog: 게이머들을 위한 news feed project 게이머들을 위한 news feed project. Contribute to minisundev/Gamelog development by creating an account on GitHub. github.com 느낀 점 : 강의가 너무 많아서 듣는데만도 힘들어서 복습도 못 한채로 팀 프로젝트에 들어갔는데 팀원들이 내가 모르는 부분 많이 알려주기도 했지만 일단 과제는 완성해야하니까 모여서 코딩하는 시간에 강의자료 들여다보니까 실전 압축 경험으로 이해가 쏙쏙 되어서 많이 배우게 되었다 사실 강의 듣느라 개인과제는 못했는데 과제를 하면서, 실제로 코딩을 하면서 익히는게 제일 머릿속에 잘 남는 .. 2023. 11. 27.
2023-11-23, Today I Learned ⭐Java array deep copy 쉽게 할 수 없을까 1. clone we’ll copy an array of primitive types using the clone method: int[] array = {23, 43, 55, 12}; int[] copiedArray = array.clone(); 2. stream String[] strArray = {"orange", "red", "green'"}; String[] copiedArray = Arrays.stream(strArray).toArray(String[]::new); ⭐Java Set import java.util.HashSet; HashSet cars = new HashSet(); cars.add("Volvo"); cars.contai.. 2023. 11. 24.
Spring Boot 시작 시 A problem occurred configuring root project > Could not resolve all files for configuration ':classpath'. A problem occurred configuring root project 'gameLog'. > Could not resolve all files for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.1.5. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.1.5 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.1.5 was found. The consumer wa.. 2023. 11. 23.
2023-11-22, Today I Learned ⭐Java String 값 비교 compareTo if string1 > string2, it returns positive number if string1 < string2, it returns negative number if string1 == string2, it returns 0 str1.compareTo(str3); ⭐Java max Math.max(2,5); Math.max임 2023. 11. 22.
2023-11-21, Today I Leanred ⭐Java square Math.pow(3, i) ⭐Java uppercase to lowercase String txt = "Hello World"; System.out.println(txt.toUpperCase()); System.out.println(txt.toLowerCase()); 2023. 11. 21.
인증과 인가 인증과 인가 인증(Authentication) 인증 : 해당 유저가 실제 유저인지 인증하는 개념 실제 그 유저가 맞는지를 확인하는 절차 ex) 스마트폰 지문인식, 사이트 로그인 등 인가(Authorization) 인가 : 해당 유저가 특정 리소스에 접근이 가능한지 허가를 확인하는 개념 ex) 관리자 페이지-관리자 권한, 회원/비회원 여부에 따라 다른 권한을 받음 “웹 애플리케이션 인증” 일반적으로 서버-클라이언트 구조로 되어있고, 실제로 이 두가지 요소는 아주 멀리 떨어져 있다. 그리고 Http 라는 프로토콜을 이용하여 통신하는데, 그 통신은 **비연결성(Connectionless) 무상태(Stateless)**로 이루어짐 비연결성(Connectionless) 서버와 클라이언트가 연결되어 있지 않다 채팅.. 2023. 11. 20.
Spring Bean Bean 수동 등록 new project → web, lombok, thymeleaf 추가 implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.projectlombok:lombok' dependency 프로젝트 생성시 추가하는거 까먹어서 수동으로 gradle.build에 추가해줌 // Security implementation 'org.springframework.boot:spring-boot-starter-security' Security 추가해줌! Security 기능 제한.. 2023. 11. 20.
2023-11-20, Today I Learned 오늘 배운 것 제곱근이 존재하는지 아닌지 원래 for문 돌려서 했는데 오늘 문득 sqrt를 쓰면 더 나을 거 같았음 ⭐Java 제곱근 sqaure root Math.sqrt(25); Math.sqrt() 메소드는 입력값과 출력값은 모두 double형이며 Math.sqrt(대상숫자)를 넣어주면 됩니다. ⭐Java 정수부 소수부 분리 double d = 123.456789555; // 소수의 정수부만 추출 int ip = (int) d; // 소수의 소수부만 추출 double fp = d - (int) d; // 출력 결과: 0.4567895550000003 💡소수부 == 0.0이면 제곱근 약수가 있는 수 ⭐Java String to char Array char[] chars = str.toCharArray.. 2023. 11. 20.