묻고 답해요
160만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결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 내 기본 코드가 선생님의 화면과 다릅니다. 삭제한 주석 내용도 그렇구요. 다른 이유가 있을까요? 그래서 그런지 오류가 발생합니다.
-
미해결설계독학맛비's 실전 Verilog HDL Season 1 (Clock부터 Internal Memory까지)
모듈 io 전송시간
강의 잘 보고 있습니다. 감사합니다!!module 에서 input output bit width 값에 따른 전송시간에 대해 궁금합니다. 예를 들어서 input에 7bit의 bit width를 가진 전기적 신호를 0101010 이런식으로 보낸다면 최소 전압을 6번 바꾸면서 보내야하는데 이러면 1bit 보다 시간이 걸린다고 생각이 드는데요. DFF이 clock을 사용하는 이유가 시간을 동기화 시켜서 제어하기 편하게 하는 것이라 저는 이해했습니다. 그렇다면 input 과정에서도 dff의 클럭처럼 시간을 정해 놓고 보내는 건지 아니면 시간을 두고 연속적으로 보내는 것인지 궁금합니다.32bit나 1bit든 bit width에 상관없이 속도에 차이를 무시할 정도로 clock이 더 길어서 상관이 없는지 궁금합니다.=================현업자인지라 업무때문에 답변이 늦을 수 있습니다. (길어도 만 3일 안에는 꼭 답변드리려고 노력중입니다 ㅠㅠ)강의에서 다룬 내용들의 질문들을 부탁드립니다!! (설치과정, 강의내용을 듣고 이해가 안되었던 부분들, 강의의 오류 등등)이런 질문은 부담스러워요.. (답변거부해도 양해 부탁드려요)개인 과제, 강의에서 다루지 않은 내용들의 궁금증 해소, 영상과 다른 접근방법 후 디버깅 요청, 고민 상담 등..글쓰기 에티튜드를 지켜주세요 (저 포함, 다른 수강생 분들이 함께보는 공간입니다.)서로 예의를 지키며 존중하는 문화를 만들어가요.질문글을 보고 내용을 이해할 수 있도록 남겨주시면 답변에 큰 도움이 될 것 같아요. (상세히 작성하면 더 좋아요! )먼저 유사한 질문이 있었는지 검색해보세요.잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.==================
-
미해결R로 하는 텍스트마이닝 (Top keyword부터 감성분석까지)
top Keword 추출 강의 질문
Top Keword 추출 강의에서 수업자료에 commnts와 score 파일이 없는데 어디서 받을 수 있을까요?
-
미해결Java/Spring 테스트를 추가하고 싶은 개발자들의 오답노트
FakeRepository 만들 때 Join 테이블하는 경우 질문드립니다.
서비스 테스트 시 Repository 상속해서 FakeRepository를 생성자 주입을 통해 진행한다는 내용에 대해서는 이해하고 실습해 보았습니다.그런데 만약 Repository 메서드 중 JPA의 on 절을 이용한 join을 사용해 데이터를 가져오는 경우 FakeRepository의 내부 구현이 궁금합니다내부에 Id와 List를 통해 해당 엔티티에 대한 정보를 저장할 수 있지만, Join을 하는 경우 외부 테이블의 정보가 필요하기 때문에 이를 Fake하고 싶을 때는 어떻게 해결할 수 있는지 알려주시면 감사하겠습니다.
-
해결됨[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
싸이월드 만들기 똑같이 했는데 예제랑 다릅니다 ㅠㅠ
코드는 이렇게 작성했는데아래 있는 wrapper__left__body 가 너무 작게 나오는데 이유가 뭘까요?
-
미해결카프카 완벽 가이드 - 커넥트(Connect) 편
cdc 동기화 테스트 환경 초기화
안녕하세요열심히 수강중인 수강생입니다.mysql과 postgresql을 동기화하는 cdc를 테스트중인데무언가 꼬였나봅니다.초기화하는 방법이 궁금합니다.강의의 어느 부분을 참고하면 되는지 답변 부탁드립니다감사합니다.
-
미해결[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)
뉴스기사크롤링시 날짜 범위 지정하는 방법 알려주세요
안녕하세요 선생님파이썬 자체를 처음 깔아봤는데 선생님 덕분에 여기까지 왔습니다...감사드려요ㅠㅠㅠㅠ 뉴스기사들을 엑셀화 하는 거 까지는 따라갔는데기간의 범위를 정하고 싶어요 머리가 안 돌아가네요ex) 3분기 기사만 가져오고 싶다 / 8월달 기사만 가져오고 싶다어느 부분을 어떻게 바꿔주면 되는지 코드 부탁드립니다+네이버 기사 가져올때 400페이지까지 밖에 못 가져오던데 혹시 다른 방법은 없을까요?#네이버기사 크롤링 엑셀저장 import requests from bs4 import BeautifulSoup import time import pyautogui from openpyxl import Workbook #사용자입력 keyword = pyautogui.prompt("검색어를 입력하세요") lastpage = int(pyautogui.prompt("몇 페이지까지 크롤링 할까요?")) #엑셀생성하기 wb = Workbook() #엑셀 시트 생성하기 ws = wb.create_sheet(keyword) #열 너비 조절 ws.column_dimensions['A'].width = 60 ws.column_dimensions['B'].width = 60 ws.column_dimensions['C'].width = 120 ws.column_dimensions['D'].width = 60 #행 번호 row = 1 #페이지 번호 pageNum = 1 for i in range(1, lastpage*10, 10) : print(f"{pageNum}페이지 크롤링중입니다 =================") response = requests.get(f"https://search.naver.com/search.naver?sm=tab_hty.top&where=news&query={keyword}&start={i}") html = response.text soup = BeautifulSoup(html, 'html.parser') articles = soup.select("div.info_group") #뉴스기사 div 10개 추출 for article in articles: links = article.select("a.info") #리스트 if len(links) >= 2: #링크가 2개 이상이면 url = links[1].attrs['href'] #두번째 링크의 href를 추출 response = requests.get(url, headers={'User-agent': 'Mozila/5.0'}) html = response.text soup_sub = BeautifulSoup(html, 'html.parser') #만약 연예 뉴스라면 if "entertain" in response.url: title = soup_sub.select_one(".end_tit") content = soup_sub.select_one("#articeBody") date = soup_sub.select_one("div.article_info > span > em") #만약 스포츠 뉴스라면 elif "sports" in response.url: title = soup_sub.select_one("h4.title") content = soup_sub.select_one("#newsEndContents") #본문 내용안에 불필요한 div, p제거 divs = content.select("div") for div in divs: div.decompose() paragraphs = content.select("p") for p in paragraphs: p.decompose() else: title = soup_sub.select_one(".media_end_head_headline") content = soup_sub.select_one("#newsct_article") date = soup_sub.select_one("span.media_end_head_info_datestamp_time._ARTICLE_DATE_TIME") print("=======링크======= \n", url) print("=======제목======= \n", title.text.strip()) print("=======본문======= \n", content.text.strip()) print("=======날짜======= \n", date) ws['A1'] = 'URL' ws['B1'] = '기사제목' ws['C1'] = '기사본문' ws['D1'] = '업로드날짜' ws[f'A{row}'] = url ws[f'B{row}'] = title.text.strip() ws[f'C{row}'] = content.text.strip() ws[f'D{row}'] = date.text.strip() row=row+1 pageNum = pageNum+1 wb.save(f'{keyword}_result.date.xlsx')