1. 현재 학습 진도 몇 챕터/몇 강을 수강 중이신가요? 1- 10 어떤 알고리즘을 학습하고 계신가요? 1 - 10 2. 궁금한 부분 def find_not_repeating_first_character(string): occurrence_array = find_alphabet_occurrence_array(string) for char in string: if occurrence_array[ord(char) - ord('a')] == 1: return char return "_" def find_alphabet_occurrence_array(string): alphabet_occurrence_array = [0] * 26 for char in string: index = ord(char) - ord('a') alphabet_occurrence_array[index] += 1 return alphabet_occurrence_array 딩코딩코 선생님의 풀이와 다르게 반복된 값이 들어 있는 array에서 string의 element를 순회하면서 index의 빈도수를 조회하고 1이면 return 하도록 했는데 괜찮은 접근일까요?
Airflow Variables 설정시 스노우플레이크와 연결을 위한 snowflake_userid, snowflake_password, snowflake_account 설정은 이해를 합니다. 그런데 첫번째인 Country_capital_url 왜 설정하는지 이해가 안갑니다.
point 0 1 2 3 isWhat 5 6 3 현재 point가 1로 6을 출력한 뒤 마지막 두번째 take()를 하면 return isWhat[point--]는 현재의 isWhat값인 6을 출력한 뒤에 point는 0이 되고, 다시 마지막 take()를 다시하면, return isWhat[point--]로 point 0일 때 isWhat의 값 5를 출력한 뒤에 point -1이 되어 종료되는 것은 아닌가요? 6이 한 번 더 있어야 되는 것은 아닌지 여쭈어 봅니다.
문제 발생 : npm run start:dev 시 위와 같은 에러 발생 Error: connect ECONNREFUSED ::1:6379 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1615:16) { errno: -4078, code: 'ECONNREFUSED', syscall: 'connect', address: '::1', port: 6379 } 문제 원인: Redis 연결 실패 → 애플리케이션이 Redis 서버(포트 6379 )에 연결하려 했지만 거부됨. ECONNREFUSED 오류는 Redis가 실행되지 않거나, 접근할 수 없는 상태 일 때 발생. 문제 해결 : Redis 기본 설정은 IPv6 ( ::1 )을 사용함. IPv4( 127.0.0.1 )로 강제 변경해 해결 localhost 가 아닌 127.0.0.1 로 변경 // .env 기존 코드 REDIS_URL=redis://localhost:6379 // .env 변경 코드 REDIS_URL=redis://127.0.0.1:6379 위 에러 만나고 애쓴 부분 공유합니다. 혹시 잘못된 해결 방법이라면 알려주시면 감사하겠습니다!
from itertools import permutations infos = list(input()) ans = 0 for comb in set(permutations(infos)): ok = True for i in range(0,len(infos)-1): if comb[i] == comb[i+1] : ok = False break ans += ok print(ans) BOJ 1342번 문제를 다음과 같이 풀었는데 계속해서 메모리초과 때문에 오답처리가 나서 질문 남깁니다. permutations가 한 번에 모든 순열을 생성하기 때문에 메모리 문제가 발생한다고 GPT의 답변을 얻을 수 있었으나, 강사님의 풀이 1번에도 permutations가 있는데도 메모리초과가 나지 않고 정답처리가 나서 왜 이런 차이가 나는 지 궁금합니다.
안녕하세요. Java 상속 10개 예제 파트의 유형 5. 부모 메서드를 오버라이딩하지 않고, 자식에서 새롭게 정의된 메서드를 사용 할 경우에 대해 질문이 있어서 남깁니다. 아직 제가 업캐스팅에 대해 완벽히 이해가 되었지 않았기 때문에 드리는 질문입니다. 업캐스팅이란, 객체 생성 시, 클래스의 타입은 부모 클래스로, 생성자는 자식 생성자로 하는 것이라 배웠습니다. 업캐스팅이 진행 될 경우, 기존 부모 클래스 내부 메서드는 해당 객체에서 활용할 수 있지만, 자식 클래스에서 부모 클래스의 메서드를 오버라이딩 하지 않고, 새롭게 정의한 메서드를 사용할 수 없는 것인가요? 예를 들어, 다음과 같은 코드를 살펴 볼 경우, class Parent { // 부모 클래스의 void형 메서드 show void show() { System.out.println("Parent show"); } } class Child extends Parent { // 자식 클래스의 void 형 메서드 show(int a) // 부모 클래스에 존재하지 않던 메서드를 새롭게 정의한 메서드 void show(int x) { System.out.println("Child show : " + x); } } public class Main { public static void main(String[] args) { Parent p = new Child(); // 업캐스팅으로 생성된 객체 p // p는 참조 타입이 Parent이고, 생성은 Child 생성자에 의해 생성된 객체이다 p.show(); // p.show() -> Child에 없는 메서드 -> Parent에서 해당 메서드 호출 p.show(1); // p.show(1) -> Child에만 있는 메서드 -> 참조 타입이 Parent이기 때문에 컴파일 에러 발생 } } p.show()는 Parent 클래스에서 정의된 메서드 show()를 호출하지만, p.show(1)는 Child 클래스에서만 정의된(Parent 클래스에는 없는) 메서드이기 때문에, 참조 타입에 따라 컴파일 에러가 발생하는 것 같습니다. 아직 제가 업캐스팅을 잘 이해하지 못해서 그런지, 업캐스팅이 없으면 안되는 경우를 제가 모르기 때문인지, 업캐스팅의 이점을 잘 모르겠습니다. 사실 저 경우도 단순히 Child 타입으로 p를 만들었다면 문제 없이 넘어가는 경우이고, 두 번째 자식 클래스의 메서드에서 오버라이딩을 진행한 경우에도 업캐스팅을 사용해야 하나?라는 의문이 들었습니다. class Parent { void show() { System.out.println("Parent show"); } } class Child extends Parent { void show() { System.out.println("Child show"); } void show(int x) { System.out.println("Child show : " + x); } } public class Main { public static void main(String[] args) { Child p = new Child(); p.show(); p.show(1); } } 업캐스팅을 단순히 정처기 실기를 통과하기 위한 하나의 주제로 보는 상황이라 이런 문제가 벌어지는 것 같습니다...ㅠㅠ 혹시 개발 과정에서 업캐스팅이 없으면 안 되는 경우(저처럼 그냥 타입을 Child로 바꿔버리면 안 되는 경우 등)에 대한 예시가 있을까요?? 다양한 문제 상황을 주셔서 여러 고민을 할 수 있는 것 같습니다. 항상 질 높은 강의 감사드립니다!
docker-compose up -d 할때 leafy_leafy-front_1가 자꾸 꺼지고 restart 되는게 반복되는데 docker logs leafy_leafy-front_1 를로 확인해본결과 exec /usr/local/bin/ docker-entrypoint.sh : no such file or directory 라는 오류가 있네요 윈도우로 수업 들을때는 문제없었는데 aws ec2 아마존 리눅스 에서 돌려보니 해당 오류가 계속 생겨서 질문드립니다 검색 및 예전 답변을 참고해서 crlf 를 lf 로 바꿔도보고 새로 clone 해보고 했는데 여전히 오류 입니다. 윈도우에서는 되다가 오히려 리눅스 환경에서 안되는게 이유를 모르겠습니다 ㅠㅠ 답변 부탁합니다
콘솔창에 Lottie 관련으로 경고 메시지 같은게 뜨는데 해당 내용은 어떻게 해야 해결할 수 있나요? 혹시페이지에 문제가 생기지는 않는건가요? 문서를 봐도 무슨 말인지 모르겠네요. componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details. * Move data fetching code or side effects to componentDidUpdate. * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run npx react-codemod rename-unsafe-lifecycles in your project source folder. Please update the following components: Lottie2
왜인지 모르게 npm install로 npm install --save @react-native-vector-icons/fontawesome5이런식으로 설치를 해주고 나서 import FontAwesome5 from '@react-native-vector-icons/fontawesome5'; 을 하면 icon을 가지고 오지 못해서 [runtime not ready]: Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'VectorIcons' could not be found. Verify that a module by this name is registered in the native binary., js engine: hermes, stack: invariant@2200:25~ 위에와 같은 오류가 발생합니다,,, font가 제대로 카피되지 않아서 벌어지는 일 같아용,,, 그래서 여러가지 시도해본 결과 다른거 할 필요없이 import FontAwesome5 from '@react-native-vector-icons/fontawesome5'; 이런식으로 Icon이 아니라 FontAwesome5를 해주니까 되더라구요,,? 그런 후에 다시 import Icon from '@react-native-vector-icons/fontawesome5'; 이렇게 Icon으로 해주니까 font들이 제대로 카피가 되더라구요,,? 위에 사진처럼 복사되면 제대로 된거죠? (Icon 잘 나옵니다,,) 혹시 바로 import Icon했을때는 왜 안된건지 아실까요?
안녕하세요. 강사님. 설치 중 오류가 있어 문의드립니다. vagrant up 명령 실행 시 중간에 나던 오류는 yum -> dnf 로 변경하여 오류 없이 [7] 까지는 통과했는데요. 아래 [8] 번 부터 오류가 발생합니다. 확인 가능하시면 확인을 좀 부탁 드립니다. k8s-master: ======== [8] kubeadm으로 클러스터 생성 ======== k8s-master: ======== [8-1] 클러스터 초기화 (Pod Network 세팅) ======== k8s-master: W0313 17:20:12.760941 26182 version.go:104] could not fetch a Kubernetes version from the internet: unable to get URL " https://dl.k8s.io/release/stable-1.txt ": Get " https://dl.k8s.io/release/stable-1.txt ": tls: failed to verify certificate: x509: certificate signed by unknown authority k8s-master: W0313 17:20:12.760978 26182 version.go:105] falling back to the local client version: v1.27.2 k8s-master: [init] Using Kubernetes version: v1.27.2 k8s-master: [preflight] Running pre-flight checks k8s-master: [preflight] Pulling images required for setting up a Kubernetes cluster k8s-master: [preflight] This might take a minute or two, depending on the speed of your internet connection k8s-master: [preflight] You can also perform this action in beforehand using 'kubeadm config images pull' k8s-master: W0313 17:20:12.881425 26182 images.go:80] could not find officially supported version of etcd for Kubernetes v1.27.2, falling back to the nearest etcd version (3.5.7-0) k8s-master: W0313 17:20:13.861338 26182 checks.go:835] detected that the sandbox image "registry.k8s.io/pause:3.6" of the container runtime is inconsistent with that used by kubeadm. It is recommended that using "registry.k8s.io/pause:3.9" as the CRI sandbox image. k8s-master: error execution phase preflight: [preflight] Some fatal errors occurred: k8s-master: [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-apiserver:v1.27.2: output: E0313 17:20:13.105343 26238 remote_image.go:167] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-apiserver:v1.27.2\": failed to resolve reference \"registry.k8s.io/kube-apiserver:v1.27.2\": failed to do request: Head \" https://registry.k8s.io/v2/kube-apiserver/manifests/v1.27.2\ ": x509: certificate signed by unknown authority" image="registry.k8s.io/kube-apiserver:v1.27.2" k8s-master: time="2025-03-13T17:20:13+09:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-apiserver:v1.27.2\": failed to resolve reference \"registry.k8s.io/kube-apiserver:v1.27.2\": failed to do request: Head \" https://registry.k8s.io/v2/kube-apiserver/manifests/v1.27.2\ ": x509: certificate signed by unknown authority" k8s-master: , error: exit status 1 k8s-master: [ERROR ImagePull]: failed to pull image registry.k8s.io/kube-controller-manager:v1.27.2: output: E0313 17:20:13.323731 26275 remote_image.go:167] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-controller-manager:v1.27.2\": failed to resolve reference \"registry.k8s.io/kube-controller-manager:v1.27.2\": failed to do request: Head \" https://registry.k8s.io/v2/kube-controller-manager/manifests/v1.27.2\ ": x509: certificate signed by unknown authority" image="registry.k8s.io/kube-controller-manager:v1.27.2"
git에 있는 chapter 03에 있는 거 그대로 copy 하고 index.js 수행 해도 아래와 같은 오류가 떠요.. 버전은 16이구요.. 어디가 잘 못 된걸까요? Cannot read properties of undefined (reading 'S') TypeError: Cannot read properties of undefined (reading 'S') at http://localhost:3001/static/js/bundle.js:19184:56 at ./node_modules/react-dom/cjs/react-dom-client.development.js ( http://localhost:3001/static/js/bundle.js:20831:2 ) at options.factory ( http://localhost:3001/static/js/bundle.js:29391:31 ) at __webpack_require__ ( http://localhost:3001/static/js/bundle.js:28833:32 ) at fn ( http://localhost:3001/static/js/bundle.js:29050:21 ) at ./node_modules/react-dom/client.js ( http://localhost:3001/static/js/bundle.js:21060:20 ) at options.factory ( http://localhost:3001/static/js/bundle.js:29391:31 ) at __webpack_require__ ( http://localhost:3001/static/js/bundle.js:28833:32 ) at fn ( http://localhost:3001/static/js/bundle.js:29050:21 ) at ./src/index.js ( http://localhost:3001/static/js/bundle.js:28617:74 )