소셜로그인 부분을 그래프큐엘 가드를 사용해서 적용하면 원인을 도저히 모르겠는 , res.setHeader function이 없다는 에러가 계속 발생하는데요.. 챗지피티 무료버전에 물어보니 소셜로그인 부분은 restapi로 구현한다고하는데.. 챗지피티를 믿을수가없어서요.. 소셜로그인 부분은 restapi로 해야된다. 그래프큐엘로 바꿀수있는데 너가 코드를 잘 못친듯? 1번과 2번중에 어떤건가요?
pycharm을 사용해서 print("Red Apple\rPine") 을 입력했더니 PineApple이 출력되는 게 아니라 Pine만 출력됩니다 구글에 검색해보니 \r 뒤의 문자만 출력해주는 탈출문자라는데 아무튼 똑같이 입력했는데도 불구하고 제 컴퓨터에서는 왜 강의 예제와 달리 Pine만 출력되나요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인 요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. package hello.core.autowired.allbean; import hello.core.AutoAppConfig; import hello.core.discount.DiscountPolicy; import hello.core.member.Grade; import hello.core.member.Member; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.stereotype.Component; import java.util.List; import java.util.Map; public class AllBeanTest { @Test void findAllBean(){ AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(AutoAppConfig.class); DiscountService discountService = ac.getBean(DiscountService.class); Member member = new Member(1L, "userA", Grade.VIP); int discountPrice = discountService.discount(member, 10000, "fixDiscountPolicy"); Assertions.assertThat(discountService).isInstanceOf(DiscountService.class); Assertions.assertThat(discountPrice).isEqualTo(1000); } @Component static class DiscountService{ private final Map<String, DiscountPolicy> policyMap; private final List<DiscountPolicy> policies; @Autowired public DiscountService(Map<String, DiscountPolicy> policyMap, List<DiscountPolicy> policies) { this.policyMap = policyMap; this.policies = policies; System.out.println("policyMap = " + policyMap); // System.out.println("policies = " + policies); System.out.println(policyMap.keySet()); } public int discount(Member member, int price, String discountCode) { DiscountPolicy discountPolicy = policyMap.get(discountCode); System.out.println("discountCode = " + discountCode); System.out.println("discountPolicy = " + discountPolicy); return discountPolicy.discount(member, price); } } } 일때 policyMap에도 자동주입되는건데 map 타입이다보니 스프링에서 자동적으로 component 등록되어서 빈에 등록된 DiscountPolicy 클래스를 상속받은 빈을 찾아보니 FixDiscountPolicy,RateDiscountPolicy 이렇게 있어서 모두 자동적으로 스프링에서 policyMap에 넣어준다라고 생각하면 되는건가요 ?
안녕하세요 4:03에 super()명령어로 Class car{ string model; string year; 실행하고 난 뒤에 this.batteryCapacity = batteryCapacity는 75라는 거고 그 다음 줄에 ElectricCar~kwh 이 부분은 왜 출력하지 않고 넘어 가나요??
5:06 에서 int sum = 0; ~ switch(sum/30) { ~ 일 때 sum 이 int로 선언되었기 때문에 sum/30 이 8.xxx 가 되고, 버림돼서 8이 된다고 하셨는데, sum/30 이 몫의 나눗셈을 뜻하는 거니까 '8' 이고, int이니까 정수형 8이 역시 맞구나! 하고 넘어가는 논리로 생각하면 틀린 생각일까요?
import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; //import App from './App'; //import reportWebVitals from './reportWebVitals'; import Clock from './chapter_04/clock'; const root = ReactDOM.createRoot(document.getElementById('root')); setInterval(() => { root.render( <React.StrictMode> <Clock /> </React.StrictMode> ); }, 1000); import React from "react"; const Clock = () => { return( <div> <h1>안녕, 리엑스</h1> <h2>현재 시간: {new Date().toLocaleTimeString}</h2> </div> ) } export default Clock; Failed to compile. Module not found: Error: Can't resolve './chapter_03/Library' in 'C:\reactdeveloper\reactcoding\my-app\src' WARNING in [eslint] src\index.js Line 4:8: 'App' is defined but never used no-unused-vars Line 5:8: 'reportWebVitals' is defined but never used no-unused-vars Line 7:8: 'Library' is defined but never used no-unused-vars Failed to compile. Module not found: Error: Can't resolve './chapter_03/Library' in 'C:\reactdeveloper\reactcoding\my-app\src' WARNING in [eslint] src\index.js Line 4:8: 'App' is defined but never used no-unused-vars Line 5:8: 'reportWebVitals' is defined but never used no-unused-vars Line 7:8: 'Library' is defined but never used no-unused-vars Failed to compile. Module not found: Error: Cannot find file: 'clock.jsx' does not match the corresponding name on disk: '.\src\chapter_04\Clock.jsx'. ERROR in ./src/index.js 10:0-39 Module not found: Error: Cannot find file: 'clock.jsx' does not match the corresponding name on disk: '.\src\chapter_04\Clock.jsx'. webpack compiled with 1 error 이렇게 오류가 나고 있는데 해결 방법이 있을까요
car.start 를 통해 출력 되기전에 Car car= new ~~ 를 통해 생성자를 만들때 super(model,year);를 진행하여 부모인 Car(String model,int year) 로 가서 System.out.println을 통해 Car 생성자: Tesla Model 3, 2021이 출력되는게 맞나요?!
안녕하세요, 강사님. 6.3을 실습하는 과정에서 표제에 적은 두 스크립트를 실행 할 때 동일한 이슈가 발생하여 문의드립니다. 일단 create-certificate.sh 실행 시 cp-k8s 노드에 sshpass 가 없어서 정상적으로 스크립트가 진행되지 못했습니다. (사실 이 부분을 제대로 인지하지 못하고 강의 뒷부분까지 진행하였습니다) 그다음 http://5.docker-image-pullpush-to-harbor.sh 실행 할 때는, docker가 없어서 docker login부터 push 과정까지 전부 진행이 안되더라고요. root@cp-k8s:~/_Lecture_prom_learning.kit/ch6/6.3# ./5.docker-image-pullpush-to-harbor.sh ./5.docker-image-pullpush-to-harbor.sh: line 3: docker: command not found ./5.docker-image-pullpush-to-harbor.sh: line 4: docker: command not found ./5.docker-image-pullpush-to-harbor.sh: line 5: docker: command not found ./5.docker-image-pullpush-to-harbor.sh: line 6: docker: command not found 그래서 docker를 설치한 다음, 아래 내용들처럼 pull은 된 거 같은데, push는 인증서 이슈로 실패한 거 같습니다. root@cp-k8s:~/_Lecture_prom_learning.kit/ch6/6.3# ./5.docker-image-pullpush-to-harbor.sh WARNING! Using --password via the CLI is insecure. Use --password-stdin. Error response from daemon: Get "https://192.168.1.63/v2/": tls: failed to verify certificate: x509: certificate signed by unknown authority Using default tag: latest latest: Pulling from library/nginx f11c1adaa26e: Pull complete c6b156574604: Pull complete ea5d7144c337: Pull complete 1bbcb9df2c93: Pull complete 537a6cfe3404: Pull complete 767bff2cc03e: Pull complete adc73cb74f25: Pull complete Digest: sha256:67682bda769fae1ccf5183192b8daf37b64cae99c6c3302650f6f8bf5f0f95df Status: Downloaded newer image for nginx:latest docker.io/library/nginx:latest Using default tag: latest The push refers to repository [192.168.1.63/library/nginx] Get "https://192.168.1.63/v2/": tls: failed to verify certificate: x509: certificate signed by unknown authority root@cp-k8s:~# docker images REPOSITORY TAG IMAGE ID CREATED SIZE 192.168.1.63/library/nginx latest fffffc90d343 3 weeks ago 188MB nginx latest fffffc90d343 3 weeks ago 188MB 그 다음엔 강의 앞 부분으로 돌아가서, 인증서 설치 부분을 다시 진행해보았습니다. root@harbor:~/_Lecture_prom_learning.kit/ch6/6.3/2.harbor-certificate# ./create-certificate.sh Certificate request self-signature ok subject=C = KR, ST = Seoul, L = Seoul, O = lecture, OU = prometheus, CN = 192.168.1.63 ./create-certificate.sh: line 26: sshpass: command not found ./create-certificate.sh: line 27: sshpass: command not found ./create-certificate.sh: line 28: sshpass: command not found ./create-certificate.sh: line 29: sshpass: command not found ./create-certificate.sh: line 33: sshpass: command not found ./create-certificate.sh: line 34: sshpass: command not found ./create-certificate.sh: line 35: sshpass: command not found ./create-certificate.sh: line 36: sshpass: command not found ./create-certificate.sh: line 33: sshpass: command not found ./create-certificate.sh: line 34: sshpass: command not found ./create-certificate.sh: line 35: sshpass: command not found ./create-certificate.sh: line 36: sshpass: command not found ./create-certificate.sh: line 33: sshpass: command not found ./create-certificate.sh: line 34: sshpass: command not found ./create-certificate.sh: line 35: sshpass: command not found ./create-certificate.sh: line 36: sshpass: command not found mkdir: cannot create directory ‘/root/_Lecture_prom_learning.kit/ch6/6.3/tls/’: File exists mv: cannot stat 'ca.srl': No such file or directory 앞서 말씀드린 대로 docker처럼 sshpass 가 없어서 새로 설치한 다음, 계속 진행해보았는데 ca.srl 파일이 생성이 되지 않더라고요. 그래서 그런 건지 이미지 push가 계속 실패하였습니다. 질문을 좀 정리하자면... 일단 마스터 노드에 sshpass, docker 가 설치가 안 되어 있는 건지, 바쁘시겠지만 확인 한 번 부탁드립니다. 그리고 이미지 push 이슈를 해결하는 방법도 함께 가이드 부탁 드리겠습니다. 감사합니다.
안녕하세요 강의 잘 듣고있습니다. 강의를 듣다가 궁금한 점이, browser.ts와 http.ts 두개를 만든 점 입니다. next는 CSR과 SSR을 둘다 사용하기에, 서버에서도 데이터 처리를 하려고 http.ts를 통해 서버 데이터 처리를 하는 게 맞나요? 아래 코드는 브라우저 환경일 때만 brower.ts를 실행시키고 http.ts를 브라우저 환경이든 아니든 항상 켜져있는건가요? if (typeof window !== 'undefined') { if (process.env.NEXT_PUBLIC_API_MOCKING === 'enabled') { // eslint-disable-next-line global-require require('@/mocks/browser') } } 그렇다면 만약 react에서 사용하게 되면 CSR만 한다는 가정하에 http.ts는 필요 없게 되는건가요?
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 이 부분이 이해가 되질 않습니다. HHT인 경우 '001'이 되어야 하지만, value가 1부터 *2로 증가해서 HHT에 해당하는 값을 저장할 때, a[i] | value (=4)에 의해 '100'이 저장되지 않나요?? 비트의 순서가 뒤집힌거 같은데 상관없나요? + 위에 go 함수에서 if(a[j] & i)로 비교에 a[j]를 사용하는데, a[j]에 4('HHT'를 저장했을 경우)가 저장되어 있으면 '100' 비교하는데 순서가 뒤집힌거 같아서 헷갈립니다. a[j]에 저장되어 있는 값으로 나타내는 동전이 어차피 대칭이기 때문에 로직이 통과하는 것인가요?
안녕 하세요.. 이런 질문을 드려도 될까 모르겠습니다만.. 현재 운영 되는 사이트는 ms-sql 로 bak 파일 기준 약 50기가 정도 됩니다. 사이트를 개편 하려고 하고 있는데요..mysql 로 바꾸는 것을 논의 중 입니다. 처음 부터 데이터가 50기가 가 입력 되는 것은 아니고..운영 하면서 데이터가 늘어날텐데.. 경험 상 50기가 정도 될 것으로 예상 됩니다. 특정 테이블은 몇천만건의 데이터가 입력 될 수도 있는데요.. mysql 이나 mariadb 로 이 정도의 데이터베이스를 운영 할 수 있을지.. 사이트 속도 에는 큰 문제가 없을지.. 조언 부탁 드립니다. 감사 합니다.
개인 프로젝트를 build 하고 생성된 jar파일을 깃허브의 private 리포지토리에 업로드 하려하니 25MB 를 초과하는 파일을 업로드 할 수 없다는 github 메시지가 뜹니다. 이건 어떻게 해결해야 할까요? 배포를 할때는 jar파일을 wget 하기위한 github 저장소가 항상 필요한 걸까요? jar 파일을 서버로 전송하는 다른 방법도 있는지 궁금합니다.
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. ItemType 라디오버튼을 체크하지 않고 등록할 경우, Item 객체의 ItemType 값이 null 인 걸 확인했는데요. editForm.html 이나 item.html 에서 th:field값의 ${item.itemType} 도 당연히 null 이겠죠? 응답데이터에 애초에 itemType 이 없더라구요. 이부분에서 없는 값을 참조하는데 문제가 생기지 않는 이유를 알 수 있을까요??