묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
N:N 구현 시, update 부분에서 컴파일 에러가 납니다.
async update({ productId: id, updateProductInput }: { productId: string, updateProductInput: UpdateProductInput }) { const beforeProduct = await this.findOne(id); const updatedProduct = { ...beforeProduct, id, //덮어쓰기 ...updateProductInput, // 덮어쓰기 }; return await this.productRepository.save(updatedProduct); } 위는 코드부입니다.일단 영상에서 update부분을 만진거 같지는 않은데, 여기서 updateProductInput의 productTags가 string 타입 배열이라 저장 시 충돌이 일어나네요. 태그 생성부분을 따로 메서드 추출을 해야할까요?
-
미해결자바스크립트 알고리즘 문제풀이 입문(코딩테스트 대비)
이중 for문에 대한 시간 복잡도 질문 있습니다!
밑의 코드의 내부 for문에서 최악의 경우 연산이 arr.length-1번 일어나기 때문에 시간 복잡도를 O(n^2)으로 봐야 할까요?function solution(m, arr) { let answer = 0, sum = 0; for (let i = 0; i < arr.length; i++) { sum = arr[i]; if (sum === m) { answer += 1; continue; } for (let j = i + 1; j < arr.length; j++) { sum += arr[j]; if (sum === m) { answer += 1; break; } else if (sum > m) { break; } } } return answer; }
-
해결됨풀스택을 위한 탄탄한 프런트엔드 부트캠프 (HTML, CSS, 바닐라 자바스크립트 + ES6) [풀스택 Part2]
header 의 CSS 값 중 left:0 으로 설정한 부분이 잘 이해가 되지 않습니다.
[모던 HTML/CSS 로 상용화도 가능한 반응형 모던 웹페이지 만들기3] 12:10 부분에서, header 의 CSS 값 중 top :0 인 것은 이해가 되는데,left :0 으로 설정한 이유는 잘 모르겠습니다.이미 width:100% 로 설정해서 좌우에 딱 맞게 설정된것으로 이해했는데, 여기에다가 또 left:0 을 해서 중앙이 아닌 좌측 정렬을 하는 이유가 있는걸까요?
-
미해결Vue.js 끝장내기 - 실무에 필요한 모든 것
Node 버전변경, nvm 설치가 다른 프로젝트에도 영향 주나요?
초기 세팅하다 안돼서 폴더 다 삭제하고 처음부터 다시 했더니삭제전 노드, vue cli 버전이 그대로 뜨는데 수업 듣기 전 상태로 돌리는 방법이 있나요?
-
미해결애플 웹사이트 인터랙션 클론!
마지막 강의 js파일로 바꿀 시 스크롤 프레임 렉? 버벅임?
마지막 강의에서 올리신 js파일로 바꾸니 애니메이션이 들어가있는 section 0, 2에서 터치패드로 스크롤 시 멈추는 부분에서 몇프레임 앞뒤 왔다갔다 하는 현상이 좀 심하게 발생합니다. 이전만큼 부드럽게 진행이 되지 않고 좀 간격이 넓게 스크롤 되는 느낌입니다. 이미지 로딩 후 정렬 때문에 이렇게 되는건가요? 아니라면 혹시 팁을 좀 주실 수 있나요?다시 확인해본 바 새로고침을 하면 이러한 문제가 사라지긴 합니다만 원인을 잘 모르겠네요. 좀 더 알아보겠습니다. 제가 진행한 파일입니다!https://leealvinlee.github.io/Leeum_Maurizio_Catellan/
-
해결됨Vue.js 끝장내기 - 실무에 필요한 모든 것
vue create 할때 pick a unit testing solution은 안 떠요
vue-cli 5.0.8이라 선생님이 하라는대로 했는데 unit testing solution부분은 없는데 어떻게 하나요?
-
미해결자바스크립트 알고리즘 문제풀이 입문(코딩테스트 대비)
while문 없이 if만 사용
function solution(m, arr) { let answer = 0; let sum = 0; let lt = 0; for (let rt = 0; rt < arr.length; rt++) { if (sum < m) sum += arr[rt]; else if (sum > m) { sum -= arr[lt++]; } if (sum === m) { answer++; sum += arr[rt]; } } return answer; } let a = [1, 2, 1, 3, 1, 1, 1, 2];while문 없이 if만 사용해도 답이 나오던데 while문 이렇게 사용해도 문제가 없나요?
-
미해결처음 만난 리액트(React)
CommentListItem의 props에 대한 질문입니다.
강의에서 CommentListItem 컴포넌트를 만든 후에CommentList 컴포넌트를 만들었는데,CommentListItem에서 comment를 props로 받는건CommentList에 map에서 comments에서 배열을 하나씩 뽑을 때 사용할 이름 comment를 생각해두고 CommentListItem가 comment로 명명한 props를 받는건가요? 그리고map에서 사용할 comment 처럼 쓰이는 것들도 그냥 변수라고 부르나요?index가 key 값으로 사용되지 않았는데 존재 이유는 무엇인가요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
클래스와 상속에 대한 질문입니다.
첫번째 질문 class Monster { power = 10; constructor(aaa) { this.power = aaa; } attack = () => { console.log("공격하자!!"); console.log(`내 공격력은 ${this.power} 이야`); }; run = () => { console.log("도망가자!!"); }; } const mymonster1 = new Monster(20); mymonster1.attack(); mymonster1.run(); const mymonster2 = new Monster(); mymonster2.attack(); mymonster2.run();//터미널 공격하자!! 내 공격력은 20 이야 도망가자!! 공격하자!! 내 공격력은 undefined 이야 도망가자!!위와 같이 new Monster 하면서 생성자에 power 값을 넘겨주지 않으면 undefined 이 찍히는데,저렇게 생성자가 있는 상황에서, 기본적으로 class 안에서 설정해 준 power 값 power = 10;을 이용하려면 어떻게 해야 하나요? 두번째 질문class Monster { power = 10; constructor(aaa) { this.power = aaa; } attack = () => { console.log("공격하자!!"); console.log("내 공격력은 " + this.power + " 이야!!!"); }; } class SkyMonster extends Monster { run = () => { console.log("날라서 도망가자!!"); }; } class GroundMonster extends Monster { run = () => { console.log("뛰어서 도망가자!!"); }; } const skymonster = new SkyMonster(10); skymonster.attack(); skymonster.run(); const groundmonster = new GroundMonster(30); groundmonster.attack(); groundmonster.run(); class Monster { power = 10; constructor(aaa) { this.power = aaa; } attack = () => { console.log("공격하자!!"); console.log("내 공격력은 " + this.power + " 이야!!!"); }; } class SkyMonster extends Monster { constructor(qqq) { super(qqq); } run = () => { console.log("날라서 도망가자!!"); }; } class GroundMonster extends Monster { constructor(www) { super(www); } run = () => { console.log("뛰어서 도망가자!!"); }; } const skymonster = new SkyMonster(10); skymonster.attack(); skymonster.run(); const groundmonster = new GroundMonster(30); groundmonster.attack(); groundmonster.run(); //터미널 공격하자!! 내 공격력은 10 이야!!! 날라서 도망가자!! 공격하자!! 내 공격력은 30 이야!!! 뛰어서 도망가자!!위의 코드를 아래 코드로 바꾸면서 부모 생성자로 값을 넘겨주는 방법을 알려주셨는데터미널에 찍히는 결과는 똑같은데 왜 저렇게 부모 생성자로 값을 넘겨줘야 하는지 이유를 잘 모르겠습니다.
-
해결됨[코드캠프] 훈훈한 Javascript
동기와 비동기, undefined 질문입니다.
안녕하세요. 섹션 8 데이터 통신에서 동기와 비동기 실습을 하며 모르는 것이 있어 질문드립니다.setTimeout(() => { console.log("setTimeout call") }) const func3 = function() { console.log("func3 call") } const func2 = function() { func3() console.log("func2 call") } const func1 = function() { func2() console.log("func1 call") } func1()이 코드를 실행하였는데 console 창에 setTimeout call 위에 undefined가 뜬게 이해가 안갑니다. 어느 부분을 실행하였을 때 나온 undefined인지 설명 부탁드립니다!
-
해결됨타입스크립트 입문 - 기초부터 실전까지
todoItems 타입을 더 상세하게 해도 관계는 없을런지요?
강의에서 todoItems 타입을 object[] 로 지정하셨는데요.{ id: number, title: string, done: boolean }[] 와 같이 상세하게 작성해도 무방할까요? 일단 에러는 안났는데, 실제 개발시에는 object[]가 더 간단할거 같지만, 어떤게 더 좋을까요?
-
미해결Vue.js 중급 강좌 - 웹앱 제작으로 배워보는 Vue.js, ES6, Vuex
깃허브 권한요청드립니다
권한 요청드려요~
-
해결됨[코드캠프] 시작은 프리캠프
js 파일로 따로하면
안녕하세요 강사님 질문이 있습니다.인증번호 전송하는 예시를 html내부에 js 태그로, 퀴즈를 거의 비슷하게 맞춰서 완료하긴 했는데, 이를 js 확장자로 파일을 2개 나눠서 진행해봤는데 뭐가 문제인지 잘 작동하지 않습니다. 단순히 제가 뭐를 잘못 입력한건지 아니면 이렇게 2개 나눠서 하는게 안되는건지 궁금합니다!!
-
미해결[하루 10분|Web Project] HTML/JS/CSS로 나만의 심리테스트 사이트 만들기
아톰 에디터 설치
atom.io로 들어가면 자꾸 이런 화면이 나오네요! 어떻게 해야 강의에서 보여주시는 화면으로 들어갈 수 있나요? ㅠㅠㅠ
-
미해결Vue.js 끝장내기 - 실무에 필요한 모든 것
라우터 네비게이션 가드 질문드려요
안녕하세요 캡틴판교님라우터 네비게이션 가드 강의를 듣다가 next()는 to에서 지정한 url로 이동하기 위한 함수라고 이해했고 위의 next('/login')은 이해가 되는데아래 next()는 to를 어디로 인식하고 이동하게되나요??
-
미해결Vue.js 끝장내기 - 실무에 필요한 모든 것
[질문] $store와 store의 차이
안녕하세요 캡틴판교님 제가 저번에도 질문드린 적이 있는데 이해가 잘안되서 다시 질문드려요강의에서는 import store해서 가져온다음 && store.getters.isLogin으로 사용하는데위와 같이 사용하면 작동이 안되나요??this.$store 도 store안에있는 무언가를 가져오는 코드구문이 아닌가요??store와 $store의 차이를 잘 모르겠어요 너무 궁금합니다.
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
Entity 구현 - 1: N, N : M 이 강의10분 13초에서
안녕하세요.위 파일은 product.entity.ts 파일입니다.product.entity.ts 파일에서 @JoinColumn() 을 productSaleslocation 테이블에만 해주시는 이유가 무엇인지 알 수 있을까요?product테이블과 서로 관계를 맺고 있는 productSaleslocation 테이블과 users 테이블에도 @JoinColumn()을 해줘야 하는 것 아닌가요?상품테이블은productCategory테이블과(상품카테고리_id)ManyToOne 관계를 맺고 있으며, User 테이블과 (유저_id) ManyToOne 관계를 맺고 있어서 각각 JoinColumn을 해줘야 하는 것으로 생각했는데, 제 생각이 틀린 것일까요?좋은 강의 해주셔서 진심으로 감사합니다!
-
미해결Vue.js 끝장내기 - 실무에 필요한 모든 것
{data} 관련 질문드립니다
안녕하세요 캡틴판교님 강의를 듣던 중 설명해주셨는데 까먹어서 어디서 들었는지 기억이 안나서 질문드려요저기 data를 바로 { }로 묶어서 쓸수있는 이유가 궁금해요개발자뷰안에서 보이는 요청한 data인가요?
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
entity 구현 1:1 강의 질문입니다.
안녕하세요. 좋은 강의 감사합니다.entity 구현 1:1 강의에서 npm i 후 package: '@angular-devkit/core@15.1.4', Unsupported engine 이라고 나오는데, 이렇게 터미널에 찍히는 이유가 무엇인가요?계속 사용할 경우 어떤 문제가 발생하나요? npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/core@15.1.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/schematics@15.1.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/schematics-cli@15.1.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/core@15.0.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: '@angular-devkit/schematics@15.0.4', npm WARN EBADENGINE required: { npm WARN EBADENGINE node: '^14.20.0 || ^16.13.0 || >=18.10.0', npm WARN EBADENGINE npm: '^6.11.0 || ^7.5.6 || >=8.0.0', npm WARN EBADENGINE yarn: '>= 1.13.0' npm WARN EBADENGINE }, npm WARN EBADENGINE current: { node: 'v16.12.0', npm: '8.1.0' } npm WARN EBADENGINE } npm WARN deprecated apollo-datasource@3.3.2: The `apollo-datasource` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-server-errors@3.3.1: The `apollo-server-errors` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-server-plugin-base@3.7.1: The `apollo-server-plugin-base` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-server-types@3.7.1: The `apollo-server-types` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead npm WARN deprecated apollo-server-express@3.11.1: The `apollo-server-express` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-reporting-protobuf@3.3.3: The `apollo-reporting-protobuf` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/usage-reporting-protobuf` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated apollo-server-env@4.2.1: The `apollo-server-env` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/utils.fetcher` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. npm WARN deprecated subscriptions-transport-ws@0.11.0: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md npm WARN deprecated apollo-server-core@3.11.1: The `apollo-server-core` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details. added 806 packages, and audited 807 packages in 21s 98 packages are looking for funding run `npm fund` for details found 0 vulnerabilities
-
미해결인터랙티브 웹 개발 제대로 시작하기
브라우저 사이즈에 따라 위치값이 달라지는건 왜일까요..?
안녕하세요전진 3D스크롤 예제를 이리저리 수정해보고 있는데요.옆면 벽에 더해 위쪽 벽도 만들어보고 싶어서 수정하고 있습니다. 브라우저 사이즈가 작을때는 정상적입니다..근데 브라우저를 최대화하면...이렇게 위쪽 벽이 튀어나가버립니다.. html은 실습예제에서 양쪽벽과 위쪽벽만 빼고 삭제했습니다..<div class="world"> <div class="stage"> <div class="house"> <section class="wall wall-left"></section> <section class="wall wall-right"></section> <section class="wall wall-upper wall-upper-left"></section> <section class="wall wall-upper wall-upper-right"></section> </div> </div></div> css는 body world stage house wall는 실습예제와 크게 다른점이 없구요..body { height: 100vh; font-family: 'Apple SD Gothic Neo', 'Roboto', 'Noto Sans KR', NanumGothic, 'Malgun Gothic', sans-serif; color: #555; background: #555;}.world { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; perspective: 100vw;}.stage { position: absolute; left: 0; top: 0; width: 100vw; height: 100vh; transform-style: preserve-3d;}.house { width: 100vw; height: 100vh; transform: translateZ(-500vw); transform-style: preserve-3d;}.wall { position: absolute; left: 0; top: 0; width: 100vw; height: 100vh;} 옆벽과 위쪽벽만 아래처럼 만들어놨습니다...wall-right { background:#6b68ff55; width: 1000vw; transform: rotateY(90deg) translateZ(-400vw)}.wall-upper-left { height: 1000vw; background: #00000055; transform: rotateX(90deg) translateZ(500vw)} 둘다 길이가 1000vw라서 브라우저 가로사이즈에 따라 달라질 요인은 없는거같은데...왜 그럴까요?ㅠㅠ세로로는 브라우저 크기에 영향을 안받고, 오직 가로크기가 변하면 저렇게 어긋나버립니다..