s = list(input()) n = len(s) choose = [] check = [False] * len(s) ans = [] def check_ad(s): for i in range(len(s)-1): if s[i] == s[i+1]: return False return True def make(level): if level == n and check_ad(choose): result = ''.join(choose) if result not in ans: ans.append(result) for i in range(n): if check[i]: continue choose.append(s[i]) check[i] = True make(level + 1) choose.pop() check[i] = False make(0) print(len(ans)) 안녕하세요 강사님! 위 코드는 시간 초과가 나는데 순열 강의 알고리즘을 그대로 사용한 것입니다! 강사님의 순열 코드는 시간 초과가 안나는데 왜 이거는 시간초과가 날까요? 내장된 permutation이 효율적으로 구현된 것일까요?
now = datetime(year=2023, month=3, day=30) print('현재시간:' + str(now)) print('-----------------월 연산 --------------------') print(now + relativedelta.relativedelta(months=1)) print(now.replace(month=1)) 위의 코드 실행 결과가 다르게 나오는 것 같은데요..1개월 후면 4월30일이 맞는 것 아닌가요? 현재시간:2023-03-30 00:00:00 -----------------월 연산 -------------------- 2023-04-30 00:00:00 2023-01-30 00:00:00 감사합니다.
cv2.imread() 함수를 통해 이미지를 읽어 들일 때, 한글을 읽어오지 못해 오류가 발생하는 경우가 있습니다. 아래의 코드로 해결하시면 됩니다. 참고로, 아래 코드 사용 시 cvtColor() 함수를 사용해서 색상을 변경하지 않아도 됩니다. import numpy as np img_path = "이미지 파일 경로" img_file= np.fromfile(img_path, np.uint8) cv_decode = cv2.imdecode(img_file, cv2.IMREAD_COLOR) qr_reader = pyzbar.decode(cv_decode) print(qr_reader)
실제 시뮬레이터로, 테스트할 때는 앱이 정상적으로 동작하나, 베타 테스터를 할 수 있는 링크를 통해 앱을 설치해서 실행시키면은 스플래시 스크린에서 앱이 멈추는 현상이 발생합니다 .스플래시 스크린 관련 부분은, 강사님 강의를 그대로 참고했는데, 혹시 버전 관련해서 문제가 발생하는게 있을까요?? 해결하고자하는데 잘 안되서, 이런 경우에 어떤식으로, 에러를 핸들링하는지 알고싶습니다!
강의에서 보면 예를 들어 goog의 연평균 주식 구하실때, pct_change() 구한값에 mean()을 취하셔서 working day 252를 곱하셨는데, 복리 개념을 생각해보면 (df_daily['goog'].pct_change() + 1).prod() ** (252/len(df_daily)) - 1 이렇게 되야 하는게 아닌가 궁금하여 문의드립니다! 값이 거의 비슷하다고 가정하시고 그냥 복리 개념은 생략하신건지요! 감사합니다
안녕하세요! 2분 쯤에 구조체 선언하는 2가지 형태에 대해서 비교해 주실때 오른쪽에서 구조체 선언할때 (왼쪽과는 달리)그냥 struct 라고만 되어있는데 struct Person {//내용}person1 ; 이렇게 Person(구조체명)이 들어가야 하는데 실수로 빠진 건지 아니면 이 경우에는 구조체명을 쓰지 않아도 되는 건지 궁금합니다! 그리고 왼쪽 케이스 아랫부분 사용시 용례에 struct 구조체명 타입명; 이라고 되어있는데 여기서 타입명을 변수명이라고 이해해도 될까요? 뒷 강의에서 typedef를 다루면서 타입명이 나오기는 하는데 여기서도 typedef 키워드가 있을때를 의미하는 건지 헷갈려서요ㅜㅜ
npx react-native init FoodDeliveryApp --template react-native-template-typescript 명령어 실행하면 error Installing pods failed. This doesn't affect project initialization and you can safely proceed. However, you will need to install pods manually when running iOS, follow additional steps in "Run instructions for iOS" section. 이런 에러가 뜹니다. 검색해보니 수동으로 pod를 설치해야하는 것 같은데 ls로 FoodDeliveryApp을 보면 영상과 달리 어떠한 것도 검색되지 않습니다.. 이 문제를 어떻게 해결해야 할 지 모르겠어서 질문드립니다.
[제로초 강좌 질문 필독 사항입니다] 질문에는 여러분에게 도움이 되는 질문과 도움이 되지 않는 질문이 있습니다. 도움이 되는 질문을 하는 방법을 알려드립니다. https://www.youtube.com/watch?v=PUKOWrOuC0c 0. 숫자 0부터 시작한 이유는 1보다 더 중요한 것이기 때문입니다. 에러가 났을 때 해결을 하는 게 중요한 게 아닙니다. 왜 여러분은 해결을 못 하고 저는 해결을 하는지, 어디서 힌트를 얻은 것이고 어떻게 해결한 건지 그걸 알아가셔야 합니다. 그렇지 못한 질문은 무의미한 질문입니다. 1. 에러 메시지를 올리기 전에 반드시 스스로 번역을 해야 합니다. 번역기 요즘 잘 되어 있습니다. 에러 메시지가 에러 해결 단서의 90%를 차지합니다. 한글로 번역만 해도 대부분 풀립니다. 그냥 에러메시지를 올리고(심지어 안 올리는 분도 있습니다. 저는 독심술사가 아닙니다) 해결해달라고 하시면 아무런 도움이 안 됩니다. 2. 에러 메시지를 잘라서 올리지 않아야 합니다. 입문자일수록 에러메시지에서 어떤 부분이 가장 중요한 부분인지 모르실 겁니다. 그러니 통째로 올리셔야 합니다. 3. 코드도 같이 올려주세요. 다만 코드 전체를 다 올리거나, 깃헙 주소만 띡 던지지는 마세요. 여러분이 "가장" 의심스럽다고 생각하는 코드를 올려주세요. 4. 이 강좌를 바탕으로 여러분이 응용을 해보다가 막히는 부분, 여러 개의 선택지 중에서 조언이 필요한 부분, 제 경험이 궁금한 부분에 대한 질문은 대환영입니다. 다만 여러분의 회사 일은 질문하지 마세요. 5. 강좌 하나 끝날 때마다 남의 질문들을 읽어보세요. 여러분이 곧 만나게 될 에러들입니다. 6. 위에 적은 내용을 명심하지 않으시면 백날 강좌를 봐도(제 강좌가 아니더라도) 실력이 늘지 않고 그냥 코딩쇼 관람 및 한컴타자연습을 한 셈이 될 겁니다. Last login: Thu Oct 10 11:24:20 on ttys000 gimjaewon@gimjaewon-ui-MacBookAir ~ npm start npm error code ENOENT npm error syscall open npm error path /Users/gimjaewon/package.json npm error errno -2 npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/Users/gimjaewon/package.json' npm error enoent This is related to npm not being able to find a file. npm error enoent npm error A complete log of this run can be found in: /Users/gimjaewon/.npm/_logs/2024-10-10T02_26_21_944Z-debug-0.log ✘ gimjaewon@gimjaewon-ui-MacBookAir ~ 이전 과정까지 잘 마쳤는데 npm start 입력시 이런 오류가 떠서 막혔습니다.
알려주신 방법대로 했는데 이번에는 아래와 같은 에러가 발생합니다 ㅠㅠ gongmyeong@Huns-Pro documents % sudo npx react-native@0.72.6 init MatzipApp --version 0.72.6 Password: ###### ###### ### #### #### ### ## ### ### ## ## #### ## ## #### ## ## ## ## ## ## ### ### ## ## ######################## ## ###### ### ### ###### ### ## ## ## ## ### ### ## ### #### ### ## ### ## #### ######## #### ## ## ### ########## ### ## ## #### ######## #### ## ### ## ### #### ### ## ### ### ## ## ## ## ### ###### ### ### ###### ## ######################## ## ## ### ### ## ## ## ## ## ## #### ## ## #### ## ## ### ### ## ### #### #### ### ###### ###### Welcome to React Native! Learn once, write anywhere ✔ Downloading template ✔ Copying template ✔ Processing template ✔ Installing Ruby Gems ℹ Installing Ruby Gems ✔ Installing CocoaPods ✖ Installing CocoaPods dependencies (this may take a few minutes) error bundler: failed to load command: pod (/Users/gongmyeong/Documents/MatzipApp/vendor/bundle/ruby/2.7.0/bin/pod) CLAide::Help: [!] You cannot run CocoaPods as root. Usage: $ pod COMMAND CocoaPods, the Cocoa library package manager. Commands: + cache Manipulate the CocoaPods cache + env Display pod environment + init Generate a Podfile for the current directory + install Install project dependencies according to versions from a Podfile.lock + ipc Inter-process communication + lib Develop pods + list List pods + outdated Show outdated project dependencies + repo Manage spec-repositories + setup Set up the CocoaPods environment + spec Manage pod specs + update Update outdated project dependencies and create new Podfile.lock Options: --allow-root Allows CocoaPods to run as root --silent Show nothing --version Show the version of the tool --verbose Show more debugging information --no-ansi Show output without ANSI codes --help Show help banner of specified command /Users/gongmyeong/Documents/MatzipApp/vendor/bundle/ruby/2.7.0/gems/claide-1.1.0/lib/claide/command.rb:439:in `help!' /Users/gongmyeong/Documents/MatzipApp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:102:in `ensure_not_root_or_allowed!' /Users/gongmyeong/Documents/MatzipApp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:48:in `run' /Users/gongmyeong/Documents/MatzipApp/vendor/bundle/ruby/2.7.0/gems/cocoapods-1.15.2/bin/pod:55:in `<top (required)>' /Users/gongmyeong/Documents/MatzipApp/vendor/bundle/ruby/2.7.0/bin/pod:23:in `load' /Users/gongmyeong/Documents/MatzipApp/vendor/bundle/ruby/2.7.0/bin/pod:23:in `<top (required)>' ✖ Installing CocoaPods dependencies (this may take a few minutes) error Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/environment-setup?os=macos&platform=android and follow the React Native CLI QuickStart guide for macOS and iOS. info Run CLI with --verbose flag for more details.
t1 >> t3 t2 >> t3 이렇게 테스크를 연결했을때 case 1 : t1, t2 둘다 종료되어야 t3가 실행되는지 case 2 : t1이 종료되었을떄, t2가 종료되었을때 각각 t3가 한번씩 실행되는지 궁금합니다. 위의 방법과 [t1, t2] >> t3 가 동등하다고 설명해주셨는데 case 1, case2 두가지 방법을 설정하고싶을때는 어떻게 처리하면 될까요?
2-5강중 DrawerNavigation 강의를 진행하던 중 오류가 생겼습니다. 오류내용은 다음과 같습니다. ERROR Warning: Error: [Reanimated] Native part of Reanimated doesn't seem to be initialized. See https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#native-part-of-reanimated-doesnt-seem-to-be-initialized for more details., js engine: hermes at DrawerViewBase (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:181627:22) at RCTView at View (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:64127:43) at GestureHandlerRootView (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:178516:21) at RNCSafeAreaProvider at SafeAreaProvider (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:141950:24) at SafeAreaProviderCompat (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:142727:24) at DrawerView (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:181827:27) at PreventRemoveProvider (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:138566:25) at NavigationContent (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:139353:22) at anonymous (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:139369:27) at DrawerNavigator (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:181521:18) at MainDrawerNavigator at RootNavigator (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:132339:41) at EnsureSingleNavigator (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:135474:24) at BaseNavigationContainer (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:135070:28) at ThemeProvider (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:140882:21) at NavigationContainerInner (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:140770:26) at App at RCTView at View (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:64127:43) at RCTView at View (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:64127:43) at AppContainer (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:64000:25) at MatzipApp(RootComponent) (http://localhost:8081/index.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example.MatzipApp:117354:28) ERROR Warning: TypeError: Cannot read property 'isConfigured' of undefined This error is located at: in DrawerViewBase (created by DrawerView) in RCTView (created by View) in View (created by GestureHandlerRootView) in GestureHandlerRootView (created by DrawerView) in RNCSafeAreaProvider (created by SafeAreaProvider) in SafeAreaProvider (created by SafeAreaProviderCompat) in SafeAreaProviderCompat (created by DrawerView) in DrawerView (created by DrawerNavigator) in PreventRemoveProvider (created by NavigationContent) in NavigationContent in Unknown (created by DrawerNavigator) in DrawerNavigator (created by MainDrawerNavigator) in MainDrawerNavigator (created by RootNavigator) in RootNavigator (created by App) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by App) in App in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in MatzipApp(RootComponent), js engine: hermes ERROR Warning: TypeError: Cannot read property 'isConfigured' of undefined This error is located at: in DrawerViewBase (created by DrawerView) in RCTView (created by View) in View (created by GestureHandlerRootView) in GestureHandlerRootView (created by DrawerView) in RNCSafeAreaProvider (created by SafeAreaProvider) in SafeAreaProvider (created by SafeAreaProviderCompat) in SafeAreaProviderCompat (created by DrawerView) in DrawerView (created by DrawerNavigator) in PreventRemoveProvider (created by NavigationContent) in NavigationContent in Unknown (created by DrawerNavigator) in DrawerNavigator (created by MainDrawerNavigator) in MainDrawerNavigator (created by RootNavigator) in RootNavigator (created by App) in EnsureSingleNavigator in BaseNavigationContainer in ThemeProvider in NavigationContainerInner (created by App) in App in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer in MatzipApp(RootComponent), js engine: hermes 에러내용에 공식문서 링크가 달려있어서 들어가서 따라해보았지만 역시 동일하게 오류가 발생하였습니다. babel.config.js module.exports = { presets: ['module:@react-native/babel-preset'], plugins: [ '@babel/plugin-proposal-export-namespace-from', 'react-native-reanimated/plugin', ], }; 해당 issue도 확인해서 해결법을 따라해봤지만 여전히 동일한 오류가 발생합니다. https://github.com/software-mansion/react-native-reanimated/issues/5856 제 github repository입니다. https://github.com/DongSeonYoo/RN-study/tree/main/front