분류 전체보기 썸네일형 리스트형 [코딩테스트 입문] 중복된 숫자 개수 중복된 숫자 개수 1안) solution.py def solution(array, n): answer = 0 answer = array.count(n) return answer 2안) solution.py def solution(array, n): answer = 0 if (len(array) 100): raise ValueError("length of array") if (max(array) 1000): raise ValueError("maximum value of an element") if (n 1000): raise ValueError("parameter value") answer = array.count(.. 더보기 [코딩테스트 입문] 짝수의 합 짝수의 합solution.pydef solution(n): answer = 0 if (0 출처 - 프로그래머스(코딩테스트 연습) : https://school.programmers.co.kr/learn/courses/30/lessons/120831 더보기 [코딩테스트 입문] 배열의 평균값 배열의 평균값1안) solution.pydef solution(numbers): answer = 0 answer = sum(numbers) / len(numbers) return answer2안) solution.pydef solution(numbers): answer = 0 for number in (numbers): count = 0 count += 1 if 0 출처 - 프로그래머스(코딩테스트 연습) : https://school.programmers.co.kr/learn/courses/30/lessons/120817 더보기 kubernetes kubectl config 명령 - 1 쿠버네티스 kubectl config 명령 Modify kubeconfig files using subcommands like "kubectl config set current-context my-context"사용법 The loading order follows these rules: 1. If the --kubeconfig flag is set, then only that file is loaded. The flag may only be set once and no merging takesplace. 2. If $KUBECONFIG environment variable is set, then it is used as a list of paths (normal path delimiting rul.. 더보기 kubernetes kubectl config 명령 - 2 쿠버네티스 kubectl config 설정쿠버네티스 컨트롤러 서버(linux)kubectl config view$ kubectl config viewapiVersion: v1clusters:- cluster: certificate-authority-data: DATA+OMITTED server: https://127.0.0.1:6443 name: cluster.localcontexts:- context: cluster: cluster.local user: kubernetes-admin name: kubernetes-admin@cluster.localcurrent-context: kubernetes-admin@cluster.localkind: Configpreferences: {}.. 더보기 kubernetes kubectl get 명령 kubectl get 명령kubectl get field selectorkubectl get pods -o wide --field-selector status.phase=Running$ kubectl get pods -o wide --field-selector status.phase=RunningNAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATESmyapp-rs-dynamic-4gchk 1/1 Running 0 23m 10.233.118.6.. 더보기 kubernetes kubectl delete 명령 kubectl delete 명령Delete resources by file names, stdin, resources and names, or by resources and label selector.사용법Examples: # Delete a pod using the type and name specified in pod.json kubectl delete -f ./pod.json # Delete resources from a directory containing kustomization.yaml - e.g. dir/kustomization.yaml kubectl delete -k dir # Delete a pod based on the type and name in the JSON passed.. 더보기 우분투에서 rc-local 서비스를 활성화하는 방법 우분투에서 rc-local(rc.local) 서비스를 활성화하는 방법Ubuntu 22.04는 rc.local이 기본적으로 비활성화되어 있으며, systemd를 사용하는 서비스와 유닛 파일로 대체되었습니다.테스트 환경$ lsb_release -dDescription: Ubuntu 22.04.2 LTSrc-local 서비스 활성화1. rc-local 서비스 상태 확인systemctl status rc-local.service$ systemctl status rc-local.service○ rc-local.service - /etc/rc.local Compatibility Loaded: loaded (/lib/systemd/system/rc-local.service; static) Drop-In:.. 더보기 이전 1 ··· 148 149 150 151 152 153 154 ··· 315 다음