inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

173만명의 커뮤니티!! 함께 토론해봐요.

토큰생성 오류, 무한로딩나시는분들 이거 해보세요

미해결

따라하며 배우는 노드, 리액트 시리즈 - 기본 강의

userSchema.methods.comparePassword=function(plainPassword, cbfn){ //암호화된 비밀번호와 plain패스워드가 같은가? //plain패스워드를 암호화 후 체크 console.log("user.jsmethod") bcrypt.compare(plainPassword, this.password, function(err, isMatch){ if(err) return cbfn(err) cbfn(null, isMatch)//ismatch=true }) } if(err) return cbfn(err), 에서 ,빼니까 잘 되네요 console.log는 필요없으니 빼시면 됩니다 강의보니까 ,에서 ;로 수정하셨던데 이걸 빼먹으신거 같아요

  • nodejs
  • react
적경 댓글 2 좋아요 11 조회수 967

mask-rcnn-test dataset

미해결

[개정판] 딥러닝 컴퓨터 비전 완벽 가이드

안녕하세요. 강의 잘 수강하고 있습니다. 현재 mask rcnn-ballon 데이터셋 학습을 진행중입니다. 주석에서 train, val, test dataset 환경 파라미터가 있다고 나와있는데, train, validation 데이터 이외의 test 데이터셋은 어디에서 확인할 수 있는지 알 수 있을까요? 감사합니다.

  • tensorflow
  • 딥러닝
  • keras
  • 컴퓨터-비전
  • python
  • 머신러닝 배워볼래요?
조영훈 댓글 1 좋아요 0 조회수 249

Class-Validator MODULE_NOT_FOUND 에러

미해결

Slack 클론 코딩[백엔드 with NestJS + TypeORM]

강의를 잘 따라 가면서 공부를 하고 있는데 강좌에 나와있는대로 class-validator 을 npm -i class-validator 을 설치 후 nest를 실행하니 nest 에서 Cannot find module 'class-validator/types/decorator/decorators' 라는 에러를 나타냅니다. 혹시 몰라서 API 공식문서 에 있는 npm i class-validator class-transformer 을 다시 설치를 해보아도 같은 에러를 나타내는데 이럴 경우 어디서 확인을 해보아야 할까요? 혹시 몰라서 package.json 을 살펴 보았습니다만 dependencies 내에 설치가 되어있는것으로 나왔습니다.

  • error
  • TypeORM
  • NestJS
  • nodejs
  • express
Cliche 댓글 2 좋아요 0 조회수 1305

input case 2번 질문드립니다.

해결됨

파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)

test case 2 번의 경우 10 3 6 5 8 5 6 8 7 6 6 7 로 주어지는데 주어진 수의 리스트를 정렬하면 [5 5 6 6 6 6 7 7 8 8] 이 되고 이분 탐색 알고리즘에 의해 해를 구하면 최소 크기가 23일때 [5 5 6 6],[6 6 7],[7 8 8] 을 만족하므로 주어진 output인 24가 아닌 23이 정답이라고 생각했는데 어느 부분에서 잘못생각하였는지 궁금합니다.

  • python
  • 코테 준비 같이 해요!
taehyeong1998 댓글 1 좋아요 0 조회수 233

BFS풀이 시 높이 범위에 대한 의견공유

해결됨

파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)

h를 무조건 0~99로 설정하기보다는 미리 높이의 min 값과 max값을 구한 후 min~max 범위로 for 문을 돌려주면 더 효율적인 풀이가 될 것 같습니다. from collections import deque N = int(input()) graph = [list(map(int,input().split())) for _ in range(N)] min_rain = 99999999 max_rain = -1 # 높이의 min,max 구해주기 for row in graph: min_tmp = min(row) max_tmp = max(row) if min_tmp < min_rain: min_rain = min_tmp if max_tmp > max_rain: max_rain = max_tmp dr = [1,0,-1,0] dc = [0,1,0,-1] ans = 0 for rain in range(min_tmp+1,max_rain): visited = [[0 for _ in range(N)] for _ in range(N)] cnt = 0 for rr in range(N): for cc in range(N): if visited[rr][cc] == 0 and rain < graph[rr][cc] : visited[rr][cc] = 1 q = deque() q.append((rr,cc)) while q: r,c = q.popleft() for i in range(4): nr = r + dr[i] nc = c + dc[i] if 0 <= nr < N and 0 <= nc < N and visited[nr][nc] == 0 and rain < graph[nr][nc]: visited[nr][nc] = 1 q.append((nr,nc)) cnt += 1 if cnt > ans: ans = cnt print(ans)

  • 코테 준비 같이 해요!
  • python
