안녕하세요. 제가 예제 볼 때 온라인 컴파일러 사이트로 직접 작성해보면서 공부를 하는 중인데요 파이썬 if문 lst 예제를 그대로 사이트에 입력하면 ========================= lst = [1, 2, 3] if lst: print("리스트는 비어있지 않습니다.") else: print("비어있지 않습니다.") ===================== else가 예제처럼 if와 같은 열에 있지 않게 되고, 에러가 뜨더라구요. 저기서 else문 지우면 "리스트는 비어있지 않습니다." 정상으로 출력 되구요. 혹시 문법은 문제 없는데 파이썬이 버전마다 다른지 궁금합니다 https://www.tutorialspoint.com/online-programming-compilers.htm 사이트는 여기 이용 중입니다!
안녕하세요 강사님 코드를 따라치면서 학습을 하고 있는데 <View style={styles.fixed}> 이 style 부분에 No overload matches this call. Overload 1 of 2, '(props: ViewProps): View', gave the following error. Type '{ position: string; bottom: number; width: string; borderTopWidth: number; borderTopColor: string; paddingTop: number; paddingHorizontal: number; }' is not assignable to type 'StyleProp<ViewStyle>'. Type '{ position: string; bottom: number; width: string; borderTopWidth: number; borderTopColor: string; paddingTop: number; paddingHorizontal: number; }' is not assignable to type 'ViewStyle'. Types of property 'position' are incompatible. Type 'string' is not assignable to type '"absolute" | "static" | "relative" | "fixed" | "sticky" | undefined'. Overload 2 of 2, '(props: ViewProps, context: any): View', gave the following error. Type '{ position: string; bottom: number; width: string; borderTopWidth: number; borderTopColor: string; paddingTop: number; paddingHorizontal: number; }' is not assignable to type 'StyleProp<ViewStyle>'. Type '{ position: string; bottom: number; width: string; borderTopWidth: number; borderTopColor: string; paddingTop: number; paddingHorizontal: number; }' is not assignable to type 'ViewStyle'. Types of property 'position' are incompatible. Type 'string' is not assignable to type '"absolute" | "static" | "relative" | "fixed" | "sticky" | undefined'.ts(2769) ViewPropTypes.d.ts(203, 3): The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<View> & Readonly<ViewProps>' ViewPropTypes.d.ts(203, 3): The expected type comes from property 'style' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<View> & Readonly<ViewProps>' ( property ) style ?: StyleProp < ViewStyle > View Problem (Alt+F8) 이런 에러가 뜨는데 제가 어느 부분에서 잘못했는지, 왜 이런 에러가 발생했는지 모르겠습니다.... 전체 코드는 아래와 같습니다. import CustomButton from '@/components/CustomButton'; import InputFiled from '@/components/InputFiled'; import { colors } from '@/constants'; import { StyleSheet, View } from 'react-native'; export default function LoginScreen() { return ( <> <View style={styles.container}> <InputFiled label="이메일" placeholder="이메일을 입력해주세요" ></InputFiled> <InputFiled label="비민번호" placeholder="비밀번호를 입력해주세요" ></InputFiled> </View> <View style={styles.fixed}> <CustomButton label="로그인하기"></CustomButton> </View> </> ); } const styles = { container: { flex: 1, margin: 16, gap: 16, }, fixed: { position: 'absolute', bottom: 0, width: '100%', borderTopWidth: StyleSheet.hairlineWidth, borderTopColor: colors.GRAY_300, paddingTop: 12, paddingHorizontal: 16, }, };
안녕하세요! Nest에서 Fast API로 컨버젼중입니다. Nest는 Many to Many, Many to One 등등 이러한 연관관계를 설정해서 테이블을 생성합니다. Fast API에서는 아래 코드처럼 단순히 join만 걸어두고 사용하면 되는 걸까요?? class User(Base): __tablename__ = "user" id = Column(Integer, primary_key=True, index=True) username = Column(String(256), nullable=False) password = Column(String(256), nullable=False) todos = relationship("ToDo", lazy="joined")
ReadComponent.js 파일을 만들고 ReadPage의 리턴 내용에 ReadComponent의 tno 값을 추가한 후에 npm start를 실행했는데 아래와 같은 에러가 발생했습니다. [eslint] src\components\menus\todo\ReadComponent.js Line 13:29: 'useState' is not defined no-undef Line 16:9: 'getOne' is not defined no-undef Search for the keywords to learn more about each error. ReadComponent.js의 useState와 getOne 로직 부분이 잘못 된 거 같아서 강의 영상을 다시 봤는데 틀린 부분이 없어 보여 어떤 게 문젠지 질문을 드리고 싶습니다. 참고용으로 ReadComponent.js의 내용을 추가해놓겠습니다. import React, { useEffect } from 'react'; const initState = { tno:0, title:'', writer:'', dueDate: '', complete: false } function ReadComponent({tno}) { const [todo, setTodo] = useState(initState) useEffect(() => { getOne(tno).then(data => { console.log(data) setTodo(data) }) }, [tno]); return ( <div> </div> ); } export default ReadComponent; 덧붙여서 툴은 vscode를 쓰고 있습니다. 잘 부탁드리겠습니다.
안녕하세요~! 소플님 덕분에 리액트 강의 잘보고 있습니다~! chapter_07 입장버튼을 10번 눌렀을때 콘솔로그가 밑에 처럼 찍히는건 이해가 되었는데 ====================== useEffect() is called. isFull: false Current count value: 10 밑에로그는 왜 다시 찍히는건가요?? ====================== useEffect() is called. isFull: true 9번까지는 위에로그가 안찍히는거 같은데 10번째에 로그가 찍히는 이유가 궁금합니다~!
안녕하세요 현재 리액트 강의 6.2) UI 구현하기를 수강 중 문제가 발생해서 질문 드립니다. App.css에서 스타일을 정의하고 적용을 하니 요소들이 오히려 우측으로 치우치고 화면을 축소 및 확대를 시켜도 중앙 정렬이 이루어지지 않습니다. 원인을 모르겠어서 질문 드립니다.
안녕하세요 강사님 airflow config를 변경하기 위해 시도해보았는데 이렇게 expose를 false->true로 변경하여도 airflow web에서는 변경되지 않아서 혹시 어디가 잘못 되었는지 문의드립니다 그리고 dag인식이 느린 것 같아 dag_dir_list 값을 100으로 변경하였는데 cpu만 괜찮다면 다른 변수들은 수정할 필요가 없을까요?
1. 현재 학습 진도 몇 챕터/몇 강을 수강 중이신가요? 3-8 해쉬-2 어떤 알고리즘을 학습하고 계신가요? 해쉬 여기까지 이해하신 내용은 무엇인가요? 전체 이해 완료 안녕하세요 선생님 궁금한 점이 있어요. HashTable의 경우에도 조회 성능이 최선일 경우 O(1)이고, set 자료구조에 포함되어 있는 지 여부조회도 O(1)로 이해를 했습니다! 해당 문제의 경우 set으로 변환하고 풀어도 시간복잡도 면에서 성능은 비슷하다고 봐도 될까요~? def get_absent_student(all_array, present_array): present_students_set = set(present_array) for student in all_array: if student not in present_students_set: return student
안녕하세요 선생님! 파이썬 설치 하고 확장기능 설치도 다 하고 하라고 알려주신대로 다 했는데 저는 저 함수에 대한 자동완성이 선생님처럼 안나오고 우측 처럼 나옵니다. (왼쪽 선생님 화면은 캡쳐가 막혀있는지 빈화면으로 뜨네요... 무튼 선생님 화면엔 print (value ~ ) 이런식으로 명확하게 함수에 대한 설명이 나오거든요 이거 어떻게 해결하나요?? 참고로 챗지피티한테 물어봐서 인터프리터 설정, 확장기능 활성화 여부, 인텔리센스 설정 확인, vs code 캐시 최화, json 파일 확인하고 수정까지 다 해본 상황입니다! 휴.... 크게 문제는 없지만 자동완성 되면 배우는데 도움 될 거 같아서.... 여쭤봅니다 ㅠ