묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결앵귤러 파이어베이스 완전정복 - PetStore 쇼핑몰 프로젝트
섹션2 FireBase의 petList활용하기에서 에러나네요
설명대로 다운로드받은 폴더에서 복사하고 새로 생성한 프로젝트에 붙여넣기했는데 저도 저 위와 같은 오류문구가 나오네요 ./src/app/services/item.service.ts:2:0-41 - Error: Module not found: Error: Can't resolve 'firebase/app' in 'C:\Users\jun\Documents\angular-08liter\angular-petlist\src\app\services' ./src/app/services/item.service.ts:3:0-27 - Error: Module not found: Error: Can't resolve 'firebase/database' in 'C:\Users\jun\Documents\angular-08liter\angular-petlist\src\app\services' Error: src/app/classes/item.ts:2:5 - error TS2564: Property 'key' has no initializer and is not definitely assigned in the constructor. 2 key: string; ~~~ Error: src/app/classes/item.ts:3:5 - error TS2564: Property 'id' has no initializer and is not definitely assigned in the constructor. 3 id: string; ~~ Error: src/app/classes/item.ts:4:5 - error TS2564: Property 'name' has no initializer and is not definitely assigned in the constructor. 4 name: string; ~~~~ Error: src/app/classes/item.ts:5:5 - error TS2564: Property 'available' has no initializer and is not definitely assigned in the constructor. 5 available: boolean; ~~~~~~~~~ Error: src/app/item/item.component.html:4:27 - error TS2341: Property 'item' is private and only accessible within class 'ItemComponent'. 4 <input [(ngModel)]="item.id" placeholder="ID"/> ~~~~ src/app/item/item.component.ts:8:16 8 templateUrl: './item.component.html', m ~~~~~~~~~~~~~~~~~~~~~~~ Error occurs in the template of component ItemComponent. Error: src/app/item/item.component.html:4:27 - error TS2341: Property 'item' is private and only accessible within class 'ItemComponent'. 4 <input [(ngModel)]="item.id" placeholder="ID"/> ~~~~ src/app/item/item.component.ts:8:16 8 templateUrl: './item.component.html', ~~~~~~~~~~~~~~~~~~~~~~~ Error occurs in the template of component ItemComponent. Error: src/app/item/item.component.html:9:27 - error TS2341: Property 'item' is private and only accessible within class 'ItemComponent'. 9 <input [(ngModel)]="item.name" placeholder="Name"/> ~~~~ src/app/item/item.component.ts:8:16 8 templateUrl: './item.component.html', ~~~~~~~~~~~~~~~~~~~~~~~ Error occurs in the template of component ItemComponent. Error: src/app/item/item.component.html:9:27 - error TS2341: Property 'item' is private and only accessible within class 'ItemComponent'. 9 <input [(ngModel)]="item.name" placeholder="Name"/> ~~~~ src/app/item/item.component.ts:8:16 8 templateUrl: './item.component.html', ~~~~~~~~~~~~~~~~~~~~~~~ Error occurs in the template of component ItemComponent. Error: src/app/item/item.component.html:14:27 - error TS2341: Property 'item' is private and only accessible within class 'ItemComponent'. 14 <input [(ngModel)]="item.available" type="checkbox"/> ~~~~ src/app/item/item.component.ts:8:16 8 templateUrl: './item.component.html', ~~~~~~~~~~~~~~~~~~~~~~~ Error occurs in the template of component ItemComponent. Error: src/app/item/item.component.html:14:27 - error TS2341: Property 'item' is private and only accessible within class 'ItemComponent'. 14 <input [(ngModel)]="item.available" type="checkbox"/> ~~~~ src/app/item/item.component.ts:8:16 8 templateUrl: './item.component.html', ~~~~~~~~~~~~~~~~~~~~~~~ Error occurs in the template of component ItemComponent. Error: src/app/item/item.component.ts:34:9 - error TS2322: Type 'Item | undefined' is not assignable to type 'Item'. Type 'undefined' is not assignable to type 'Item'. 34 this.item = this.itemService.getItem(id); ~~~~~~~~~ Error: src/app/services/item.service.ts:4:27 - error TS2307: Cannot find module 'firebase/app' or its corresponding type declarations. 4 import * as firebase from 'firebase/app'; ~~~~~~~~~~~~~~ Error: src/app/services/item.service.ts:36:33 - error TS7006: Parameter 'snapshot' implicitly has an 'any' type. 36 this.itemList.on('value', snapshot => { ~~~~~~~~ Error: src/app/services/item.service.ts:37:27 - error TS7006: Parameter 'snap' implicitly has an 'any' type. 37 snapshot.forEach( snap => { 라고 나고있는데 진행이 안되고있어요
-
미해결예제로 살펴보는 PyQt Tutorial
QSlider 부분 자료 파일
따로 png 파일이 없는건가요? mute.png min.png medium.png max.png 파일이 없네요 ㅠㅠ
-
미해결mongoDB 기초부터 실무까지(feat. Node.js)
궁금한 사항이 있습니다.
항상 좋은강의 해주셔셔 감사합니다. 다름이 아니라 관계를 하게 될 경우 index를 따로 생성해주셔야 한다고 말씀해주셨는데 부모 - 자식의 관계를 key로 생성한다면 결국 부모랑 자식이 가지고 있는 id는 모두 index로 생성이 되어있고 부모는 자식의 key를 자식은 부모의 key를 가지고 있는 상태인데 왜 따로 index를 부여해야 하는지 궁금합니다..
-
미해결자바스크립트 알고리즘 문제풀이 입문(코딩테스트 대비)
봉우리문제
선생님 봉우리 문제에서 flag변수를 사용하셨는데, 정확히 flag변수는 어떤 경우에 사용해야하는지 알 수 있을까요? 언제써야하는건지 확실히 모르겠습니다.
-
미해결Google 공인! 텐서플로(TensorFlow) 개발자 자격증 취득
중학생도 가능?
안녕하세요, 좋은 강의 감사 드립니다. 제 아들이 중학교 1학년인데, 이쪽에 관심이 많습니다. 중학생 또는 초등학생고학년도 이 자격을 취득할 수 있나요? 아이가 소프트웨어를 정말 좋아합니다^^
-
미해결언리얼 핵앤슬래쉬 게임 만들기
앉아서 무기 뽑기 강의 중 질문
앉아서 무기 뽑기 애니메이션 블루프린트에서 캐쉬포즈 메뉴가 없습니다.(4.26버전) 강의 내용에는 캐쉬포즈를 선택해서 진행하시던데, 캐쉬포즈 메뉴가 왜 없는지 모르겠습니다. 별도로 설정해줘야되는 부분이 있을까요?
-
미해결일주일 완성! 3dsmax 입문 (자동차 및 캐릭터 만들기)
서로 다른 맥스 파일 간 오브젝트 이동
안녕하세요, 파일 간 오브젝트 이동에 관한 문제입니다. 예를 들어, 제가 맥스 파일을 열고 자동차 오브젝트를 만들었는데 다른 맥스 파일을 새로 열어서 이 자동차 오브젝트를 그 파일로 복사붙여넣기 하고 싶을 때 다른 파일로의 이동은 어떻게 하는건가요?
-
미해결[개정판] 파이썬 머신러닝 완벽 가이드
오류 문의
1. 피처별 상관도를 시각화하는 과정에서 사용된 아래의 코딩에서 오류가 나고 있습니다. plt.figure(figsize=(9, 9)) corr = card_df.corr() sns.heatmap(corr, camp='RdBu') 결과 : AttributeError: 'QuadMesh' object has no property 'camp' 아래와 같이 camp를 제거하고 실행하면 오류없이 수행이 되기는 합니다. plt.figure(figsize=(9, 9)) corr = card_df.corr() sns.heatmap(corr) 구글링을 해도 해당 오류에 대한 것을 찾을 수가 없어서 파라미터를 제거한 것인데 버전이 업그레이드 되면서 camp라는 속성이 사라진 건가요? 아니면 다른 패키지의 설치가 더 필요한 것일까요? 2. pip install -U imbalanced-learn 설치 후 from imblearn.over_sampling import SMOTE smote = SMOTE(random_state=0) X_train_over, y_train_over = smote.fit_sample(X_train, y_train) 위와 같이 실행하면 'SMOTE' object has no attribute 'fit_sample' 라는 오류가 나옵니다. from imblearn.over_sampling import SMOTE smote = SMOTE(random_state=0) X_train_over, y_train_over = smote.fit_resample(X_train, y_train) 로 실행하면 수행이 되는데 문제가 없을까요? 버전 문제일수 있다고 해서 pip install -U scikit-learn 도 수행을 했는데 문제가 해결되지는 않고 있습니다. fit_sample() 함수 대신 fit_resampe()를 사용해도 되는 것일까요? 테스트 환경은 아나콘다가 아니고 윈도우에 파이썬을 설치후 vscode에서 작업을 하고 있습니다.
-
미해결내 업무를 대신 할 파이썬(Python) 웹크롤링 & 자동화 (feat. 주식, 부동산 데이터 / 인스타그램)
네이버 부동산 크롤링 헤더 오류
네이버 부동산 크롤링 작업 중 아래와 같은 오류가 계속 발생합니다. 어떻게 해결할 수 있나요?
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
저는 왜 open in browser가 안보일까요?
저는 왜 open in browser가 안보일까요?
-
미해결프로그래밍, 데이터 과학을 위한 파이썬 입문
에러확인부탁드립니다.
import random random_number = random.randint(1,100) print("숫자를 맞춰보세요(1~100):") user_input = int(input()) while (user_input != random_number): if user_input > random_number: print("숫자가 너무 큽니다.") elif user_input < random_number: print("숫자가 너무 작습니다.") print("정답입니다. 정답은", user_input,"입니다" ) partially initialized module 'random' has no attribute 'randint'
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
@Transactional 어노테이션 질문드립니다
안녕하세요 영한님 Jpa 로 단순 조회기능을 이용하게될때 Service Layer 에서 @Transactional(readOnly=true) 를 메소드에 선언해서 사용했었는데요 테스트하다보니 @Transactional 어노테이션 없이 사용해도 조회도되고 controller 단에서도 영속성컨텍스트가 살아있는걸로 확인이 되었습니다 (osiv 는 켜놓았습니다) findById or findAll 같은 단순 조회기능에서는 @Transactional 은 없어도 되는건가요? spring 에서는 기본적으로 트랜잭션범위와 영속성컨텍스트의 범위가 동일하다고 알고있는데 @Transactional 설정을 안해줘도 조회기능에선 영속성컨텍스트가 유지된다고 보면될까요 ? 아니면 @Transactional(readOnly=true) 는 @Transactional 없이 동작하는것과 어떤 차이가 있는걸까요 ㅠㅠ
-
미해결자바 스프링부트 활용 웹개발 실무용
MyBastisConfiguration설정시
@Autowired DataSource dataSource; @Bean public SqlSessionFactory sqlSessionFactory(DataSource dataSource, ApplicationContext applicationContext) throws Exception{ 이렇게 선언하는건랑 @Bean public SqlSessionFactory sqlSessionFactory(@Autowired DataSource dataSource, ApplicationContext applicationContext) throws Exception{ 강의에서처럼 메소드안에 직접 @Autowired 를 선언하면서 인자로 넣는거랑 차이가 있나요?
-
미해결
python cx_freeze linux
안녕하세요 윈도우에서 cx_freeze 사용하여 실행파일 만들면 exe 실행 파일 만들어 지면서 잘 동작합니다. 하지만 리눅스에서는 실행파일은 나오는데 실행 파일을 클릭해보면 "공유 라이브러리" 파일에 대해 동작하는 포로그램을 설치하지 않았습니다. 하고 나와 소스코드 앞에 #!/usr/bin/env python3 를 다 붙여 python3 setup.py build 를 하여 싫행파일을 클릭해봐도 같은 증상입니다.ㅠㅠ 혹시 해결방법 아시는분 있으신가요? 아 그리고 briefcase 라는 모듈도 같은 역할을 하는건가요?? 독립 실행형 패키지를 만들 수 있는 피키징 도구라는 말만 있고 자료가 너무 없네요ㅠㅠ
-
미해결웹 개발 슈퍼 기초 (HTML, CSS, Javascript)
홈페이지를 만들었는데 footer 영역에 리스트가 가려져서 안보여요
홈페이지를 만들었는데 반응형 리스트 목록이 길어서 footer 영역에 리스트가 가려져서 안보여요! 스크롤도 없고, 혼자 만지작 거려봤는데 전부 펼쳤을 때 끄트머리가 가려져서 안보이더라구요 ㅠㅜ 리스트를 다 열어도 푸터가 자연스럽게 아래로 내려가는 법은 없을까요? p.s 만든 내용이 첨부가 안되서 파일을 첨부해 작성한 지식인 링크를 첨부합니다! https://kin.naver.com/qna/detail.nhn?d1id=4&dirId=40608&docId=391754398
-
해결됨[리뉴얼] Node.js 교과서 - 기본부터 프로젝트 실습까지
sequelize-auto 질문있습니다.
안녕하세요 제로초님 강의를 보면서 시퀄라이즈 생성시 db를 미리 만들어 놓은 후 sequelize-auto 로 모델들을 생성해주면 init-models 등 모델 관련 js가 생기는데요 여기서 db접속이 안되는 것 같은 에러가 발생합니다. 예를들어 User모델을 가지고온 후 findOne을 하게되면 User.findOne is not a function 이런 에러가 발생하는데... 이런경우 어떻게 해결해야할까요..?
-
미해결[2026년 출제기준] 웹디자인개발기능사 실기시험 완벽 가이드
css 포지션 속성 내용 중에서
부모요소, 자식요소를 나누어 자식요소를 원하는 위치로 정확히 보내는 내용부분을 공부하고 제가 이해한 부분이 맞는 것인지 여쭤봅니다. 그림 속에서 각각의 중심점은 점으로 표시한 부분들이 맞나요?? 아니면 모두 다 왼쪽 상단이 중심점인건가요??
-
미해결실무에서 바로 쓰는 영어 이메일
강의 자료를 부탁 드립니다
안녕하세요 강의를 신청해서 듣고 있습니다 강의 자료를 별도로 제공되지 않는지요 ? 강의 자료가 있으면 부탁 드립니다. 아니면 시중에 교재가 있으면 알려 주세요 감사합니다 김영민 배상
-
미해결자바(Java) 알고리즘 문제풀이 입문: 코딩테스트 대비
테스트 케이스 추가 질문
안녕하세요! 아래와 같이 구현하였는데, 주어진 케이스만으로는 검증이 되지 않아서요! 혹시 다른 케이스 제공 부탁드려도 될까요? - 구현 - 1. ArrayList의 time 부분을 해시맵으로 구현 -> time 종류의 수를 통해 그 수만큼만 반복하도록 while문을 구현하였습니다.(테스트 케이스의 경우 1, 2, 3 으로 3종류이므로 3번 반복) 2. 0번째, 즉 ArrayList의 맨 앞의 부분을 반복 이전에 미리 빼두었습니다. 3. while 내에 for문을 통해 i를 갱신하며 이전에 탐색했던 부분은 지나가도록 구현하였습니다. import java.io.IOException;import java.util.*;class Pay { int money; int time; public Pay(int money, int time) { this.money = money; this.time = time; }}public class Main { public static void main(String[] args) throws IOException { Main T = new Main(); Scanner sc = new Scanner(System.in); int n = sc.nextInt(); HashMap<Integer, Integer> hm = new HashMap<>(); ArrayList<Pay> arr = new ArrayList<>(); for (int i = 0; i < n; i++) { int m = sc.nextInt(); int t = sc.nextInt(); hm.put(t, hm.getOrDefault(hm.get(t), 0)+1); arr.add(new Pay(m, t)); } Collections.sort(arr, new Comparator<Pay>() { @Override public int compare(Pay o1, Pay o2) { if(o2.time == o1.time) { return o2.money - o1.money; } else return o2.time - o1.time; } }); PriorityQueue<Integer> pQ = new PriorityQueue<>(Collections.reverseOrder()); int day = arr.get(0).time; int key = hm.size(); int j = 1; int result = 0; pQ.offer(arr.get(0).money); while(key > 0) { for(int i=j; i<arr.size(); i++) { if(day == arr.get(i).time) { pQ.offer(arr.get(i).money); } else { day=arr.get(i).time; j = i; break; } } key --; result += pQ.poll(); } System.out.println(result); }}
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
단방향 연관관계
안녕하세요 영한님! 연관관계 매핑에 대해 궁금한 점이 있어 질문 드립니다! @Entitypublic class Section { @ManyToOne private Point startPoint; @ManyToOne private Point endPoint;} Section (구간) 이라는 Entity 가 있고 구간의 시작과 끝을 표현하는 Point 라는 Entity가 있습니다 그리고 이들의 관계는 다음과 같습니다! A - B - C - D 라는 거리가 있을때 1 구간(Section) : A(point), B(point) 2 구간(Section) : B, C 3 구간(Section): C, D 1. 이들의 연관관계는 ManyToOne 이 맞는 것일까요? 2. Section이 연관관계의 주인이고 이는 단향뱡 관계 입니다 이때 굳이 ManyToOne 이라는 연관관계를 표현해줘야 할 필요가 있는 것인가요? 단지 명시적으로 보여주기 위함일까요? 강의 항상 잘 보고 있습니다! 감사합니다!