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 키워드가 있을때를 의미하는 건지 헷갈려서요ㅜㅜ
알려주신 방법대로 했는데 이번에는 아래와 같은 에러가 발생합니다 ㅠㅠ 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.
[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
안녕하세요 강의 너무 잘보고있어요!! 근데 궁금점이 생겼네요 강의에서는 AccessToken이 만료되거나 변조되었다면 에러메세지를 전달하고있는데 만약에 변조된 AccessToken을 캐치하고 에러를 프론트로 전달한다면 통상적인 프로세스로는 Refresh토큰을 가지고 Access를 재 발급하지 않나요 ? 그렇다면 만일 공격자가 새로 발급된 AccessToken을 탈취할 수 있는 거 아닌가 라는 생각이 들어서요.. 그렇다면 통상적으로 변조된 AccessToken을 캐치한다면 이를 클라로 에러코드와 같이 전달하고 아예 refresh와 access를 초기화 시키고 재 로그인을 요구하는 것이 옳은 프로세스일지요?
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
안녕하세요! 강의 잘 보고 있습니다. 강의를 보는 중에 헷갈리는 개념이 있어서 질문드려요! 올려주신 강의 중 미들웨어 챕터 부분을 보고 있어요. 그런데 문득 미들웨어와 uvicorn, gunicorn, hypercorn 과 같은 WSGI, ASGI 서버 간의 관계에 대해서 궁금증이 들었습니다. 보통 언어에 상관없이 웹 통신을 한다라고 하면 아래와 같은 구조로 통신한다고 볼 수 있잖아요?(DB가 있다고 가정) """ Client(Web Browser) ---> Web Server ---> Web Application Server ---> DB """ 그리고 파이썬에서는 uvicorn, gunicorn 과 같은 WSGI, ASGI 서버들이 Web Server 역할을, Flask, FastAPI 와 같은 프레임워크 서버들이 Web Application Server의 역할을 한다고 알고 있습니다. 그리고 저 Web Server 요소가 미들웨어라고 정의한다고 알고 있었는데요! 그런데 FastAPI 공식문서 상 에서는 미들웨어라는 것을 소개할 때, "모든 요청 또는 응답에 대해서 사전 또는 사후 처리 로직을 추가할 때 사용하는 것" 이라고 소개를 하면서 문득 "그러면 여기서 이야기하는 미들웨어랑 uvicorn, gunicorn 과는 어떤 차이점이 있는거지?" 하면서 헷갈리더라구요. 자바에서는 미들웨어라는 개념이 JVM 위에서 동작하면서 DB 연결, TCP/IP 연결 등과 같이 다른 소프트웨어(ex.애플리케이션)가 잘 동작하도록 지원해주는 소프트웨어라고 알고 있는데요! 만약 이러한 관점에서 본다면 uvicorn, gunicorn 과 같은 WSGI 또는 ASGI 서버들도 미들웨어라고 볼 수는 없는 걸까요? ChatGPT 한테 물어보았을 때는 엄연히 다른 개념이라고 하는데.. 정확히 차이점을 잘 모르겠어서요. 답변 해주시면 감사하겠습니다! (참고로 저는 파이썬으로만 오랫동안 개발해와서 자바나 다른 언어 관련해서는 잘 모를 수도 있어서 다른 언어에 대한 비유로 답변 주시면 제가 잘 이해를 못할 수도 있습니다!)
다른 분 질문의 답변을 봐도 이해가 잘 안되서 질문 남깁니다! 앞 포인터 강의에서 int *p = &n; printf("%d\n", p); 를 실행하면 n의 주소값이 출력된다고 이해했는데, char *str; printf("%s\n", str); 을 했을때는 왜 myString의 0번째 인덱스 주소값이 출력되는게 아니라 this is string 이 출력되는지 이해가 안되서요.. 설명해주시면 감사하겠습니다!
세션을 실행하고 있어 curl로 실행하려고 하는데 아래와 같은 에러 메세지가 뜨네요. Invoke-WebRequest : 매개 변수 이름 'c'이(가) 모호하므로 매개 변수를 처리할 수 없습니다. 일치하는 항목은 다음과 같습니다. -Credential -CertificateThumbprint -Certificate -ContentType. 위치 줄:1 문자:45 + curl -X POST http://127.0.0.1:8000/set/ -i -c cookies.txt + ~~실행하면 위와 같은 에러메시지가 나오는데 어떻게 해결할 수 있나요? from fastapi import FastAPI,Request from fastapi.security import HTTPBasic from starlette.middleware.sessions import SessionMiddleware app=FastAPI() app.add_middleware(SessionMiddleware,secret_key="your-secret-key") @app.post("/set/") async def set_session(request:Request): request.session["username"]='smith' return {"message":"Session value"} @app.get("/get/") async def get_session(request:Request): username=request.session.get("username","Guest") return {"username":username}