묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
n개 데이터 합치기/분리하기 질문
라이브러리 및 데이터 불러오기 그리고 EDA강의중,17:04->데이터 합치기19:03->데이터 분리하기 부분입니다. N개의 데이터를 합치고 분리할 때2개가 주어진 경우와 3개가 주어진 경우를 안다고 가정하고 ['income']을 기준으로 합치거나 분리하시던데,시험에서는 2개나 3개 중 한가지로만 주어지지 않나요? 그럴 경우 어떤 컬럼을 기준으로 합/분리하는지 어떻게 알 수 있을까요..? 같은 강의의 EDA 전반y_train데이터에 대해서는 결측치나 타입,크기 등을 확인하지 않아도 되는건가요..? 데이터전처리 강의에서 11:00->결측치채우기 -최빈값에서mode() [0] 을 쓰시던데 [0]이 의미하는 바가 무엇인지 알고싶습니다!
-
미해결스프링 부트 - 핵심 원리와 활용
라이브러리 관련 질문
안녕하세요.김영한 강사님. Spring boot 프로젝트를 라이브러리(jar)로 만들 때 질문이 있습니다. Spring boot에 있는 내장 tomcat과 관련해서 여쭤보고 싶습니다.(Spring boot 플러그인을 사용하는 경우) Spring boot를 쓰는 프로젝트를 라이브러리로 만들고,다른 Spring boot프로젝트에서 쓰는 경우 내장 tomcat 관련 문제는 없나요?(exclude module: 'spring-boot-starter-tomcat'로 라이브러리가 된 프로젝트에서 tomcat은 제외했습니다) 혹시 만약 문제가 있을 경우에는 보통 어떻게 대처하나요? 추가로 개인 프로젝트에서 비슷한 상황에 대한 질문이 있습니다.spring boot 프로젝트에서 redis를 사용하고 있습니다. redis의 repository를 사용하고 있습니다.(org.springframework.data.repository.CrudRepository) 이걸 다른 spring boot 프로젝트에서 사용할 때,저 repository bean을 생성을 못 하는 것 같은데 라이브러리를 쓰는 프로젝트에서 main에 @ComponentScan으로 라이브러리의 패키지를 주면 그때는 생성합니다. 자동구성 설정에서 scan 범위 관련해서 설정하는 게 있을까요?
-
미해결[핵집] 2025 빅데이터 분석기사(실기)_작업형 1·2·3유형
학습자료 요청드립니다.
안녕하세요.학습자료 요청드립니다.이윤수 / elwmslazz@naver.com으로 보내주시면 감사하겠습니다.
-
미해결스프링 핵심 원리 - 기본편
ObjectProvider와 Provider에 주입되는 객체
빈 스코프 수강중에 싱글톤 스코프와 프로토타입 스코프를 동시에 사용시 발생하는 문제점으로의존성 주입시 할당된 프로토타입 빈이 계속 유지가 된다는 것이었습니다.이러한 문제점을 해결하기 위해 ApplicationContext를 필드주입을 통해 주입받거나 (가장 간단한 방법), ObjectProvider 또는 자바 표준인 Provider를 사용하는 것입니다. 질문 1.여기서 ObjectProvider<T> objectProvider; 와Provider<T> provider라는 코드에 어떠한 의존성이 주입되는 것인지 궁금합니다.실질적으로 스프링 컨테이너에서 해당하는 빈을 가져오는 부분은 getObject(), get()에서 일어나기 때문에 objectProvider와 provider에는 어떤 의존성이 주입되는지 의문이 들어 질문남깁니다.
-
미해결실전! Querydsl
@QueryProjection 관련 오류
강의 대로 Dto 생성자에 @QueryProjection 어노테이션 적용 후 컴파일하여 QMemberDto 클래스 생성 확인이 됐는데 , 테스트 시 위의 그림과 같이 빨간색처리 되며 없다고 뜬다. 무엇이 문제일까요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
next.js 13버전에서 express.static('public')이 먹지 않습니다.
안녕하세요.강의를 수강하면서 next 13으로 만들고 있습니다...노드에서 이미지 정적 폴더를 생성하고, 이미지가 서버에 저장되게끔 하는거는 구현했는데,아무리 해도 next에서 서버에 있는 이미지를 불러오지를 못합니다.아래는 제가 시도해본 방법입니다.app.use('/', express.static(__dirname + '/public')); app.use(express.static('public'));express에서 클라이언트 단으로 던져주는 저 app.use 자체가 먹지 않고 있고 아무 에러도 나오지 않아서 너무 답답합니다 ㅠㅠ 어떻게 해야 될까요...?.......
-
미해결Slack 클론 코딩[백엔드 with NestJS + TypeORM]
ENOENT: no such file or directory, stat \public\index.html
안녕하세요. 강사님지금 sleact db를 생성하였고 table도 다 생성된 상태입니다.nest-typeorm 폴더와 front 폴더 를 둘 다 실행시키면 api/users api를 요청할 때ENOENT: statusCode":404, no such file or directory, stat \public\index.html'이러한 에러가 발생합니다. middlewares/frontend.middleware.ts 파일의 경로가 잘못되어 있나 해서 res.sendFile( path.join(__dirname, '..', '..', '..', 'public', 'index.html'), );를 res.sendFile(path.join(__dirname, '../', 'public', 'index.html'));로 바꿔주었더니api 로그인 페이지로 가지 않고 바로 workspace로 가집니다.response도 html파일로 옵니다. (어떠한 api를 요청해도 마찬가지입니다.) 어떤 부분에서 잘못되었는지 감이 안 잡히네요...힌트라도 주시면 감사하겠습니다!
-
미해결파이썬 셀레니움 고급편 (python selenium - 크롤링, 크롤러)
User Agent Data 변경하는 법 강의에서 아래처럼 계속 오류가 생깁니다..
User Agent Data 변경하는 법 강의에서 아래처럼 계속 오류가 생깁니다.. 코드는 동일하게 입력한 것 같은데..왜 그런 걸까요..? selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: Invalid parameters(Session info: chrome=114.0.5735.110) import requests from user_agents import parse from selenium import webdriver from selenium.webdriver.chrome.options import Options import chromedriver_autoinstaller import random, time, os chromedriver_autoinstaller.install() def make_user_agent(ua, is_mobile): user_agent = parse(ua) model = user_agent.device.model platform = user_agent.os.family platform_version = user_agent.os.version_string + ".0.0" # 모바일 기준이다 version = user_agent.browser.version[0] print('version: ', version) ua_full_version = user_agent.browser.version_string print('ua_full_version: ', ua_full_version) architecture = "x86" print(platform, ' platform') if is_mobile: platform_info = "Linux armv8l" else: # Window platform_info = "Win32" RET_USER_AGENT = { "appVersion" : ua.replace("Mozilla/", ""), "userAgent" : ua, "platform" : f"{platform_info}", "acceptLanguage": "ko-KR, kr, en-US, en", "userAgentMetadata": { "brands" : [ {'brand': 'Not.A/Brand', 'version': '8'}, {'brand': 'Chromium', 'version': '114'}, {'brand': 'Google Chrome', 'version':'114'} ], "fullVersion": f"{ua_full_version}", "platform" : platform, "platformVersion": platform_version, "architecture" : architecture, "model": model, "mobile": is_mobile } } return RET_USER_AGENT pc_device = ["1920,1440","1920,1200","1920,1080","1600,1200","1600,900", "1536,864", "1440,1080","1440,900","1360,768" ] mo_device = [ "360,640", "360,740", "375,667", "375,812", "412,732", "412,846", "412,869", "412,892", "412,915" ] width, height = random.choice(pc_device).split(",") UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36" options = Options() UA_Data = make_user_agent(UA, True) # 랜덤 쿠키 생성하기 # ** 1~100의 숫자 이름의 폴더 밑에 쿠키를 생성해서 저장한다 rand_user_folder = random.randrange(1, 100) userCookieDir = os.path.abspath(f"./cookies/{rand_user_folder }") if os.path.exists(userCookieDir) == False: print(userCookieDir, "폴더가 없어서 생성함") os.mkdir(userCookieDir) options.add_argument(f"user-data-dir={userCookieDir}") options.add_argument(f'--user-agent={UA}') options.add_argument(f'--window-size={width}, {height}') driver = webdriver.Chrome(options=options) driver.execute_cdp_cmd("Network.setUserAgentOverride", UA_Data) driver.get('https://google.com') driver.set_window_position(500, 500) input()
-
미해결Slack 클론 코딩[실시간 채팅 with React]
의존성 배열 오류
안녕하세요. 선생님.현재 Warning: Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render. 라는 오류가 뜹니다 제가 구현하고자 하는 기능은 로컬스토리지의 storedData가 변할때, todoData를 변화를 주는 것입니다. 의존성 배열을 여러가지로 바꿔보았는데도 제자리 걸음인것 같습니다.어떻게 해야 로컬스토리지가 변할때, todoData도 변해서 map 렌더링이 또 실행될까요?const TodoItem = () =>{ localStorage.setItem('todoData', JSON.stringify(todoItem)) const [state, dispatch] = useReducer(checkReducer, todoItem) const [todoData, setTodoData] = useState(todoItem); const storedData = JSON.parse(localStorage.getItem('todoData')) useEffect(()=>{ if(storedData !== todoItem){ //storedData가 초기값이 아니라면, todoData를 바꿔준다. setTodoData(storedData) } },[storedData]); const handleCheck = (id) =>{ dispatch(checkBox(id)); }; return( <SeveralItemContainer> { todoData.map((item)=>{ return ( <TodoItemContainer key={item.id}> <TitleContainer> <img className ="dot" src={dot} alt="icon"></img> <div className="title">{item.title}</div> <img onClick={ () => {handleCheck(item.id)}} className="noncheck" src = {item.isDone ? check: noncheck} alt="icon"></img> </TitleContainer> <div className="contentcontainer"> <div className="content">{item.content}</div> </div> </TodoItemContainer> ) }) } </SeveralItemContainer> ) }; export default TodoItem;
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스
도커와 async/await 질문입니다.
안녕하세요? 강의 계속 잘 듣고 있습니다.아래 그림같이 도커강의 듣던중 docker-compose.yaml 파일에서 포트번호가 주석처리된 것을 취소하는 수정작업뒤, 다시 빌드를 하지않고 실행을 해도 된다고 하셨는데 잘 이해가 가지않습니다.Dockerfile안에서 COPY . /myfolder/ 명령어를 실행할 때 docker-compose.yaml 파일도 같이 카피되는 것 아닌가요? 그러면 다시 빌드 해줘야 할것같은데 js파일만 해당하는 건가요? 아직 빌드 개념이 잘 안잡히네요.. 2. 아래 코드는 몽고DB에서 데이터 조회와 등록하는 코드입니다. 여기서 get 메서드에서는 Board.find에 await를 붙이는 것은 이해했습니다. 그런데 post 메서드에서 board.save()에 await를 붙이는 것이 잘 이해가 안갑니다. board.save()에서 response값을 받아오는것도 아니고 단순히 저장작업만 하는 것처럼 보이는데요. 실제로 await를 안 써줘도 정상적으로 저장이 되었습니다. async/await를 어떤 상황에 써야할지 좀 헷갈리네요아 그리고 퀴즈9 하다가 질문합니다.1) 밑에 코드에서 116번줄 Phone.findOne({ phone })에서 Phone.findOne({ phone }).token 이런 식으로 뒤에 .token을 붙이면 userToken에 값이 저장이 안되고 밑에 if문에서 userToken.token 으로하면 token값이 제대로 나오는데 왜 그런가요?2) 다음 질문은 위에 2번질문과 비슷할 수도 있는데 120번줄 await Phone.updateOne({ phone: phone }, { isAuth: true }) 에서 await를 안 붙였더니 db에서 isAuth가 true로 바뀌지 않더라구요. response는 제대로 왔습니다. db에 업데이트하는 과정과 response하는 과정이 독립적일줄 알았는데 그게 아닌가요? -과제하느라 머리가 어질어질해서 질문이 좀 정돈된 것 같지 않은데 양해부탁드립니다. ㅠ ^^;;
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
@Embedded 유무 차이
Address에 @Embedded 붙히든 안붙히든 h2에 테이블에는 차이가 전혀 없는데 어떻게 이해해야 할까요? 쓰고 안쓰고의 차이가 뭘까요?
-
미해결확률과 통계 기초
12분 30초 쯤
P_X(x) = sum P_XY(x,y_j) 이 부분이 이해가 안 되네요.12분 30초 쯤에 Y와 X 영역을 직관적으로 이해할 수 있는 그림을 보여주시는데혹시 P_x(X) 중에 Y 영역 바깥에 속하는 경우는 없나요? 아니면 같은 event를 표현하지만, RV만 X와Y로 다른 거라, sample space를 동일하게 보기 때문에 저게 성립하나요?
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
Assertions.assertThat()이 안됩니다.
=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]강의와 똑같이 작성했습니다.assertThat이 안되고 junit assert 임포트도 안먹히는 거 같은데 어떻게 해결하나요?그래들리는 이렇습니다.plugins { id 'java' id 'war' id 'org.springframework.boot' version '2.7.13-SNAPSHOT' id 'io.spring.dependency-management' version '1.0.15.RELEASE' } group = 'jpabook' version = '0.0.1-SNAPSHOT' sourceCompatibility = '11' configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() maven { url 'https://repo.spring.io/milestone' } maven { url 'https://repo.spring.io/snapshot' } } dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-devtools' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'junit:junit:4.13.2' testImplementation 'org.assertj:assertj-core' } tasks.named('test') { useJUnitPlatform() } 버전이 높아서 그런거면 버전을 낮게 설정해야하나요?
-
미해결[백문이불여일타] 데이터 분석을 위한 중급 SQL
헤커랭크 테스트 속도
테스트 케이스 채점할때 속도가 원래 좀 늘리나요,,,..?프로그래머는 채점 속도랑 다른데 저만 그런가 해서요
-
미해결자바 기초부터 마스터하기 with 은종쌤 (Do it 자바 프로그래밍 입문) - Part 2(마스터편)
교재내용
안녕하세요올려주신 사이트의 교재내용은 pdf파일로는 받아볼수없나요?
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
http://localhost:8080/hello에서 에러가 나요
서버도 껐다가 켜서 다시 하고 새로고침하고 클리어도 했는데 안돼요
-
미해결따라하며 배우는 리액트 A-Z[19버전 반영]
클래스형과 함수형 컴포넌트
안녕하세요 선생님현재 섹션2까지 수강하였는데요 이후에는 전부 함수형 컴포넌트로 강의 해주시는 건가요?클래스형 컴포넌트 기초적인 내용 학습 병행해야 할지 고민이되서 질문드립니다!
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
npm install java 설치 오류 문의
안녕하세요.node.js에서 java의 jar파일을 불러서 실행시키고 싶어서 java 모듈을 설치했습니다. (npm install java)그런데 아래 처럼 설치 오류가 나와서 어떻게 해야할지 모르겠습니다. 방법이 있다면 알려주시면 좋겠습니다.npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs npm ERR! code 1 npm ERR! path C:\workspace\test\node_modules\java npm ERR! command failed npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.3.1 npm ERR! gyp info using node@18.16.0 | win32 | x64 npm ERR! gyp info find Python using Python version 3.11.3 found at "C:\Python311\python.exe" npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt npm ERR! gyp ERR! find VS checking VS2019 (16.11.33529.622) found at: npm ERR! gyp ERR! find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features" npm ERR! gyp ERR! find VS - found VC++ toolset: v142 npm ERR! gyp ERR! find VS - missing any Windows SDK npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use npm ERR! gyp ERR! find VS looking for Visual Studio 2015 npm ERR! gyp ERR! find VS - not found npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 npm ERR! gyp ERR! find VS npm ERR! gyp ERR! find VS ************************************************************** npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload. npm ERR! gyp ERR! find VS For more information consult the documentation at: npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows npm ERR! gyp ERR! find VS ************************************************************** npm ERR! gyp ERR! find VS npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\workspace\test\node_modules\node-gyp\lib\find-visualstudio.js:122:47) npm ERR! gyp ERR! stack at C:\workspace\test\node_modules\node-gyp\lib\find-visualstudio.js:75:16 npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\workspace\test\node_modules\node-gyp\lib\find-visualstudio.js:369:14) npm ERR! gyp ERR! stack at C:\workspace\test\node_modules\node-gyp\lib\find-visualstudio.js:71:14 npm ERR! gyp ERR! stack at C:\workspace\test\node_modules\node-gyp\lib\find-visualstudio.js:390:16 npm ERR! gyp ERR! stack at C:\workspace\test\node_modules\node-gyp\lib\util.js:54:7 npm ERR! gyp ERR! stack at C:\workspace\test\node_modules\node-gyp\lib\util.js:33:16 npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:427:5) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28) npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1091:16) npm ERR! gyp ERR! System Windows_NT 10.0.19045 npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\workspace\\test\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd C:\workspace\test\node_modules\java npm ERR! gyp ERR! node -v v18.16.0 npm ERR! gyp ERR! node-gyp -v v9.3.1 npm ERR! gyp ERR! not ok npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\yeeun\AppData\Local\npm-cache\_logs\2023-06-07T07_26_56_717Z-debug-0.log 오류를 해결하고자 참조한 링크입니다.https://yuhe-dogspaw.tistory.com/19https://velog.io/@wjs4199/React-npm-install%EC%8B%9C-node-gyp-%EC%97%90%EB%9F%AChttps://www.npmjs.com/package/node-gyp 다음과 같은 시도를 해보았지만 모두 실패 했습니다.해결 시도 1.python 2.x로 다운그레이드visual studio 2019 설치관리자모드 명령프롬프트에서 다음 2개 설치npm install --global node-gypnpm install --global --production windows-build-tools실패 ㅜㅜ해결 시도2.npm install -g node-gypnode-gyp rebuild --python "파이썬 2.x 설치 경로"npm config set python "파이썬 2.x 설치 경로"실패 ㅜㅜ 그리고, 혹시 jar 파일 말고 class 파일을 실행시키는 방법도 있을까요?const java = require('java'); java.classpath.push('jar/test.jar'); const something = java.import('com.house.test.Test'); const instance = new something(); const message = '테스트트트'; instance.fnSync(message);이렇게 사용을 하고 있는데 class 파일로도 실행할 수 있으면 좋겠습니다. 개발pc : window 10 homenode.js 버전 : 18.16 (msi로 설치할 때 강의 초반에 말씀하신 체크박스를 체크하고 설치함)python 버전 : 3.11참고로 window 11 home 혹은 window 10 pro 에서는 설치가 잘 되었습니다.
-
미해결
restAPI의 field-selection 개념 관련 질문드립니다!
안녕하세요! 강의 복습도 하면서 현업에 있는 직장인입니다ㅎㅎRestAPI를 구현중인데, 구현도 어렵지만 설계가 정말정말 어렵다고 느껴졉니다ㅠㅠ여러 레퍼런스를 찾아보면서 참고하여 설계를 해보고 있는데요,field selection 개념 도입하려는데 모호한 부분이 있어서요ㅠㅠ가령 GET /object 요청시 아래와 같이 Response가 왔을 경우,,{ "success": true, "message": "Data Found", "affectedRows": 1, "data": [ { "id": 1, "name": "test layer", "description": "test layer", "feature": { "type": "FeatureCollection", "features": [ { "type": "building", "properties": { "name": "object01" } } ] }, "sort_order": 0, "mod_date": "2023-03-09T06:52:19.000Z" } ] } GET field 파라미터로 가능한건 id, name, description, feature, sort_order, mod_date 까지인걸로 이해하고 있는데,만일 사용자가 features를 Return받고 싶다고 한다면이런 경우도 마찬가지로 field=feature로 받아서 처리하는게 개념적으로 맞을까요..?조언 부탁드립니다ㅜ.ㅜ
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
뭘해도 에러날때 Uncaught Error: useNavigate() may be used only in the context of a <Router> component.
App.js에 있는 <BrowserRouter>태그를 Index.js의 Provider위로 감싸주세요 그러니 Loginpage.js등에서 navigate가 정상작동하네요참고하세요.