묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결모던 안드로이드 - Jetpack Compose 입문
AAR metadata 관련오류발생
class MainViewModel : ViewModel() { val data = mutableStateOf("Hello") } class MainActivity : ComponentActivity() { private val viewModel by viewModels<MainViewModel>() override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { Column( modifier = Modifier.fillMaxSize(), verticalArrangement = Arrangement.Center, horizontalAlignment = Alignment.CenterHorizontally ) { Text( viewModel.data.value, fontSize = 30.sp ) Button(onClick = { viewModel.data.value = "World" }) { Text("변경") } } } } }강사님 늘 건강하시고 부자되세요 위 코드를 실행하니 아래오류가 발생하네요 3 issues were found when checking AAR metadata:
-
해결됨예제로 뿌수는 코틀린 Kotlin 76제
코틀린은 왜 final이 기본으로 선택한건가요?
타입을 추론하면 final이 기본으로 붙고상속도 기본으로 final이 붙어서 안되고오버라이딩도 final이 기본으로 붙어서 설정을 해줘야합니다.열려있는 자바와는 다르게 코틀린은 기본적으로 닫혀있다는걸 느꼈습니다.이렇게 코틀린이 오버라이딩과 상속, 재할당금지를 선택하게하는 이유가 뭔지 궁금합니다
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
h2 데이터베이스 설정 질문
여기에 질문 내용을 남겨주세요.1:09 에서 bin에서 ./h2.sh 했는데 denied 당했습니다.. 이거 어떻게 해결해야 할까요??
-
미해결
firebase로 authentication과 firebase database 를 쓰고 google map을 쓰고 있는데 처음 회원가입 하면 아래 에러가 납니다
throw platformexception(code: errorcode, message: errormessage as string?, details: errordetails, stacktrace: errorstacktrace);
-
미해결실리콘밸리 엔지니어가 가르치는 파이썬 장고 웹프로그래밍
docker와 Django의 설치 환경에 대해
파이썬 과목을 수강하고 Django를 window 환경에서 배우려고 신청했습니다. window에서 설치 환경에 대한 설명이 따로 없어서 그런데 Django나 docker를 설치할때 따로 해줘야 할 작업이 있나요?
-
미해결[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
상위/하위 redirect 후 반응
안녕하세요 선생님.다름이 아니라 강의를 듣다가 강의 마지막쯤에GoRoute의 상위에서 redirect를 작성할 때와, routes안에 GoRoute(이하 하위)에서 redirect 할 때의 차이점을 설명해주셨는데요.그래도 눈으로 확인하고 싶어서 print()를 통해 디버깅하고자 아래와 같은 코드로 작성한 상태입니다.코드 -> 질문 순서로 하겠습니다.// 불필요한 코드는 임의로 삭제하겠습니다. import ... bool authState = false; final router = GoRouter( redirect: (context, state) { print(state.location); print('상위 redirect'); ... }, routes: [ ... GoRoute( path: 'login2', builder: (_, state) => LoginScreen(), routes: [ GoRoute( path: 'private', builder: (_, state) => PrivateScreen(), redirect: (context, state) { print(state.location); print('하위 redirect'); if(!authState) { return '/login2'; } return null; }, ), ], ) ], ), ], );작성한 코드는 이러합니다.상위에서 print문을 2번 사용해서 현재 위치와 상위redirect임을 밝힙니다.하위에서 마찬가지로 print문을 2번 사용해서 현재 위치와 하위redirect임을 밝힙니다. 여기서부터 궁금한게 여러가지 생겼습니다. login에 실패하여 /private으로 가지 못하는 상황입니다. 제가 생각했던 출력문은상위에서는I/flutter (20444): /login/private I/flutter (20444): 상위 redirect 이렇게 출력될 것이다 생각했는데 아래와 같이 나왔습니다.I/flutter (20444): /login/private I/flutter (20444): 상위 redirect I/flutter (20444): /login I/flutter (20444): 상위 redirectQ1. 이렇게 나오는 이유가 authState값을 모르는 채로 /private에 진입부터 했다가 (=출력문 1번), false값인걸 확인하고 /login으로 다시 돌아와서 출력문 3번이 나온것이 맞는지 궁금합니다.또한 하위 redirect에서 질문이 있습니다.먼저한 질문(Q1)이 맞다면 , 예상했던 출력값이 있습니다.예상출력값)I/flutter (20444): /login2/private I/flutter (20444): 하위 redirect I/flutter (20444): /login2 I/flutter (20444): 하위 redirect 그러나 실제로 출력결과는 아래와 같았습니다. I/flutter (20444): /login2/private I/flutter (20444): 상위 redirect I/flutter (20444): /login2/private I/flutter (20444): 하위 redirect I/flutter (20444): /login2 I/flutter (20444): 상위 redirect 상위는 /private에 갔다가 /login으로 돌아오는게 출력된 반면, 하위는 /private에 갔다가 돌아오는 출력문이 찍히지를 않았습니다. Q2. 그렇다면 왜 이렇게 출력되는지 플로우나 실행흐름 같은게 궁금합니다. 또한 상위와 하위 redirect가 무조건적으로 동시에 실행하게 된다면, 상위의 redirect는 하위의 redirect로 덮어쓰여져서 하위만을 실행하거나 하위 우선적인 로직이 수행하는지 궁금합니다. 감사합니다 X)
-
미해결HTML+CSS+JS 포트폴리오 실전 퍼블리싱(시즌1)
선생님 궁금합니다
■ 질문 남기실 때 꼭! 참고해주세요.- 먼저 유사한 질문이 있었는지 검색해주세요.- 궁금한 부분이 있으시면 해당 강의의 타임라인 부분을 표시해주시면 좋습니다.- HTML, CSS, JQUERY 코드 소스를 텍스트 형태로 첨부해주시고 스크린샷도 첨부해주세요.- 다운로드가 필요한 파일은 해당 강의의 마지막 섹션에 모두 있습니다. input type=radio 는 어차피 화면에 안보이게 할껀데왜 작성하나요? 화면에 보이는건 label만 인 것 같은데 궁금합니다!
-
미해결모의해킹 실무자가 알려주는, XSS 공격 기법
board 오류
board 화면안에 아무것도 뜨질 않습니다 ㅠcommon.php 안에 비밀번호도 DB에 설정한 걸로 맞췄고 다른 수강생들이 문의했던 내용 확인해서 선생님이 하라고 한 설정 또한 다 맞춰보고 몇번씩 지우고 새로 설치하고도 해봤는데 증상이 바뀌질 않네요 ㅠㅠ 다른 추가 해결방안 있으면 답변 부탁드립니다. ps. 다른 질문 게시판 전부 확인해서 그쪽에 있는 내용 말고 다른 방안 있으면 부탁드릴게요!
-
해결됨독하게 시작하는 C 프로그래밍
unsigned int에 음수값을 넣어서 사용해도 되는건가요?
일반 코드로 작성할 때에도 오류가 없고 런타임에서도 입력을 음수로 넣거나 해도 그대로 음수로 출력 잘 되는데 이렇게 사용해도 되는건가요 아니면 음수도 지원하는 이유가 있는건가요?
-
미해결
머신러닝 로지스틱 회귀모델 랜덤서치 param_distribs 에러
안녕하세요!머신러닝 학습 중 랜덤서치의 코드를 실행했을 때 에러가 발생하여 질문 드립니다.학습 자료의 코드를 그대로 복사해서 실행해도 같은 에러가 발생하는데 어떤 이유인지 궁금하고 해결방안까지 알려주시면 감사하겠습니다🙏🏻 from scipy.stats import randint param_distribs={'C': randint(low=0.001, high=100)} from sklearn.model_selection import RandomizedSearchCV random_search=RandomizedSearchCV(LogisticRegression(), param_distributions=param_distribs, n_iter=100, cv=5)random_search.fit(X_scaled_train, y_train)--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[24], line 1 ----> 1 random_search.fit(X_scaled_train, y_train) File ~/anaconda3/lib/python3.11/site-packages/sklearn/base.py:1151, in _fit_context.<locals>.decorator.<locals>.wrapper(estimator, *args, **kwargs) 1144 estimator._validate_params() 1146 with config_context( 1147 skip_parameter_validation=( 1148 prefer_skip_nested_validation or global_skip_validation 1149 ) 1150 ): -> 1151 return fit_method(estimator, *args, **kwargs) File ~/anaconda3/lib/python3.11/site-packages/sklearn/model_selection/_search.py:898, in BaseSearchCV.fit(self, X, y, groups, **fit_params) 892 results = self._format_results( 893 all_candidate_params, n_splits, all_out, all_more_results 894 ) 896 return results --> 898 self._run_search(evaluate_candidates) 900 # multimetric is determined here because in the case of a callable 901 # self.scoring the return type is only known after calling 902 first_test_score = all_out[0]["test_scores"] File ~/anaconda3/lib/python3.11/site-packages/sklearn/model_selection/_search.py:1806, in RandomizedSearchCV._run_search(self, evaluate_candidates) 1804 def _run_search(self, evaluate_candidates): 1805 """Search n_iter candidates from param_distributions""" -> 1806 evaluate_candidates( 1807 ParameterSampler( 1808 self.param_distributions, self.n_iter, random_state=self.random_state 1809 ) 1810 ) File ~/anaconda3/lib/python3.11/site-packages/sklearn/model_selection/_search.py:834, in BaseSearchCV.fit.<locals>.evaluate_candidates(candidate_params, cv, more_results) 832 def evaluate_candidates(candidate_params, cv=None, more_results=None): 833 cv = cv or cv_orig --> 834 candidate_params = list(candidate_params) 835 n_candidates = len(candidate_params) 837 if self.verbose > 0: File ~/anaconda3/lib/python3.11/site-packages/sklearn/model_selection/_search.py:325, in ParameterSampler.__iter__(self) 323 for k, v in items: 324 if hasattr(v, "rvs"): --> 325 params[k] = v.rvs(random_state=rng) 326 else: 327 params[k] = v[rng.randint(len(v))] File ~/anaconda3/lib/python3.11/site-packages/scipy/stats/_distn_infrastructure.py:468, in rv_frozen.rvs(self, size, random_state) 466 kwds = self.kwds.copy() 467 kwds.update({'size': size, 'random_state': random_state}) --> 468 return self.dist.rvs(*self.args, **kwds) File ~/anaconda3/lib/python3.11/site-packages/scipy/stats/_distn_infrastructure.py:3357, in rv_discrete.rvs(self, *args, **kwargs) 3328 """Random variates of given type. 3329 3330 Parameters (...) 3354 3355 """ 3356 kwargs['discrete'] = True -> 3357 return super().rvs(*args, **kwargs) File ~/anaconda3/lib/python3.11/site-packages/scipy/stats/_distn_infrastructure.py:1036, in rv_generic.rvs(self, *args, **kwds) 1030 if not np.all(cond): 1031 message = ("Domain error in arguments. The `scale` parameter must " 1032 "be positive for all distributions, and many " 1033 "distributions have restrictions on shape parameters. " 1034 f"Please see the `scipy.stats.{self.name}` " 1035 "documentation for details.") -> 1036 raise ValueError(message) 1038 if np.all(scale == 0): 1039 return loc*ones(size, 'd') ValueError: Domain error in arguments. The `scale` parameter must be positive for all distributions, and many distributions have restrictions on shape parameters. Please see the `scipy.stats.randint` documentation for details.
-
미해결홍정모의 따라하며 배우는 C언어
d
14:18 질문입니다% 자체를 출력하기 위해 %% 이렇게 써야 된다는건 알겠는데요 왜 뒤에다가 d를 써야 되는지 궁금합니다
-
미해결홍정모의 따라하며 배우는 C언어
-1
4.7 printf() 함수의 변환 지정자들9:52 질문입니다 오버플로우가 발생해서 -1이 출력된다고 하셨는데요 왜 -1인지 궁금합니다
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
cannot find declaration to go to 오류
강의 내용 중 hello를 눌렀을때(단축키 사용 ctrl+b) cannot find declaration to go to 오류가 발생하더라고요. 구글이나 인프런 답변 내용들을 찾아서 제시해주신 해결 책으로 했을 때 해결이 안되어서 문의를 드립니다.src -> Mark Directory as -> Sources Root(해결x)file -> invalidate Caches -> Restart(해결x)혹시 무료버전을 사용하고 있어서 해결이 안되는걸까요??
-
해결됨Airflow 마스터 클래스
Task 실행관련 질문입니다.
안녕하세요! 'Bash Operator & 외부 쉘파일 수행하기' 강의를 듣고 실습하던 중 에러가 생겨서, 해결을 시도했는데 계속해서 실패해서 질문을 남겨봅니다!airflow를 실행하고 태스크를 수행하면 fail이 뜨는데, 로그를 확인하면 파일을 찾을 수 없다고 합니다. [2023-10-12, 14:12:25 KST] {subprocess.py:93} INFO - /bin/bash: line 1: /opt/***_log/plugins/shell/select_fruit.sh: No such file or directory [2023-10-12, 14:12:25 KST] {subprocess.py:97} INFO - Command exited with return code 127 [2023-10-12, 14:12:25 KST] {taskinstance.py:1935} ERROR - Task failed with exception Traceback (most recent call last): File "/home/airflow/.local/lib/python3.8/site-packages/airflow/operators/bash.py", line 210, in execute raise AirflowException( airflow.exceptions.AirflowException: Bash command failed. The command returned a non-zero exit code 127. 저는 wsl에 디렉토리는 아래 경로처럼 설정했습니다.(select_fruit.sh파일에 실행 권한도 주었습니다.)/airflow_log/plugins/shell/select_fruit.sh 이후 docker-compose.yaml에 volumes 항목을 아래와 같이 설정을 했습니다. ${AIRFLOW_PROJ_DIR:-.}/airflow_log/plugins:/opt/airflow/plugins Vscdoe에서 경로는 아래와 같이 설정을 했습니다.t1_orange = BashOperator( task_id="t1_orange", bash_command="/opt/airflow_log/plugins/shell/select_fruit.sh ORANGE", ) t2_banana = BashOperator( task_id="t2_banana", bash_command="/opt/airflow_log/plugins/shell/select_fruit.sh BANANA", )경로 문제인지, 아니면 다른 문제인지.. 도움 요청해봅니다.저에게 너무 필요한 강의라서 잘 듣고 있습니다! 앞으로도 좋은 강의 부탁드리겠습니다!
-
미해결실습으로 끝장내는 웹 크롤링과 웹 페이지 자동화 & 실전 활용
service 관련코드를 지우면 실행이 안되요
저는 selenium 4.14 버전 사용중인데 service 관련 내용들을 지우면 실행이 되지 않는데 뭐가 문제일까요? 아래 오류가 뜹니다. driver = webdriver.Chrome() ^^^^^^^^^^^^^^^^^^ File "c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__ super().__init__( File "c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages\selenium\webdriver\chromium\webdriver.py", line 51, in __init__ self.service.path = DriverFinder.get_path(self.service, options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\users\user\appdata\local\packages\pythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0\localcache\local-packages\python311\site-packages\selenium\webdriver\common\driver_finder.py", line 41, in get_path raise NoSuchDriverException(msg) from errselenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for chrome using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
No Persistence provider for EntityManager named hello ? 오류
실행하면 저렇게 오류가 발생해요 ㅠㅠ <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"> <persistence-unit name="hello"> <properties> <!-- 필수 속성 --> <property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/> <property name="javax.persistence.jdbc.user" value="sa"/> <property name="javax.persistence.jdbc.password" value=""/> <property name="javax.persistence.jdbc.url" value="jdbc:h2:tcp://localhost/~/test"/> <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/> <!-- 옵션 --> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql" value="true"/> <property name="hibernate.use_sql_comments" value="true"/> <!--<property name="hibernate.hbm2ddl.auto" value="create" />--> </properties> </persistence-unit> </persistence>이건 persistence.xml 이고 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>jpa-basic</groupId> <artifactId>ex1-hello-jpa</artifactId> <version>1.0-SNAPSHOT</version> <properties> <maven.compiler.source>11</maven.compiler.source> <maven.compiler.target>11</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <!-- JPA 하이버네이트 --> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>5.6.15.Final</version> </dependency> <!-- h2 데이터베이스 --> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>1.4.200</version> </dependency> <!-- Java 9 이상을 지원하는 JAXB API 라이브러리 --> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.3.1</version> </dependency> </dependencies> </project>이건 pom.xml 입니다 뭐가 틀린건가요? ㅠㅠ...
-
미해결파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)
section 7 단지번호 붙이기
안녕하세요 강사님.질문이 있어 글 남깁니다.DFS로 문제를 풀이하는 과정에서 DFS의 종료 조건이 없어 단지 하나를 다 탐색하고 DFS내의 For 문이 한 번 더 그냥 도는 거로 보이는데 이렇게 For Loop가 한 번 더 의미 없이 안돌게 하려면 어떻게 해야 할까요??
-
해결됨홍정모의 따라하며 배우는 C언어
포인터로 초기화한 문자열이 저장돼있는 공간
안녕하세요. 궁금한 것이 있어 질문드립니다.#include <stdio.h> int main() { const char* str1 = "Hello, World"; return 0; }(1)포인터 변수 str1이 가리키는 문자열 'Hello, World'는 Data Segment에 저장되어 있나요 아니면 TEXT Segment에 저장되어 있나요?(2)만약 Data Segment에 저장되어 있다면, 그 영역 중 Read Only DATA Segment 영역에 저장되어 있는 건가요?(3)ROD Segment는 읽기 전용이기 때문에 str1를 indirection 하여 문자열로 접근해 값을 바꿀 수 없는 것인가요? 늘 친절한 답변 감사합니다.
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
전역상태관리에 추가적으로 특정페이지별로 상태관리가 필요할때에 대해 질문드립니다
안녕하세요 선생님,전역상태관리에 추가적으로 특정페이지별로 상태관리가 필요할때에 대해 질문드립니다, 아토믹패턴을 구현할려다보니 props drilling이 너무 많이 일어나서 recoil로 상태관리를 시도했는데 전역에 필요한 상태들말고 특정페이지에서만 쓰이는 상태들까지 포함이 되니 파일이 너무 지저분해져서요, 특정페이지 상태관리는 context api, 전역은 recoil, 이런 조합으로 써도 될까요?아니면 다른 더 좋은 방법이 있을까요? 감사합니다
-
미해결Flutter 초입문 왕초보편
13강 예제파일 오류
main.dart 내 기본 코드가 선생님의 화면과 다릅니다. 삭제한 주석 내용도 그렇구요. 다른 이유가 있을까요? 그래서 그런지 오류가 발생합니다.