taehyeong1998 댓글 1 좋아요 0 조회수 314

행렬 분해 비용 함수 질문입니다.

해결됨

[개정판] 파이썬 머신러닝 완벽 가이드

안녕하세요! 멋진 강의를 들을 수 있어서 감사하고 있습니다. 잠재요인 기반의 협업필터링 이해와 경사하강법을 이용한 행렬 분해 18:12 에서 나오는 L2 규제에 대해 궁금한 점이 있어서 문의 드립니다. 수학에 약해서 공부해볼겸 수학적으로 해석을 하려는데, 다른 사이트의 참고 내용들을 보다보니 L2 규제에 시가마가 들어가던데 여기서는 안 들어가는 이유가 무엇인지 궁금합니다. 감사합니다!

  • 행렬분해
  • 통계
  • l2규제
  • python
  • 추천시스템
  • 머신러닝 배워볼래요?
cjh 댓글 3 좋아요 0 조회수 470

serve -s build가 되지 않습니다..

미해결

한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지

Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. PS C:\Users\PC\Desktop\emotion diary> npm install -g serve changed 89 packages, and audited 90 packages in 10s 23 packages are looking for funding run npm fund for details PS C:\Users\PC\Desktop\emotion diary> cd hello PS C:\Users\PC\Desktop\emotion diary\hello> serve -g build serve : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Users\PC\AppData\Roaming\npm\ser ve.ps1 파일을 로드할 수 없습니다. 자세한 내용은 about_Execution_Policies( https://go.mic rosoft.com/fwlink/?LinkID=135170)를 참조하십시오. 위치 줄:1 문자:1 + serve -g build + ~~~~~ + CategoryInfo : 보안 오류: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess PS C:\Users\PC\Desktop\emotion diary\hello> npm run build > hello@0.1.0 build > react-scripts build Creating an optimized production build... Compiled with warnings. [eslint] src\components\DiaryItem.js Line 32:16: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text src\components\DiaryList.js Line 1:15: 'useEffect' is defined but never used no-unused-vars src\components\EmotionItem.js Line 6:13: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text src\pages\Diary.js Line 20:7: React Hook useEffect has a missing dependency: 'id'. Either include it or remove the dependency array react-hooks/exhaustive-deps Line 37:7: React Hook useEffect has a missing dependency: 'navigate'. Either include it or remove the dependency array react-hooks/exhaustive-deps Line 58:25: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text src\pages\Edit.js Line 5:9: 'getStringDate' is defined but never used no-unused-vars Line 22:7: React Hook useEffect has a missing dependency: 'id'. Either include it or remove the dependency array react-hooks/exhaustive-deps Line 39:7: React Hook useEffect has a missing dependency: 'navigate'. Either include it or remove the dependency array react-hooks/exhaustive-deps Search for the keywords to learn more about each warning. To ignore, add // eslint-disable-next-line to the line before. File sizes after gzip: 54.79 kB build\static\js\main.544a876e.js 1.42 kB build\static\css\main.b7fc6af2.css The project was built assuming it is hosted at /. The build folder is ready to be deployed. You may serve it with a static server: serve -s build Find out more about deployment here: https://cra.link/deployment PS C:\Users\PC\Desktop\emotion diary\hello> serve -s build serve : 이 시스템에서 스크립트를 실행할 수 없으므로 C:\Users\PC\AppData\Roaming\npm\ser ve.ps1 파일을 로드할 수 없습니다. 자세한 내용은 about_Execution_Policies( https://go.mic rosoft.com/fwlink/?LinkID=135170)를 참조하십시오. 위치 줄:1 문자:1 + serve -s build + ~~~~~ + CategoryInfo : 보안 오류: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess PS C:\Users\PC\Desktop\emotion diary\hello> npm install -g serve와 npm run build를 했습니다 you may serve it with a static server라는 메시지와함께 serve -s build라는 메세지도 떴는데 serve -s build라고 명령어를 입력했는데도 입력이 되지 않습니다... 루트폴더 문제인가요? 문제가 무엇인가요

  • react
  • nodejs
  • javascript
HongWon Kim 댓글 3 좋아요 0 조회수 1028

적용 학습

해결됨

일잘하는 마케터, MD에게 꼭 필요한 파이썬 데이터 분석

안녕하세요 리뷰 크롤링 하는 과정에서 다른 페이지에 적용 학습해보다가 에러코드가 떠서 질문드립니다. name = ['언더아머 CGI 다운'] ns_address = 'https://search.shopping.naver.com/search/all?query=cgi%20%EB%8B%A4%EC%9A%B4&frm=NVSHATC&prevQuery=%EB%89%B4%EB%B0%9C%EB%9E%80%EC%8A%A4%EB%B0%94%EB%9E%8C%EB%A7%89%EC%9D%B4' shoppingmall_review = "/html/body/div/div/div[2]/div[2]/div[2]/div[3]/div[1]/ul/li[3]/a" category_total = "/html/body/div/div/div[2]/div[2]/div[2]/div[3]/div[7]/div[2]/div[2]/ul/li[1]/a" 순서대로 위와 같이 적용 완료하였는데요, 그 다음에 소스코드 주신 부분인 아래 부분을 적용하니까 다음과 같은 에러가 뜹니다. 확인 부탁드려도 될까요? header = {'User-Agent': ''} driver.implicitly_wait(3) driver.get(ns_address) req = requests.get(ns_address,verify=False) html = req.text soup = BeautifulSoup(html, "html.parser") sleep(2) element=driver.find_element_by_xpath(shoppingmall_review) driver.execute_script("arguments[0].click();", element) sleep(2)' 에러 - /usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) --------------------------------------------------------------------------- NoSuchElementException Traceback (most recent call last) <ipython-input-30-8a5c5adbf17a> in <module> 6 soup = BeautifulSoup(html, "html.parser") 7 sleep(2) ----> 8 element=driver.find_element_by_xpath(shoppingmall_review) 9 driver.execute_script("arguments[0].click();", element) 10 sleep(2) 3 frames /usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py in find_element_by_xpath(self, xpath) 392 element = driver.find_element_by_xpath('//div/td[1]') 393 """ --> 394 return self.find_element(by=By.XPATH, value=xpath) 395 396 def find_elements_by_xpath(self, xpath): /usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py in find_element(self, by, value) 976 return self.execute(Command.FIND_ELEMENT, { 977 'using': by, --> 978 'value': value})['value'] 979 980 def find_elements(self, by=By.ID, value=None): /usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py in execute(self, driver_command, params) 319 response = self.command_executor.execute(driver_command, params) 320 if response: --> 321 self.error_handler.check_response(response) 322 response['value'] = self._unwrap_value( 323 response.get('value', None)) /usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/errorhandler.py in check_response(self, response) 240 alert_text = value['alert'].get('text') 241 raise exception_class(message, screen, stacktrace, alert_text) --> 242 raise exception_class(message, screen, stacktrace) 243 244 def _value_or_default(self, obj, key, default): NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div/div/div[2]/div[2]/div[2]/div[3]/div[1]/ul/li[3]/a"} (Session info: headless chrome=105.0.5195.102) 그리고 다음 url과 같이 나타낼 페이지가 그리 많지 않은 경우에도 같은 소스코드 양식을 사용해도 될까요? https://search.shopping.naver.com/catalog/29274895216?query=cgi%20%EB%8B%A4%EC%9A%B4&NaPm=ct%3Dl8qn5dbs%7Cci%3Dcc97712ba6dec8be52ea670a2e607bb755d59f4f%7Ctr%3Dslsl%7Csn%3D95694%7Chk%3D97fd029ce7fc81750ad0a1d2110ad155b54fe09d 감사합니다.

  • python
  • 웹-크롤링
GGGG 댓글 1 좋아요 0 조회수 1065

버퍼 강의 중 VWorld StateTile 레이어

해결됨

QGIS 파이썬 자동화 (벡터편) Ver.2

버퍼 강의 중 VWorld StateTile 레이어 추가를 어떻게 하나요???

  • GIS
  • QGIS
  • python
backboss 댓글 1 좋아요 2 조회수 476

sequelize cascade 옵션을 사용해서 delete 할때

미해결

안녕하세요. 웹 프로젝트를 진행하면서 궁금한 점이 있어서 질문드립니다. mysql과 sequelize를 사용하며 users 테이블과 contents 테이블이 1:N 관계를 가지고 있습니다. 그래서 users 데이터를 delete 할 때 자식으로 묶인 contents 데이터들을 cascade 옵션을 통해 같이 delete 시키고자 합니다. models/contents.js models/users.js 이때 그냥 삭제시키는 게 아니라 users 테이블과 contents 테이블 모두 paranoid 옵션을 통해 deletedAt을 생성시키고 삭제된 날짜를 찍히게 하고자 하는데 현재 user를 delete 하면 user는 삭제가 되어 deletedAt이 잘 나오지만 content는 삭제가 되지 않아 deletedAt이 나오지 않는 상황입니다. 구글링을 통해 여러 방법을 시도해 보았지만 해결되지 않아 질문드립니다. hooks나 api를 사용하지 않고 cascade를 통해 자식 요소까지 삭제되면서 deletedAt이 잘 나올 수 있는 효과적인 방법이 있을까요?

  • mysql
  • sequelize
  • nodejs
김경태 댓글 0 좋아요 0 조회수 306

class name 질문

미해결

한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지

안녕하세요. classname 작성하실때 어떤건 className = {name} 이런식으로 괄호 안에 넣고 어떤건 단순히 className = "name" 이렇게 하시는데 혹시 어떤 차이가 있고 이유는 무엇인지 궁금합니다 ㅠㅠ 이미 가르쳐주셨던건데 제가 모르는거 같기도 하네요

  • react
  • nodejs
  • javascript
ch2323 댓글 1 좋아요 0 조회수 398

StandardScaler변환 후 log변환

미해결

[개정판] 파이썬 머신러닝 완벽 가이드

24:04 코드에서 왜곡된 분포 정도를 낮추기 위해 log변환으로 스케일링을 하였는데 StandardScaler로 한번 더 변환을 하는것이 의미가 있는지 궁금합니다 이유가 무엇인가요?

  • 통계
  • 머신러닝 배워볼래요?
  • python
예찬 댓글 1 좋아요 1 조회수 571

cookie-parser Invalid or unexpected token error

미해결

따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)

