묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨웹 게임을 만들며 배우는 React
혹시 webstorm 단축키 궁금한게 있어서 질문 하나 드려도 될까요?
1분 3초쯤에 this.state를 찾을때 밑으로 하나씩 찾아서 내려가는 부분이 있는데, 아무리 찾아봐도 command+F / command+G 단축키를 사용하라는 말밖에 나오지 않더라구요. 영상에서는 위에 find, replace창이 나오지 않고 자기가 원하는만큼만 찾아서 여러개를 동시에 수정하는것처럼 보이는데 혹시 단축키를 좀 알려주실수 있을까요? 강좌랑 관련 없는 질문이라, ㅠ 그래도 대답해주시면 정말 감사하겠습니다.
-
미해결프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
질문이요
import sys print('Learn Python', file=sys.stdout) 여기서 sys, stdout, file의 의미에 대해 상세한 설명 부탁드립니다. 이해가 전혀 안됩니다...
-
미해결홍정모의 따라하며 배우는 C++
[02:41] s.resize(-1) 이 던지는 익셉션을 받아서 what()을 출력했을 때 string too long이 나오는 이유
안녕하세요? 복습하면서 다시 생각해봤습니다. 혹시 -1로 리사이즈를 한다면 뭐가 들어오든 리사이즈 된 사이즈보다는 길테니까 그런건가요? ==================================자답========== unsigned라서 -1을 하면 0xffffffff 가 되니까 그런거네요 ㅠ. 감사합니다.
-
미해결실전! Querydsl
안녕 하세요
entitymanager는 thread에 safe하지 않는걸로 알고 있습니다 근데 강의에서 thread에 safe하다고 하셔서 확인해보니 safe하지 않네요. spring container가 thread safe하게 관리해주는 것으로 알고 있습니다 맞나요?
-
미해결Vue로 Nodebird SNS 만들기
프론트엔드에 pm2 설치 후 배포시 에러
Asset Size Chunks Chunk Names ../server/client.manifest.json 20 KiB [emitted] 0817e97d2ab6d875667b.css 5.96 KiB 1 [emitted] [immutable] vendors.pages/hashtag/_id/index.pages/index.pages/post/_id/index.pages/user/_id/index 1d9e24029b0ed22b7d35.js 170 KiB 11 [emitted] [immutable] vendors.app 22a81dec205a130e1a29.js 57 KiB 2 [emitted] [immutable] app 43d0e13dc8fa836e29e8.css 298 KiB 11 [emitted] [immutable] [big] vendors.app 44f7a0bec3436e27b197.js 18 KiB 0 [emitted] [immutable] vendors.pages/hashtag/_id/index.pages/index.pages/post/_id/index.pages/profile.pages/user/_id/index 4ec1ad9bc60a36e13a4a.js 10.7 KiB 4 [emitted] [immutable] pages/hashtag/_id/index 5167c334427c8fcbbd94.css 1.17 KiB 2 [emitted] [immutable] app 59f75d985b76432b3cd3.js 4.15 KiB 7 [emitted] [immutable] pages/profile 6ff8b63eb8ff7016d497.js 9.15 KiB 8 [emitted] [immutable] pages/signup 840631b74903ce4d53b0.css 15.5 KiB 0 [emitted] [immutable] vendors.pages/hashtag/_id/index.pages/index.pages/post/_id/index.pages/profile.pages/user/_id/index 856def534aff94f4d327.css 3.45 KiB 8 [emitted] [immutable] pages/signup 92884176131a7b5ec567.js 10.7 KiB 6 [emitted] [immutable] pages/post/_id/index 99d17a0eda7f415cfb38.js 184 KiB 3 [emitted] [immutable] commons.app LICENSES 450 bytes [emitted] c8fc11877db27c56ed53.css 638 bytes 4, 6, 9 [emitted] [immutable] pages/hashtag/_id/index, pages/post/_id/index, pages/user/_id/index d029fafdb9b8b637a9ee.css 9.25 KiB 5 [emitted] [immutable] pages/index e0313d1fb9ba10e912b6.js 3.5 KiB 10 [emitted] [immutable] runtime e66cb99312216d2764ce.js 19.8 KiB 5 [emitted] [immutable] pages/index efc4033aeefbd33635aa.js 11.4 KiB 9 [emitted] [immutable] pages/user/_id/index fd133dd0d0011d9cd14c.js 38 KiB 1 [emitted] [immutable] vendors.pages/hashtag/_id/index.pages/index.pages/post/_id/index.pages/user/_id/index + 2 hidden assets Entrypoint app = e0313d1fb9ba10e912b6.js 99d17a0eda7f415cfb38.js 43d0e13dc8fa836e29e8.css 1d9e24029b0ed22b7d35.js 5167c334427c8fcbbd94.css 22a81dec205a130e1a29.js WARNING in chunk vendors.pages/hashtag/_id/index.pages/index.pages/post/_id/index.pages/profile.pages/user/_id/index [extract-css-chunks-webpack-plugin] Conflicting order between: * css ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./node_modules/vuetify/src/components/VList/VList.sass * css ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./node_modules/vuetify/src/components/VItemGroup/VItemGroup.sass WARNING in chunk vendors.pages/hashtag/_id/index.pages/index.pages/post/_id/index.pages/profile.pages/user/_id/index [extract-css-chunks-webpack-plugin] Conflicting order between: * css ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./node_modules/vuetify/src/components/VList/VListItem.sass * css ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./node_modules/vuetify/src/components/VItemGroup/VItemGroup.sass WARNING in chunk vendors.pages/hashtag/_id/index.pages/index.pages/post/_id/index.pages/profile.pages/user/_id/index [extract-css-chunks-webpack-plugin] Conflicting order between: * css ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./node_modules/vuetify/src/components/VAvatar/VAvatar.sass * css ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./node_modules/vuetify/src/components/VItemGroup/VItemGroup.sass WARNING in chunk vendors.pages/hashtag/_id/index.pages/index.pages/post/_id/index.pages/profile.pages/user/_id/index [extract-css-chunks-webpack-plugin] Conflicting order between: * css ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./node_modules/vuetify/src/components/VList/VListGroup.sass * css ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./node_modules/vuetify/src/components/VItemGroup/VItemGroup.sass WARNING in chunk vendors.pages/hashtag/_id/index.pages/index.pages/post/_id/index.pages/profile.pages/user/_id/index [extract-css-chunks-webpack-plugin] Conflicting order between: * css ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./node_modules/vuetify/src/components/VList/VListItemGroup.sass * css ./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/postcss-loader/src??ref--6-oneOf-1-2!./node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-3!./node_modules/vuetify/src/components/VItemGroup/VItemGroup.sass WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). This can impact web performance. Assets: 43d0e13dc8fa836e29e8.css (298 KiB) Hash: 5443d611dde775b1d684 Version: webpack 4.41.5 Time: 32526ms Built at: 01/24/2020 5:06:57 AM Asset Size Chunks Chunk Names 2df6e4c3d4f56668a4ad.js 62 KiB 2 [emitted] [immutable] pages/index 80fe0f56e710f573f2cf.js 15.8 KiB 4 [emitted] [immutable] pages/profile 89dbd60b37836cf539ee.js 7.34 KiB 5 [emitted] [immutable] pages/signup 8a4a6fe05250c3600fcb.js 55.7 KiB 6 [emitted] [immutable] pages/user/_id/index cfbe446713f0473106f9.js 55 KiB 1 [emitted] [immutable] pages/hashtag/_id/index e7ba37c492da17f18d7f.js 55.1 KiB 3 [emitted] [immutable] pages/post/_id/index server.js 127 KiB 0 [emitted] app server.manifest.json 843 bytes [emitted] + 7 hidden assets Entrypoint app = server.js server.js.map > vuerd-front@1.0.0 start /home/ubuntu/NodeBird/ch6/front > cross-env PORT=80 NODE_ENV=production pm2 start server [PM2][ERROR] Script not found: /home/ubuntu/NodeBird/ch6/front/server npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! vuerd-front@1.0.0 start: `cross-env PORT=80 NODE_ENV=production pm2 start server` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the vuerd-front@1.0.0 start 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! /root/.npm/_logs/2020-01-24T05_06_59_197Z-debug.log pm2 를 설치하고 package.json 에서 start, prestart 부분을 수정, 생성하고 했는데 에러가 나옵니다. pm2 안 하고 배포하면 실행이 됩니다.
-
미해결더 자바, 애플리케이션을 테스트하는 다양한 방법
@Test사용 메서드가 이름에 따라 테스트 순서가 바뀌네요
create1>create2>create3 는 위에서 아래대로 순차적으로 테스트가 실행되었습니다 그런데 underbar라는 단어를 쓰면 create3_underbar > create2_underbar > create1_underbar 이렇게 "_" 사용과 상관없이 역순으로 실행되네요 underscore라는 단어를 쓰면 create1_underscore > create2_underscore > create3_underscore 또 순차대로 테스트를 실행합니다 비문인 단어를 쓰면 그런걸까요?
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
주문과 배송의 1:1 관계가 아닌 1:N 관계의 요구사항에 대해 여쭙습니다.
안녕하세요. '도메인 분석 설계 - 도메인 모델과 테이블 설계, 엔티티 클래스 개발 1' 강의 부분에 궁금한 사항이 있어서 여쭙습니다. 팀장님께서 예제로써 설계하신 테이블 및 클래스 연관관계 매핑을 작성하던 중에 만약, 주문과 배송이 1:1 관계가 아니라, 1:N 관계를 이루고 있다고 한다면 주문(Order) 테이블과 배송(Delivery) 테이블 사이에 이들을 1:N으로 연관시킬 수 있는 중간테이블이 존재해야하는지, 이때 외래키는 배송 테이블로 설정해야하는지 알고싶습니다. 질의 내용을 아래에 쉽게 풀어 보았습니다. 예를들어, 하나의 주문정보가 있고 주문 내역에는 여러 상품들이 있는 경우 이때 각 주문 상품에 대해 배송정보(택배회사, 운송장번호 등)를 등록해주어야 하는 요구사항있다면 프로젝트 설계단계에서 테이블 및 클래스 연관관계 설정이 궁금합니다. 미리 답변 감사드리며, 새해 복 많이 받으세요.
-
미해결홍정모의 따라하며 배우는 C++
vcpkg 설치 오류로 문의드립니다.
안녕하세요 교수님! 질문 처음 올려보는데 이런 오류 문제로 처음 올리게 되네요. 다름이 아니라 20.4 vcpkg 설치 과정 강의를 들으면서 설치를 따라하고 있는데 vcpkg install boost:x64-windows 명령어를 실행할 때마다 계속 이러한 설치 오류가 납니다. 구글링 하여 여러 방법을 따라 시도해 보았지만 해결이 되지 않고 있습니다 ㅠㅠ 게임 만들기 강의도 오늘부터 수강 시작하려고 했던 참이라 문제가 빨리 해결 되었으면 좋겠는데... 도움 주시면 감사하겠습니다. 비쥬얼 스튜디오 2017 버전을 사용하고 있습니다. 연휴 잘 보내시고 새해 복 많이 받으세요!
-
해결됨React로 NodeBird SNS 만들기
post 삭제시 연계된 댓글 데이터
안녕하세요 제로초님 post 게시글 삭제시 그 post에 달린 댓글들을 시퀄라이드 comment 테이블에서도 삭제를 하고 싶은데 게시글 삭제시 아래와 같이 PostId만 삭제됩니다 위와 같이 Comment 삭제 대상을 PostId로 잡았는데 이 부분이 문제인걸까요? 연휴에 질문드려 죄송합니다..
-
해결됨남박사의 파이썬으로 실전 웹사이트 만들기
.나요에러가 구문 {{result.pubdate|formatdatetime}}
안녕하세요. view.html에서는 잘되었는데... {{result.pubdate|formatdatetime}} list.html에서는 {{result.pubdate}} formatdatetime 이부분이 들어가면 dict 에러가 발생 합니다. @app.template_filter("formatdatetime") def format_datetime(value): if value is None: return "" now_timestamp = time.time() offset = datetime.fromtimestamp(now_timestamp) - datetime.utcfromtimestamp(now_timestamp) value = datetime.fromtimestamp(int(value) / 1000) + offset return value.strftime('%Y-%m-%d %H:%M:%S') @app.route("/list") def lists(): # 페이지 값 ( 값이 없는 경우 기본값은 1) page = request.args.get("page", 1, type=int) # 한페이지당 몇개의 게시물을 출력할지 설정 limit = request.args.get("limit", 10, type=int) search = request.args.get("search", -1, type = int) keyword = request.args.get("keyword", type = str) #최종적으로 완성된 쿼리를 만들 변수 query = {} #검색어 상태를 추가할 리스트 변수 search_list = [] if search == 0: search_list.append({"title":{"$regex":keyword}}) elif search == 1: search_list.append({"contents":{"$regex":keyword}}) elif search == 2: search_list.append({"title":{"$regex":keyword}}) search_list.append({"contents":{"$regex":keyword}}) elif search == 3: search_list.append({"name":{"$regex":keyword}}) # 검색 대상이 한개라도 존재할 경우 query 변수에 $or 리스트를 쿼리 합니다. if len(search_list) > 0: query = {"$or" : search_list} board = mongo.db.board datas = board.find({}).skip((page - 1) * limit).limit(limit) # 게시물의 총 갯수 tot_count = board.find({}).count() # 마지막 페이지의 수를 구합니다. last_page_num = math.ceil(tot_count / limit) # 페이지 블럭을 5개씩 표기 block_size = 5 # 현재 불럭의 위치 block_num = int((page - 1) / block_size) # 블럭의 시작 위치 block_start = int((block_size * block_num) + 1) # 블럭의 끝 위치 block_last = math.ceil(block_start + (block_size - 1)) return render_template( "list.html", datas = datas, limit = limit, page = page, block_start = block_start, block_last = block_last, last_page_num = last_page_num ) 혹시 오타가 있을까봐. 소스까지 넣어봤습니다.
-
해결됨레트로의 유니티 C# 게임 프로그래밍 에센스
GameObject 자식 Object들의 위치를 변경하려고 하는데 문제가 생겼습니다
Button을 Prefab으로 저장해 둔 후에 ScrollBar를 Button에 추가한 후 Text와 ScrollBar의 위치를 변경하려고 하니깐 사진과같이 메시지가 뜨네요 혹시 해결방법이 있을지 궁금합니다.
-
해결됨홍정모의 따라하며 배우는 C++
[아래질문 관련] 리턴타입이 int일 때와 Cents일 때의 차이
안녕하세요. 출력연산자 오버로딩을 해놔서 아래 처럼만 오버로딩해도 체이닝되는 것 처럼 보였던 거 같아요. int operator-() { return -m_cents; } 출력연산자 오버로딩을 주석처리하고 프린트 함수를 만들어서 테스트해보니 int를 리턴해서는 체이닝이 안되네요. void print() { cout << m_cents << endl; } /*friend std::ostream& operator<<(std::ostream& out,const Cents& cents) { out << cents.m_cents; return out; }*/ 감사합니다. <전체코드> // 9_3.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> using namespace std; class Cents { private: int m_cents; public: Cents(int cents_in = 0) : m_cents(cents_in) {} int getCents() const { return m_cents; } int& getCents() { return m_cents; } void print() { cout << m_cents << endl; } /*friend std::ostream& operator<<(std::ostream& out,const Cents& cents) { out << cents.m_cents; return out; }*/ //int operator-() //{ // return -m_cents; //} Cents operator-() const { return Cents(-m_cents); } bool operator!() const { return (m_cents == 0) ? true: false; } }; int main() { Cents cents1(6); Cents cents2(2); (-(-(-cents1))).print(); return 0; }
-
미해결Node.js 교과서 - 기본부터 프로젝트 실습까지
if(!answer || !answer.trim())
!answer.trim()는 어떠한 것을 의미하는건지 궁금합니다. trim() 메서드는 'String' 앞, 뒤 공백을 제거하는 것으로 알고 있습니다. 앞, 뒤 공백을 제거하지 못한다는 것이 어떤 의미인지 알고 싶습니다. 감사합니다.
-
미해결홍정모의 따라하며 배우는 C++
[아래질문 에러메시지]
안녕하세요? 아래와 같이 에러메시지가 나옵니다. 기본 멤버 이니셜 라이저에서 배열 바운드를 추론 할 수 없습니다 ========= 아래 =============== 검색해서 아래와 같은 정보를 찾았습니다. https://stackoverflow.com/questions/29593207/what-is-the-reason-for-not-being-able-to-deduce-array-size-from-initializer-stri 여기에 아래와 같은 답변들을 보니까 Foo라는 구조체의 생성자의 멤버 이니셜라이제이션 리스트에서 초기화 될 수 있기 때문이라고 설명하는 거 같습니다. because str can be also initialized in the member-initialization-list of Foo's constructor, discarding the initializer from the in-class initializer The reason is that you always have the possibility to override an in-class initializer list in the constructor. So I guess that in the end, it could be very confusing. struct Foo { Foo() {} // str = "test\0"; // Implementing this is easier if I can clearly see how big `str` is, Foo() : str({'a','b', 'c', 'd'}) {} // str = "abcd0" const char str[] = "test"; }; Notice that replacing const char with static constexpr char works perfectly, and probably it is what you want anyway. 감사합니다.
-
해결됨홍정모의 따라하며 배우는 C++
[ 02:10] 프라이빗에서 퍼블릭으로 바꿔다는 게 한가지가 있고요
안녕하세요? 새해 복 많이 받으세요. 제가 내용을 잘못 적었었네요. private에서 퍼블릭으로 바꿔서 인캡슐레이션이 깨진 부분을 설명해주고 계신데요. 음성은 "퍼블릭에서 프라이빗으로 바꿔다는 게 한가지가 있고요" 이렇게 나오고 있어요. 이 부분이 "프라이빗에서 퍼블릭으로 바꿨다는 게 한가지가 있고요" 로 되어야할 거 같습니다. 감사합니다.
-
해결됨윤재성의 Java 기반 Android 9.0(pie) App 개발 고급 3단계
액션바 커스터 마이징 할때 한 다음에 여기에 팝업메뉴 추가 가능한가요...
액션바 중에서 쓸만한게 많은것 같은데 그것을 같이 쓰면서 동시에 색깔을 바꾸거나 추가 하거나 하는 커스터 마이징도 같이 하고 싶어요. 액션바 커스터 마이징 할때 한 다음에 여기에 팝업메뉴 추가 가능한가요... 아니면 반대로 기존 액션바 그대로 넣고 배경색만 바꾸거나 하는 편집이 가능한가요?
-
미해결홍정모의 따라하며 배우는 C언어
getch함수
#include <stdio.h> int main() { char c; while ((c = _getch()) != '\n') { printf("%c", c); } printf("\n"); } 위 코드에에서 _getch함수로 문자하나를 입력받고 그걸 변수c에 저장 후에 개행문자가 아닐때와 비교를 해서 개행문자가 c에 들어오면 종료되도록 하고 아니라면 출력을 하도록 만들었는데 실행을 해보면 개행을 하게되면 종료가 아니라 콘솔창에서 처음 입력을 받은 곳으로 돌아갑니다 그 이유가 무엇인가요?
-
미해결파이썬 입문 및 웹 크롤링을 활용한 다양한 자동화 어플리케이션 제작하기
왜 소리가 두개로 나오죠??
다른 강의랑 소리가 같이 나는데요 왜 그런거죠?
-
미해결[김왼손의 왼손코딩] 미운코딩새끼: 4시간 만에 끝내는 파이썬 기초 (전자책 포함)
에디터 모드
에디터 모드는 어떻게 들어가죠?
-
미해결문제로 배우는 C언어
다른 방법이 궁금합니다.
강의에서처럼 처음에 min에 대해서 임의로 입력자가 입력하지 않을 것 같은 값을 초기화해서 코딩하는 방법 말고, min을 선언만 하고 값을 초기화 하지 않거나, 정말로 꼭 초기화 해야한다면 0같은 값으로 초기화 해서 이 문제를 해결 하고 싶습니다. 어떻게 코딩해야하나요? 제 나름대로 시도 해봤지만 min 값이 0이 뜨거나 에러가 발생합니다.