묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결공공데이터로 파이썬 데이터 분석 시작하기
df[f]의 의미가 무엇인지 궁금합니다.
선생님 안녕하세요. 늘 강의 잘 보고 있습니다. 궁금한게 있어서 글 남깁니다. for f in facilities: df[f] = df_fac["공원보유시설(편익시설)"].str.contains(f) df[facilities].sum() 으로 강의해주셨는데 for문에서 df[f]를 만들고 밑에서는 df[facilities]로 쓴 이유가 무엇인지 궁금합니다. df[f].sum()으로 하면 6이라는 숫자가 나와서 틀린 방법 같기는 한데 df[f]가 어떤 역할을 하는지 잘 모르겠습니다 ㅠㅠ
-
해결됨React + API Server 프로젝트 개발과 배포 (CI/CD)
CI/CD부분 appleboy/ssh-action@master 질문입니다.
name: web-character-project CI/CD on: push: branches: [master] jobs: build: name: Build runs-on: ubuntu-latest steps: - name: executing remote ssh commands using key uses: appleboy/ssh-action@master with: host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }} port: ${{ secrets.PORT }} script: ./deploy.sh 위와 같이 yml파일을 작성한후 푸쉬하였는데 에러가 발생하여서 케누님께 여쭤보려고 합니다. 케누님과 똑같은 방식으로 구현한 다음 잘 되나?? 푸쉬해봤는데......... dial tcp [ec2의 IP]: ***: i/0 timeout 깃허브 액션에서 처리하는중에 위와 같은 에러가 발생하였습니다... ㅠㅠ 에러에 대해서 구글링해봤는데.. 영어실력이 부족하다보니 잘 이해가 안가네요 ㅠ;;; 케누님 영상에서는 잘만 되는데;;; 저는 이래서 답답한 마음이 드네요 ㅠㅠ 어떻게 이 문제를 해결할 수 있을까요?? !!
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 영화 사이트 만들기
#2강 npm install
npm ERR! code 1 npm ERR! path C:\Users\지은\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\지은\AppData\Roaming\nvm\v16.15.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\지은\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\지은\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@0.14.0 npm ERR! node-pre-gyp info using node@16.15.0 | win32 | x64 npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download npm ERR! node-pre-gyp info check checked for "C:\Users\지은\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node" (not found) npm ERR! node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gz npm ERR! node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gz npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@16.15.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@16.15.0 | win32 | x64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@16.15.0 | win32 | x64 npm ERR! gyp ERR! find Python npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON npm ERR! gyp ERR! find Python checking if "python3" can be used npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error npm ERR! gyp ERR! find Python checking if "python" can be used npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python39\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python39\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python38\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python38\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python38-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python37\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python37\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python37-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python36\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python36\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python36-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run npm ERR! C:\Users\지은\AppData\Local\npm-cache\_logs\2022-05-25T05_57_34_949Z-debug-0.lognpm ERR! code 1 npm ERR! path C:\Users\지은\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\지은\AppData\Roaming\nvm\v16.15.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\지은\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node --module_name=bcrypt_lib --module_path=C:\Users\지은\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1) npm ERR! node-pre-gyp info it worked if it ends with ok npm ERR! node-pre-gyp info using node-pre-gyp@0.14.0 npm ERR! node-pre-gyp info using node@16.15.0 | win32 | x64 npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download npm ERR! node-pre-gyp info check checked for "C:\Users\지은\Downloads\boilerplate-mern-stack-master\boilerplate-mern-stack-master\node_modules\bcrypt\lib\binding\bcrypt_lib.node" (not found) npm ERR! node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gz npm ERR! node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gz npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gz npm ERR! node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.8 and node@16.15.0 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.8/bcrypt_lib-v3.0.8-node-v93-win32-x64-unknown.tar.gz npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@16.15.0 | win32 | x64 npm ERR! gyp info ok npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.0.0 npm ERR! gyp info using node@16.15.0 | win32 | x64 npm ERR! gyp ERR! find Python npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON npm ERR! gyp ERR! find Python checking if "python3" can be used npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error npm ERR! gyp ERR! find Python checking if "python" can be used npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python39\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python39\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python39\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python39-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python39-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python39-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python39-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python38\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python38\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python38\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python38-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python38-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python38-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python38-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python38-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python38-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python37\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python37\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python37\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python37-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python37-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python37-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python37-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python37-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python37-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python36\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python36\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python36\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Users\지은\AppData\Local\Programs\Python\Python36-32\python.exe npm ERR! gyp ERR! find Python - "C:\Users\지은\AppData\Local\Programs\Python\Python36-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files\Python36-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files\Python36-32\python.exe" could not be run npm ERR! gyp ERR! find Python checking if Python is C:\Program Files (x86)\Python36-32\python.exe npm ERR! gyp ERR! find Python - "C:\Program Files (x86)\Python36-32\python.exe" could not be run npm ERR! C:\Users\지은\AppData\Local\npm-cache\_logs\2022-05-25T05_57_34_949Z-debug-0.log 루트 디렉토리에서 npm install 오류가 계속뜹니다ㅠ 버전의 문제인가요...? 이 강의 꼭 듣고싶은데 해결방법이 있을까요..?
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
cron을 설정했는데 useGuard가 작동을 하지 않습니다.
안녕하세요! 강사님 알려주신 내용 기반으로 개인 프로젝트 작업을 하다가 구글링으로 찾기 힘들어서 질문을 남깁니다. cron으로 특정 유저의 정보를 read하는 API를 자동으로 call하려고 합니다. 이렇게 설정을 하고 나면 Guard에서 얻게되는 user 정보를 가져오지 못해서 다음과 같은 에러가 나오게 됩니다. 대략적으로 구글링을 해본 결과 cron은 singletone일 때만 작동하는 것으로 되어있는데 다른 API에서 얻는 값은 매 요청마다 새로 설정되는 Request scope라서 그렇다고 하는데 정확히 내용이 이해가 가지 않습니다. 공식문서에 나온대로 JwtAuthGurad에 @Injectable({scope: scope.Default})로 지정도 해보았는데 결과는 에러가 나왔습니다. 혹시 useGuard에서 나온 결과를 포함해서 API call을 크론잡하려고 하면 어떻게 해야할까요? 매번 답변 주셔서 감사드립니다.
-
미해결대세는 쿠버네티스 (Helm편)
grafana 설치시 service type 을 loadbalancer 로 할 경우..
기본이 External 이고 Classic LB 인데, service annotations 에 internal 과 ALB 를 명시해줘도 반영이 안되는 것 같습니다. 변경하려면 ingress controller 가 무조건 필요한걸까요? 현재는 일단 nodeport 로 만들어서 내부에서만 접근하고 있습니다.
-
미해결스프링 핵심 원리 - 기본편
@DisplayName 관련질문
안녕하세요. 다름이 아니라 강의에서 테스트할때 @Test @DisplayName("보여지는 목록 제목")로 제목을 지정을하면 클래스를 실행했을때 저 제목이름이 나와야하는데 오늘수업진행하면서 보니까 displayname에 지정한 제목이 아니라 void뒤의 값이 목록제목으로 나오더라구요. 혹시 제가 코드를 잘못입력을 한건지 어떤 설정이 잘못된건지 질문여쭤봐도 될까요??
-
미해결Vue.js 시작하기 - Age of Vue.js
질문드려요,
안녕하세요, 좋은 강의 감사합니다.! $emit, props연습할때에 component 등록 방법을 Vue.component로 변경해서 연습을 해봤는데요, 이벤트가 작동은 하지만 아래와 같은 오류가 나요 어느부분을 확인해봐야하는지 어떻게 고쳐야 하는지 아직 잘 모르겠습니다 ㅜㅜ 답변 부탁드려요..! [오류 내용] vue.js:634 [Vue warn]: Property or method "addNumber" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties. (found in <Root>) vue.js:634 [Vue warn]: Property or method "propsnum" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties. (found in <Root>) [연습 소스] <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <div id="app"> <app-header v-on:pass="logText"></app-header> <app-content v-on:addnum="addNumEvent" v-bind:propsnum="number"> <template id="appContentTemp"> <div> <button v-on:click="addNumber">Click Add</button> <p>{{propsnum}}</p> </div> </template> </app-content> </div> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> <script> var appheader = { template: '<button v-on:click="passEvent">Click Event!</button>', methods:{ passEvent:function(){ this.$emit('pass'); } } } Vue.component('app-content', { template : '#appContentTemp', props : { propsnum:Number, }, methods: { addNumber : function(){ this.$emit('addnum'); } } }) new Vue({ el:'#app', components:{ 'app-header' : appheader }, data : { number : 10 }, methods:{ logText : function(){ console.log('hi'); }, addNumEvent:function(){ this.number += 1; console.log(this.number); } } }) </script> </body> </html>
-
미해결스프링 부트 개념과 활용
CREATE TABLE 예제 따라하다가 'expected "identifier"; SQL statement:' 오류나는 경우
강의를 따라하다가 아래와 같은 에러가 나며 종료가 되었는데 테이블명 USER 대신 USERS 로 변경하니 정상동작 했습니다. 다른분들 참고하세요. Spring Boot 2.7.0 버전 입니다. java.lang.IllegalStateException: Failed to execute ApplicationRunner at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:765) ~[spring-boot-2.7.0.jar:2.7.0] at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:752) ~[spring-boot-2.7.0.jar:2.7.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.7.0.jar:2.7.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.0.jar:2.7.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.0.jar:2.7.0] at com.example.db.DbApplication.main(DbApplication.java:10) ~[classes/:na] Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "CREATE TABLE [*]USER(id INTEGER NOT NULL, name VARCHAR(255), PRIMARY KEY (id));"; expected "identifier"; SQL statement: CREATE TABLE USER(id INTEGER NOT NULL, name VARCHAR(255), PRIMARY KEY (id)); [42001-212] at org.h2.message.DbException.getJdbcSQLException(DbException.java:502) ~[h2-2.1.212.jar:2.1.212] at org.h2.message.DbException.getJdbcSQLException(DbException.java:477) ~[h2-2.1.212.jar:2.1.212]
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
findByName메서드 질문
MemoryMemberRepository라는게 DB CRUD의 역할을 하는거라고 생각하고 DTO의 역할을 한다고 생각하면 되는게 맞는지요? 그리고 @Override public Optional<Member> findById(Long id) { return Optional.ofNullable(store.get(id)); } 이렇게 썼는데 왜 findByName은 위에 와 다른게 찾는것일까요? 같은 찾기 메서드인데 말이죠 @Override public Optional findByName(String name) { return store.values().stream() .filter(member -> member.getName().equals(name)) .findAny(); } name은 위와 같은 코드이더라고요 store.values().stream() .filter(member -> member.getName().equals(name)) .findAny();이런 메서드들은 무슨의미인지도 궁금합니다.
-
미해결프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
python interpreter 설치 안되는 이유
영상에서 말씀주신데로 python interpreter를 설치하였는데 왼쪽 아래 파란색쪽에 표시가 나타나지 않습니다. 설치가 되지 않은 것 같은데 이유가 뭔가요?
-
미해결스프링 핵심 원리 - 고급편
앞에서 나오는 패턴들은 실무에서 쓰이긴 하나요? (콜백, 템플렛 메서드 등)
영한님 강의 구성이 보통 A테크닉 B테크닉 C테크닉 이런식으로 점차적으로 발전시켜 나가는 수업이잖아요. 그런데 결국 마지막 완전체 기술을 알고나면 앞에서 배운 기술들은 굳이 왜 실습했나 생각이 들때가 있어서요. (단점들이 분명이 있는 기술들이라 보완된 최종 기술로 쓸수밖에 없을거같아요) 분명 그 테크닉들을 실습하면서 깊이있게 배우는 스킬들이 있을테고, 왜 이런 패턴이 생겨나게 됐는지 자연스럽게 이해돼서 좋기는 한데 지금 제 상황이 빠른 시일내에 현업 적응을 해야되는 상황이다보니 실무에 실제로 쓰이는 기술 위주로 스피드하게 보고싶어서요. 영한님 수업 7개 결제 해두었는데, 이걸 이런식으로 다 보기에는 시간이 좀 부족할거같아서 질문드립니다.
-
미해결내 업무를 대신 할 파이썬(Python) 웹크롤링 & 자동화 (feat. 주식, 부동산 데이터 / 인스타그램)
드디어 강의 정독 2번째 했네요
안녕하세요 선생님 근 1개월 동안 파이썬 기초 부터 크롤링 까지 공부를 계속하면서 공부했습니다 그래서 우선부동산 데이터 크롤링 하는것부터 하고 있는데요 대구 / 경북 지역의 부동산 단지정보를 수집하자 라는 목표로 우선 프로그램을 짜고 있습니다. 네이버 부동산의경우 해당 지역 대구시 > 남구 > 대명동 일경우 타 동의 정보도 화면에 노출되어 타 동의 단지정보도 같이 나타나게 되는것을 확인하였습니다 . 그래서 작업방식은 단지정보 수집을 위한 코드 값은 모바일 m.land.naver.com에서 수집하고 이때 수집된 단지 정보로 상세정보를 수집하기로 하였습니다 우선 단지정보수집을 위해서 아래와 같이 코드를 작성하였는데요 for문에서 오류가 발생하네요 기초정보를 출력하는 코드들은 수업에서 배운내용으로 테스트가 끝난 상태입니다 아래 코드에서 발행하는 문제에 대해서 조언을 부탁드리겠습니다 %matplotlib inline from IPython.core.interactiveshell import InteractiveShell InteractiveShell.ast_node_interactivity = "all" import pandas as pd pd.set_option('display.float_format', lambda x: '%.3f' % x) pd.set_option('max_columns', None) import requests import bs4 import time import numpy as np from datetime import datetime from selenium import webdriver driver = webdriver.Chrome() driver.get("https://m.land.naver.com") from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC headers = { "Connection": "keep-alive", "Host": "m.land.naver.com", "authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IlJFQUxFU1RBVEUiLCJpYXQiOjE2MjMyMzkyMzksImV4cCI6MTYyMzI1MDAzOX0.gdgEApo9bDG5IsSsYDWWeHlAN9LtNh6ejEARMS0FGL8", "Referer": "Referer: https://m.land.naver.com/", "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-origin", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36", } comid = 2700000000 #대구광역시 코드 mycomid = 2700000000 url = "https://m.land.naver.com/map/getRegionList?cortarNo={}&mycortarNo={}".format(comid,mycomid) res_reg = requests.get(url, headers=headers) print(res_reg) data_dict = res_reg.json() data_dict #데이터 확인하기 region_list_df = pd.Series(data_dict['result']).to_frame().T region_list_df #내부에 파일이 묶여져 있어서 리스트만 뽑아올 필요가 있다 region_list_df['list'] nested_df1 = pd.DataFrame(region_list_df['list'].iloc[0]) nested_df1 #내부에 있는 데이터만 뽑아서 확인하기 cartNuns = nested_df1['CortarNo'] nested_list = list(cartNuns) #아파트코드만 뽑아오기 ---------------------- for i in nested_list: comid_st = i url = "https://m.land.naver.com/map/getRegionList?cortarNo={}".format(comid_st) res_reg = requests.get(url, headers=headers) data_dict = res_reg.json() region_list_df = pd.Series(data_dict['result']).to_frame().T nested_df1 = pd.DataFrame(region_list_df['list'].iloc[0]) nested_df1 요부분이 에러가 나옵니다
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
타임리프 ${member.id} ${member.name} 누르면 이동이 안됩니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요 안녕하세요. 타임리프쪽 따라하고있는데, 영한님 처럼 ctrl 하고 ${member.id} 를 클릭하면 연동되어있는 id로 이동이 안됩니다. 원래 안되는건가요?? 실행은 잘되고, 8080에 값도 잘 찍힙니다. 타임리프 문법에 마우스를 올리면 no documentation found 라고 뜹니다.
-
미해결실전! Querydsl
이상황에는 nativequery가 최선일까요..?
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]QueryDsl로 [계약]테이블에서 [시작날짜], [종료날짜]를 조회해옵니다.그리고 API응답으로 기간(시작날짜~종료날짜)을 추가해주어야 하는데요.이것을 처음에는 Query로 두날짜를 디비에서 조회해오고, 서비스단에서 두날짜를 계산해서 일수를 응답해줬는데,비지니스 변경사항으로, 기간순으로 Orderby를 해야하는게 추가되었어요. Sorting조건이 총 4개인데 (그중하나가 기간)제가 생각해낸건... 우선 query에서 orderby를 해야겠다. 싶어서 select절에서 해당 기간을 계산하기로 했어요.PostgreSQL사용중인데 date_part 함수로 계산 할 수 있더라구요. -> 근데 이게 jpql에 지원안하는건지 querydsl로는 풀수가 없어서...NativeQuery로 해결했구요. orderby도 4가지로 동적처리를 해줘야해서 문자열로 컨트롤해서 처리했습니다.. ("... order by " + orderParam ;")영한님이면 어떻게 처리했을지... 너무나궁금해서 글남겨봅니다..
-
미해결[리뉴얼] 처음하는 MongoDB(몽고DB) 와 NoSQL(빅데이터) 데이터베이스 부트캠프 [입문부터 활용까지] (업데이트)
knowledge_it.find( {"author": "Dave"} ) 관련
몽고 db에서 실행 명령문 knowledge_it.find({author : /Dave/})은 이름이던 성이던 Dave 가 들어간 모든 document를 찾을 수 있는데, 이 명령문을 파이썬으로는 어떻게 실행해야 하는지와 혹시 'author'를 'name'으로 변경 할 수 있는 방법에 대해서도 알려 주시면 감사하겠습니다. 참 그리고 Sudio3가 one month free 후 유료로 전환되는것 같은데.. 다른 무료 툴이 있음 추천 바랍니다.
-
미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
h2 버전 2 이상 테이블 생성안될시
User 객체를 다른 이름으로 바꾸면 해결됩니다. user가 예약어가 되었습니다. application.yml 파일에 아래처럼 설정하셔야 DML 전에 DDL 구문이 실행됩니다 또한 sysdate() 함수 말고 now()함수를 사용하셔야 합니다. jpa: show-sql: true defer-datasource-initialization: true
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
모델에는 여러개의 객체가 들어갈 수 있나요 ?
이번 멀티 체크박스를 넣을 때 보면 @ModelAttribute로 Map 자료구조의 regions 라는 객체를 모델에 넣어주고 또 model.addAttribute로 items 자료구조의 items라는 객체를 넣어줘서 Model에는 총 2개의 객체가 있는건가요 ? 모델에는 여러개의 객체가 공존할 수 있나요 ? 그냥 컨트롤러와 뷰를 연결시켜주는 데이터베이스라 생각하면되나요 ?
-
미해결[리뉴얼] 코딩자율학습 제로초의 자바스크립트 입문
textContent 에러
선생님 안녕하세요. 코드를 따라서 쳐보고 돌려봤는데 Uncaught TypeError TypeError: Cannot set properties of null (setting 'textContent') at onClickButton (c:\FrontEnd\HTML\JSProject1.html:25:25) 라는 에러가 발생했습니다. 여러 해결법을 찾아보다가 선생님 전자책에 나와있는 코드를 그대로 복붙했는데도 같은 에러가 발생합니다. 도대체 뭐가 문제인지 모르겠네요ㅜㅜ
-
미해결[리뉴얼] 코딩자율학습 제로초의 자바스크립트 입문
버블링 이해가 잘안가는데요..
버블링이 자식에서 부모로 전달되고 캡처링이 부모에서 자식으로 이벤트가 전달된다고 이해했는데요 table에 이벤트를 걸어서 td를 클릭했을때 td가 이벤트 타겟이 되면 캡처링 아닌가영?..ㅠㅠㅠ table이 부모고 td가 자식인데 왜 버블링이 되는거죠..?ㅠㅠㅠ
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
학습로드맵관련 질문
안녕하세요 기초강의를 듣고있는데 기존에 자바와 스프링의 강의를 수강은 해봤는데 기초편을 듣는데 이해를 잘못하는거같아서 ㅠㅠ 테스트부분부터 @responseboydy부분부터 갑자기 이해하기가 어려운데 정상인건지 반복해서 보면 이해가가는건지 다른걸 더 배워야되는지 감이 안잡힙니다 ㅠㅠ