영상에 따라서 단순하게 cookie-parser 설치하고 import cookie-parser 한다음에 app.use(cookieParser()) 진행하면 상단에 이미지처럼 에러가 발생하더라구요. cookie-parser을 제거하면 cookie가 정상적으로 저장되는 것을 볼 수 있었습니다. 어떤 부분을 놓친 것일까요 server.ts import express from "express"; import morgan from "morgan"; import { AppDataSource } from "./data-source" import authRoutes from "./routes/auth"; import subRoutes from "./routes/subs"; import cors from 'cors'; import dotenv from 'dotenv'; import cookieParser from "cookie-parser"; const app = express(); dotenv.config(); app.use(cors({ origin: process.env.ORIGIN, credentials: true })) app.use(express.json()); app.use(morgan('dev')); app.use(cookieParser()) app.get("/", (_, res) => res.send("running")); app.use('/api/auth', authRoutes); app.use("/api/subs", subRoutes); const PORT = process.env.PORT; console.log('PORT', PORT) app.listen(PORT, async () => { console.log(`server running at http://localhost:${PORT}`); AppDataSource.initialize().then(async () => { console.log("data initialize...") }).catch(error => console.log(error)) })

  • react
  • nodejs
  • typescript
  • postgresql
  • docker
  • 클론코딩
  • Next.js
