묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part4: 게임 서버
lock lock-free 성능 차이가 없다는 부분에 대하여
강의 하실때 lock방식과 lock-free방식에 성능 차이가 없다는 것처럼 이야기 하셔서, 왜 성능 차이가 없을까 라는 것을 생각 해 보면, 주로 성능 차이가 어디에서 오냐를 먼저 고민해 봐야 할 것입니다. 저의 생각으로는, 정상적인 상황에서 Context switching으로 인해 커널 - 유저 모드 전환에서 큰 비용이 발생한다고 생각이 됩니다. 전통적인 Event 방식이 대표적인 예라고 생각합니다. 작업하신 lock-free 방식을 볼때마다 spinlock이 계속 떠올랐습니다. 결국 User mode에서 polling하고 있는 것이 겠지요. 어디서 주워 듣기로는 요즘 lock들도 커널 모드로 바로 들어가 일정시간 잠들지 않고, user mode에서 3000번, 5000번 정도 while을 돌면서 소유권을 얻을 수 있는지 확인한다고 합니다. 그 횟수동안 얻지 못하면 sleep 되는 식으로 알고 있습니다. 결국 빠르게 소유권이 전환되는 상황이라면 user mode에서만 작업이 발생하기 때문에 큰 overhead가 없다고 볼 수 있을 것 같습니다. 이러한 이유로 두 방식의 성능 차이가 거의 없다고 보는데 다른 분들의 의견이 궁금합니다.
-
미해결코딩으로 학습하는 리팩토링
리팩토링 11, 16은 이미 예제가 작성되어 있네요!
리팩토링 11, 16 에 실습할 수 있는 예제가 없습니다!이미 백기선님께서 리팩토링해주신 코드에요 저는 2월 14일에 인프런에 올라와있는 강의자료에서 다운로드 받았는데요, 혹시 최신 예제 소스를 깃헙으로 관리하실 예정이시라면 새로 풀땡겨서 받겠습니다.
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part4: 게임 서버
강의와 상관없는 질문
FMOD failed to initialize. This may be because your sound card is configured to give applications exclusive access, thus preventing Unity from using this device. You can change this in Control Panel > Audio Devices and Sound Themes > Playback Device > Properties > Options ... : "Soundcard does not support the minimum features needed for this soundsystem (16bit stereo output). " (59) 안녕하세요. 강의와 상관없는 질문이긴 하지만 검색해도 안나오길래 질문해봅니다. 스피커를 바꾸고 바로 유니티엔진을 켰는데 위 에러가 뜹니다. 구글검색해도 안나오고 뭐 어찌해야할지 모르겠습니다.. 혹시 해결책을 아시는지 궁금합니다
-
미해결유니티 머신러닝 에이전트 완전정복 (기초편)
파이토치 설치방법
pip 파이토치 설치방법을 잘 모르겠습니다... 유니티 머신러닝 에이전트 살펴보기 > ML-Agents 설치 강의에서 하단에 해당 과정을 통해서 설치를 진행했을 때 pytorch가 설치되지 않은 경우는 pytorch 홈페이지 (https://pytorch.org/) 에서 pytorch 설치를 추가적으로 진행하시고 이후 내용을 진행해주셔야합니다. 라고 적어주셨는데 링크를 타고 들어가도 설치 방법을 잘 모르겠습니다. 구글링을 해봐도 이해가 안되서 여쭈어봅니다.
-
미해결Node.js로 웹 크롤링하기
db.Proxy.create 부분 질문이 있습니다.
# db.Proxy.create 부분 질문이 있습니다. 1. Promise.all 를 사용하는 이유가 무엇인가요? Promise.all 없이 foreach 만 사용해도 적상작동을 합니다. 2. map 에 async 함수를 준 이유가 무엇인가요? db.Proxy.create 가 Promise 인건가요? > 좋은 강의 감사합니다. 좋은 하루 보내세요 : )
-
미해결
Fulfill your website requirements by hiring a website design company in India
Your website design will determine the amount of interest you build from your viewers. If it's plain and basic, no one will even bat an eye. The market is looking for variety and if you have a unique idea then don't let your website interface ruin the business. Hire the best Website designing company in India. Especially when it comes to the Indian market your website in no way must seem uninteresting because the audience can bounce after concluding it is weak when seen from a credibility point of view. The best and the easiest way to provide an engaging outlook for your website is to choose an efficient website design company in India that knows the needs and deeds of the market. The best ways to hire a good website design company in India: Web design in India is still in its development phase. But there are skilled web design companies that have provided their services to a wide variety of clients in return for good feedback. So keep your eye out for one. Their work and client history will prove their mettle. You need to review their track record to be sure if they're responsive to your requests and will be able to provide you with a website that works. Website design company in Noida should be all about listening and then implementing. If they seem to be well friendly to your demands and requests by providing the appropriate results then do not hesitate as you now have the right website designing company in India to make it work for you. Web design in India is essential to grabbing people's attention who are visiting your business website. You need to be aware of the normal rates and always keep an eye out for the minor details of your website. Make sure that your website comes out in a way that seems to be appealing website and nice to your customers. Web designing is no simple or time pass hobby, it takes time to cultivate and come up with a design that can captivate the audience in its aura of brilliance. Exaggerated? Yeah, maybe a little bit but hopefully you get the point. Best Web Design Company in India for all your web design requirements.
-
미해결웰컴 투 태블로 월드
수업 예제 파일
따라서 해볼 수 있는 샘플 파일이 있는지요?
-
미해결예제로 배우는 딥러닝 자연어 처리 입문 NLP with TensorFlow - RNN부터 BERT까지
코드 실행 오류
안녕하세요. AISchool 님, 늘 좋은 강의 감사드립니다. 이번 강의에서 제공해주신 코드를 수정없이 그대로 실행했는데 word2vec.fit(dataset, epochs=20, callbacks=[tensorboard_callback]) 이 코드를 실행하면 IndexError: tuple index out of range 가 발생합니다. Call arguments received: • pair=('tf.Tensor(shape=(1024,), dtype=int32)', 'tf.Tensor(shape=(1024, 5, 1), dtype=int64)') 이렇게 뜨는데 어떻게 수정해야 하나요? 그럼 답변 기다리겠습니다. 감사합니다!
-
미해결홍정모의 따라하며 배우는 C언어
size_t %zu사용
5:58 에서 size_t 에 해당하는 형식 지정자가 %zu라고 하셨는데 6: 42쯤 나오는 코드 34,35 번째 줄에는 왜 %zu가 쓰인 건가요? size_t를 사용하지 않은 코드인데도 %zu를 쓴 이유가 궁금합니다. 16:27에 나오는 코드에서도 size_t를 사용하지 않았는데 50번째 줄에서도 %zu를 사용하는데요 size_t라는 자료형을 선언해야만 출력할 때 %zu를 쓸 수 있는 것 아닌가요?
-
미해결홍정모의 따라하며 배우는 C언어
size of pointer
10:18 에서 콘솔창에 size of pointer = 4 bytes 라고 뜨는데 저는 4바이트가 아니라 8바이트로 뜨는데 왜 그런건가요? 코드는 똑같이 작성했습니다.
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
LOAD_POSTS_REQUEST가 무한정 일어나요.,
보시다 시피 GET /posts 304 에러로 인해 정상 작동하지 않습니다. 사진상으로는 멈춰있지만 무시무시하게 많은 에러가 제 신성한 VSC 터미널창을 도배하고 있습니다. 처음엔 REQUEST - SUCCESS를 번갈아 보내는 모습을 보고, 'page/index.js'에서 요청을 보내는 클라이언트의 잘못이라고 생각했습니다. REQUEST를 무한정 보내고 있으니 보내는 쪽의 문제일 거라고요.. front/page/index.js ... ... import { LOAD_POSTS_REQUEST } from '../reducerss/post'; import { LOAD_USER_REQUEST } from '../reducers/user'; const Home = () => { const dispatch = useDispatch(); const { me } = useSelector(state => state.user); const { mainPosts, hasMorePosts, loadPostsLoading } = useSelector( state => state.post, ); useEffect(() =>{ dispatch({ type: LOAD_USER_REQUEST, }); dispatch({ type: LOAD_POSTS_REQUEST, }) }, []); const [ref, inView] = useInView(); // useEffect(() => {}, []) : 뒤에 빈배열을 넣을 경우.componentDidMount()같은 효과를 줄 수 있다. useEffect(() => { if (inView && hasMorePosts && !loadPostsLoading) { const lastId = mainPosts[mainPosts.length - 1]?.id; dispatch({ type: LOAD_POSTS_REQUEST, lastId, }); } }, [inView, hasMorePosts, loadPostsLoading, mainPosts]); return ( <AppLayout> {me && <PostForm />} {mainPosts.map(post => ( <PostCard key={post.id} post={post} /> ))} ....... ....... </AppLayout> ); }; export default Home; 그런데 딱히 특이사항이 발견되지 않아서 front/sagas와 front/reducers 쪽을 보았습니다. front/sagas import { all, delay, fork, put, call, takeLatest, throttle, } from 'redux-saga/effects'; import axios from 'axios'; import { ...... LOAD_POSTS_REQUEST, LOAD_POSTS_SUCCESS, LOAD_POSTS_FAILURE, } from '../reducers/post'; function loadPostsAPI(data) { //실제로 서버에 요청을 보냄 return axios.get('/posts', data); } function* loadPosts(action) { try { const result = yield call(loadPostsAPI, action.data); yield put({ type: LOAD_POSTS_SUCCESS, data: result.data, // data에 게시글들 배열 -> 이것은 reducer로 간다 }); } catch (err) { yield put({ type: LOAD_POSTS_FAILURE, data: err.response.data, }); } }; .... function* watchLoadPosts() { yield takeLatest(LOAD_POSTS_REQUEST, loadPosts); } .... export default function* postSaga() { yield all([ fork(watchAddPost), fork(watchLoadPosts), fork(watchRemovePost), fork(watchAddComment), ]); } front/reducers const reducer = (state = initialState, action) => produce(state, draft => { switch (action.type) { case LOAD_POSTS_REQUEST: draft.loadPostsLoading = true; draft.loadPostsDone = false; draft.loadPostsError = null; break; case LOAD_POSTS_SUCCESS: draft.loadPostsLoading = false; draft.loadPostsDone = true; draft.mainPosts = draft.mainPosts.concat(action.data); draft.loadPostsError = null; draft.hasMorePosts = draft.mainPosts.length < 50; break; case LOAD_POSTS_FAILURE: draft.loadPostsLoading = false; draft.loadPostsError = action.error; break; 304 에러로 보아 서버 쪽 문제일 수도 있어서 라우터 쪽도보았습니다. const express = require('express'); const { Post, Image, User, Comment } = require('../models'); const router = express.Router(); router.get('/', async (req, res, next) => { // GET /posts try { const posts = await Post.findAll({ limit: 10, order: [['createdAt', 'DESC']], include: [{ model: User, }, { model: Image, }, { model: Comment, }], }); res.status(200).json(posts); } catch (error) { console.error(error); next(error); } }); module.exports = router; 어느쪽 문제인지 사실 잘 모르겠습니다.저런식으로 무한 로딩 에러가 난다면 어디에서 에러를 찾아야 하나요? 제가 생각하기엔 프론트였는데 예상이 빗나가서 2시간째 헤매고 있습니다 도와주세요
-
미해결홍정모의 따라하며 배우는 C언어
size_t
3:53에서 size_t가 typedef unsigned int 를 의미한다고 나오는데요 제 컴퓨터에서는 typedef unsigned long long으로 뜹니다. 어떻게 이해해야 하나요? 그리고 일단 size_t가 unsigned int 라고 이해한 상태에서 22번째 줄 size_t float_size = sizeof(float); 을 이해하는 것이 조금 헷갈리는데요 float의 크기를 size_t 그러니까 unsigned int로 나타낸다? 이렇게 이해하는 것이 맞을까요?
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part6: 웹 서버
RankingService 클래스의 UpdateGameResult 메서드에 대한 질문
UpdateGameResult에서 // Update public Task<bool> UpdateGameResult(GameResult gameResult) { var findResult = _context.GameResults .Where(x => x.Id == gameResult.Id) .FirstOrDefault(); if (findResult == null) return Task.FromResult(false); findResult.UserName = gameResult.UserName; findResult.Score = gameResult.Score; _context.SaveChanges(); return Task.FromResult(true); } 여기서 _context.SaveChanges() 를 하기 전에 DeleteGameResult 메서드처럼 _context.GameResults.Update(findResult) 같은 함수가 있겠다 라는 생각이 들었는데 없어서 혼란스러워요 저렇게 하면 지역변수 findResult의 값만 바뀌는 것 아닌가? 생각했는데 실제로 데이터베이스의 값이 바뀌는 걸 보고 원래 저렇게 쓰는건가라는 생각이 들긴하는데 Update만 저렇게 쓰니 원리가 궁금하네용 답변해주시면 정말 감사하겠습니다!
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part1: C# 기초 프로그래밍 입문
질문이 있습니다!
CreatePlayer 함수를 만들 때 switch 문을 활용하셨는데요, 마지막에 default 값에 hp, attack 값을 0으로 넣지 않으면 본문에 오류가 나는 원리가 궁금합니다. 그리고 CreatePlayer 함수의 매개변수목록 중에 ClassType Choice 를 넣는 이유는 열거형으로 적어놨던 ClassType 내용들을 이 함수로 끌어와서 쓰겠다는 뜻인건가요?
-
미해결언리얼 엔진4 입문 (C++ 기반)
언리얼 코딩할 때 자동완성 기능이 있나요?
언리얼은 명령어는 원래 자동완성이 안되는건가요? 예를 들어 UE_LOG(LogTemp, Warning , TEXT("BeginPlay"), 3); 에서 Warning을 지우고 Ctrl + Space 를 누르면 보통 'Error를 사용해라' 와 같이 그 위치에 맞는 값이 나오지 않나요? 비주얼 스튜디오에 있는 라이브러리들은 자동완성이 되는데 언리얼엔진것만 안되서 질문드립니다!
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
user.save is not a function 오류.. 문의드립니다.
User.js index.js Log 실질적으로 DB 연결및 reqbody 값도 정상적으로 들어오는데 User.Save 못찾는 경우는 어떻게 해야할까요?! ㅠㅠ
-
미해결설계독학맛비's 실전 Verilog HDL Season 1 (Clock부터 Internal Memory까지)
안녕하세요
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요 맛비님! 혹시 2:46초 쯤에 라인 한번에 잡아 주석 처리하는 방법과 변수 자동완성 기능은 어떻게 켜두는지 궁금합니다ㅠㅠ 변수 자동완성 기능이 ctrl + p 를 누르면 되는것은 찾았지만.. 입력중에 활성화 되는 방법이 보이지 않아 이렇게 질문을 남깁니다.
-
미해결[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)
반복문 활용2 : 시간 16:30 ~ 17:00
해당 결과문을 얻기 위해서 정답이 이렇다면 data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] data.reverse() for index in data: print(index) 저의 경우는 조금더 손쉽게 할려는 생각으로 data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] for index in data.reverse(): print(index) 해당 결과의 오류창을 보면 TypeError: 'NoneType' object is not iterable 다음과 같이 나타나게 됩니다. 제가 간과한 변수가 있을까 싶어서 문의 드립니다
-
미해결장박사의 블록체인 이해와 구조
수업에서 다루지 않는 파일들
수업에서 모든 파일에 대해 상세하게 설명해주시진 않다 보니, 처음부터 혼자 작은 프로젝트를 만들어 보는 데에 어려움이 있습니다. 1. html_start로 전자지갑 개발 실습을 하고 qr을 이용해보기도 한 다음, 2. 농산물 이력 관리로 넘어가는데요. 1번에서는 다양한 js 파일들이 있고, 2번에서는 js 파일의 수가 확 줄어든 것을 확인할 수 있었습니다. 2번은 비트코인의 transaction이 없고 다양한 라이브러리를 쓸 필요가 없으니 js 파일이 줄어들었을 것이라고 추측했습니다. 대신 서버를 활용하기 때문에 package.json과 main.js 파일 등이 있구요... 농산물 이력 관리 프로그램을 만들 때에는 1번 실습 파일 중에 있던 web3.js 같은 것이 필요 없나요? 왜 1번에서는 web3에 대한 파일이 필요하고 2번에서는 필요 없나요?
-
미해결MERN STACK 커뮤니티 : 시작부터 배포까지 알려주는 React
res.req.file로 코딩하시는 이유가 궁금합니다.
multer를 사용해서 하나의 파일만 받는 메소드인 upload를 사용하고 그 안에서 req, res, err 를 받아서 console.log(res.req.file)을 코딩하실 때, 설명으로는 upload의 응답인 res에 ImageUpload.js의 요청인 req라고 설명주시면서 res.req.file를 코딩하셨는데 req.file로 ImageUpload.js의 요청을 받아오는 것까지는 이해가 되었으나, res.req.file을 코딩하시는 것은 이해가 잘되지 않았습니다. 조금 더 추가적인 설명 부탁드립니다.