본문 바로가기

documentation32

Flutter 플러터는 왜 국제화 파일을 생성하지 않는 걸까요?, Why is Flutter not generating the internationalization files? 질문 다음은 https://flutter.dev/docs/development/accessibility-and-localization/internationalization#dart-tools와 https://docs.google.com/document/d/10e0saTfAv32OZLRmONy866vnaw0I2jwL8zukykpgWBc/edit#heading=h.upcu5w85cvc2에 나와 있는 국제화 문서를 따라보려고 하는데, 어떤 파일도 생성되지 않습니다. 기본적으로 pub spec.yaml 파일에 다음 수정 사항을 적용하라고 합니다: dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter intl: ^0.17.0-nullsaf.. 2024. 1. 3.
Python PIL을 사용하여 사진 크기를 어떻게 얻을 수 있나요?, How do I get the picture size with PIL? 질문 이미지의 크기를 PIL이나 다른 Python 라이브러리를 사용하여 어떻게 얻을 수 있나요? 답변 from PIL import Image im = Image.open('whatever.png') width, height = im.size 문서에 따르면. 2023. 12. 5.
Python 왜 datetime.datetime.utcnow()은 시간대 정보를 포함하지 않을까요?, Why does datetime.datetime.utcnow() not contain timezone information? 질문 datetime.datetime.utcnow() 왜 이 datetime은 명시적으로 UTC datetime임에도 불구하고 시간대 정보가 없는 걸까요? 이게 tzinfo를 포함하고 있을 것으로 예상했는데요. 답변 Python 3.2 이후로는 datetime 모듈에 datetime.timezone이 포함되어 있습니다. datetime.utcnow()의 문서에는 다음과 같이 나와 있습니다: 인식 가능한 현재 UTC 날짜 및 시간은 datetime.now(timezone.utc)를 호출하여 얻을 수 있습니다. 따라서, datetime.utcnow()은 tzinfo를 설정하지 않으며 UTC임을 나타내지 않지만, datetime.now(datetime.timezone.utc)는 tzinfo가 설정된 UTC 시.. 2023. 11. 24.
Python 시본(seaborn) 축 또는 그림 수준 플롯의 그림 크기를 변경하는 방법, How to change the figure size of a seaborn axes or figure level plot 질문 어떻게 이미지 크기를 변경하여 인쇄에 적합하게 할 수 있을까요? 예를 들어, 가로 방향으로 11.7 인치, 세로 방향으로 8.27 인치인 A4 용지를 사용하고 싶습니다. 답변 다음과 같이 seaborn의 set 메서드에서 rc 매개변수에 대한 키 'figure.figsize'와 함께 사전을 전달하여 그림 크기를 설정할 수도 있습니다: import seaborn as sns sns.set(rc={'figure.figsize':(11.7,8.27)}) 또 다른 대안은 다음과 같이 rcParams의 figure.figsize를 사용하여 그림 크기를 설정하는 것입니다: from matplotlib import rcParams # 인치로 된 그림 크기 rcParams['figure.figsize'] = 11.. 2023. 10. 26.