묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결작정하고 장고! Django로 Pinterest 따라만들기 : 바닥부터 배포까지
comment detail.html 에서 target_comment.pk 를 쓰지않는 이유는무엇인가요?
context_object_name 에서 target_comment 를 썻는데 delete.html 에서는 쓰고 detail.html 에서는 그냥 comment.pk 를 쓰셧는데 target_comment.pk 를 써도 문제가없나요?
-
미해결JIRA를 활용해 더 효과적으로 프로젝트 협업하기
릴리즈
릴리즈의 정의가 무엇인지모르겠습니다. 배포라고 이해하려니 감이잘안와서 쉽게 설명해주실수있으실까요?
-
미해결[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part1: C++ 프로그래밍 입문
temp 내용 질문입니다!
저는 14:54초 쯤의 temp 메모리를 확인하는 부분에서 ccccccccccc 이외의 값들도 들어가 있는데 컴파일러마다 다른 부분인 걸까요??
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
교수님 1개 추가로 적어주셨으면합니다. (junit5사용자 한에서)
Junit4에서실습이라면 상관없지만 만약 Junit5에서 실습이라면 import org.junit.runner.RunWith; @RunWith(SpringRunner.class) 이 2개를 import org.junit.jupiter.api.extension.ExtendWith;@ExtendWith(SpringExtension.class) 이런식으로 바꾸고하니 가능했습니다.
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
ObjectOptimisticLockingFailureException
안녕하세요. 좋은 강의 제공해주셔서 감사합니다. 지금은 강의를 바탕으로 개발을 진행하고 있는데요. 궁금한 점이 생겨서 질문을 남겨봅니다. Spring Boot에 spring-data-jpa를 사용하고 있습니다. 2개의 API가 동시에 들어와 같은 row를 삭제하는 상황입니다. 이 때, 하나의 트랜잭션에서 ObjectOptimisticLockingFailureException이 발생하는데요. select한 값에 대해서 다른 트랜잭션이 이미 delete하여 delete할 row가 없다는 에러로 확인했는데요. 보통 spring-data-jpa로 delete하실 때, jpql을 사용해서 바로 delete native query가 날라가게 하시는지, 아니면 해당 에러를 따로 처리하는 방법이 있으신지 궁금합니다.
-
해결됨스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
안녕하세요 타임리프 질문입니다
이거 두개가 다른건가요?? 밑에껀 안되네요 ㅜㅜ 앞의 회원id 상품명 링크에서 th:href="@{/basic/items/{itemId}(itemId=${item.id})}" th:text="${item.id}"> - > th:href="@{|/basic/items/${item.id}|}" th:text="${item.itemName}"> 는 됐었는데 안되는 이유가 궁금합니다..ㅜㅜ th:onclick="|location.href='@{/basic/items/{itemId}/edit(itemId=${item.id})}'|"th:onclick="|location.href='@{/basic/items/${item.id}/edit}'|"
-
해결됨스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
css 위치 질문입니다.
안녕하세요! thymeleaf를 사용해서 동적으로 사용할 때 <link th:href="@{/css/bootstrap.min.css}" href="../css/bootstrap.min.css" rel="stylesheet"> 이렇게 사용되고 있는데 templates/basic/items.html 에서 열어서 /css/bootstrap.min.css 라고 바뀌었을때 css의 위치는 static/css/ 에 위치하고있는데 어떻게해서 열릴수있는건가요..?
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
MMDetection의 이해와 Faster RCNN 적용 실습 에서 No module named 'mmdet.datasetsasets'
안녕하십니까! 수업 감사히 잘 듣고 있습니다. * PC로 학습을 진행하고 있습니다. 환경은 아래와 같습니다. - GPU : GeForce GTX 105... (nvidia-smi) - cuda_11.0.3_450.51.06_linux.run 설치 - cudnn cudnn-11.0-linux-x64-v8.0.5.39.tgz 설치 - Anaconda : Anaconda3-2019.10-Linux-x86_64.sh 설치 - ananconda 가상환경 구성 - jupyter notebook 설치, 환경 설정 - 가상환경 activate -> jupyter multi kernel 설치 - pytorch 설치 : pip install torch==1.7.1+cu110 torchvision==0.8.2+cu110 torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html - pip install mmcv-full - git clone https://github.com/open-mmlab/mmdetection.git - cd mmdetection; python setup.py install => faster-rcnn의 학습(train)을 수행하고 예측(inferencd)을 잘 구현하였습니다. 그리고 mask-rcnn을 학습(수강)하였습니다. (새로운 가상환경 생성 후 학습) => mask-rcnn을 학습하고 와서 faster-rcnn의 소스를 정리하기 위해 잘 작동하던 소스를 실행 시키보니 아래와 같은 오류가 발생하였습니다. ======================================================================= --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) /tmp/ipykernel_1654/2266340391.py in <module> 6 import numpy as np 7 ----> 8 from mmdet.datasetsasets.builder import DATASETS 9 from mmdet.datasets.custom import CustomDataset 10 ModuleNotFoundError: No module named 'mmdet.datasetsasets' ======================================================================= - pip install mmcv-full 과 python setup.py install 을 다시 실행해도 안되네요. - 그리고 새로운 가상환경을 구축하고 이전과 동일하게 환경 잡고 해봐도 동일한 오류가 발생합니다. 답변 부탁드립니다.
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
npm run dev 할 때의 오류
서버를 켜기 위해 npm run dev를 입력했는데 다음과 같은 오류가 떴습니다 ㅜ missing script: dev A complete log of this run can be found in: 이 다음으로 어떤 경로가 나옵니다 그 전에는 잘 되다가 "unable to attach to brower" 라는 에러 메세지가 뜨고 나서는 npm run dev를 입력하면 위와 같은 에러 메세지가 뜨는데 어떻게 해야 하나요...?
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
오류 해결 방법 공유합니다.
FROM node:alpine RUN mkdir -p /usr/src/app/node_modules/.cache RUN chmod -R 777 /usr/src/app WORKDIR /usr/src/app COPY package.json ./ RUN npm install COPY ./ ./ CMD ["npm", "run", "start"] 오류 내용: EACCES: permission denied, mkdir '/usr/src/app/node_modules/.cache' 해결 방법: WORKDIR 을 설정하기 전에, 디렉토리를 만들고 접근 권한을 부여했습니다. 학습 용도기 때문에 777(모두허용)했지만, 배포 상황에서는 상황에 맞게 권한을 부여해야겠죠?
-
미해결[리뉴얼] 처음하는 MongoDB(몽고DB) 와 NoSQL(빅데이터) 데이터베이스 부트캠프 [입문부터 활용까지] (업데이트)
부분 문자열 검색 관련
안녕하세요, 항상 좋은 강의 감사합니다. 이번 강의를 듣고나니, 부분문자열을 검색할 때에 $regex 을 활용해서 검색하는 것이, text index 파일을 만들지 않아도 되고, 또 다양한 정규표현식 문법으로 검색할 수 있어 더 효율적이라고 생각이 듭니다. 근데 그럼에도 text index를 통해 부분문자열을 검색하는 이유가 무엇인지 궁금합니다. 그리고 실제 일을 할때에는 어떤 방법을 더 많이 활용하는지도 궁금합니다.
-
미해결실전! Querydsl
List 를 Map으로 변환할 수 있을까요?
List<MemberDto> 조회 결과를 Map형태로 변경해서 받을 수는 있나요??
-
미해결파이썬 무료 강의 (활용편1) - 추억의 오락실 게임 만들기 (3시간)
똑같이 따라 쳤는데 오류가 생겨요
나도코딩님처럼 똑같이 쳤는데 NameError: name 'ball_to_remove' is not defined 이런 오류가 떠여 도와주세요 ㅠㅠ import os import pygame ######################################################### # 기본 초기화 (반드시 해야 하는 것들) pygame.init() # 초기화 (반드시 필요) # 화면 크기 설정 screen_width = 640 # 가로 크기 screen_height = 480 # 세로 크기 screen = pygame.display.set_mode((screen_width, screen_height)) # 화면 타이틀 설정 pygame.display.set_caption("서준이의 게임2") #게임 이름 # FPS clock = pygame.time.Clock() ######################################################### # 1. 사용자 게임 초기화 (배경 화면, 게임 이미지, 좌표, 속도, 폰트 등) current_path = os.path.dirname(__file__) # 현재 파일의 위치 반환 image_path = os.path.join(current_path, "images") # images 폴더 위치 반환 # 배경 만들기 background = pygame.image.load(os.path.join(image_path, "background.png")) # 스테이지 만들기 stage = pygame.image.load(os.path.join(image_path, "stage.png")) stage_size = stage.get_rect().size stage_height = stage_size[1] # 스테이지의 높이 위에 캐릭터를 두기 위해 사용 # 캐릭터 만들기 character = pygame.image.load(os.path.join(image_path, "character.png")) character_size = character.get_rect().size character_width = character_size[0] character_height = character_size[1] character_x_pos =(screen_width /2) - (character_width /2) character_y_pos = screen_height - character_height - stage_height # 캐릭터 이동 방향 character_to_x = 0 # 캐릭터 이동 속도 character_speed = 5 # 무기 만들기 weapon = pygame.image.load(os.path.join(image_path, "weapon.png")) weapon_size = weapon.get_rect().size weapon_width = weapon_size[0] # 무기는 한 번에 여러 발 발사 가능 weapons = [] # 무기 이동 속도 weapon_speed = 10 # 공 만들기 (4개 크기에 대해 따로 처리) ball_images = [ pygame.image.load(os.path.join(image_path, "balloon1.png")), pygame.image.load(os.path.join(image_path, "balloon2.png")), pygame.image.load(os.path.join(image_path, "balloon3.png")), pygame.image.load(os.path.join(image_path, "balloon4.png"))] # 공 크기에 따른 최초 스피드 ball_speed_y = [-18, -15, -12, -9] # index 0, 1, 2, 3 에 해당하는 값 # 공들 balls= [] # 최초 발생하는 큰 공 추가 balls.append({ "pos_x" : 50, # 공의 x 좌표 "pos_y" : 50, # 공의 y 좌표 "img_idx" : 0, # 공의 이미지 인덱스 "to_x": 3, # x축 이동방향, -3 이면 왼쪽으로, 3 이면 오른쪽으로 "to_y": -6, # y축 이동방향, "init_spd_y": ball_speed_y[0]})# y 최초 속도 # 사라질 무기, 공 정보 저장 변수 weapon_to_remove = -1 ball_to_remvoe = -1 running = True while running: dt = clock.tick(60) # 2. 이벤트 처리 (키보드, 마우스 등) for event in pygame.event.get(): if event.type == pygame.QUIT: running = False if event.type == pygame.KEYDOWN: if event.key == pygame.K_LEFT: # 캐릭터를 왼쪽으로 character_to_x -= character_speed elif event.key == pygame.K_RIGHT: # 캐릭터를 오른쪽으로 character_to_x += character_speed elif event.key == pygame.K_SPACE: # 무기 발사 weapon_x_pos = character_x_pos + (character_width / 2) - (weapon_width / 2) weapon_y_pos = character_y_pos weapons.append([weapon_x_pos, weapon_y_pos]) if event.type == pygame.KEYUP: if event.key == pygame.K_LEFT or event.key == pygame.K_RIGHT: character_to_x = 0 # 3. 게임 캐릭터 위치 정의 character_x_pos += character_to_x if character_x_pos < 0: character_x_pos = 0 elif character_x_pos > screen_width - character_width: character_x_pos = screen_width - character_width # 무기 위치 조정 # 100, 200 -> 180, 160, 140, ... # 500, 200 -> 180, 160, 140, ... weapons = [ [w[0], w[1] - weapon_speed] for w in weapons] # 무기 위치를 위로 # 천장에 닿은 무기 없애기 weapons = [ [w[0], w[1]] for w in weapons if w[1] > 0] # 공 위치 정의 for ball_idx, ball_val in enumerate(balls): ball_pos_x = ball_val["pos_x"] ball_pos_y = ball_val["pos_y"] ball_img_idx = ball_val["img_idx"] ball_size = ball_images[ball_img_idx].get_rect().size ball_width = ball_size[0] ball_height = ball_size[1] # 가로벽에 닿았을 때 공 이동 위치 변경 (튕겨 나오는 효과) if ball_pos_x < 0 or ball_pos_x > screen_width - ball_width: ball_val["to_x"] = ball_val["to_x"] * -1 # 세로 위치 # 스테이지에 튕겨서 올라가는 처리 if ball_pos_y >= screen_height - stage_height - ball_height: ball_val["to_y"] = ball_val["init_spd_y"] else: # 그 외의 모든 경우에는 속도를 증가 ball_val["to_y"] += 0.5 ball_val["pos_x"] += ball_val["to_x"] ball_val["pos_y"] += ball_val["to_y"] # 4. 충돌 처리 # 캐릭터 rect 정보 업데이트 character_rect = character.get_rect() character_rect.left = character_x_pos character_rect.top = character_y_pos for ball_idx, ball_val in enumerate(balls): ball_pos_x = ball_val["pos_x"] ball_pos_y = ball_val["pos_y"] ball_img_idx = ball_val["img_idx"] # 공 rect 정보 업데이트 ball_rect = ball_images[ball_img_idx].get_rect() ball_rect.left = ball_pos_x ball_rect.top = ball_pos_y # 공과 캐릭터 충돌 처리 if character_rect.colliderect(ball_rect): running = False break # 공과 무기들 충돌 처리 for weapon_idx, weapon_val in enumerate(weapons): weapon_pos_x = weapon_val[0] weapon_pos_y = weapon_val[1] # 무기 rect 정보 업데이트 weapon_rect = weapon.get_rect() weapon_rect.left = weapon_pos_x weapon_rect.top = weapon_pos_y # 충돌 체크 if weapon_rect.colliderect(ball_rect): weapon_to_remove = weapon_idx # 해당 무기 없애기 위한 값 설정 ball_to_remove = ball_idx # 해당 공 없애기 위한 값 설정 break # 충돌된 공 or 무기 없애기 if ball_to_remove > -1: del balls[ball_to_remove] ball_to_remove = -1 if weapon_to_remove > -1: del weapons[weapon_to_remove] weapon_to_remove = -1 # 5. 화면에 그리기 screen.blit(background, (0, 0)) for weapon_x_pos, weapon_y_pos in weapons: screen.blit(weapon, (weapon_x_pos, weapon_y_pos)) for idx,val in enumerate(balls): ball_pos_x = val["pos_x"] ball_pos_y = val["pos_y"] ball_img_idx = val["img_idx"] screen.blit(ball_images[ball_img_idx], (ball_pos_x, ball_pos_y)) screen.blit(stage, (0, screen_height - stage_height)) screen.blit(character, (character_x_pos, character_y_pos)) pygame.display.update() pygame.quit()
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
mappeby 질문있습니다.
mappeby = "team" 에서 규칙이 외래키를 가지고 있는 연관관계 주인에서 (member)에서 외래키를 가지고 있는 필드명 을(team)을 mappeby 뒤에 적어주면 되는것인가요???
-
미해결모든 개발자를 위한 HTTP 웹 기본 지식
delete, patch에 대해서
안녕하세요 영한님 좋은 강의 해주셔서 감사합니다! 만약, 사이트 내에 member가 탈퇴했을 때 실제 db에서 member를 지우지는 말고 member 테이블의 delete_type 칼럼을 1로 바꿔주세요 라는 요구사항이 들어왔다면 이 경우에는 요청 api를 URI : members/{id} METHOD : DELETE 로 하는게 맞을까요? 아니면 URI : members/{id} METHOD : PATCH 로 해야 하는게 맞을까요?
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
build 에러
안녕하세요. 빌드시 에러가 나는데 내용은 다음과 같습니다. testcase를 작성한게 없는데 test에서 에러가 난다니.. 우선은 test를 제외하고 build하니 빌드가 되긴 했는데 왜 그런지 이유를 모르겠습니다.. > Task :test FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':test'. > There were failing tests. See the report at: file:///D:/★spring%20공부/study/hello-spring-again/hello-spring-again/build/reports/tests/test/index.html
-
해결됨탄탄한 백엔드 NestJS, 기초부터 심화까지
TypeORM내용도 해당 강좌에 포함되었으면 합니다!
기존 자바,스프링 개발 하다가 해당 강의 약 절반정도 진행 하였는데 TypeORM에 대한 내용은 빠진 것 같아서, 해당 내용도 강좌에 포함되었으면 합니다~! 실무에서는 주로 Nest.JS를 어떤 조합으로 사용하는지도 궁금합니다. :]
-
미해결R로 하는 네트워크 분석
Gephi 가중치 관련 질문
가중치를 한줄씩 추가해서 만드는 방식이라면 가중치는 항상 정수만 가능한가요? 가중치를 실수형태로 부여해야하는 상황입니다. 그것이 불가능하다면 gephi 말고 사용가능한 다른 툴이 있나요?
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
Dockerfile 작성 시 캐싱에 관련해서 질문있습니다.
강의 잘 듣고 있습니다! 이번 강의 3:30 쯤에서 말씀하신 내용인데, 이전에도 다뤘지만 캐싱되는 방식이 애매하여 질문드립니다. 1. `COPY package.json ./` 과정이 생략된 경우 - 빌드 할 때마다 의존성 설치가 이뤄지는 것은 이해가 갑니다. 2. `COPY package.json ./` 과정이 추가된 후 `npm install` 을 실행한 후, `COPY ./ ./` 를 실행하는 경우 - 제 생각에는 npm install을 실행하는 시점에서 컨테이너의 working directory 에는 package.json 하나만 있는데 파일에 변경이 없으니 캐싱된 데이터(node_modules, package-lock.json)를 가져와서 복사해서 넣어준다. - 여기까지 수행하면 의존성이 설치된 상태이니, 나머지 모든 파일들을 복사해서 넣어준다. 다만 여기에는 package.json 이 겹치는 파일이나, 내용에 차이가 없기 때문에 문제가 발생하지 않는다. 위 작성한 내용 중 제가 잘못 이해한 부분이 있다면 지적해주시면 감사하겠습니다. 항상 감사합니다 :-) + 추가로 든 의문인데, 캐싱된 데이터는 이전에 생성했던 컨테이너에서 가져오는 걸까요?
-
미해결
스프링부트 배포
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요 김영한선생님 코스에 따라 열심히 공부하고있는 학생입니다. 수업내용은 너무 재밌고 유익한데 배포에 대해서는 아직까지 들은게 없더라고요 ㅠ 친구들한테도 보여주고 싶어서 배포 하고 제가 따라 만들어높은 프런트엔드하고 같이 쓰고 싶은데 그거에 대한 자료들이 있을까요?? 인터넷에 찾아 봤더니 로컬 호스트로 밖에 안하시더라거요. 서버 배포하는데 결제가 들어가도 괜찮습니다.