묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결코어 자바스크립트
prototype chaining 강의 마지막에 나오는 코드를 따라해봤는데요...
제목 그대로 prototype chaining 강의 마지막에 나오는 코드를 따라했는데요, 일반적인 html에 script 태그 안에 넣어서 돌리면 잘됩니다. 콘솔창에 잘 뜹니다.그런데 문제는 현재 이 강의를 재생하는 상태에서 제가 옆에 콘솔창을 띄우고 똑같이 해봤는데요 이런 에러가 납니다. 맨 처음 출력은 되는게 보이지만 그 이후로 무수한 에러가 납니다... 이유가 뭘까요? 궁금합니다!
-
미해결[백문이불여일타] 데이터 분석을 위한 중급 SQL
HAVING 과 WHERE
안녕하세요! 강의 잘 듣고 있습니다. AVG(Price) AS avg_price 로 변수를 할당해준 후에 HAVING에 집어넣는 대신에, GROUP BY 한 후에, 그 아래에 WHERE AVG(Price) >= 100 을 쓰면 안되는 건가요? 반드시 SELECT 에서 변수 할당을 해주어야 하는 건가요? 그렇다면 LIKE를 WHERE과 묶어서 사용하듯이 GROUP BY는 HAVING과 무조건 같이 간다고 생각하면 될까요 ? ㅠㅠ
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
Google colab 데이터 자료건
항상 좋은 강의로 감사합니다. 다름이 아니오라 Google colab 새로운 강의가 나와서 듣고 파일을 다운로드 후 DLCV_Colab_SrcCode.zip안에 Detection에서 preliminary, ssd, yolo폴더 안에 아무것도 없습니다. 제가 다운로드를 잘 못한거지 확인 부탁드립니다. 감사합니다.
-
미해결[백문이불여일타] 데이터 분석을 위한 기초 SQL
코드 에러 이유를 못찾겠어요
select, from, limit 코드 제대로 입력한거 같은데 계속 에러라고 뜨네요 이유가 뭘까요ㅠㅠ
-
미해결스크래치 코딩으로 배우는 수학의 개념과 원리
기다리는 시간 시간 update 하는 간격 조정
좋은 강의 감사드립니다. 게임을 좀 더 박진감 있게 보이게 하기 위해 기존에 "2초 기다리기" "time을 time - 2로 정하기"에서 0.01초 단위로 바꿔 봤습니다. 그런데 게임이 종료하고 나면 남은 시간이 -0.01입니다. 단순한 버그인지, 생각해 볼 꺼리가 있는 현상인지 질문 드립니다. 감사합니다.
-
미해결모던 자바스크립트(ES6+) 기본
let 변수와 var 변수를 비교하는 예제 질문입니다.
{ let k = 0; node.children[k].onclick = function(event) { event.target.style.backgroundColor = "yellow"; console.log(k); } } { let k = 1; node.children[k].onclick = function(event) { event.target.style.backgroundColor = "yellow"; console.log(k); } } { let k = 2; node.children[k].onclick = function(event) { event.target.style.backgroundColor = "yellow"; console.log(k); } } 선생님 예제에서 for문에서 k 가 증가할때마다 k의 블록 스코프가 생성된다고 이해했습니다. 이해가 잘되지 않는 반복문은 풀어서 쓰면 이해가 잘됬어서 위의 코드처럼 반복문을 풀어썼는데 저렇게 이해하는게 맞는건가요? 블록으로 지정하지 않고 k를 선언하니까 var 로 선언했을 때와 같이 3으로 출력되서 let k 를 각각의 블록으로 묶었더니 예제와 같이 동작하지만 for문을 위와같은 형태로 풀어써본적이 없어서 질문드립니다!
-
미해결it 취업을 위한 알고리즘 문제풀이 입문 (with C/C++) : 코딩테스트 대비
안녕하세요 채점에 대해 질문드립니다!!
선생님과 비슷하게 코드를 짜서 콘솔로 in1 같은 경우 f11를 눌러 직접 입력하여 테스트를 해봤는데 out1과 동일하게 답이 나옵니다. 그러나 채점기로 돌려보면 Wrong_answer로 뜹니다! 혹시 제가 놓치는 부분이 있을까요?? 확인 부탁드립니다! #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int i,j,cnt,n; scanf("%d",&n); vector<int> a(n); for(i=0;i<n;i++){ scanf("%d",&a[i]); } printf("1"); for(i=1;i<n;i++){ cnt=0; for(j=i;j>=0;j--){ if(a[j]>=a[i])cnt++; } printf(" %d",cnt); } return 0; }
-
미해결[백문이불여일타] 데이터 분석을 위한 기초 SQL
LIKE '%a%'
안녕하세요 강의 잘 듣고 있습니다. 예시에서 LIKE '%a%' 가 "a" 가 있는 모든 값이라고 하는데요, a로 시작하는 데이터랑 a로 끝나는 데이터도 포함하나요? 즉, %에 아무것도 안들어와도 되는 건가요?
-
미해결C로 배우는 자료구조 및 여러가지 예제 실습
메모리 동적 할당에서 메모리공간을 확장시킬 때
메모리 동적 할당에서 메모리공간을 확장시킬 때, 50분쯤에 있는 코드에는 원래 array에 할당되어있던 메모리 공간이 쓰레기값이 되어버리는 하자가 있다고 하셨는데요. 그렇다면 저 코드 대신에 realloc을 사용하는 방법이 있는 걸로 알고있는데요! realloc을 쓰면 안좋은 점이라도 있는건가요?
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
로그 아웃시 401 (Unauthorized) 에러가 발생 합니다. 원인을 잘 모르겠습니다...
frontend => LoginForm.js reducers/user.js, sagas/user.js config/config.js backend => app.js, passport/index.js passport/local.js 위의 파일들이 에러가 예상되지만 backend 쪽 인증관련 에러로 보입니다. BACK app.js const express = require('express'); const cors = require('cors'); const session = require('express-session'); const cookieParser = require('cookie-parser'); const passport = require('passport'); const dotenv = require('dotenv'); const morgan = require('morgan'); // const path = require('path'); const postRouter = require('./routes/post'); const postsRouter = require('./routes/posts'); const userRouter = require('./routes/user'); const db = require('./models'); const passportConfig = require('./passport'); dotenv.config(); const app = express(); db.sequelize.sync() .then(() => { console.log('db 연결 성공'); }) .catch(console.error); passportConfig(); app.use(morgan('dev')); app.use(cors({ origin: '*', // origin: 'http://localhost:3060', // credentials: true, })); // app.use('/', express.static(path.join(__dirname, 'uploads'))); app.use(express.json()); app.use(express.urlencoded({ extended: true })); app.use(cookieParser(process.env.COOKIE_SECRET)); app.use(session({ saveUninitialized: false, resave: false, secret: process.env.COOKIE_SECRET, })); app.use(passport.initialize()); app.use(passport.session()); app.get('/', (req, res) => { res.send('hello express'); }); // API는 다른 서비스가 내 서비스의 기능을 실행할 수 있게 열어둔 창구 app.use('/posts', postsRouter); app.use('/post', postRouter); app.use('/user', userRouter); app.listen(3065, () => { console.log('서버 실행 중!'); }); passport/index.js const passport = require('passport'); const local = require('./local'); const { User } = require('../models'); module.exports = () => { passport.serializeUser((user, done) => { // 서버쪽에 [{ id: 1, cookie: 'clhxy' }] done(null, user.id); }); passport.deserializeUser(async (id, done) => { try { const user = await User.findOne({ where: { id }}); done(null, user); // req.user } catch (error) { console.error(error); done(error); } }); local(); }; passport/local.js const passport = require('passport'); const { Strategy: LocalStrategy } = require('passport-local'); const bcrypt = require('bcrypt'); const { User } = require('../models'); module.exports = () => { passport.use(new LocalStrategy({ usernameField: 'email', passwordField: 'password', }, async (email, password, done) => { try { const user = await User.findOne({ where: { email } }); if (!user) { return done(null, false, { reason: '존재하지 않는 이메일입니다!' }); } const result = await bcrypt.compare(password, user.password); if (result) { return done(null, user); } return done(null, false, { reason: '비밀번호가 틀렸습니다.' }); } catch (error) { console.error(error); return done(error); } })); }; routes/middlewares.js exports.isLoggedIn = (req, res, next) => { if (req.isAuthenticated()) { next(); } else { res.status(401).send('로그인이 필요합니다.'); } }; exports.isNotLoggedIn = (req, res, next) => { if (!req.isAuthenticated()) { next(); } else { res.status(401).send('로그인하지 않은 사용자만 접근 가능합니다.'); } }; routes/user.js const express = require('express'); const bcrypt = require('bcrypt'); const passport = require('passport'); const { User, Post } = require('../models'); const { isLoggedIn, isNotLoggedIn } = require('./middlewares'); const router = express.Router(); router.get('/', async (req, res, next) => { // GET /user try { if (req.user) { const fullUserWithoutPassword = await User.findOne({ where: { id: req.user.id }, attributes: { exclude: ['password'] }, include: [{ model: Post, attributes: ['id'], }, { model: User, as: 'Followings', attributes: ['id'], }, { model: User, as: 'Followers', attributes: ['id'], }] }) res.status(200).json(fullUserWithoutPassword); } else { res.status(200).json(null); } } catch (error) { console.error(error); next(error); } }); router.post('/login', isNotLoggedIn, (req, res, next) => { passport.authenticate('local', (err, user, info) => { if (err) { console.error(err); return next(err); } if (info) { return res.status(401).send(info.reason); } return req.login(user, async (loginErr) => { if (loginErr) { console.error(loginErr); return next(loginErr); } const fullUserWithoutPassword = await User.findOne({ where: { id: user.id }, attributes: { exclude: ['password'] }, include: [{ model: Post, attributes: ['id'], }, { model: User, as: 'Followings', attributes: ['id'], }, { model: User, as: 'Followers', attributes: ['id'], }] }) return res.status(200).json(fullUserWithoutPassword); }); })(req, res, next); }); router.post('/', isNotLoggedIn, async (req, res, next) => { // POST /user/ try { const exUser = await User.findOne({ where: { email: req.body.email, } }); if (exUser) { return res.status(403).send('이미 사용 중인 아이디입니다.'); } const hashedPassword = await bcrypt.hash(req.body.password, 12); await User.create({ email: req.body.email, nickname: req.body.nickname, password: hashedPassword, }); res.status(201).send('ok'); } catch (error) { console.error(error); next(error); // status 500 } }); router.post('/logout', isLoggedIn, (req, res) => { req.logout(); req.session.destroy(); res.send('ok'); }); router.patch('/nickname', isLoggedIn, async (req, res, next) => { try { await User.update({ nickname: req.body.nickname, }, { where: { id: req.user.id }, }); res.status(200).json({ nickname: req.body.nickname }); } catch (error) { console.error(error); next(error); } }); router.patch('/:userId/follow', isLoggedIn, async (req, res, next) => { // PATCH /user/1/follow try { const user = await User.findOne({ where: { id: req.params.userId }}); if (!user) { res.status(403).send('없는 사람을 팔로우하려고 하시네요?'); } await user.addFollowers(req.user.id); res.status(200).json({ UserId: parseInt(req.params.userId, 10) }); } catch (error) { console.error(error); next(error); } }); router.delete('/:userId/follow', isLoggedIn, async (req, res, next) => { // DELETE /user/1/follow try { const user = await User.findOne({ where: { id: req.params.userId }}); if (!user) { res.status(403).send('없는 사람을 언팔로우하려고 하시네요?'); } await user.removeFollowers(req.user.id); res.status(200).json({ UserId: parseInt(req.params.userId, 10) }); } catch (error) { console.error(error); next(error); } }); router.delete('/follower/:userId', isLoggedIn, async (req, res, next) => { // DELETE /user/follower/2 try { const user = await User.findOne({ where: { id: req.params.userId }}); if (!user) { res.status(403).send('없는 사람을 차단하려고 하시네요?'); } await user.removeFollowings(req.user.id); res.status(200).json({ UserId: parseInt(req.params.userId, 10) }); } catch (error) { console.error(error); next(error); } }); router.get('/followers', isLoggedIn, async (req, res, next) => { // GET /user/followers try { const user = await User.findOne({ where: { id: req.user.id }}); if (!user) { res.status(403).send('없는 사람을 찾으려고 하시네요?'); } const followers = await user.getFollowers(); res.status(200).json(followers); } catch (error) { console.error(error); next(error); } }); router.get('/followings', isLoggedIn, async (req, res, next) => { // GET /user/followings try { const user = await User.findOne({ where: { id: req.user.id }}); if (!user) { res.status(403).send('없는 사람을 찾으려고 하시네요?'); } const followings = await user.getFollowings(); res.status(200).json(followings); } catch (error) { console.error(error); next(error); } }); module.exports = router; FRONT config/config.js export const domainUrl = 'http://api.nodebird.com'; export const localhostUrl = 'http://localhost:3065'; LoginForm.js import React, { useCallback, useEffect } from 'react'; import { Form, Input, Button } from 'antd'; import Link from 'next/link'; import styled from 'styled-components'; import { useDispatch, useSelector } from 'react-redux'; import useInput from '../hooks/useInput'; // import { loginRequestAction } from '../reducers/user'; import { LOG_IN_REQUEST } from '../reducers/user'; const ButtonWrapper = styled.div` margin-top: 10px; `; const FormWrapper = styled(Form)` padding: 10px; `; const LoginForm = () => { const dispatch = useDispatch(); const { logInLoading, logInError } = useSelector((state) => state.user); const [email, onChangeEmail] = useInput(''); const [password, onChangePassword] = useInput(''); useEffect(() => { if (logInError) { alert(logInError); } }, [logInError]); // const onSubmitForm = useCallback(() => { // console.log(email, password); // dispatch(loginRequestAction({ email, password })); // }, [email, password]); const onSubmitForm = useCallback(() => { console.log(email, password); dispatch({ type: LOG_IN_REQUEST, data: { email, password }, }); }, [email, password]); return ( <FormWrapper onFinish={onSubmitForm}> <div> <label htmlFor="user-email">이메일</label> <br /> <Input name="user-email" type="email" value={email} onChange={onChangeEmail} required /> </div> <div> <label htmlFor="user-password">비밀번호</label> <br /> <Input name="user-password" type="password" value={password} onChange={onChangePassword} required /> </div> <ButtonWrapper> <Button type="primary" htmlType="submit" loading={logInLoading}>로그인</Button> <Link href="/signup"><a><Button>회원가입</Button></a></Link> </ButtonWrapper> </FormWrapper> ); }; export default LoginForm; sagas/index.js import { all, fork } from 'redux-saga/effects'; import axios from 'axios'; import postSaga from './post'; import userSaga from './user'; import { localhostUrl } from '../config/config'; // axios.defaults.baseURL = 'http://localhost:3065'; axios.defaults.baseURL = localhostUrl; // axios.defaults.withCredentials = true; axios.defaults.baseURL = localhostUrl; export default function* rootSaga() { yield all([ fork(postSaga), fork(userSaga), ]); } reducers/user.js import produce from '../util/produce'; export const initialState = { loadUserLoading: false, // 유저 정보 가져오기 시도중 loadUserDone: false, loadUserError: null, followLoading: false, // 팔로우 시도중 followDone: false, followError: null, unfollowLoading: false, // 언팔로우 시도중 unfollowDone: false, unfollowError: null, logInLoading: false, // 로그인 시도중 logInDone: false, logInError: null, logOutLoading: false, // 로그아웃 시도중 logOutDone: false, logOutError: null, signUpLoading: false, // 회원가입 시도중 signUpDone: false, signUpError: null, changeNicknameLoading: false, // 닉네임 변경 시도중 changeNicknameDone: false, changeNicknameError: null, loadFollowingsLoading: false, loadFollowingsDone: false, loadFollowingsError: null, loadFollowersLoading: false, loadFollowersDone: false, loadFollowersError: null, removeFollowerLoading: false, removeFollowerDone: false, removeFollowerError: null, me: null, signUpData: {}, loginData: {}, }; export const LOAD_USER_REQUEST = 'LOAD_USER_REQUEST'; export const LOAD_USER_SUCCESS = 'LOAD_USER_SUCCESS'; export const LOAD_USER_FAILURE = 'LOAD_USER_FAILURE'; export const LOG_IN_REQUEST = 'LOG_IN_REQUEST'; export const LOG_IN_SUCCESS = 'LOG_IN_SUCCESS'; export const LOG_IN_FAILURE = 'LOG_IN_FAILURE'; export const LOG_OUT_REQUEST = 'LOG_OUT_REQUEST'; export const LOG_OUT_SUCCESS = 'LOG_OUT_SUCCESS'; export const LOG_OUT_FAILURE = 'LOG_OUT_FAILURE'; export const SIGN_UP_REQUEST = 'SIGN_UP_REQUEST'; export const SIGN_UP_SUCCESS = 'SIGN_UP_SUCCESS'; export const SIGN_UP_FAILURE = 'SIGN_UP_FAILURE'; export const CHANGE_NICKNAME_REQUEST = 'CHANGE_NICKNAME_REQUEST'; export const CHANGE_NICKNAME_SUCCESS = 'CHANGE_NICKNAME_SUCCESS'; export const CHANGE_NICKNAME_FAILURE = 'CHANGE_NICKNAME_FAILURE'; export const FOLLOW_REQUEST = 'FOLLOW_REQUEST'; export const FOLLOW_SUCCESS = 'FOLLOW_SUCCESS'; export const FOLLOW_FAILURE = 'FOLLOW_FAILURE'; export const UNFOLLOW_REQUEST = 'UNFOLLOW_REQUEST'; export const UNFOLLOW_SUCCESS = 'UNFOLLOW_SUCCESS'; export const UNFOLLOW_FAILURE = 'UNFOLLOW_FAILURE'; export const REMOVE_FOLLOWER_REQUEST = 'REMOVE_FOLLOWER_REQUEST'; export const REMOVE_FOLLOWER_SUCCESS = 'REMOVE_FOLLOWER_SUCCESS'; export const REMOVE_FOLLOWER_FAILURE = 'REMOVE_FOLLOWER_FAILURE'; export const LOAD_FOLLOWINGS_REQUEST = 'LOAD_FOLLOWINGS_REQUEST'; export const LOAD_FOLLOWINGS_SUCCESS = 'LOAD_FOLLOWINGS_SUCCESS'; export const LOAD_FOLLOWINGS_FAILURE = 'LOAD_FOLLOWINGS_FAILURE'; export const LOAD_FOLLOWERS_REQUEST = 'LOAD_FOLLOWERS_REQUEST'; export const LOAD_FOLLOWERS_SUCCESS = 'LOAD_FOLLOWERS_SUCCESS'; export const LOAD_FOLLOWERS_FAILURE = 'LOAD_FOLLOWERS_FAILURE'; export const ADD_POST_TO_ME = 'ADD_POST_TO_ME'; export const REMOVE_POST_OF_ME = 'REMOVE_POST_OF_ME'; export const loginRequestAction = (data) => ({ type: LOG_IN_REQUEST, data, }); export const logoutRequestAction = () => ({ type: LOG_OUT_REQUEST, }); const reducer = (state = initialState, action) => produce(state, (draft) => { switch (action.type) { case REMOVE_FOLLOWER_REQUEST: draft.removeFollowerLoading = true; draft.removeFollowerError = null; draft.removeFollowerDone = false; break; case REMOVE_FOLLOWER_SUCCESS: draft.removeFollowerLoading = false; draft.me.Followers = draft.me.Followers.filter((v) => v.id !== action.data.UserId); draft.removeFollowerDone = true; break; case REMOVE_FOLLOWER_FAILURE: draft.removeFollowerLoading = false; draft.removeFollowerError = action.error; break; case LOAD_FOLLOWINGS_REQUEST: draft.loadFollowingsLoading = true; draft.loadFollowingsError = null; draft.loadFollowingsDone = false; break; case LOAD_FOLLOWINGS_SUCCESS: draft.loadFollowingsLoading = false; draft.me.Followings = action.data; draft.loadFollowingsDone = true; break; case LOAD_FOLLOWINGS_FAILURE: draft.loadFollowingsLoading = false; draft.loadFollowingsError = action.error; break; case LOAD_FOLLOWERS_REQUEST: draft.loadFollowersLoading = true; draft.loadFollowersError = null; draft.loadFollowersDone = false; break; case LOAD_FOLLOWERS_SUCCESS: draft.loadFollowersLoading = false; draft.me.Followers = action.data; draft.loadFollowersDone = true; break; case LOAD_FOLLOWERS_FAILURE: draft.loadFollowersLoading = false; draft.loadFollowersError = action.error; break; case LOAD_USER_REQUEST: draft.loadUserLoading = true; draft.loadUserError = null; draft.loadUserDone = false; break; case LOAD_USER_SUCCESS: draft.loadUserLoading = false; draft.me = action.data; draft.loadUserDone = true; break; case LOAD_USER_FAILURE: draft.loadUserLoading = false; draft.loadUserError = action.error; break; case FOLLOW_REQUEST: draft.followLoading = true; draft.followError = null; draft.followDone = false; break; case FOLLOW_SUCCESS: draft.followLoading = false; draft.me.Followings.push({ id: action.data.UserId }); draft.followDone = true; break; case FOLLOW_FAILURE: draft.followLoading = false; draft.followError = action.error; break; case UNFOLLOW_REQUEST: draft.unfollowLoading = true; draft.unfollowError = null; draft.unfollowDone = false; break; case UNFOLLOW_SUCCESS: draft.unfollowLoading = false; draft.me.Followings = draft.me.Followings.filter((v) => v.id !== action.data.UserId); draft.unfollowDone = true; break; case UNFOLLOW_FAILURE: draft.unfollowLoading = false; draft.unfollowError = action.error; break; case LOG_IN_REQUEST: draft.logInLoading = true; draft.logInError = null; draft.logInDone = false; break; case LOG_IN_SUCCESS: draft.logInLoading = false; draft.me = action.data; draft.logInDone = true; break; case LOG_IN_FAILURE: draft.logInLoading = false; draft.logInError = action.error; break; case LOG_OUT_REQUEST: draft.logOutLoading = true; draft.logOutError = null; draft.logOutDone = false; break; case LOG_OUT_SUCCESS: draft.logOutLoading = false; draft.logOutDone = true; draft.me = null; break; case LOG_OUT_FAILURE: draft.logOutLoading = false; draft.logOutError = action.error; break; case SIGN_UP_REQUEST: draft.signUpLoading = true; draft.signUpError = null; draft.signUpDone = false; break; case SIGN_UP_SUCCESS: draft.signUpLoading = false; draft.signUpDone = true; break; case SIGN_UP_FAILURE: draft.signUpLoading = false; draft.signUpError = action.error; break; case CHANGE_NICKNAME_REQUEST: draft.changeNicknameLoading = true; draft.changeNicknameError = null; draft.changeNicknameDone = false; break; case CHANGE_NICKNAME_SUCCESS: draft.me.nickname = action.data.nickname; draft.changeNicknameLoading = false; draft.changeNicknameDone = true; break; case CHANGE_NICKNAME_FAILURE: draft.changeNicknameLoading = false; draft.changeNicknameError = action.error; break; case ADD_POST_TO_ME: draft.me.Posts.unshift({ id: action.data }); break; // return { // ...state, // me: { // ...state.me, // Posts: [{ id: action.data }, ...state.me.Posts], // }, // }; case REMOVE_POST_OF_ME: draft.me.Posts = draft.me.Posts.filter((v) => v.id !== action.data); break; // return { // ...state, // me: { // ...state.me, // Posts: state.me.Posts.filter((v) => v.id !== action.data), // }, // }; default: break; } }); export default reducer; 브라우저 login 시 성공 브라우저 로그아웃 에러 브라우저 로그아웃 에러메세지
-
미해결자바스크립트 중고급: 엔진 핵심
실행 컨텍스트 질문입니다!
function a() { var value = 456; console.log(value); function b() { console.log(value); function c() { console.log(value); function d() { console.log(value); } d(); } c(); } b(); } a(); 선생님 이 코드에서 value가 전부 456으로 출력이 되는 이유를 모르겠습니다. d() 함수에서 선언적 환경 레코드와 외부 렉시컬 환경참조 안에는 어떠한 변수도 참조되지 않을거같은데 1. 제가 스코프 영역에대해 잘못알고있는건가요? 2. d() 또는 c()의 스코프 영역이 어떻게되나요?
-
미해결[OpenCV] 파이썬 딥러닝 영상처리 프로젝트 2 - 불량사과를 찾아라!
불량사과 식별 YOLO데이터 생성하기의 다음은 챕터는 어디인가요?
원하는 이미지로 YOLO 데이터 만들기 내 불량사과 식별 YOLO데이터 생성하기의 다음은 챕터는 어디인가요? 순서를 보면 Colab으로 DarkNet학습환경 만들기이고 .... 내용이 혼란스럽네요...
-
해결됨[리뉴얼] React로 NodeBird SNS 만들기
로그인시 비밀번호가 틀렸습니다.
안녕하세요. 실습을 하다가 로그인시 맞는 비밀번호( 틀릴까봐 0000 으로 작성해봤습니다.)를 입력해도 "비밀번호가 틀렸습니다."라고 나옵니다. 혹시 제 코드가 잘못 되었나 해서 수정해보다가 혹시나 해서 선생님 git 에서 clone 받아서 실행시켜 봐도 같은 증상입니다. 그 이전에 회원가입시에 SequelizeDatabaseError: Data too long for column 'password' at row 1 라는 서버에러가 떠서 검색해보고 set global sql_mode='' 로 셋팅해서 회원가입을 하면 가입은 정상작동은 확인되는데 맞는 비밀번호를 입력해도 계속적으로 "비밀번호가 틀렸습니다." 라는 부분이 작동합니다. ㅜㅜ 제가 어느부분을 확인해봐야할까요?
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
GPU 할당량 신청 거부시 학습 방법?
안녕하세요. 동영상 강의로 전반적인 개념 이해 후 실습을 진행해보려는 수강생입니다. 당장 GCP에서 GPU할당 신청부터 거부당해 어떻게 해야할지 막막하네요 ㅠ 다른 질문들을 읽어보니 GPU 없이도 전반부 강의는 따라올수 있다고 해서 일단 GPU 신청과 별개로 실습을 따라가보고 싶네요. GPU 신청이 안될때는 VM 인스턴스를 어떻게 생성하면 될까요? 처음 예시로 보여준 'vm01' 인스턴스로 진행해도 문제가 없을지요. 도움 부탁드려요~
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
npm install
섹션 0 두번 째 강의에서 npm install 하는 곳부터 에러가 나는데 > bcrypt@3.0.8 install C:\Users\118dg\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt > node-pre-gyp install --fallback-to-build node-pre-gyp WARN Using needle for node-pre-gyp https download node-pre-gyp WARN Pre-built binaries not installable for bcrypt@3.0.8 and node@12.18.3 (node-v72 ABI, unknown) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error Remote end closed socket abruptly. gyp ERR! find Python gyp ERR! find Python Python is not set from command line or npm configuration gyp ERR! find Python Python is not set from environment variable PYTHON gyp ERR! find Python checking if "python" can be used gyp ERR! find Python - "python" is not in PATH or produced an error gyp ERR! find Python checking if "python2" can be used gyp ERR! find Python - "python2" is not in PATH or produced an error gyp ERR! find Python checking if "python3" can be used gyp ERR! find Python - "python3" is not in PATH or produced an error gyp ERR! find Python checking if the py launcher can be used to find Python 2 gyp ERR! find Python - "py.exe" is not in PATH or produced an error gyp ERR! find Python checking if Python is C:\Python27\python.exe gyp ERR! find Python - "C:\Python27\python.exe" could not be run gyp ERR! find Python checking if Python is C:\Python37\python.exe gyp ERR! find Python - "C:\Python37\python.exe" could not be run gyp ERR! find Python gyp ERR! find Python ********************************************************** gyp ERR! find Python You need to install the latest version of Python. gyp ERR! find Python Node-gyp should be able to find and use Python. If not, gyp ERR! find Python you can try one of the following options: gyp ERR! find Python - Use the switch --python="C:\Path\To\python.exe" gyp ERR! find Python (accepted by both node-gyp and npm) gyp ERR! find Python - Set the environment variable PYTHON gyp ERR! find Python - Set the npm configuration variable python: gyp ERR! find Python npm config set python "C:\Path\To\python.exe" gyp ERR! find Python For more information consult the documentation at: gyp ERR! find Python https://github.com/nodejs/node-gyp#installation gyp ERR! find Python ********************************************************** gyp ERR! find Python gyp ERR! configure error gyp ERR! stack Error: Could not find any Python installation to use gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:307:47) gyp ERR! stack at PythonFinder.runChecks (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:136:21) gyp ERR! stack at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:225:16) gyp ERR! stack at PythonFinder.execFileCallback (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:271:16) gyp ERR! stack at exithandler (child_process.js:310:5) gyp ERR! stack at ChildProcess.errorhandler (child_process.js:322:5) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12) gyp ERR! stack at onErrorNT (internal/child_process.js:469:16) gyp ERR! stack at processTicksAndRejections (internal/process/task_queues.js:84:21) gyp ERR! System Windows_NT 10.0.18362 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\118dg\\Downloads\\boilerplate-mern-stack-master\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding\\bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=C:\\Users\\118dg\\Downloads\\boilerplate-mern-stack-master\\boilerplate-mern-stack-master\\node_modules\\bcrypt\\lib\\binding" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72" gyp ERR! cwd C:\Users\118dg\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt gyp ERR! node -v v12.18.3 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\118dg\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\118dg\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\118dg\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) node-pre-gyp ERR! System Windows_NT 10.0.18362 node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\118dg\\Downloads\\boilerplate-mern-stack-master\\boilerplate-mern-stack-master\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Users\118dg\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt node-pre-gyp ERR! node -v v12.18.3 node-pre-gyp ERR! node-pre-gyp -v v0.14.0 node-pre-gyp ERR! not ok Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\118dg\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\118dg\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1) npm WARN react-redux@5.1.2 requires a peer of react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself. npm WARN react-redux@5.1.2 requires a peer of redux@^2.0.0 || ^3.0.0 || ^4.0.0-0 but none is installed. You must install peer dependencies yourself. npm WARN react-boiler-plate@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.12 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.12: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bcrypt@3.0.8 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bcrypt@3.0.8 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\118dg\AppData\Roaming\npm-cache\_logs\2020-07-31T21_23_04_559Z-debug.log 이 에러는 어떻게 해결하면 될까요? ㅠ 파이썬도 최신 버전으로 다시 설치해보고 이것저것 시도해봐도 안되네요 ㅠ
-
미해결홍정모의 따라하며 배우는 C언어
if문의 !line_flag에 대해 질문 드립니다.
bool line_flag = false; 로 line_flag의 초기값이 false입니다. 4분 18초 경 if(!isspace(c) && !line_flag)에서 "line_flag가 false라면, 앞에 !이 붙었기 때문에 요거 자체가 true가 아니라면" 라고 말씀해주시는데 여기서 헷갈립니다 ㅠ line_flag가 false인데 !line_flag는 true여야 되지 않나요? 애초에 논리연산자 && 면 둘 다 true여야 if문의 body가 실행될텐데 !line_flag가 true여야 하는게 아닌지 궁금합니다 ㅠㅠ
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
서버사이드 렌더링과 클라이언트 사이드 렌더링에 대해
Next가 결국 첫 방문시에는 서버사이드 렝더링을 해주고 그 다음부터 클라이언트 사이드 렌더링을 해준다는 이야기인가요? 그리고 Next를 쓰지 않고 create-react-app으로 프로젝트를 짜면 클라이언트 사이드 렌더링만 하는건가요?
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
Global관하여
slick 과 충돌이 발생하여 css 적용하게 하기 위해 export const Global = createGlobalStyle` .slick-slide { display: inline-block; } ` 해당 코드를 쓰셨다고 했는데 어떻게 slick-slide class 인걸 하고 쓰셨는지 궁금합니다 이후에 이런 문제가 발생하였을 시에 어떤 방식으로 찾아서 처리해야하는 지 감이 잘 안옵니다..질문이 좀 이상한가요 ?..ㅜㅜ
-
해결됨[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)
typeError 관련 질문입니당
아래 그림에서,, 이렇게 하면 에러가 나는데,, 왜 그럴까요 ㅠ
-
미해결프론트엔드 개발환경의 이해와 실습 (webpack, babel, eslint..)
수업을 듣고 궁금한 점이 있습니다!
우선 좋은 강의 감사합니다. 😄 개발 환경을 구현하고 나서 그 후에 이 환경에서 어떤 방식으로 개발을 진행하는지 궁금합니다. 기본적인 프로젝트 구조나, routing 등 프론트엔드 실무에서 사용하는 여러가지들을 해당 환경에 적용하는 방법을 알 수 있을까요? 항상 구조가 짜여져 있는 환경에서 개발을 하다가 직접 환경을 구성하는 연습을 해보니 감이 잘 잡히지 않네요... ㅠ