로그인후 replace가 안되는 이유?
미해결
Next + React Query로 SNS 서비스 만들기
지금 로그인 후 핸들러에서 값을 잘 주는것을 확인했고 auth.ts의 콘솔 부분에 값이 잘 나오는것을 확인했습니다 여기서 result에서도 성공했다고 나오는데 replace가 안되네요 이유가 뭘까요
- react
- next.js
- react-query
- next-auth
- msw
172만명의 커뮤니티!! 함께 토론해봐요.
미해결
Next + React Query로 SNS 서비스 만들기
지금 로그인 후 핸들러에서 값을 잘 주는것을 확인했고 auth.ts의 콘솔 부분에 값이 잘 나오는것을 확인했습니다 여기서 result에서도 성공했다고 나오는데 replace가 안되네요 이유가 뭘까요
미해결
[자동화 완전 정복] 인스타그램 휴대폰, 웹 자동화 프로그램 개발
위디터에서 인스타그램 앱화면 스크린샷찍었을때요. 다른곳들은 정상적으로 네모칸들이 쳐져있는데요. 하단 홈이나 검색창등등이 분할이 안되어있고 1가지로 통째로 통합되어있습니다. 이것을 어떻게해야할까요? 추가로 방금 다시 실행해보는데.. Unsupported deviceId: Android:06157df6f3285a38 [Finished 0s] 어느정도됬었는데 이제 이게 발생합니다 빠른답변좀 부탁드려요..강의가 예전꺼라 뭐하나 해결하려하면 사소한것이나 바뀐부분에서 너무많은시간을 소요합니다 ㅜㅜ
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
수업자료에 있는거 다운로드해서 자료 생성했는데 loc2001 찍었을때 결과가 달라요 ㅠ
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 제출아이콘이 없어요
해결됨
2주만에 통과하는 알고리즘 코딩테스트 (2024년)
N=4 일 때 좌표 4개가 주어지고 1명, 2명, 3명, 4명 모였을 때의 경우의 수를 비교해야할 것 같은데 1명 모였을때 경우의 수, 2명 모였을 때 경우의 수, 3명 모였을 때 경우의 수, 4명 모였을 때 경우의 수를 어떻게 그 좌표 조합을 만들 수 있는지 고민입니다. 1명 모였을 때는 단일 반복문, 2명일 때 2중 반복문, 3명일 때 3중 반복문이 필요할 것 같은데... 이게 N개면 N개의 반복문을 만드는게 맞나 싶어서요.. ㅠ
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
기출 3회 작업형 2에서 피처엔지니어링 전 df.select _dtypes(exclude = "o").copy() .... 로 트레인 데이터와 테스트 데이터를 수치와 범주형으로 나눈 후 수치형 MinMaxScaler 범주형 원핫인코딩으로 각각 피처링을 하셨는데 이때 수치형을 보면 cols = ["A", "B"...]로 오브젝트형을 지정하셨더라구요. 피처엔지니어링때 cols =[ ] 를 별도 지정하더라도 위 데이터를 나누는 과정이 필수일까요?? 아래처럼 해도 되면 concat도 필요없을거 같아서요. 예) df.select _dtypes(exclude = "o").copy() << 이과정없이 from sklearn.preprocessing import MinMaxScaler scaler = MinMaxScaler() cols = ['Age', 'FamilyMembers'] train[cols] = scaler.fit _transform(train[cols]) test[cols] = scaler. transform(test[cols]) from sklearn.preprocessing import LabelEncoder cols = ['Nationality'] for col in cols: le = LabelEncoder() train[col] = le.fit _transform(train[col]) test[col] = le.transfrom(test[col])
미해결
[리뉴얼] 처음하는 파이썬 백엔드와 웹기술 입문 (파이썬 중급, flask[플라스크] 로 이해하는 백엔드 및 웹기술 기본) [풀스택 Part1-1]
터미널에서 conda activate가 되어 있는 경우에는 conda 설치 위치의 bin을 참조하게 되더라구요. 그래서 강의를 따라서 설치 후 서버를 실행하면 /USERS/{유저}/opt/ananconda3/~~ 를 계속 참조해서 오류가 발생합니다. 이런 경우엔 conda 가상환경을 꺼주시면 정상적으로 동작합니다. conda deactivate mysql.server start
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
강의를 보니 베이스라인의 경우 object칼럼을 날리고 수치형으로만 했음에도 정확도가 높은 결과가 나왔습니다그런데 실제 시험에서도 저렇게 임의로 칼럼을 날리면서 진행해도 큰 문제가 없을까요?
미해결
처음하는 파이썬 백엔드 FastAPI 입문 (FastAPI부터 비동기 SQLAlchemy까지) [풀스택 Part1-2]
안녕하세요 passlib dp 노랑 불이 들어왔는데, 어떻게 해결하나요? 구글링 해도 안나오네요 ㅠㅠ
해결됨
[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
안녕하세요! 강의 잘 듣고 있습니다! 이번 과제 코드 피드백 부탁드립니다! 고맙습니다. <화면> <html> <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>SignUp</title> <link rel="stylesheet" href="./final.css"> <script defer src="./final.js"></script> </head> <body> <div class="wrapper"> <div class="wrapper__header"> <span id="header__title">코드캠프 회원가입</span> </div> <div class="wrapper__body"> <div class="wrapper__text"> <input type="text" id="email" placeholder="이메일을 입력해 주세요."> <span class="errorMsg email">이메일이 올바르지 않습니다.</span> <input type="text" id="name" placeholder="이름을 입력해 주세요."> <span class="errorMsg name">이름이 올바르지 않습니다.</span> <input type="text" id="pw1" placeholder="비밀번호를 입력해 주세요."> <span class="errorMsg pw1">비밀번호를 입력해주세요.</span> <input type="text" id="pw2" placeholder="비밀번호를 다시 입력해 주세요."> <span class="errorMsg pw2">비밀번호를 입력해주세요.</span> </div> <div class="wrapper__phone" oninput="phone()"> <input type="text" id="num1" maxlength="3"> - <input type="text" id="num2" maxlength="4"> - <input type="text" id="num3" maxlength="4"> </div> <div class="wrapper__certification"> <div class="cert__number"> <span id="certNum">000000</span> <button class="chkBtn" disabled="true">인증번호 전송</button> </div> <div class="cert__time"> <span id="certTimer">3:00</span> <button class="chkBtn" disabled="true">인증완료</button> </div> </div> <div class="wrapper__select"> <div class="select__locale"> <select id="locale"> <option selected disabled>지역을 선택하세요</option> <option value="서울">서울</option> <option value="경기">경기</option> <option value="인천">인천</option> </select> <span class="errorMsg locale">지역을 선택해주세요.</span> </div> <div class="select__gender"> <label for="woman"> <input type="radio" name="gender" id="woman"> 여성 </label> <label for="man"> <input type="radio" name="gender" id="man"> 남성 </label> </div> <span class="errorMsg gender">성별을 선택해주세요.</span> </div> </div> <div class="divideLine"></div> <div class="wrapper__check"> <!-- <button class="submit" disabled="true">가입하기</button> --> <button class="submit">가입하기</button> </div> </div> </body> </html> <css> *{ box-sizing: border-box; margin: 0; } html, body{ width: 540px; } .chkBtn{ width: 120px; height: 40px; border: 1px solid #D2D2D2; border-radius: 7px; font-size: 16px; font-weight: 400; color: #0068FF; background-color: #FFF; cursor: pointer; } .chkBtn.active { width: 120px; height: 40px; border: 1px solid #D2D2D2; border-radius: 7px; font-size: 16px; font-weight: 400; background-color: #0068FF; color: #FFF; cursor: pointer; } .errorMsg{ width: 100%; color: red; font-size: 10px; display: flex; flex-direction: column; align-items: center; visibility: hidden; } .wrapper{ width: 100%; height: 100%; padding: 60px 80px; border: 1px solid #AACDFF; border-radius: 20px; box-shadow: 7px 7px 39px rgba(0, 104, 255, .25); } .wrapper__header{ width: 100%; font-size: 32px; font-weight: 700; color: #0068FF; padding-bottom: 60px; } .wrapper__body{ width: 100%; } .wrapper__text > input{ width: 100%; height: 60px; margin-top: 20px; font-size: 16px; font-weight: 400; border: 1px solid #D2D2D2; border-radius: 7px; padding: 18px; } .wrapper__phone{ width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 0; } .wrapper__phone > input{ width: 100px; height: 40px; border: 1px solid #D2D2D2; border-radius: 7px; } .wrapper__certification { width: 100%; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; } #certNum, #certTimer{ color: #0068FF; font-size: 18px; padding-right: 20px; } .cert__time{ padding: 20px 0; } .wrapper__select{ width: 100%; display: flex; flex-direction: column; align-items: center; } .select__locale{ width: 100%; display: flex; flex-direction: column; justify-content: center; } #locale{ width: 100%; height: 60px; border: 1px solid #D2D2D2; border-radius: 7px; color: #797979; font-size: 16px; font-weight: 400; padding: 18px; } .select__gender{ width: 140px; display: flex; justify-content: space-between; padding-top: 30px; } .divideLine{ width: 100%; border: 1px solid #E6E6E6; margin: 20px 0; } .wrapper__check{ width: 100%; display: flex; justify-content: center; } .submit { width: 100%; height: 60px; font-size: 18px; font-weight: 400; color: #0068FF; background-color: #FFF; border: 1px solid #0068FF; border-radius: 7px; } <js> const submit = document.querySelector('.submit'); // 가입하기 const numberChk = document.querySelector('.cert__number .chkBtn'); // 인증번호 전송 const timeChk = document.querySelector('.cert__time .chkBtn'); // 인증완료 let time = 180; // 180초, 인증 시간 let isStarted = false; // email const emailChk = () => { let email = document.getElementById('email').value; if(email.includes('@') === true){ let isEmail = email.split('@')[1].includes('.'); if(isEmail === false){ document.querySelector('.errorMsg.email').style.visibility = 'visible'; document.querySelector('.errorMsg.email').value = ''; return false; } else { document.querySelector('.errorMsg.email').style.visibility = 'hidden'; return true; } } else { document.querySelector('.errorMsg.email').style.visibility = 'visible'; document.getElementById('email').value = ''; return false; } } // name const nameChk = () => { let name = document.getElementById('name').value; if(name.length === 0){ document.querySelector('.errorMsg.name').style.visibility = 'visible'; return false; } else { document.querySelector('.errorMsg.name').style.visibility = 'hidden'; return true; } } // pw const pwChk = () => { let pw1 = document.getElementById('pw1').value; let pw2 = document.getElementById('pw2').value; if(pw1 && pw2){ if(pw1 === pw2){ document.querySelector('.errorMsg.pw1').style.visibility = 'hidden'; document.querySelector('.errorMsg.pw2').style.visibility = 'hidden'; return true; } else { document.querySelector('.errorMsg.pw1').style.visibility = 'visible'; document.querySelector('.errorMsg.pw2').style.visibility = 'visible'; document.querySelector('.errorMsg.pw1').innerHTML = '비밀번호가 일치하지 않습니다.' document.querySelector('.errorMsg.pw2').innerHTML = '비밀번호가 일치하지 않습니다.' return false; } } else { document.querySelector('.errorMsg.pw1').style.visibility = 'visible'; document.querySelector('.errorMsg.pw2').style.visibility = 'visible'; return false; } } // phone const phone = () => { let num1 = document.getElementById('num1').value; let num2 = document.getElementById('num2').value; let num3 = document.getElementById('num3').value; if(num1.length === 3) { document.getElementById('num2').focus(); if(num2.length === 4) { document.getElementById('num3').focus(); } } if(num1.length === 3 && num2.length === 4 && num3.length === 4){ numberChk.classList.add('active'); certification(); } } const certification = () => { // 인증번호 numberChk.disabled = false; numberChk.addEventListener('click', e => { let randomNumber = String(Math.trunc(Math.random() * 1000000)).padStart(6, '0') document.getElementById('certNum').innerText = randomNumber; // 타이머 if(isStarted === false){ isStarted = true; timeChk.disabled = false; let timer = setInterval(() => { if(time >= 0){ let min = Math.trunc(time / 60); let sec = String(time % 60).padStart(2,'0'); document.getElementById('certTimer').innerText = `${min}:${sec}`; time--; } else { clearTime(timer); } }, 100) timeChk.addEventListener('click', e => { if(time >= 0){ alert('인증이 완료 되었습니다.'); clearTime(timer); submit.disabled = false; } }) } }) } const clearTime = (timer) => { timeChk.classList.remove('active'); numberChk.classList.remove('active'); document.getElementById('certNum').innerText = '000000'; document.getElementById('certTimer').innerText = '0:00'; timeChk.disabled = true; numberChk.disabled = true; isStarted = false; clearInterval(timer); } const checkValidation = () => { emailChk(); nameChk(); pwChk(); if(emailChk() && nameChk() && pwChk()) { return true; } else { return false; } } // 검증 submit.addEventListener('click', e => { checkValidation(); if(checkValidation()){ alert('코드캠프 가입을 축하합니다.'); } });
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
선생님! 6:05초에 logit("종속변수 ~ 독립변수 + " ) 넣어줄때요, 종속변수는 문제에서 생존여부(Survived)를 예측하고자 한다고 했기때문에 종속변수가 되는걸까요? 아니면 문제 1번에서 Gender 와 Survived 간의 독립성 검정을 한다고 했을때 문제 2번에 Gender가 독립변수인게 적혀있기 때문에 Survived 는 자동으로 종속변수가 되는걸까요? 종속변수를 어떻게 확인해야 하는지 잘 모르겠습니다!
해결됨
[코드캠프] 부트캠프에서 만든 고농축 프론트엔드 코스
자바스크립트 함수가 조금 어려운데 함수는 그냥 관련된 코드들을 작성할 때 사용하나요? 예를 들어 input으로 어떠한걸 한다면 input 함수를 만들어서 이 함수안에는 input과 관련된 코드들을 작성한다고 보면되는건가요?
미해결
입문자를 위한 LangChain 기초 — v1.0+ 업데이트
마지막 RAG 강의에서, 첫번째 명령문을 실행시키면, !pip install -q langchain langchain-openai tiktoken chromadb typer 호환과 관련된 에러가 발생합니다. ===================== ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. spacy 3.7.4 requires typer<0.10.0,>=0.3.0, but you have typer 0.12.3 which is incompatible. weasel 0.3.4 requires typer<0.10.0,>=0.3.0, but you have typer 0.12.3 which is incompatible. ===================== ChatGPT를 통하여 여러 해결방안을 제시받아 시도해 보았는데 해결이 되지 않습니다. 손쉬운 해결 방법이 있을지요?
미해결
파이썬 동시성 프로그래밍 : 데이터 수집부터 웹 개발까지 (feat. FastAPI, async, await)
수업대로 127.0.0.1:8000/items/{id} 를 넣었는데 starlette.routing.NoMatchFound: No route exists for name "static" and params "path". internal Server Error 가 나옵니다 ㅠ BASE_DIR, directory 모두 수업대로 다 입력했습니다. 구글링을 해도 방법을 찾질 못해서요.
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
안녕하세요~! 수강기간이 얼마 안남았네요. 이번 실기시험까지는... 강의 연장 가능할까요?
해결됨
코딩테스트 [ ALL IN ONE ]
제가 알기로는 for, while문 모두 반복문인데 왜 O(n)으로 계산되는건가요?
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
안녕하세요. 3-4 피쳐엔지니어링에 인코딩 부분에서 질문이 있습니다. 파일에선 범주형 칼럼을 추출하기 위해 X_train.columns[X_train.dtypes == object] 를 사용했는데 cols = X_ train.select _dtypes(include= "O").columns 로 해도 동일하게 작업이 가능한가요? 최대한 단순하게 외우고 싶어서 이게 가능하다면 select_dtypes() 사용하는걸로 외우려고요
미해결
Next + React Query로 SNS 서비스 만들기
modal이 없는 상황의 오류를 해결하기위해 제로초님이 default.tsx라는 파일을 소개해줬는데요, 그냥 layout.tsx에서 애초에 Probs를 정의할때 type Probs= modal?:reactNode로 하면 안될까요?
해결됨
[퇴근후딴짓] 빅데이터 분석기사 실기 (작업형1,2,3)
4회 기출 유형(작업형2)까지 수강하였을 때, 제가 이해한 내용은 다음과 같습니다. <모델의 성능을 평가하는 방법> 데이터 분리 (X_tr, X_val, y_tr, y_val) → 모델 학습 & 하이퍼 파라미터 튜닝 → 평가 (f1 score, roc_auc_score 등) 하이퍼 파라미터 튜닝의 값을 조절해가며 평가 점수 확인 데이터 분리 없이, 모델 학습 & 하이퍼 파라미터 튜닝 → 교차검증 (cross_val_score) 이때 질문드립니다. 제가 이해한 대로, 모델의 성능을 평가하는 방법이 위의 2가지가 있는게 맞을까요? 강사님이 영상에서 교차검증을 사용한 이유는 문제에서 평가 방식을 '평가: Macro f1-score'라고 제시해주었기 때문인가요? 혹시 실제 시험 상황에서 평가 방식을 제시해주지 않는다면, 위의 2가지 방법 중 어떤 것을 사용해도 상관이 없는건가요?
미해결
Next + React Query로 SNS 서비스 만들기
안녕하세요 msw patch 관련해서 여쭤보고싶은게 있습니다! 제로초님 강의를 응용해서 프로젝트에 msw로 데이터들을 테스트 하고있습니다 handler에서 /users란 엔드포인트로 get요청후 데이터들을 받아온뒤 다시 수정이 필요해 patch handler를 생성했습니다. mutation을 통해서 patch 요청은 성공한거같은데 기존의 get으로 받아온 user데이터들을 수정하고 싶다면 어떻게 할수있을지 여쭤보고싶습니다 ! const mutation = useMutation({ mutationFn: async (e: FormEvent) => { e.preventDefault(); const updatedUser = { userId: product.userId, nickName: product.nickName, userFileUrl: product.userFileUrl, techStack: product.techStack, position: product.position, employmentStatus: product.employmentStatus, year: product.year, links: product.links, alarmStatus: product.alarmStatus, content: product.content, softSkill: product.softSkill, }; fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/users`, { method: "PATCH", body: JSON.stringify(updatedUser), }); }, }); import { bypass, http, HttpResponse } from "msw"; import { hotPeople, peoples, users } from "./peopleData"; export const handlers = [ http.get("/peoples/hot/:tag", () => { return HttpResponse.json(hotPeople); }), http.get("/peoples", ({ request, params }) => { return HttpResponse.json(peoples); }), http.get("/users", () => { return HttpResponse.json(users); }), http.patch("/users", async ({ request }) => { return HttpResponse.text("success?"); }), ]; export default handlers;