박준희 댓글 0 좋아요 0 조회수 262

Router 예제 복붙 - 오류

미해결

따라하며 배우는 노드, 리액트 시리즈 - 기본 강의

20강에서 Router 예제 복붙 시 오류안나는 최종본입니다 !! import React from "react"; import { Route, Routes, BrowserRouter } from "react-router-dom"; import LandingPage from "./components/views/LandingPage/LandingPage"; import LoginPage from "./components/views/LoginPage/LoginPage"; import RegisterPage from "./components/views/RegisterPage/RegisterPage"; function App() { return ( <BrowserRouter> <div> {/* A <Switch> looks through its children <Route>s and renders the first one that matches the current URL. */} <Routes> <Route exact path="/" element={LandingPage()}/> <Route exact path="/login" element={LoginPage()}/> <Route exact path="/register" element={RegisterPage()}/> </Routes> </div> </BrowserRouter> ); } export default App;

  • nodejs
  • react
jysrho12 댓글 2 좋아요 3 조회수 1112

return문

미해결

한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지

자바스크립트 함수 인강에서 return문 개념이 너무 헷갈려서요. function getArea(width*height){ let area = width* height; return area; } let area1 = getArea(100,200); return을 쓰면 위와 같이 항상 새로운 변수를 지정해서 getArea함수를 호출해야하나요? 왜 return을 사용하는지 잘 모르겠어요..

  • react
  • javascript
  • nodejs
소연 댓글 0 좋아요 1 조회수 295

CREATE 상태변화 로직 분리 시 newItem 생성을 reducer에서 하는 이유

