묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[React 1부] 만들고 비교하며 학습하는 React
helpers.js
emit, on 등 헬퍼 함수가 좀 헷갈려서 따로 html 파일을 만들어서 연습하는 중인데요! qs 함수를 만들어서 사용하면 dom 객체를 제대로 받아오지 못하는데 이유가 뭘까요..? 그리고 emit 함수 부분 mdn 문서를 봐도 제대로 이해가 안 되는데 custom, dispatch를 간단하게 설명해 주시면 감사드리겠습니다ㅜㅜ <body> <div class="container"> <form id="search-form-view"> <input type="text" placeholder="검색어를 입력하세요" autofocus /> <button type="reset" class="btn-reset"></button> </form> </div> <script> function qs(selector, scope = document) { if (!selector) throw "no selector"; scope.querySelector(selector); } const form = qs('#search-form-view'); console.log(form); // undefined const form1 = document.querySelector('#search-form-view'); console.log(form1);
-
미해결스프링 핵심 원리 - 기본편
final은 왜 붙이셨는지 알 수 있을까요?
private final MemberRepositry memberRepository; 인터페이스 의존시킬때 final은 무슨 역할을 하나요?
-
미해결코로나맵 개발자와 함께하는 지도서비스 만들기 2
-g로 설치하는 이유가 있나요?
아직 프로젝트 시작전인데요^^ 이 3가지 모듈들을 global로 설치하는 이유가 있을까요? express 는 늘 -s 옵션으로 설치하고 nodemon은 -D 옵션으로 설치해왔었는데.. 혹시 코로나맵 프로젝트에는 -g가 꼭 필요한건가 싶어 질문드립니다^^
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
양방향 연관관계 관련 질문
안녕하세요. 영한 선생님 강의를 듣는 도중 궁금한 부분이 생겨 문의 드립니다. Team team = new Team();team.setName("TeamA");//1차 캐시에 저장em.persist(team);Member member = new Member();member.setUsername("memberA");member.setTeam(team);//1차 캐시에 저장em.persist(member);//???team.getMembers().add(member);//1차 캐시에서 조회Team findTeam = em.find(Team.class, team.getId());List<Member> members = findTeam.getMembers(); 위에 소스중 team.getMembers().add(member) 이부분에서1차 캐쉬의 team이 업데이트 되는건가요?? 또, 1차 캐쉬의 형태는 테이블 구조가 아닌, 객체구조가 맞나요??
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
getServerSideProps HYDRATE redux store 초기화 문제 질문 드립니다.
로그인 페이지, 메인 페이지에서 getServerSideProps로 profile을 받아오는 action을 취하고 있는데요. 로그인했을 때, 프로필이 받아와져서 메인페이지로 넘어가는데, 새로고침하면 다시 profile이 null값이 떨어집니다 ㅠㅠ
-
미해결머신러닝 엔지니어 실무
후반부 강의 자료 요청 드립니다.
머신러닝 실무 강의 정말 잘 듣고 있습니다. 수강평 남겼습니다. 기존 여타 인공지능 수업과 달리 소프트웨어공학을 접목한 실무적인 내용이 정말 도움이 많이 되었습니다. 앞으로도 실무에 도움이 될만한 좋은 강의 많이 부탁드리도록 하겠습니다. 감사합니다. email: hgk0426@tta.or.kr
-
미해결mongoDB 기초부터 실무까지(feat. Node.js)
MongoDB 데이터 구조에 대해 질문 있습니다.
안녕하세요. 강의를 듣고 궁금한 점이 생겨서 여쭤봅니다. 이러한 모양의 테이블이나 이보다 더 복잡한 테이블의 셀안의 값을 표현하고자 할때의 질문이 있습니다. 저러한 모양의 스키마를 짜서 내장이나 populate하는 것은 document가 길어질 수록 셀에 표현될 값을 탐색하는데 어려움이 있습니다. 그렇다고 각 셀마다 저기에 맞는 값을 호출해서 표현하기에는 그림의 셀만해도 서버를 18번 호출하는 것으로 보여서 망설여집니다. 이러한 복잡한 테이블을 표현할때 Mongodb의 좋은 스키마를 짜는 방법이 있는지 궁금합니다.
-
미해결Vue.js 완벽 가이드 - 실습과 리팩토링으로 배우는 실전 개념
깃헙 권한요청입니다!
인프런아이디 : pji3504 인프런 이메일: pji3504@naver.com 깃헙아이디 : pji3504@naver.com 깃헙 Username : jongik96 바쁘신 와중에 죄송합니다만 깃헙 접근권한 수락 부탁드립니다ㅠ 강의듣고싶어 미칩니다,, 😋
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
오버플로우 문제 해결 방법
숫자 입력 필드에 대해서 너무 큰 값을 입력하면 오버플로우가 발생해서 컨트롤러에 해당 값이 기대했던 값으로 넘어가지 않고 음수로 변형되어서 넘어가는데 이러한 경우를 방지하기 위해서 현업에서는 보통 어떤 방식을 사용하고 있는지 궁금합니다.
-
미해결자바(Java) 알고리즘 문제풀이 입문: 코딩테스트 대비
String.valueOf(cnt)를 하지 않고 cnt만 하면 문제가 생길까요? 그리고 cnt의 위치!
import java.util.Scanner; public class Main { public String solution(String str) { String answer = ""; int cnt = 1 ; str += " "; for(int i = 0; i < str.length()-1; i++) { if(str.charAt(i) == str.charAt(i+1)) cnt++; else { answer += str.charAt(i); if(cnt >= 2) answer += cnt; // 문자열 더하기라 정수형태로 해도 괜찮을 것 같은데 String.valueOf(cnt)를 한 이유가 궁금합니다 ! cnt = 1; // 이건 if(cnt >=2) 조건에 넣는게 더 효율적이지 않을까 생각드는데 어떻게 생각하시나요? ㅎㅎ } } return answer; } public static void main(String[] args) { Main T = new Main(); Scanner scan = new Scanner(System.in); String str = scan.next(); System.out.println(T.solution(str)); } }
-
미해결웹툰,만화기법(중급)
소리 안들림
https://www.inflearn.com/course/%EC%9B%B9%ED%88%B0-%ED%81%B4%EB%A6%BD%EC%8A%A4%ED%8A%9C%EB%94%94%EC%98%A4-3/lecture/61648?tab=curriculum 1강도3강도 소리가 안들려요
-
미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
Optional 처리방법 문의
isPresent 와 orElseThrow 의 차이점에 대해 문의 드립니다. Optional 을 공부하다보니 에러처리를 동시에 하는 함수가 있어서 사용해보았습니다. 제가 생각할때는 변수에 저장하지 않고 바로 사용하는 부분이 장점 같았는데, 두 방식에서 내부동작의 차이점이 있는지 궁금합니다. Optional<User> findById = userRepository.findById(id); if (! findById.isPresent()) { throw new UserNotFoundException(id); } userRepository.findById(id).orElseThrow(() -> new UserNotFoundException(id))
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
error가 발생했는데 뭘 잘못했는지 모르겠습니다.
error 발생 : TypeError: products is undefined 이전까지는 다 잘되다가 마지막에 innerHTML을 넣으니 이런 오류가 뜨는데 뭘 잘못했는지 도저히 모르겠습니다. <html> <head> <title>그랩마켓</title> <link href="index.css" type="text/css" rel="stylesheet" /> <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> </head> <body> <div id="header"> <div id="header-area"> <img src="images/icons/logo.png" alt="" /> </div> </div> <div id="body"> <div id="banner"> <img src="images/banners/banner1.png" alt="" /> </div> <h1>판매되는 상품들</h1> <div id="product-list"></div> </div> <div id="footer"></div> </body> <script> axios.get("https://0d1b6acd-73da-48c3-8cca-572d9b17eca5.mock.pstmn.io/products") .then(function (result) { console.log("통신결과 : ", result); const products = result.data.products; let productsHtml = ""; for (var i = 0; i < products.length; i++) { let product = products[i]; productsHtml = productsHtml + '<div class="product-card">' + "<div>" + '<img class="product-img" src="' + product.imageUrl + '" alt="" />' + "</div>" + '<div class="product-contents">' + '<span class="product-name">' + product.name + "</span>" + '<span class="product-price">' + product.price + "원" + "</span>" + '<div class="product-seller">' + '<img class="product-avatar" src="images/icons/avatar.png" alt="" />' + "<span>" + product.seller + "</span>" + "</div>" + "</div>" + "</div>"; } document.querySelector("#product-list").innerHTML = productsHtml; }) .catch(function (error) { console.error("error 발생 : ", error); }); </script> </html>
-
미해결일잘스쿨 : 일을 잘하고 생산성을 높이는 법
강의 영상 중복 확인 요청
'일을 잘 한다는 건 시간을 잘 쓴다는 것' 강의가 '생산성을 높이는 방법' 강의와 중복 되는 것 같습니다. 확인 부탁드려요.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
MemoryMemberRepositoryTest 실행 오류
해당 클래스를 실행하면 오류가 납니다. 일단 강의에서 회원관리 예제 강의를 듣기 전까지 수업 관련 코딩은 오류없이 잘 구동 됐었습니다. 근데 여기서부터 막히는것 같습니다. MemoryMemberRepositoryTest를 run하면 아래와 같은 에러가 납니다. > Task :compileJava UP-TO-DATE > Task :processResources UP-TO-DATE > Task :classes UP-TO-DATE > Task :compileTestJava FAILED C:\Users\����\Desktop\study\hello-spring\src\test\java\hello\hellospring\repository\MemoryMemberRepositoryTest.java:25: error: no suitable method found for assertThat(Member) assertThat(member).isEqualTo(result); ^ method MatcherAssert.<T#1>assertThat(String,T#1,Matcher<? super T#1>) is not applicable (cannot infer type-variable(s) T#1 (actual and formal argument lists differ in length)) method MatcherAssert.<T#2>assertThat(T#2,Matcher<? super T#2>) is not applicable (cannot infer type-variable(s) T#2 (actual and formal argument lists differ in length)) where T#1,T#2 are type-variables: T#1 extends Object declared in method <T#1>assertThat(String,T#1,Matcher<? super T#1>) T#2 extends Object declared in method <T#2>assertThat(T#2,Matcher<? super T#2>) C:\Users\����\Desktop\study\hello-spring\src\test\java\hello\hellospring\repository\MemoryMemberRepositoryTest.java:26: error: cannot find symbol Assertions.assertThat(member).isEqualTo(result); ^ symbol: method assertThat(Member) location: class Assertions C:\Users\����\Desktop\study\hello-spring\src\test\java\hello\hellospring\repository\MemoryMemberRepositoryTest.java:41: error: no suitable method found for assertThat(Member) assertThat(result).isEqualTo(member1); ^ method MatcherAssert.<T#1>assertThat(String,T#1,Matcher<? super T#1>) is not applicable (cannot infer type-variable(s) T#1 (actual and formal argument lists differ in length)) method MatcherAssert.<T#2>assertThat(T#2,Matcher<? super T#2>) is not applicable (cannot infer type-variable(s) T#2 (actual and formal argument lists differ in length)) where T#1,T#2 are type-variables: T#1 extends Object declared in method <T#1>assertThat(String,T#1,Matcher<? super T#1>) T#2 extends Object declared in method <T#2>assertThat(T#2,Matcher<? super T#2>) C:\Users\����\Desktop\study\hello-spring\src\test\java\hello\hellospring\repository\MemoryMemberRepositoryTest.java:55: error: no suitable method found for assertThat(int) assertThat(result.size()).isEqualTo(2); ^ method MatcherAssert.<T#1>assertThat(String,T#1,Matcher<? super T#1>) is not applicable (cannot infer type-variable(s) T#1 (actual and formal argument lists differ in length)) method MatcherAssert.<T#2>assertThat(T#2,Matcher<? super T#2>) is not applicable (cannot infer type-variable(s) T#2 (actual and formal argument lists differ in length)) where T#1,T#2 are type-variables: T#1 extends Object declared in method <T#1>assertThat(String,T#1,Matcher<? super T#1>) T#2 extends Object declared in method <T#2>assertThat(T#2,Matcher<? super T#2>) Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 4 errors FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileTestJava'. > Compilation failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 3s 3 actionable tasks: 1 executed, 2 up-to-date 그리고 화면 내에 store 에 저렇게 음영이 져있는데 어떻게 해야할지 모르겠습니다. store에 알트엔터누르면 나오는 메뉴에서 뭘 선택해야 할지 모르겠습니다 .ㅜ 그리고 상단에 저렇게 오류가 나는데 어떤식으로 접근해서 어떻게 해결을 해야할지 잘 감이 오질 않습니다. 알려주시면 배우겠습니다. 부탁드립니다.
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
오류가 뜨는데 뭘 잘못한건지 모르겠습니다.
안녕하세요 선생님 UI가 많이 달라져서 강의 듣고 따라해도 안되는것 같은데요. 눈 모양 클릭해도 주소가 나타나지 않고, send를 눌러도 오류가 뜨는 것 같습니다. 000
-
미해결Slack 클론 코딩[실시간 채팅 with React]
이미지 파일 넣기
png파일을 간단하게 ---------------------import header_logo from '@images/headImg.jpeg'; <Header> <img src={header_logo}/></Header> --------------------- 이런식으로 해보았는데 잘 안되어서 images폴더 따로 만들고 그 안에 types 폴더에 images.d.ts파일을 만들었습니다. 그 안에 내용으로 declare module '*.jpg';declare module '*.jpeg';declare module '*.png';이런식으로 채워 넣고 tsconfig.json에 { "compilerOptions": { ... "typeRoots" : ["node_modules/@types", "@images/types"], ... },} 이렇게 해놓았습니다. 그런데 이런 오류가 떴습니다.. 무엇을 추가해야 이미지 업로드를 할 수 있을까요..
-
미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
PK GenerationType 선택기준 질문
@GeneratedValue(strategy = GenerationType.SEQUENCE) @GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.AUTO) @GeneratedValue(strategy = GenerationType.TABLE) JPA에서 지원되는 PK생성 전략을 네가지로 확인했습니다. 찾아보니 DB 에 따라 Oracle 이면 Sequence, MySQL 쪽이면 Identity 를 사용한다는 걸 알게 되었고, Identity 는 현재 생성된 키 값을 기준으로 증가한다는 것을 확인했습니다. 그렇다면 Sequence, Auto 그리고 Table 의 차이점이나 주로 어떻게 사용이 구분되는지 알고 싶습니다.
-
미해결
탈퇴방밥
탈퇴어떻게하니요- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
-
해결됨Vue.js 중급 강좌 - 웹앱 제작으로 배워보는 Vue.js, ES6, Vuex
this.$store.state.todoItems 할 때 뜨지 않는 현상(해결 방법)
제가 해결한 방법을 공유 하겠습니다. 당시 뜨던 에러 코드는 uncaught SyntaxError: Unexpected token a in JSON at position 0 였는데요. 쌩뚱맞게 JSON 에러가 떠서 뭐지..? 하고 구글링하다가 혹시 localstorage에 이상한 값이 있나 확인해봤더니 이상한 데이터들이 많이 있더라구요..ㅎㅎ 한번 싹 삭제하고 다시 브라우저를 켰더니 정상 작동합니다!도움이 되셨으면 좋겠습니다 ㅎㅎ