묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결it 취업을 위한 알고리즘 문제풀이 입문 (with C/C++) : 코딩테스트 대비
심바문제 질문입니다.
안녕하세요 선생님.. 강의 잘 듣고 있습니다! 강의를 보고 선생님 코드를 돌려보았는데 이런 경우에 결과가 잘못 출력되는것 같아 질문드립니다. 맵 아래 이동/size/거리는 제가 임의로 출력을 해본것인데요.. 만약 맵이 위의 사진과 같다면 size가 3이 됐을때 (1,3)에 있는 크기 3토끼를 먹으러 갈 수 있게 되어서 답이 6이상이 나오지 않나요..? 코드 상에서는 6을 출력하고 끝나는데 코드에 오류가 있는걸까요..? 아니면 제가 뭘 잘못 생각하고 있는건가요?!
-
미해결해커를 위한 iOS 앱 모의 해킹 전문 과정
Incorrect Architecture
아이폰 5 ios 10.3.3인데요 Incorrect Architecture 라고 설치가 안되네요 ㅜㅜ DVIA는 버전이 끝났다고 하고
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
docker test auto compling 관련 질문입니다.
현재 window pro 옵션에서 docker를사용하고 있습니다. HOKIDAR_USEPOLLING=true 옵션을 활용해서 파일 변경부분에 대한 변경점은 즉각 적용되나 test부분이 즉각 적용이 되지 않는 문제가 있습니다 이에 test를 즉각적용하려면 어떠한 방법을 해야 할 까요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 쇼핑몰 사이트 만들기[전체 리뉴얼]
이미지 업로드시
Header 부분에 multipart/form-data 을 설정하지 않아도 잘 동작하는거 같은데 온전히 프론트에선 에러를 확인할수 없나용?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
12강, POST를 보내면 [ERR_HTTP_HEADERS_SENT] 에러
- Postman으로 email, PW를 보내며 '비밀번호가 틀렸습니다' 가 Response로 돌아오면서 아래 에러가 나옵니다... 비번은 분명 맞는데 이런 에러가 나옵니다ㅜ 혹시 이유를 알 있나요? - 좀 길지만 전체 코드 복붙했습니다. 감사합니다! CODE ERROR _http_outgoing.js:558 throw new ERR_HTTP_HEADERS_SENT('set'); ^ Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client at ServerResponse.setHeader (_http_outgoing.js:558:11) at ServerResponse.header (/Users/user/VS Code/project_with_NodeJS/boiler-plate/node_modules/express/lib/response.js:771:10) at ServerResponse.send (/Users/user/VS Code/project_with_NodeJS/boiler-plate/node_modules/express/lib/response.js:170:12) at ServerResponse.json (/Users/user/VS Code/project_with_NodeJS/boiler-plate/node_modules/express/lib/response.js:267:15) at /Users/user/VS Code/project_with_NodeJS/boiler-plate/index.js:48:20 at /Users/user/VS Code/project_with_NodeJS/boiler-plate/models/user.js:62:9 at /Users/user/VS Code/project_with_NodeJS/boiler-plate/node_modules/bcrypt/bcrypt.js:210:13 at processTicksAndRejections (internal/process/task_queues.js:75:11) { code: 'ERR_HTTP_HEADERS_SENT' } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! boiler-late@1.0.0 start: `node index.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the boiler-late@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! /Users/user/.npm/_logs/2020-12-28T03_02_38_926Z-debug.log
-
스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
순수 JDBC도 따라쳐야 하나요?
삭제된 글입니다
-
미해결초보자를 위한 HTML 기초
자바스크립트를 이용할 때 button type 지정에 관한 궁금증
안녕하세요! 자바스크립트를 사용하여 정보 전송을 제어할 때, 전송 button의 type을 "button"으로 지정하라는 부분과 관련해 궁금한 점이 있습니다. button의 type을 submit으로 지정할 경우, 해당 버튼 클릭, 엔터키 입력 그리고 스페이스바 입력 등 form에 대한 모든 submit 이벤트를 유발하는 동작이 유효해지더라구요. 그래서 저는 종종 button의 type을 submit으로 지정하고, form의 submit 이벤트에 event.preventDefault 메서드로 본래의 동작을 막은 후 원하는 자바스크립트 코드를 실행시키고는 합니다(아래 예시). 이 경우에 어떤 문제가 있을 수 있을까요? document.querySelector('form').addEventListener('submit', (e) => { e.preventDefault(); // 원하는 동작을 수행하는 코드 })
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
@Transactional을 import하지 못합니다.
안녕하세요. 우선, 친절하고 상세한 강의 감사합니다 :) 이번 강의를 따라가는 도중 Transactional관련하여 에러가 나서 질문글 남깁니다. import org.springframework.transaction.annotation.Transactional; @Transactional 위와 같이 import해주었지만, 계속 빨간불이 뜨며 Cannot resolve symbol 'Transactional' 라고 뜹니다. 에러 해결 방법을 검색하여, ReBuildProject와 Invalidate Caches/Restart를 해보았는데도 작동하지 않습니다ㅜㅜ
-
해결됨it 취업을 위한 알고리즘 문제풀이 입문 (with C/C++) : 코딩테스트 대비
채점폴더가 이상합니다...
이제 막 강의를 처음부터 공부하는 학생입니다. 강의에서 알려주신대로 코드를 짜고 그에 맞게 파일도 복사했는데 강의와 똑같이 했는데 이렇게 뜨는 이유를 모르겠습니다... 물론 내용 이해랑 풀이를 어떻게 해야하는지 그런 매커니즘을 이해하는게 가장 중요한 것임을 알지만 앞으로 강의와 동일 혹은 맞게 하였는데 이렇게 채점폴더내의 오류가 있을까 질문드립니다...
-
해결됨실전! 스프링 데이터 JPA
pk 질문 드립니다~
안녕하세요. 강의를 보다가 궁금한게 있어서 질문 남깁니다! pk값만 자바에서 기본형을 사용하지 않고 래퍼 클래스로 사용하시는 이유가 궁금합니다! 그리고 @GenerateValue를 하면 persist할 때 값이 셋팅된다고 하셨는데, 리플렉션을 이용해서 셋팅되는 건가요? 원래 merge에서 null인지 확인하기 때문에 래퍼 클래스를 사용하는줄 알았는데, 기본형일 경우 0인지 확인 하더라고요~ 그제가 잘못 알고있었던 거였네요..ㅎㅎㅎ 그럼 어떤 이유에서 래퍼 클래스가 사용되는 건가요??!
-
미해결모든 개발자를 위한 HTTP 웹 기본 지식
질문이 있습니다.
보통 서버 에서 POST/PUT/PATCH 로 받아도, service의 로직에 따라 의미가 달라질텐데, (예를들어 PUT으로 받아도, 부분 수정이 가능하도록 짜는 경우?) 강의에서 말씀하시는 내용들은 HTTP Method의 단순 개념에 대해 말씀하시는걸까요??
-
예제로 배우는 스프링 입문 (개정판)
강의자료는 다운받을 수 없나요?
삭제된 글입니다
-
미해결실전! Querydsl
factory 에 반환값을 담는 객체가 없어요
안녕하세요~ 기존에 작업하시던 분들이 아래와 같이 반환값을 담는 객체가 없게끔 사용하시던데요 이때는 영속성 객체에만 담겨지게 되는것인가요? ex) factory.selectFrom(qSchool).leftJoin(qSchool.students, qStudent).fetch(); // 반환값을 담는 컨테이너가 없음 감사합니다.
-
미해결모든 개발자를 위한 HTTP 웹 기본 지식
이런 강의도있었다니 !!!!
영한님 강의를 보면 너무 재밌고 행복합니다.이번 강의도 열심히 달리겠습니닷
-
미해결프로그래밍, 데이터 과학을 위한 파이썬 입문
챕터 7 과제 관련 이메일로 문의드렸습니다.
답변 주시면 감사하겠습니다.
-
해결됨실전! Querydsl
Tuple 이라는 객체 질문입니다
QueryDsl 써보셨던 분들이 'Tuple 을 사용하면 영속성컨텍스트의 캐싱을 타지 않는다' 라고 하시는데 매뉴얼을 봐도 해당 내용을 찾을수가 없어서요 Tuple 은 multi-projection 을 위한 컨테이너일 뿐인것 같고 JPA 캐싱 동작과는 관계없는것 같은데.. 어떤게 맞나요? 감사합니다.
-
파이썬으로 장고(Django) 공략하기: 입문
이 에러는 어떻게 해야하나요?
삭제된 글입니다
-
미해결DataScience와 AI의 개념 (공부하는 방법)
프로젝트 재밌게 잘 봤습니다!
"GAN/강화학습의 개념"에서 보여주신 강화학습 프로젝트 잘 보았습니다. 제가 직관적으로 봤을땐 전투기의 고도가 가장 높을 때가 가장 안전하기도 할 것 같은데 강화학습을 하면서 고도가 점점 낮아지는 것이 신기하네요.
-
미해결Klaytn 클레이튼 블록체인 어플리케이션 만들기 - 이론과 실습
npm install시 오류
gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) gyp ERR! System Windows_NT 10.0.19041 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\kkang\addition-game-starter\node_modules\scrypt gyp ERR! node -v v14.15.3 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm WARN klay-dapp-boilerplate@0.0.1 No repository field. npm WARN klay-dapp-boilerplate@0.0.1 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! scrypt@6.0.3 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the scrypt@6.0.3 install 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! C:\Users\kkang\AppData\Roaming\npm-cache\_logs\2020-12-27T18_24_39_357Z-debug.log 이렇게 오류가 뜨네요 몇일째 이것해결하려고 하고 있는데 구글링과 이전 인프런 질문들 통하여서 시도해봐도 해결이 안되네요 조언 부탁드리겟습니다
-
미해결파이썬 무료 강의 (활용편1) - 추억의 오락실 게임 만들기 (3시간)
공이 한번에 하나씩만 사라져요
공이 가장 처음 쪼개질 때에는 문제 없는데, 이 후에 공격하면 한 번에 한 공만 쪼개집니다... 예를 들어 Ball을 B라고 가정하면, B1->B2,B'2 로 쪼개지고, 각 공에 공격을 가하면 쪼개져야 하는데, B1만 쪼개지고 B'2는 아무리 공격해도 안 없어지더라고요...이후에 B2가 다시 쪼개져도 B3에서 같은 현상이 벌어집니다ㅠㅠ 하단 이미지에선 반드시 해야 하는 설정은 넣지 않았습니다! 실제 코드에선 있어요 #1. 사용자 게임 초기화 (배경 이미지, 캐릭터, 좌표, 폰트, 속도 등) current_path = os.path.dirname(__file__) image_path = os.path.join(current_path, '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 - stage_height - character_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 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 = [-18, -15, -12, -9] balls = [] balls.append({ "pos_x" : 50, "pos_y" : 50, "img_idx": 0, "to_x": 3, "to_y": -6, "init_spd_y": ball_speed[0] }) weapon_to_remove = -1 ball_to_remove = -1 game_font = pygame.font.Font(None, 40) total_time = 100 start_ticks = pygame.time.get_ticks() game_result = "Game Over" ############################## 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 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. 충돌 처리 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"] 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] 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 if ball_img_idx < 3: ball_width = ball_rect.size[0] ball_height = ball_rect.size[1] small_ball_rect = ball_images[ball_img_idx + 1].get_rect() small_ball_width = small_ball_rect.size[0] small_ball_height = small_ball_rect.size[1] balls.append({ "pos_x" : ball_pos_x + (ball_width / 2) - (small_ball_width / 2), "pos_y" : ball_pos_y + (ball_height / 2) - (small_ball_height / 2), "img_idx": ball_img_idx + 1, "to_x": -3, "to_y": -6, "init_spd_y": ball_speed[ball_img_idx + 1]}) balls.append({ "pos_x" : ball_pos_x + (ball_width / 2) - (small_ball_width / 2), "pos_y" : ball_pos_y + (ball_height / 2) - (small_ball_height / 2), "img_idx": ball_img_idx + 1, "to_x": 3, "to_y": -6, "init_spd_y": ball_speed[ball_img_idx + 1]}) break 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 if len(balls) == 0: game_result = "Mission Complete" running = False #5. 회면에 그리기 screen.blit(background, (0,0)) for weapon_x_pos, weapon_y_pos in weapons: screen.blit(weapon, (weapon_x_pos, weapon_y_pos)) screen.blit(stage, (0, screen_height - stage_height)) screen.blit(character, (character_x_pos, character_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)) elapsed_time = (pygame.time.get_ticks() - start_ticks) / 1000 timer = game_font.render("Time : {}".format(int(total_time - elapsed_time)), True, (255,255,255)) screen.blit(timer, (10,10)) if total_time - elapsed_time <= 0: game_result = "Time Over" running = False pygame.display.update() msg = game_font.render(game_result, True, (255,255,0)) msg_rect = msg.get_rect(center = (int(screen_width / 2), int(screen_height / 2))) screen.blit(msg, msg_rect) pygame.display.update() pygame.time.delay(2000) pygame.quit()