회원관리예제 강의 듣는 도중에 에러가 발생하여 문의드립니다. 아래는 build.gradle 부분입니다. plugins { id 'org.springframework.boot' version '2.3.8.RELEASE' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' } group = 'hello' version = '0.0.1-SNAPSHOT' sourceCompatibility = '11' repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' } } test { useJUnitPlatform() } 에러 내용은 아래와 같습니다. java.lang.NoClassDefFoundError: org/junit/platform/commons/util/ClassNamePatternFilterUtils at org.junit.platform.launcher.core.LauncherFactory.loadAndFilterTestExecutionListeners(LauncherFactory.java:122) at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:108) at org.junit.platform.launcher.core.LauncherFactory.create(LauncherFactory.java:75) at org.eclipse.jdt.internal.junit5.runner.JUnit5TestLoader.<init>(JUnit5TestLoader.java:34) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at java.base/java.lang.Class.newInstance(Class.java:584) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createRawTestLoader(RemoteTestRunner.java:371) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.createLoader(RemoteTestRunner.java:366) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.defaultInit(RemoteTestRunner.java:310) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.init(RemoteTestRunner.java:225) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209) Caused by: java.lang.ClassNotFoundException: org.junit.platform.commons.util.ClassNamePatternFilterUtils at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 14 more 참고로 윈도우를 사용하고, sts 이클립스를 사용하였습니다. 아무리 봐도 강사님이랑 코드는 똑같은거 같은데 test 수행시 저런 에러가 발생하는데 아무리 찾아도 모르겠습니다.
안녕하세요 기존에 BFS를 응용해서 타사이트중에 최단거리를 찾는문제에서 위,아래,오른쪽을 체크하는 방법을 몰라서 아래와 같이 막혔습니다. ㅠㅠ 오늘 10시간동안 골머리 앓다가 결국 문의 올립니다 ㅠ 해당 링크와 작성한 소스는 아래와 같습니다. https://programmers.co.kr/learn/courses/30/lessons/1844 import java.util.LinkedList ; import java.util.Queue ; public class GameMapTest { int m , n = 0 ; // 가로 세로를 구하기 위해 셋팅 int [][] dirs = {{ 1 , 0 } , {- 1 , 0 } , { 0 , 1 } , { 0 , - 1 }} ; // 오른쪽 , 왼쪽 , 위 , 아래 int size = 0 ; // 칸의 개수 public int solution ( int [][] grid) { int answer = 0 ; if (grid == null || grid. length == 0 ) { return answer - 1 ; } m = grid. length ; // 행 길이 4 n = grid[ 0 ]. length ; // 열 길이 5 int maxCnt = 0 ; int [][] visited = new int [ m ][ n ] ; for ( int i= 0 ; i< m ; i++) { // 행렬보기 for ( int j= 0 ; j< n ; j++) { System. out .print(grid[i][j]) ; } } for ( int i= 0 ; i< m ; i++) { for ( int j= 0 ; j< n ; j++) { if (grid[i][j] == 1 ) { size = 1 ; bfs(grid , i , j , visited) ; // 0 만들기 if (maxCnt < size ) { maxCnt = size ; } } } } answer = maxCnt ; return answer ; } public int bfs ( int [][] grid , int x , int y , int [][] visited) { Queue< int []> queue = new LinkedList<>() ; queue.offer( new int [] {x , y}) ; // 0, 0 으로 초기화해 버리기 // 오 , 왼 , 위 , 아래 while (!queue.isEmpty()) { int [] point = queue.poll() ; // 사방으로 조회 for ( int [] dir : dirs ) { int x1 = point[ 0 ] + dir[ 0 ] ; int y1 = point[ 1 ] + dir[ 1 ] ; // 1. 마이너스 좌표 체크 x1 >= 0 && y1 >= 0 // 2. m*n 범위 체크 m > x1 && n > y1 // 3. grid[x1][y1] == 1 if (x1 >= 0 && y1 >= 0 && m > x1 && n > y1 && grid[x1][y1] == 1 ) { if (!queue.isEmpty()) size ++ ; grid[x1][y1] = 0 ; queue.offer( new int []{x1 , y1}) ; } } } return size ; }
. welcome { /* border: 5px solid #000; */ height : 90vh ; position : relative ; } 저기 있는 vh라는 단위를 보고 vh라는 단위를 보고 궁금해서 인터넷 검색을 해보니... 예를 들어 브라우저 높이값이 900px일때 1vh는 9px이라는 뜻이 되지요. 그와 유사하게 뷰포트의 너비값이 750px이면 1vw는 7.5px이 됩니다. 출처: https://webclub.tistory.com/356 [Web Club] 라고 나오는데 90vh라면은 810px라는 말입니까?
그래도 모양이 똑바로 되지 않네요 <! DOCTYPE html > < head > < meta charset = "UTP-8" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < title > StarUp Mate : App Offical Landing </ title > < link rel = "icon" href = "images/logo-favicon.png" > <!-- jQuery CDN--> < script src = "https://code.jquery.com/jquery-3.5.1.min.js" ></ script > <!--Slick Slider--> < link rel = "stylesheet" href = "../js/slick/slick-theme.css" > < link rel = "stylesheet" href = "../js/slick/slick.css" > < script src = "../js/slick/slick.min.js" ></ script > <!--Custom CSS & JS--> < link rel = "stylesheet" href = "css/style.css" > < link rel = "stylesheet" href = "css/responsive.css" > < script src = "script/custom.js" ></ script > </ head > < body > <!--Header--> < header > < div class = "header-inner" > < div class = "logo" > < a href = "#" >< img src = "images/logo.png" alt = "" ></ a > < div class = "gnb" > < a href = "#none" > CEO 인사말 </ a > < a href = "#none" > 서비스 특징 </ a > < a href = "#none" > 자주 묻는 질문들 </ a > < a href = "#none" > 경영비전 </ a > < a href = "#none" > 사용자 리뷰 </ a > < a href = "#none" > 앱 사용자 가이드 </ a > < a href = "#none" > 최신소식 </ a > </ div > </ div > </ div > </ header > <!--welcome--> < section class = "welcome" > < div class = "slideshow" > < img src = "images/slide-welcome-01.png" > < img src = "images/slide-welcome-02.png" > < img src = "images/slide-welcome-03.png" > </ div > < div class = "welcome-heading" > < span > 창의적인 아이디어를 만드는 가장 빠른 방법 </ span > < h1 > An idea solution of startup for your </ h1 > < em > Business strategy Organization Management Business Innovation </ em > < p > 스타트업 메이트 앱이 여러분의 최상의 스타트업 구축을 위해 창의적인 아이디어를 제공하는 데 최선을 다하겠습니다. </ p > </ div > </ section > <!--ceo-access--> < section class = "ceo-access" > < div class = "ceo-inner" > < div class = "ceo-inner" > < div class = "ceo-content" > < div class = "ceo-left" > < img src = "images/quotation-mark.svg" alt = "" > < h3 > 3 Pre-made Solutions for your Startup Business </ h3 > < p > 창의적인 아이디어를 가장 빠르게 창출할 수 있는 최고의 앱 솔루션을 제공합니다. 여러분의 스타트업을 더욱 성장시키기 위해 온 힘을 다할 것이며 STARTUP MATE 라는 이름답게 항상 동반자가 되겠습니다. 감사합니다. </ p > < span > 앤드류 - 스타트업 메이트 대표이사 </ span > </ div > < div class = "ceo-right" > < div class = "ceo-msg" > < h3 > Application Downloads < big > 30,000+ </ big ></ h3 > < p > 스타트업메이트는 앱 다운로드 30,000명 이상의 앱 사용자의 충분한 피드백을 통해 검증된 서비스를 제공합니다. </ p > </ div > < div class = "ceo-photo" > < img src = "images/icon-face-ceo.jpg" alt = "" > </ div > </ div > </ div > </ div > </ div > < div class = "access-inner" > < div class = "access-content" > < div class = "access-left" > < h2 > 언제나 어디서나 즐겁고 편리한 액세스 스타트업 CEO들의 커뮤니티 </ h2 > < p > 언제나 어디서나. 즐겁고 편리한 액세스가 가능합니다. 회원 가입은 쉽고 간단합니다. 무료 회원 가입 후 로그인하시면 업데이트 된 스타트업 메이트의 서비스를 받으실 수 있습니다. </ p > < div class = "btn-download" > < a href = "" >< img src = "images/btn-appstore.png" alt = "" ></ a > < a href = "" >< img src = "images/btn-playstore.png" alt = "" ></ a > </ div > </ div > </ div > < div class = "access-right" > < img src = "images/access-mockup.png" alt = "" > </ div > </ div > </ section > css /* Fontawesome 4.7 */ @ import url ( 'https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' ); /* XEION CDN */ @ import url ( 'http://cdn.jsdelivr.net/npm/xeicon@2.3.3/xeicon.min.css' ); /* Web Fonts - Source Sans Pro */ @ import url ( 'https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200;300;400;600;700;900&display=swap' ); /* font-family: 'Source Sans Pro', sans-serif; */ /* Web Fonts - NoonNoo */ @ font-face { font-family : 'NEXON Lv2 Gothic' ; src : url ( 'https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/NEXON Lv2 Gothic.woff' ) format ( 'woff' ); font-weight : normal ; font-style : normal ; } /* Reset CSS */ * { box-sizing : border-box ; } a { text-decoration : none ; color : # 222 ; } button , input { outline : none ; } h1 , h2 , h3 , h4 , h5 , h6 { margin-top : 0 ; font-weight : normal ; line-height : 1.5em ; } /* Default CSS */ body { font-family : 'NEXON Lv2 Gothic' , sans-serif ; font-size : 18px ; line-height : 1.7em ; margin : 0 ; background-color : # fff ; color : # 222 ; } /* header */ header { position : fixed ; width : 100% ; z-index : 10 ; } . header-inner { width : 1300px ; margin : auto ; overflow : hidden ; padding-top : 30px ; padding-bottom : 15px ; } . logo { float : left ; } . logo img { margin-top : -7px ; } . gnb { float : right ; } . gnb a { margin : 10px ; font-size : 16px ; }
hhtml과 css 첨부해서 적습니다 <! DOCTYPE html > < head > < meta charset = "UTP-8" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < title > StarUp Mate : App Offical Landing </ title > < link rel = "icon" href = "images/logo-favicon.png" > <!-- jQuery CDN--> < script src = "https://code.jquery.com/jquery-3.5.1.min.js" ></ script > <!--Slick Slider--> < link rel = "stylesheet" href = "../js/slick/slick-theme.css" > < link rel = "stylesheet" href = "../js/slick/slick.css" > < script src = "../js/slick/slick.min.js" ></ script > <!--Custom CSS & JS--> < link rel = "stylesheet" href = "css/style.css" > < link rel = "stylesheet" href = "css/responsive.css" > < script src = "script/custom.js" ></ script > </ head > < body > <!--Header--> < header > < div class = "header-inner" > < div class = "logo" > < a href = "#" >< img src = "images/logo.png" alt = "" ></ a > < div class = "gnb" > < a href = "#none" > CEO 인사말 </ a > < a href = "#none" > 서비스 특징 </ a > < a href = "#none" > 자주 묻는 질문들 </ a > < a href = "#none" > 경영비전 </ a > < a href = "#none" > 사용자 리뷰 </ a > < a href = "#none" > 앱 사용자 가이드 </ a > < a href = "#none" > 최신소식 </ a > </ div > </ div > </ div > </ header > <!--welcome--> < section class = "welcome" > < div class = "slideshow" > < img src = "images/slide-welcome-01.png" > < img src = "images/slide-welcome-02.png" > < img src = "images/slide-welcome-03.png" > </ div > < div class = "welcome-heading" > < span > 창의적인 아이디어를 만드는 가장 빠른 방법 </ span > < h1 > An idea solution of startup for your </ h1 > < em > Business strategy Organization Management Business Innovation </ em > < p > 스타트업 메이트 앱이 여러분의 최상의 스타트업 구축을 위해 창의적인 아이디어를 제공하는 데 최선을 다하겠습니다. </ p > </ div > </ section > <!--ceo-access--> < section class = "ceo-access" > < div class = "ceo-inner" > < div class = "ceo-inner" > < div class = "ceo-content" > < div class = "ceo-left" > < img src = "images/quotation-mark.svg" alt = "" > < h3 > 3 Pre-made Solutions for your Startup Business </ h3 > < p > 창의적인 아이디어를 가장 빠르게 창출할 수 있는 최고의 앱 솔루션을 제공합니다. 여러분의 스타트업을 더욱 성장시키기 위해 온 힘을 다할 것이며 STARTUP MATE 라는 이름답게 항상 동반자가 되겠습니다. 감사합니다. </ p > < span > 앤드류 - 스타트업 메이트 대표이사 </ span > </ div > < div class = "ceo-right" > < div class = "ceo-msg" > < h3 > Application Downloads < big > 30,000+ </ big ></ h3 > < p > 스타트업메이트는 앱 다운로드 30,000명 이상의 앱 사용자의 충분한 피드백을 통해 검증된 서비스를 제공합니다. </ p > </ div > < div class = "ceo-photo" > < img src = "images/icon-face-ceo.jpg" alt = "" > </ div > </ div > </ div > </ div > </ div > < div class = "access-inner" > < div class = "access-content" > < div class = "access-left" > < h2 > 언제나 어디서나 즐겁고 편리한 액세스 스타트업 CEO들의 커뮤니티 </ h2 > < p > 언제나 어디서나. 즐겁고 편리한 액세스가 가능합니다. 회원 가입은 쉽고 간단합니다. 무료 회원 가입 후 로그인하시면 업데이트 된 스타트업 메이트의 서비스를 받으실 수 있습니다. </ p > < div class = "btn-download" > < a href = "" >< img src = "images/btn-appstore.png" alt = "" ></ a > < a href = "" >< img src = "images/btn-playstore.png" alt = "" ></ a > </ div > </ div > </ div > < div class = "access-right" > < img src = "images/access-mockup.png" alt = "" > </ div > </ div > </ section > css /* Fontawesome 4.7 */ @ import url ( 'https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' ); /* XEION CDN */ @ import url ( 'http://cdn.jsdelivr.net/npm/xeicon@2.3.3/xeicon.min.css' ); /* Web Fonts - Source Sans Pro */ @ import url ( 'https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200;300;400;600;700;900&display=swap' ); /* font-family: 'Source Sans Pro', sans-serif; */ /* Web Fonts - NoonNoo */ @ font-face { font-family : 'NEXON Lv2 Gothic' ; src : url ( 'https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/NEXON Lv2 Gothic.woff' ) format ( 'woff' ); font-weight : normal ; font-style : normal ; } /* Reset CSS */ * { box-sizing : border-box ; } a { text-decoration : none ; color : # 222 ; } button , input { outline : none ; } h1 , h2 , h3 , h4 , h5 , h6 { margin-top : 0 ; font-weight : normal ; line-height : 1.5em ; } /* Default CSS */ body { font-family : 'NEXON Lv2 Gothic' , sans-serif ; font-size : 18px ; line-height : 1.7em ; margin : 0 ; background-color : # fff ; color : # 222 ; } /* header */ . header {} . header-inner { border : 1px solid # 000 ; width : 1300px ; margin : auto ; overflow : hidden ; padding-top : 30px ; padding-bottom : 15px ; } . logo { float : left ; } . logo img { margin-top : -7px ; } . gnb { float : right ; } . gnb a { margin : 10px ; font-size : 16px ; }
안녕하세요 덕분에 강의 수강 잘 했습니다. 강의에서 랭귀지 서버와 인텔리센스를 종종 언급하시는데요 궁금한 점은 vs코드 내부적으로 돌아가는 랭귀지서버를 통해서 인텔리센스를 사용하는 것인지, 인텔리코드를 통해서 인텔리센스를 사용하는 것인지 궁금합니다. 만약에 후자라면 코드를 설치하지 않았다면 센스를 이용할 수 없다는 말이겠죠?? 두번째로 자바스크립트에서는 프로토타입 기반으로 알고 있는데 타입스크립트도 역시 프로토타입기반이고 슈가문법으로 객체를 흉내내나요 아니면 다른 oop처럼 클래스 문법을 갖고 있나요?? 질문이 조금 엉뚱하기도 한 거 같은데요. 찾아보니 답을 얻기 힘들어서 질문드립니다... 감사합니다.
안녕하세요 강사님! 강의 항상 열심히 듣고 있습니다. 이번에 스프링을 배운김에 토이 프로젝트를 하나 하고 있습니다. 기능중에 준비된 랜덤단어 두 개 로 유저의 닉네임을 랜덤으로 지어주는 기능을 만들려고 합니다. 그래서 랜덤단어X랜덤단어를 만드는거는 쉽지만 user table 에 이미 있는 닉네임이면 클라에 주기 전에 서버에서 먼저 거르는 작업을 하고자 합니다. 랜덤단어 하나를 만들어서 DB에 존재하는지 검사하는 로직을 통과할때까지 while문으로 돌릴까 생각하였지만 db와 연결을 너무 많이 하게 될 것 같아 포기하고 sql문으로 해결할 수 없는지 생각해 보았습니다. 그래서 생각한게 랜덤단어가 들어있는 테이블을 두 개 만들어서 세타조인을 해서 하나의 테이블을 만들고, 유저테이블에서 나온 닉네임과 대칭 차집합을 통해 아직 만들어지지 않은 닉네임들을 후보까지 안전하게 10개를 뽑아서 클라에 넘겨주자는 생각을 했습니다. 그래서 대칭 차집합 쿼리를 찾아보니 SELECT str FROM ( SELECT str FROM tableA UNION ALL SELECT str FROM tableB ) AS tmp GROUP BY str HAVING COUNT ( * ) = 1 이렇게 구현할 수 있다는 것을 알게 되었습니다. 근데 jpql은 FROM 절에 서브쿼리를 적을 수 없어 이것을 구현할 수 없다고 생각했습니다. 혹시 뭔가 다른 구현이 가능한 방법이 있을까 해서 질문 드립니다!
스프링 공부만 하다가 코딩테스트 처음 접하게된 초보입니다. 풀다가 궁금한 점이 생겼는데 알려주신 유형의 문제를 이런식으로는 풀면 안되는 건가요? public String solve (String num1 , String num2) { /* int intNum1 = Integer.parseInt(num1); int intNum2 = Integer.parseInt(num2); return Integer.toString(intNum1 + intNum2);*/ } 보통 알고리즘 문제는 charAt로 푸는건지.. 아니면 성능 문제라던지 어떤 이유때문에 charAt으로 푸신건지 알고 싶습니다!
강의 잘 보고 있습니다~ 이해가 안가는 부분이 있는데 Start() 함수 는 게임이 실행되면 딱 한번 실행 되는구나 하고 이해를 했습니다. 밑에 질문을 보니 Start() 함수 가 시작되는 순서는 랜덤인것 같구요. 그럼 Managers 에서의 Start() 함수보다 Player 의 Start() 함수가 먼저 출력될 경우 Instance 가 null 인 상태로 Managers mg = Managers.Instance; 가 실행돼서 Start() 함수는 딱 한번 실행되니 mg는 null 이 될 수 있는 가능성이 있는건가요? 그래서 그럴 가능성을 염려해두고 Instance 프로퍼티 안에 Init(); 를 넣어서 다른 클래스에서 사용할때마다 실행 하게끔 한건가요?
안녕하세요. 코드작성도중 12번째 줄부터 16번째 줄까지 minutes,seconds,hours를 재정의 할 때 모두 int를 붙여서 코드를 작성했는데, 코딩도중 에러가 발생했습니다. 앞에서 int로 정의를 했기 떄문에 재정의할 필요가 없어서 다시 지우고 코드를 작성하니 에러가 사라졌습니다. 이미 정의를 했으니 int를 생략하는것은 이해가 되는데 int를 붙였을 때 코딩이 안되는 이유가 궁금합니다.