묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
궁금증 질문있습니다.!
import React from 'react'; import './App.css'; import { BrowserRouter as Router, Switch, Route, Link } 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'; import Auth from './hoc/auth'; function App() { return ( <Router> <Switch> <Route exact path="/" component={Auth(LandingPage, null, true)} /> <Route exact path="/login" component={Auth(LoginPage, false)} /> <Route exact path="/register" component={Auth(RegisterPage, false)} /> </Switch> </Router> ); } export default App; 그냥 호기심으로 인한 질문입니다! hoc폴더안에 auth.js에 있는 함수는 익명함수인데. App.js에서 쓸때는 Auth로 import를 해주시면서 함수를 이용하셨는데 익명함수를 import할 때 마음대로 이름을 바꿔도 되나요?. 만약 auth.js파일에 익명함수가 2개 이상일 때도 똑같이 가능한가요? 안된다면 어떻게 해주나요? 왜냐하면 저번에 user_reducer.js안에 그냥 user를 import하시고 넘어가셔서 다음에 설명해주실줄 알고 넘어갔거든요!. 궁금하네요!
-
미해결실습 UI 개발로 배워보는 순수 javascript 와 VueJS 개발
vuejs 데이터 참조 관련 질문이 있습니다.
컴포넌트 강의 FormComponent 구현 2를 듣던 중 FormComponent.js 를 작성하고 있을 때, 문뜩 data()함수에서 return 하는 객체의 프로퍼티인 inputValue를 어떻게 methods 프로퍼티 안에 onSubmit()함수에서 this.inputValue로 참조를 할 수 있는지 의문이 생겼습니다. console.log(this)로 하나씩 찍어보면서 확인해본 결과 <submit을 할 때마다 어떻게 나오는지 확인하기 위해서 FormComponent.js의 onSubmit함수에서 찍어보았습니다> <submit하였을 때 console.log(this)의 결과> FormComponent 에서 this로 가르키면 VueComponent가 나온다는 것을 알았고 VueComponent에 _data 프로퍼티가 있는 것을 보았습니다. 그래서 this._data.inputValue가 this.inputValue와 같은지 확인해보기 위해서 찍어보았고 서로 같다는 것을 확인했습니다. 전 여기서 두가지가 궁금증이 생겼습니다. 제가 아직 자바스크립트에 대한 이해도가 낮습니다. 해서 아래 두가지의 궁금증에 대한 이론적인 부분을 어떻게 찾아보아야하는지 모르겠습니다. (아마 제가 모르는게 무엇인지 제가 모르는 것 같습니다) 1. 어떻게 data()메소드에서 반환하는 오브젝트가 곧 바로 VueComponent의 _data에 들어가는지... 2. 어떻게 this._data.inputValue로 참조해오지 않고 _data를 생략하고 this.inputValue로만 참조할 수 있는지
-
미해결Vue.js 완벽 가이드 - 실습과 리팩토링으로 배우는 실전 개념
node환경 구조
안녕하세요, 강의 중 궁금한 부분이 있어서 질문드립니다. 프로젝트 구성중 front node 환경이 별도로 구성되어 있고 실제 API를 처리하는 nginx를 별도로 분리하여 제 생각에는 client 호출 -> frontserver -> nginx 와 같은 방식으로 API 가 처리됩니다. 이 때, 기본 /config 설정에서 api_base_url : nginx 타깃 정보 /store/index.js 설정에서 baseUrl : frontserver 타깃정보 다음과 같은 방식으로 구성이 되어 있는데.. 해당 구조와 강의의 구조와 차이가 있는거 같아서.. 궁금증이 생깁니다. 현재 강의도 node서버 기반으로 구동되는건데.. frontserver를 따로 구축하는게 무슨 차이인가요?
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part2: 자료구조와 알고리즘
실수한 부분에서 나온 증상에 대한 이해
제가 parent[nextY, nextX] = new Pos(node.Y, node.X) 대신에 PosY, PosX를 집어 넣으니까 뭔가 맵이 폭포스마냥 계속 업데이트 되는걸로 보이던데 이게 모든 점의 부모점을 시작점으로 해버려서 진행도 못하고 그자리에서 멤돌기 때문에 생기는거죠? public void Astar() { // the delta values when moving towards Up, Left, Down, Right int[] deltaY = { -1, 0, 1, 0 }; int[] deltaX = { 0, -1, 0, 1 }; int[] cost = { 1, 1, 1, 1 }; // Giving points depending on how close the player is to the destination // F = G + H // F = Final Score (the smaller, the better. Varying depending on the route) // G = the cost to move from the start to the destination (the smaller, the better. Varying depending on the route) // H = the distance from the current position and the destination, without ignoring any obstacles (the smaller, the better. Fixed) // the status whether a coordinate has been visited (visited = closed) bool[,] closed = new bool[_board.Size, _board.Size]; // ClosedList (List can be used as well) // the status whether a route to (y, x) has been found (Gigving score) // not found -> Int32.Max // found -> F = G + H int[,] open = new int[_board.Size, _board.Size]; // OpenList (which has the scores on each coordinate) // Initialize OpenList for (int y = 0; y < _board.Size; y++) for (int x = 0; x < _board.Size; x++) open[y, x] = Int32.MaxValue; // an Array to track the parent nodes Pos[,] parent = new Pos[_board.Size, _board.Size]; // Use PriorityQueue, which is specialized to pick up the best case // a tool to pick up the best candidate from OpenList PriorityQueue<PQNode> pq = new PriorityQueue<PQNode>(); // Found Start (Reservation begins) // Log and give the score to the coordinate open[PosY, PosX] = 0 + Math.Abs(_board.DestY - PosY) + Math.Abs(_board.DestX - PosX); // : G == 0; H = the distance from Start to Destination pq.Push(new PQNode() { F = Math.Abs(_board.DestY - PosY) + Math.Abs(_board.DestX - PosX), G = 0, Y = PosY, X = PosX }); parent[PosY, PosX] = new Pos(PosY, PosX); // parent of Start is itself while (pq.Count > 0) { // Find out the best candidate PQNode node = pq.Pop(); // Skip if a coordinate has been visited(clsoed) with a faster route, while finding out routes to the same coordinate if (closed[node.Y, node.X]) continue; // Visit saying this coordinate won't visited again closed[node.Y, node.X] = true; // Quit if reached the destination if (node.Y == _board.DestY && node.X == _board.DestX) break; // Reserve(Open) the coordinates by verifying if they are available to move to for (int i = 0; i < deltaY.Length; i++) { int nextY = node.Y + deltaY[i]; int nextX = node.X + deltaX[i]; // Skip when the coordinate is out of the boundary if (nextY < 0 || nextY >= _board.Size || nextX < 0 || nextX >= _board.Size) continue; // Skip when the coordinate is Wall if (_board.Tile[nextY, nextX] == Board.TileType.Wall) continue; if (closed[nextY, nextX]) continue // Evalutate the cost int g = node.G + cost[i]; // the cost to move to the next coordinate int h = Math.Abs(_board.DestY - nextY) + Math.Abs(_board.DestX - nextX); // the distance from the current position to the destination // Skip when a btter route is found if (open[nextY, nextX] < g + h) continue; open[nextY, nextX] = g + h; // Put the calculated score pq.Push(new PQNode() { F = g + h, G = g, Y = nextY, X = nextX }); // input the coordinate to the Priority Queue parent[nextY, nextX] = new Pos(PosY, PosX); // the parent node of the next coordinate is the current node, which is the fastest one (verified by going through the filters above) } } // retrieve the path by follwing the parent nodes inversly CalculatePathFromParent(parent); }
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
선생님 질문이 있습니다.
@Configuration public class SpringConfig { @Bean public MemberService memberService(){ return new MemberService(memberRepository()); } @Bean public MemberRepository memberRepository(){ return new MemoryMemverRepository(); } 의존성을 주입하는 과정에서 반환형말고 memberRepository같은 메서드 이름들은 임의로 정하신게 맞으신가요?
-
미해결리액트로 나만의 블로그 만들기(MERN Stack)
안녕하세요, await
안녕하세요, 수업듣는 도중에 계속 이런식으로 값이 나와서 Error가 떳었는데 Server쪽에서 await을 넣어주니까 제대로 된값이 나왔습니다. 혹시나 저같이 안나오시는분들이 계실까봐 이렇게 올려봅니다!
-
해결됨스스로 구축하는 AWS 클라우드 인프라 - 기본편
질문 있습니다
DB서버의 경우 private 서브넷에 위치시키는 것이 좋다고 알고 있는데요. REST API 서버를 EC2로 구현한 경우 public 서브넷, private 서브넷 중에 어느 곳에 위치하는 것이 좋은지 이유를 알고 싶습니다.
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
강사님 controller에서 form과 관련해 질문이 있습니다.
안녕하세요 강사님 강의 잘 듣고있습니다. 제가 따로 프로젝트를 만들어서 연습을 하고 있는데 강사님이 Entity에는 setter를 가급적이면 넣지 않는게 좋다고 하셔서 그렇게 하고있는데 궁금한 점은 controller의 form을 만들 때에도 setter를 쓰는것이 좋지 않은 방법인가요? 이런식으로 해보긴 했는데 어떤식으로 하는게 좋을지 몰라서 여쭈어봅니다.
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
이번 강의 users.js에서 map() 대신 forEach()를 사용한 이유
간단한 궁금증입니다.. map()과 forEach()의 세세한 차이점은 검색을 해봤는데 map메소드가 보통 성능 면에서도 더 빠르고 기존의 데이터를 변형시키지 않고 새로운 배열을 반환하기 때문에 기존 데이터가 필요한 경우에도 쓸 수 있을 것 같다는 생각이 들었습니다. 강사님은 각각 어떤 경우에 map()과 forEach()를 사용하시는지 여쭤보고 싶습니다!
-
미해결반응형 웹사이트 포트폴리오(Architecture Agency)
slick.js 이런 경우는 어떻게 해야하나요..?
강의를 두번 완강하고나서 다른 사이트 클론코딩하면서 연습하고 있습니다 강의 예제가 아니라서 물어봐도 되는건지 모르겠네요.. 마우스를 갖다대면 slide down 되면서 내려오는 sub menu가 있고 바로 아래에 slick.js를 사용한 fade되는 슬라이더를 만들었습니다. sub menu가 내려오기 전에는 이상이없는데 내려왔을때 슬라이더가 옆으로 밀립니다 이 부분은 어떻게 해결 할 수 있을까요?
-
미해결선형대수학개론
Theorem10에서...
안녕하세요 오늘도 고생하십니다. 혹시 theorem10에서 맨밑에 linear transformation을 겇친 식이 area of T(V)가 아니라 volume of T(V)아닌가요?? 감사합니다
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
AWS 프리티어 요금 관련 질문입니다.
AWS 우분투 프리티어가 750시간 무료인걸로 알고 있는데요. 1~2달 정도 계속 켜두면서 조금씩 이것저것 건드려보고 디자인도 바꿔보고 할 예정인데. 1~2달정도 켜두면 요금이 많이 나올까요? 강의 도중에 15000원 이야기를 들은적이 있는데. 인터넷에서 AWS 요금 관련 썰을 많이 들어서 걱정이 되어서 질문 남겨 봅니다.
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
왜 굳이 input에 value를 넣었나요?
안녕하세요. 강의 잘 보고 있습니다. 혹시 input에 value를 넣어 타이핑이 안되게 한 이유가 무엇인가요? 굳이 setState을 사용하지 않고 타이핑을 치면 될텐데요...
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 영화 사이트 만들기
favorite list에서 삭제
안녕하세요 선생님! 제가 선생님이 하신 Axios.post 이런 부분을 전부 다 redux로 하도록 바꾸었는데 그 중에서 favorite page에서 삭제 버튼을 눌렀을 때만 onClick 이벤트로 삭제가 되어야하는데 favorite page에 접속하면 잠깐동안 항목에 리스트가 보였다가 다 자동으로 삭제가 되는 문제가 있어서 질문드려요! 콘솔로 찍어보니까 데이터는 전달되었는데 제가 버튼을 누르지않았는데도 onClickFavorite 이라고 제가 정의한 함수가 실행되고 있더라구요. 혹시 어디가 틀렸는지 가르쳐주실 수 있으실까요?? import React, { useEffect, useState } from 'react' import './favorite.css'; import { useDispatch } from 'react-redux'; import { getFavorite, removeFavorite } from '../../../_actions/user_action'; import { Popover } from 'antd'; import { IMAGE_BASE_URL } from '../../../Config'; function FavoritePage() { const dispatch = useDispatch(); const [Favorites, setFavorites] = useState([]) useEffect(() => { console.log('useeffect') dispatchFavoriteMovies() }, []) const dispatchFavoriteMovies = () => { dispatch(getFavorite({userFrom: localStorage.getItem('userId')})) .then(response => { if(response.payload.success){ console.log('dispatchfavoritemoviesresponse.payload',response.payload) setFavorites(response.payload.favorites) }else{ alert('영화 정보를 가져오는데 실패') } }) } const onClickDelete = (movieId, userFrom) => { const variables = { movieId, userFrom } dispatch(removeFavorite(variables)) .then(response => { if(response.payload.success){ dispatchFavoriteMovies() console.log('onclickdeleteresponse.payload',response.payload) }else{ alert('좋아요 취소 실패') } }) } const renderCards = Favorites.map((favorite, index) => { const content = ( <div> {favorite.moviePost ? <img src={`${IMAGE_BASE_URL}w500${favorite.moviePost}`} /> : "no image" } </div> ) return <tr key={index}> <Popover content={content} title={`${favorite.movieTitle}`}> <td>{favorite.movieTitle}</td> </Popover> <td>{favorite.movieRunTime} mins</td> <td><button onClick={onClickDelete(favorite.movieId, favorite.userFrom)}>Remove</button></td> </tr> }) return ( <div style={{ width: '85%', margin: '3rem auto' }}> <h2>Favorite Movies</h2> <hr /> <table> <thead> <tr> <th>Movie Title</th> <th>Movie RunTime</th> <th>Remove from favorites</th> </tr> </thead> <tbody> {renderCards} </tbody> </table> </div> ) } export default FavoritePage
-
해결됨3dsmax 모델링 고수의 비밀! (Modeling Expert Technique)
맥스에서 타블렛을 이용하여 모델링할때 타블렛 설정
손목이 아파서 타블렛으로 맥스 사용하고 싶은데요 타블렛 초보라 어떻게 설정해야 맥스에서 사용할 수 있는지 잘 모르겠어요ㅠㅠ 혹시 블로그나 인프런 강의중에 맥스에서 타블렛 설정하는 방법 알려주는 강의가 있나요?
-
미해결R로 배우는 통계
파이함수 text 입력 부분에서 궁금한 것이 있습니다.
잘못 쓴게 있으면 파이함수 재입력해서 하라고 하셨는데 만약에 입력해야 할 양이 많을 경우, 순간적으로 하나 잘못 입력 했다고 다시 처음 부터 쓰기엔 너무 번거롭지 않을까해서요.. 해당부분만 곧바로 취소 시키는 방법은 없는건가요?
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
DTO class 선언 및 update 시 id 조회 질문
안녕하세요. 두 가지 질문이 있어 이렇게 질문을 적어봅니다. 1. inner class를 왜 static으로 선언하나요? private으로 하면 물론 코드가 돌아가는 방식은 다르지만, 잘 돌아가더라구요. 혹시 실무에 적용한다면 어떤 문제점이 있나요? (다음 강의에서는 아무 것도 붙이지 않은 상태로 작성하신 것을 보니, 별로 임팩트 있는 부분은 아닌가보군요 ^^;) 2. 이건 간단한 질문인데, updateMemberV2 메서드에서 merberService.update 후, id로 update를 날렸음에도 id를 다시 찾아오시더라구요. id로 Member를 찾고 그로부터 getId를 다시 하는 이유가 있을까요? (수강자료에서 updateMemberV2 메서드 부분에 fineOne이라고 오타 있습니다.!) 항상 좋은 강의 감사드립니다.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
Gradle 세팅 화면이 다르게 나옵니다.
안녕하세요! 기본 세팅 따라하고 있었는데 Gradle project 칸이 아예 보이지 않는 건 어떤 문제 때문일까요?
-
미해결[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)
사용자 이름이 한국어라 쥬피터가 안되는것 같고 runtime 에서 들어가고 있는데
여기 runtime 안에 있는 파일들은 쥬피터 사용 후에 삭제해도 상관없나요?
-
미해결iOS/Android 앱 개발을 위한 실전 React Native - Basic
아이콘 이미지가 안 보인다면
https://github.com/facebook/react-native/issues/29215#issuecomment-712772968 그대로 따라하면 이미지가 보입니다!