안녕하세요. 몇가지 의문이 있어 질문 드립니다. 올바른 테스트 작성 규칙에서 내부 구현에 대한 테스트, 단순한 UI렌더링 관련 테스트는 하지 않는것이 좋다고 하셨는데, className prop이 css class에 적용되는지, placeholder설정, focus 시 border 스타일이 변경되는지 테스트하는건 단순히 UI와 관련된 테스트가 아닌가요? getByPlaceholder API는 만약 구현코드에서 placeholder 내용이 달라지면 테스트 코드도 모두 수정해야 하는데 종속성이 있다고 볼 수 있지 않나요? 아직 테스트가 익숙하지 않아 그런지 이런 부분이 많이 헷갈립니다ㅜㅜ
기초부터 배우는 Next YTMusic 클론 코딩 (with next.js 14, UI 마스터)
안녕하세요 . drawer.tsx에 있는 DrawerClose를 사용하면 useState를 통해 상태관리를 안해줘도 되지않나 싶어서 여쭤봅니다. Header쪽에 <DrawerClose> <Logo/> </DrawerClose> 이렇게 감싸주면 drawer가 열렸을때 x버튼을 누르면 똑같이 동작하더라고요. 혹시 useState를 사용하신 이유가 있을까요?
안녕하세요. 문제 풀다가 강의랑 백준 페이지에서는 입력할수 있는 k의 범위가 서로 달라서 궁금해서 여쭤봅니다.!! 백준 페이지에서는 입력할 수 있는 k의 범위가 6<k<13인데요 강의나 노션에서는 제약 조건이 6 <=k <= 13인데 혹시 시간복잡도를 구하기 위해서 일부러 범위를 이렇게 잡은 건지 혹시 다른 이유가 있는지 알려주실 수 있을까요?
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요. 강의 자료에는 따로 완성된 코드를 볼 수 있는 자료가 없던데 제공되지 않는건가요?
dfs 영상을 쭉 보고있는데요 ㅎ 문제들 마다 규칙이 거의 무조건적으로 visited 와 2차원 graph 가 생성이 되나요 ?? visited = [] graph = [[False] *MAX for _ in range(MAX)] 2. MAX 를 두시는 이유가 뭔가요 ??
문제) 의존성 설치 후 npm run dev를 기동하면 $ npm run dev > test-example-shopping-mall@0.0.0 dev > concurrently --kill-others 'npm run dev:server' 'npm run dev:ui' [0] ''npm'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α�, �Ǵ� [0] ��ġ ������ �ƴմϴ�. [1] 'run'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α�, �Ǵ� [1] ��ġ ������ �ƴմϴ�. [2] ���� �̸�, ���� �̸� �Ǵ� ���� ���̺� ������ �߸��Ǿ����ϴ�. [3] ''npm'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α�, �Ǵ� [3] ��ġ ������ �ƴմϴ�. [4] 'run'��(��) ���� �Ǵ� �ܺ� ����, ������ �� �ִ� ���α�, �Ǵ� [4] ��ġ ������ �ƴմϴ�. [4] run exited with code 1 --> Sending SIGTERM to other processes.. [3] 'npm exited with code 1 --> Sending SIGTERM to other processes.. --> Sending SIGTERM to other processes.. [1] run exited with code 1 --> Sending SIGTERM to other processes.. [0] 'npm exited with code 1 --> Sending SIGTERM to other processes.. [5] ���� �̸�, ���� �̸� �Ǵ� ���� ���̺� ������ �߸��Ǿ����ϴ�. [5] dev:ui' exited with code 1 이런 콘솔이 찍히며 테스트 서버가 실행되지 않습니다. 인코딩이 깨져서 뭐가 문젠지 추적을 못하겠어요ㅠㅠ node 버전은 강의와 동일하게 19.9.0으로 맞춰두었습니다. +) 인코딩이 깨지는 문제는 vscode터미널 말고 다른 커맨드창을 이용하니 해결 되었습니다. > test-example-shopping-mall@0.0.0 dev > concurrently --kill-others 'npm run dev:server' 'npm run dev:ui' [0] ''npm' is not recognized as an internal or external command, [0] operable program or batch file. [1] 'run' is not recognized as an internal or external command, [1] operable program or batch file. [2] The filename, directory name, or volume label syntax is incorrect. [3] ''npm' is not recognized as an internal or external command, [3] operable program or batch file. [4] 'run' is not recognized as an internal or external command, [4] operable program or batch file. [4] run exited with code 1 --> Sending SIGTERM to other processes.. [3] 'npm exited with code 1 --> Sending SIGTERM to other processes.. [2] dev:server' exited with code 1 --> Sending SIGTERM to other processes.. [1] run exited with code 1 --> Sending SIGTERM to other processes.. [0] 'npm exited with code 1 --> Sending SIGTERM to other processes.. [5] The filename, directory name, or volume label syntax is incorrect. [5] dev:ui' exited with code 1 그런데 여전히 실행이 안됩니다ㅜㅜ npm을 못찾는거 같은데 환경변수에 따로 등록을 해야하나요? npm -v하면 버전은 잘 나오는데 원인을 모르겠습니다... 현재 환경변수와 버전정보 추가합니다. +) package.json스크립트에서 작은 따옴표를 큰 따옴표로 수정해서 최종적으로 해결되었습니다... 허무하네용ㅋㅋㅋ ㅠ
네이버쇼핑크롤링을 연습도중 상품썸네일 링크를 가져와보고싶어서 연습을해봤는데 아래링크처럼했을때 첫번째 상품의 이미지링크만 가져오게되고 나머지 이미지썸네일 링크는 여러가지 다른선택자를 이용해서 시도를 해봤지만 이와같이 한개의 이미지썸네일 링크만 가져와져서 이럴때 어떻게 해야될지 궁금합니다! from selenium import webdriver import time from bs4 import BeautifulSoup import re from urllib.parse import urlparse, urlunparse driver = webdriver.Chrome() driver.get('https://search.shopping.naver.com/search/all?adQuery=%EB%8B%AD%ED%84%B8%EB%BD%91%EB%8A%94%EA%B8%B0%EA%B3%84&origQuery=%EB%8B%AD%ED%84%B8%EB%BD%91%EB%8A%94%EA%B8%B0%EA%B3%84&pagingIndex=1&pagingSize=40&productSet=overseas&query=%EB%8B%AD%ED%84%B8%EB%BD%91%EB%8A%94%EA%B8%B0%EA%B3%84&sort=review&sps=N×tamp=&viewType=list') last_height = driver.execute_script("return document.body.scrollheight") while True: #스크롤끝까지 내리기 driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") time.sleep(2) new_height = driver.execute_script("return document.body.scrollHeight") if new_height == last_height: break last_height = new_height html = driver.page_source soup = BeautifulSoup(html, 'html.parser') items = soup.select(".product_item__MDtDF") for item in items: # 이미지 URL 찾기 img = item.select_one(".product_img_area__cUrko img") print(img)
html기초 강의에서 만들어진 웹페이지를 제 컴터에서 크롬키고 주소 복붙하면 들어가지는데 핸드폰(아이폰) 크롬앱으로 주소 복붙하면 안들어가지네요 다른 컴터에서도 url만으로 들어가지는 웹을 만들고싶은데..음 웹 강의를 따로 들어야할까요? 아니면 여기서 간단히 무엇만 추가하면 될까요
안녕하세요, 수업을 들으면서 간혹 타자를 잘못 치게 되는 경우가 있는데 이럴때 입력 창에서 어떻게 뒤로 가기를 하거나 빠져나갈 수 있는 방법이 있을까요? 예를들어 제가 exit을 입력해야 하는데 잘못하여 'by'로 잘못 입력 후 엔터를 치니 화살표가 뜨면서 계속 해당 칸에서만 입력이 가능합니다. 이런 경우 어떻게 원래 입력위치로 돌아가서 'exit'으로 입력을 할 수 있을까요? 현재로서는 방법을 알지 못하여 창을 아예 껐다가 모든 명령어를 다시 입력 후 재진행하고 있으나 혹시 이와 같은 상황에서 명령어로 수정이 가능할 지 궁금하여 문의드립니다. 감사합니다.
Aborting installation. Unexpected error. Please report it as a bug: Error: EACCES: permission denied, open '/Users/jeonginn/Library/Preferences/create-next-app-nodejs/config.json.tmp-982595282012e022' at openSync (node:fs:581:18) at attempt (/Users/jeonginn/.npm/_npx/efeac22998af9bf2/node_modules/create-next-app/dist/index.js:8:43165) at Object.writeFileSync (/Users/jeonginn/.npm/_npx/efeac22998af9bf2/node_modules/create-next-app/dist/index.js:8:38664) at Conf._write (/Users/jeonginn/.npm/_npx/efeac22998af9bf2/node_modules/create-next-app/dist/index.js:8:74912) at set store [as store] (/Users/jeonginn/.npm/_npx/efeac22998af9bf2/node_modules/create-next-app/dist/index.js:8:73358) at Conf.set (/Users/jeonginn/.npm/_npx/efeac22998af9bf2/node_modules/create-next-app/dist/index.js:8:71962) at run (/Users/jeonginn/.npm/_npx/efeac22998af9bf2/node_modules/create-next-app/dist/index.js:74:51291) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { errno: -13, code: 'EACCES', syscall: 'open', path: '/Users/jeonginn/Library/Preferences/create-next-app-nodejs/config.json.tmp-982595282012e022' } 설치할 때 터미널에서 이런 메세지가 나오네요 ㅠㅠ 권한 문제인거 같아서 구글링 계속 해보면서 해봤는데 안되서 글 남깁니다 ㅠㅠ