해결됨

한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지

안녕하세요~ 강의 듣던 중 궁금증이 생겨 질문 남깁니다 useReducer로 CREATE 상태 로직을 분리할 때, 기존과 다르게 newItem을 reducer에서 생성하는 이유가 무엇인가요? 아래처럼 기존과 동일한 방식으로 newItem을 onCreate 내에서 생성했을 경우에도 정상 동작하는 것 같은데 혹시 동작이나 성능면에서 차이점이 있나요? +) 계속 생각할수록 로직을 분리할 때 어디서부터 어디까지 분리해야할지 기준을 잘 모르겠어요,,ㅠ 강의에서 CREATE로직 분리 시 newItem을 reducer에서 생성한 것 처럼, INIT로직 분리 시에도 initData를 reducer에서 생성 할 수 있을 것 같은데(아래 코드).. 분리하는 로직의 기준점? 같은걸 어떻게 잡아야할지 잘 모르겠습니다ㅜㅜ 혹시 어떤 기준으로 분리해야할지 규칙이나 팁같은게 있을까요?

  • nodejs
  • react
  • javascript
팀오 댓글 1 좋아요 0 조회수 417

YOLO v1 바운딩 박스 관련

미해결

[개정판] 딥러닝 컴퓨터 비전 완벽 가이드

안녕하세요! YOLO v1의 이해 - 01에서 바운딩 박스가 셀마다 2개식 생성이 되는데 이때 셀마다 갖는 바운딩 박스의 크기나 모양 등이 동일한 것인가요? 아니면 랜덤하게 생성이 되는것인가요? 감사합니다~

  • 컴퓨터-비전
  • tensorflow
  • keras
  • python
  • 딥러닝
  • 머신러닝 배워볼래요?
축구쟁이 댓글 1 좋아요 0 조회수 379

onCreate에서 data상태 관련 질문입니다

해결됨

한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지

안녕하세요 강사님! 최적화3 - useCallback 강의 듣던 중 의문점이 생겨 질문 남깁니다. onCreate에 useCallback을 사용하고 의존성 배열을 빈 값으로 두면 mount시에 한번만 실행되기 때문에 data state가 초기값인 빈 배열인 상태이다 <= 까지는 이해하였습니다. 그런데 함수형 업데이트를 이용해서 인자로 data를 전달하면 최신 data state를 반영할 수 있다는 부분이 잘 이해가 안갑니다. onCreate가 mount시에 생성되고 생성시의 data state가 계속 유지된다면 인자로 전달되는 data state또한 초기값인 빈 배열이 들어가게되어 결국 setData(([]) => [ newItem, [] ]) 처럼 동작해야 하는것이 아닌가요? 어떻게 인자로 전달되는 data에는 최신 상태가 반영되는건가요??

  • nodejs
  • react
  • javascript
팀오 댓글 1 좋아요 0 조회수 520

스케일링 1 강의 질문

미해결

[개정판] 파이썬 머신러닝 완벽 가이드

데이터 전처리 - 스케일링 - 01 강의 1분47초에서 표준화로 데이터의 피처 각각이 평균이 0 이고 분산이 1인 가우시안 정규분포로 바꿔준다고 했는데요. 원래 데이터가 정규분포를 가졌다면 xi_new (표준화 식)식 으로 평균이 0 이고 분산이 1인 정규분포를 도출할 수 있지만 애초에 정규분포를 이루지 않는 데이터의 경우 는 해당 식을 적용한다고 해서 정규분포가 되지 않을 텐데 이런 경우는 어떻게 해서 정규분포로 만든다는 것일까요? 답변 부탁드립니다. 감사합니다.

  • python
  • 머신러닝 배워볼래요?
  • 통계
허쿡 댓글 1 좋아요 0 조회수 294

도저히 모르겠어서 질문 남깁니다

미해결

따라하며 배우는 노드, 리액트 시리즈 - 기본 강의

TypeError: user.comparePassword is not a function >>비주얼에서는 이런식으로 자꾸 오류가 뜨고, 포스트맨에서는 Could not get response Error: read ECONNRESET 이렇게 뜹니다,,!!! post는 http://localhost:5000/api/users/login 이던 http://localhost:5000/login이던 다 안돼요,,, 답변 부탁드립니다ㅠㅠㅠㅠㅠㅠ

  • nodejs
  • react
시크한 두꺼비 댓글 2 좋아요 0 조회수 473

인기 태그

인프런 TOP Writers

주간 인기글