묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결FreeRTOS 프로그래밍
프로세스 종료 관련
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요 강사님 예제 관련 강의들을 보고 따라하고 있습니다. 진행 중에 디버그모드 -> 종료 후에도 콘솔 창에서는 계속 실행이 되고 있어 문의 드립니다. 강사님 아래 이미지 확인 부탁드리겠습니다. 감사합니다.
-
미해결
작정하고 장고! Django로 Pinterest 따라만들기 : 바닥부터 배포까지 강의 듣고있는데 오류 해결좀 알려주세ㅇ
작정하고 장고! Django로 Pinterest 따라만들기 : 바닥부터 배포까지 강의 듣고있는데 오류 해결좀 알려주세요 ProjectApp 구현 이 강의에서 오류가 나서 아직도 해결이 안되네요 몇일전부터 질문을했는데 아직도 강사님이 답변을 안해주네요 성공 하시는분들 알려주세요 사진안보이면 새탭이미지 열기 하면 사진 잘나와요
-
미해결[백문이불여일타] 데이터 분석을 위한 중급 SQL
LEFT 조인 질문
FULL OUTER JOIN을 보고 직접 실습해보려다 LEFT JOIN을 해보았는데요, CustomerID가 왜 NULL이 되는지 이해가 안가서 질문드립니다.
-
미해결[개정판] 파이썬 머신러닝 완벽 가이드
test_size 및 random_state 질문드립니다.
1. 강의에서 train 및 test 의 비율을 결정하는 인자라고 설명해주셨는데, 예제에서 iris_data.data의 경우 feature 값만 가지고 있고 iris_data.target의 경우 target 값만 가지고 있는데 비율을 나누는게 어떤 의미가 있는지 잘 이해가 가질 않습니다. 또한, test_szie를 높이거나 줄였을 때 어떤 효과가 있는지도 알려주시면 감사드리겠습니다. 학습 효과를 높이기 위해 test size를 줄이면 학습이 더 잘 되어서 나중에 예측(predict)를 수행 하였을 때 더 좋은 결과를 예측할 수 있는건가요?2. random_state는 동일한 학습/테스트 용 데이터를 생성하기 위한것이라고 이해 했습니다. 입력하는 수치는 어떤 기준에 의해서 정하면 좋을까요?어떤 값을 입력 하던지 상관 없으며 단순히 선생님이 입력한 값과 임의의 사용자가 동일한 값을 출력 하기 위해서 같은 값을 입력한것으로 이해해도 될까요?
-
미해결모든 개발자를 위한 HTTP 웹 기본 지식
쿠키 와 OAuth 관련 질문입니다!
[질문 내용] 안녕하세요. 클라이언트의 로그인 요청 이후 서버에서는 Set-Cookie 헤더에 session id 를 넣어주고 이후 cookie 의 session id 를 DB와 비교하여 체크하는 점 잘 배웠습니다! Oauth인증방식에서도 이런 매커니즘이 동일하게 적용되나요? 즉, 서버에서 액세스 토큰을 Set-Cookie 헤더에 넣어주고, DB에도 저장하여 이후 클라이언트 요청에서 Cookie의 액세스토큰과 DB의 액세스토큰을 비교하여 인증 여부를 체크하는 것이 맞을까요?.. 강의내용와 조금 관련성이 떨어지는 것 같기도 하지만(죄송합니다...) 강의 수강중 궁금증이 생겨 질문남깁니다!
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 유튜브 사이트 만들기
에러를 해결 못하겠습니다
댓글 작성 후 submit을 누르면 이런 에러가 뜨는데 이유를 모르겠습니다. 댓글 목록도 가져오지 못하는 것 같습니다 .ㅠㅠ 이유를 알 수 있을까요? ㅠㅠ routes/comment.js const express = require('express'); const router = express.Router(); const { Comment } = require("../models/Comment"); //================================= // Comment //================================= router.post('/saveComment',(req,res)=>{ const comment = new Comment(req.body) comment.save((err,comment)=>{ if(err) return res.json({success: false, err}) Comment.find({'_id':comment._id}) .populate('writer') .exec((err,result)=>{ if(err) return res.json({success: false, err}) res.status(200).json({success: true,result}) }) }) }) router.post('/getComments',(req,res)=>{ Comment.find({"postId":req.body.videoid}) .populate('writer') .exec((err,comments)=>{ if(err) return res.status(400).send(err) res.status(200).json({success:true,comments}) }) }) module.exports = router; comment.js import React, { useState } from 'react' import axios from 'axios' import {useSelector} from 'react-redux'; import SingleComment from './Singlecomment' function Comment(props) { const videoId = props.postId const user=useSelector(state=>state.user); //redux/state/user 경로 const [commentValue,setcommentValue]=useState("") const handleClick=(event)=>{ setcommentValue(event.currentTarget.value) } const onSubmit=(event)=>{ event.preventDefault(); const variable={ content:commentValue, writer:user.userData._id, postId:videoId } axios.post('/api/comment/saveComment',variable) .then(response=>{ if(response.data.success){ console.log(response.data.result) setcommentValue("") props.refreshFunction(response.data.result) }else{ alert('코멘트를 저장하지 못했습니다.') } }) } return ( <div> <br /> <p> Replies </p> <hr /> {console.log(props.commentLists)} {props.commentLists && props.commentLists.map((comment, index) => ( (!comment.responseTo && <SingleComment refreshFunction={props.refreshFunction} comment={comment} postId={videoId} /> ) ))} <form style={{display:'flex'}} onSubmit={onSubmit}> <textarea style={{width: '100%' , borderRadius: '5px'}} onChange={handleClick} value={commentValue} placeholder="코멘트를 작성해주세요" /> <br /> <button style={{width: '20%', height : '52px'}} onClick={onSubmit}>Submit</button> </form> </div> ) } export default Comment VideoDetailPage.js import React, { useEffect,useState } from 'react' import {Row,Col,List,Avatar} from 'antd' import { FaLaughSquint } from 'react-icons/fa' import Axios from 'axios' //import { post } from '../../../../../server/routes/video' //import { response } from 'express' import SideVideo from './Sections/SideVideo' import Subscribe from './Sections/Subscribe' import Comment from './Sections/Comment' function VideoDetailPage(props) { //const [Comments,setComment]=useState(initialState) const videoId=props.match.params.videoId const variable={videoId: videoId} const [VideoDetail,setVideoDetail]=useState([]) const [Comments,setComments]=useState([]) useEffect(()=>{ Axios.post('/api/video/getVideoDetail',variable) .then(response=>{ if(response.data.success){ setVideoDetail(response.data.videoDetail) }else{ alert('비디오 정보 가져오기 실패') } }) Axios.post('/api/comment/getComments', variable) .then(response=>{ if(response.data.success){ setComments(response.data.Comments) }else{ alert('코멘트 정보 가져오기 실패') } }) }, []) const refreshFunction=(newComment)=>{ setComments(Comments.concat(newComment)) } if(VideoDetail.writer){ const subscribeButton = VideoDetail.writer._id!==localStorage.getItem('userId') && <Subscribe userTo={VideoDetail.writer._id} userFrom={localStorage.getItem('userId')}/> return ( <Row gutter={[16,16]}> <Col lg={18} xs={24}> <div style={{width:'100%',padding:'3rem 4rem'}}> <video style={{width:'100%'}} src={`http://localhost:5000/${VideoDetail.filePath}`} controls/> <List.Item actions={[subscribeButton]} > <List.Item.Meta avatar={<Avatar src={VideoDetail.writer.image}/>} title={VideoDetail.writer.name} description={VideoDetail.description} /> </List.Item> <Comment refreshFunction={refreshFunction} commentLists={Comments} postId={videoId}/> </div> </Col> <Col lg={6} sx={24}> <SideVideo/> </Col> </Row> //</div> ) }else{ return( <div>...loading</div> ) } } export default VideoDetailPage
-
미해결스프링 핵심 원리 - 고급편
lambda 사용관련하여 질문이 있습니다
강의 매우 잘 듣고 있습니다. 전략패턴 강의를 듣다가 V1 ... V4로 리팩토링 하는 과정에서 람다를 사용하신 것을 보았습니다. 저는 강의를 들으면서 코틀린으로 실습을 진행하고 있는데 ContextV1 context1 = new ContextV1(() -> log.info("비즈니스 로직1 실행")); 코틀린 언어를 사용하는 경우 위와 같이 람다를 사용할 수 없게 됩니다. 물론 저의 코틀린 실력이 부족한 탓이지만 간단한 이슈 때문에 신경쓰여서 다음 강의로 넘어가지 못하고 있습니다 ㅠㅠ 코틀린언어 사용시 위와같은 코드에서 람다를 어떻게 써야하는지 궁금합니다.
-
미해결함수형 프로그래밍과 JavaScript ES6+ 응용편
감사합니다.
감사합니다.
-
미해결Vue.js 끝장내기 - 실무에 필요한 모든 것
nvm으로 node버전을 10.16.3으로 내리고 vue create가 안되요.
node version보면 10.16.3으로 nvm이용해서 내리고 vue cli를 깔았느데요 깔고 나서 vue create vue-till을 해보려 하니 이 cli버전은 12이상을 요구하는데 node version을 업그레이드 하라는데 해야하나요?
-
미해결Slack 클론 코딩[백엔드 with NestJS + TypeORM]
socket io ping pong 클라 상태체크하는법
제로초님 nest js 에서 socket io 통신시 ping / pong 으로 유저 상태 체크하는법을 알고싶습니다. @WebSocketGateway({ namespace: /^\/api\/\w+/, pingInterval: 10000, pingTimeout: 5000, }) 위와 같이 ping / pong 을 설정해주었는데, 딱히 'ping' 이나 'pong' 이벤트가 오지 않아서 용도가 무엇인지 잘모르겠습니다. 따로 클라이언트에 socket.emit('ping') 이런식으로 interval을 만들어줘야하는걸까요? nestjs 에서 클라이언트 상태체크를 하려면 어떻게 해야하는지 알고싶습니다.
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
글로벌 오류 form 바깥에 설정
<div th:if="${#fields.hasGlobalErrors()}"><p class="field-error" th:each="err : ${#fields.globalErrors()}"th:text="${err}">글로벌 오류 메시지</p></div> <form action="item.html" th:action th:object="${item}" method="post"> ........ </form> 글로벌 오류 설정할 때 <form>태그 안에서만 가능한 이유와 <form>태그 밖에서 글로벌 오류 메시지를 보여줄 수 있는 방법이 있는지 궁금합니다.
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
JSX에 대한 질문드립니다.
안녕하세요. JSX에서 문법규칙에서 반드시 부모 요소 하나가 감싸는 형태여야 한다라고 하는데 부모 요소가 무엇인지 알수 있을까요?
-
미해결Vue.js 끝장내기 - 실무에 필요한 모든 것
14강
스웨거에 질문이 있는데요 vue-til-server 랑 이 스웨거사이트랑은 무슨상관인가요? 제가 알기로 스웨거 접속해서 저렇게 api만들고 다 할 수 있는데 지금 3000번을 연동한 이유가 뭐에요? vue-til-server 이 프로젝트를 왜깔며 어떻게 사용되는지에 대해 설명을 안해주셔서 그냥 api 프로젝트라고만 해서 이해가 안가요.
-
미해결파이썬으로 장고(Django) 공략하기: 입문
settings.py
settings.py에 first를 웹앱이라고 추가하는데 탬플릿 파일연결을 위해 추가하는 겁니까? 그 전에 인강에서는 추가 안하셨길래 여쭤봅니다
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
jsp 관련 강의 진행중에 오류..
'JSP로 회원 관리 웹 애플리케이션 만들기' 강의를 수강중인데 page가 빨간색으로 표시되고 로직을 넣어도 전혀 적용이 안됩니다.. 이유가 뭘까요..? page에 마우스를 올리면 'Element page is not allowed here' 이라고 뜹니다
-
미해결자바(Java) 알고리즘 문제풀이 입문: 코딩테스트 대비
결과 값은 맞는데 채점시 오답이라고 나옵니다.
package matter2_6; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count = sc.nextInt(); int num[] =new int[count]; for (int i = 0; i < count; i++) { num[i] = sc.nextInt(); } Main main = new Main(); main.solution(num); } public void solution(int [] num) { int arr[] = new int [num.length]; for (int i = 0; i < num.length; i++) { for (int j = 0; j <3; j++) { if(num[i] > 0) { arr[i] *= 10; arr[i] += num[i]%10; num[i] /= 10; } } if(!isPrime(arr[i])) arr[i] = 0; } for (int i = 0; i < arr.length; i++) { if(arr[i]!=0) System.out.print(arr[i]+" "); } } public boolean isPrime(int a) { if(a==1) return false; for(int i = 2;i<a;i++) { if(a%i==0) return false; } return true; } } 잘못 된 곳을 못찾겠습니다.
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
redux-saga 요즘 추세
안녕하세요. 현 시점에서 redux-saga를 실무에서 많이 쓰는 편인지 궁금합니다. 만약 잘 안쓴다면 어떤 미들웨어를 많이 쓰나요?
-
미해결파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트
주피터 노트북 장고 실행 질문입니다.
수업에 맞게 notebook을 실행해보았는데 계속 에러가 나네요. 아무리 찾아봐도 고칠수없어 질문 드립니다. --------------------------------------------------------------------------- SynchronousOnlyOperation Traceback (most recent call last) C:\ProgramData\Anaconda3\envs\askcompany\lib\site-packages\IPython\core\formatters.py in __call__(self, obj) 700 type_pprinters=self.type_printers, 701 deferred_pprinters=self.deferred_printers) --> 702 printer.pretty(obj) 703 printer.flush() 704 return stream.getvalue() C:\ProgramData\Anaconda3\envs\askcompany\lib\site-packages\IPython\lib\pretty.py in pretty(self, obj) 392 if cls is not object \ 393 and callable(cls.__dict__.get('__repr__')): --> 394 return _repr_pprint(obj, self, cycle) 395 396 return _default_pprint(obj, self, cycle) C:\ProgramData\Anaconda3\envs\askcompany\lib\site-packages\IPython\lib\pretty.py in _repr_pprint(obj, p, cycle) 698 """A pprint that just redirects to the normal repr function.""" 699 # Find newlines and replace them with p.break_() --> 700 output = repr(obj) 701 lines = output.splitlines() 702 with p.group(): C:\ProgramData\Anaconda3\envs\askcompany\lib\site-packages\django\db\models\query.py in __repr__(self) 250 251 def __repr__(self): --> 252 data = list(self[:REPR_OUTPUT_SIZE + 1]) 253 if len(data) > REPR_OUTPUT_SIZE: 254 data[-1] = "...(remaining elements truncated)..." C:\ProgramData\Anaconda3\envs\askcompany\lib\site-packages\django\db\models\query.py in __iter__(self) 274 - Responsible for turning the rows into model objects. 275 """ --> 276 self._fetch_all() 277 return iter(self._result_cache) 278 C:\ProgramData\Anaconda3\envs\askcompany\lib\site-packages\django\db\models\query.py in _fetch_all(self) 1259 def _fetch_all(self): 1260 if self._result_cache is None: -> 1261 self._result_cache = list(self._iterable_class(self)) 1262 if self._prefetch_related_lookups and not self._prefetch_done: 1263 self._prefetch_related_objects() C:\ProgramData\Anaconda3\envs\askcompany\lib\site-packages\django\db\models\query.py in __iter__(self) 55 # Execute the query. This will also fill compiler.select, klass_info, 56 # and annotations. ---> 57 results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size) 58 select, klass_info, annotation_col_map = (compiler.select, compiler.klass_info, 59 compiler.annotation_col_map) C:\ProgramData\Anaconda3\envs\askcompany\lib\site-packages\django\db\models\sql\compiler.py in execute_sql(self, result_type, chunked_fetch, chunk_size) 1133 cursor = self.connection.chunked_cursor() 1134 else: -> 1135 cursor = self.connection.cursor() 1136 try: 1137 cursor.execute(sql, params) C:\ProgramData\Anaconda3\envs\askcompany\lib\site-packages\django\utils\asyncio.py in inner(*args, **kwargs) 20 else: 21 if event_loop.is_running(): ---> 22 raise SynchronousOnlyOperation(message) 23 # Pass onwards. 24 return func(*args, **kwargs) SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async.
-
미해결더 자바, Java 8
아이패드 화면 어떻게 띄우셨나요?
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요. 강의 열심히 듣고 있습니다. 람다 표현식 강의 중에 아이패드 화면을 맥북에 띄우신 것 같은데 혹시 어떻게 띄우셨는지 알 수 있을까요? 좋은 강의 감사합니다!
-
미해결자바(Java) 알고리즘 문제풀이 입문: 코딩테스트 대비
Run Time Error 원인을 못찾겠습니다.
package matter2_5; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); Main main = new Main(); System.out.println(main.solution(num)); } public int solution(int num) { int answer = 0; int arr[] = new int [20]; for (int i = 2; i < num; i++) { if(arr[i] == 0) answer++; for (int j = i; j < num; j+=i) { arr[j] = 1; } } return answer; } } 20을 넣었을 때 return 으로 8이 나오는데 Runtime Error 원인을 못찾겠습니다.