묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
"logInDone" state값이 다른 이유가 궁금합니다.
안녕하세요. 먼저 이런 좋은 강의를 듣게 해주셔서 감사합니다. 질문) pages/index.js 와 components/UserProfile.js 에서 state값이 다른 이유가 궁금해서 질문드립니다. 아래 사진 순서) pages/index.js components/UserProfile.js 콘솔창
-
미해결실전! Querydsl
벌크연산 후 em.flush(), em.clear()에 동시성 이슈는 없나요?
안녕하세요 영한님. 강의 정말 잘 듣고 있습니다. 감사합니다. 궁금한것이 생겨 다른 질문들도 확인해 보았는데 궁금증이 해소되지 않아 질문드립니다. ㅜ 질문 내용은- 벌크연산의 JPQL 쿼리 직후(em.flush() 실행 전),- 다른 쓰레드에 의해 영속성 컨텍스에서 엔티티 수정이 이루어지면, - em.flush()에 의해 DB가 영속성 컨텍스 내용으로 덮어씌워져 벌크연산 결과가 사라질 수 있지 않은지? 입니다. 그리고 문제가 있다면 어떻게 해결해야 하는지 알고싶습니다. 예시) 시간순서로 나열했습니다. member1의 age는 20이라고 가정하겠습니다. Thread1 Thread2 member1 조회 (영속상태가 됨) QueryDSL로 벌크연산 (DB 수정, age 를 2배로 변경) (JPQL로 인한 flush가 실행되나 아직까지 DB와 영속성 컨텍스트 차이 없음) member1 수정 (age에 1 추가) (dirtycheck 체크됨) em.flush(), em.clear() (여기서 문제발생?) em.flush()가 실행되는 시점에 member1이 수정되어 있으니 영속성 컨텍스트에 있는 member1의 age값 21이 DB에 있는 age값 40을 덮어쓰지 않나요? 만약 이런 문제가 발생한다면 이를 막기위해 어떻게 해야 하나요?
-
미해결파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)
배열 n+1 궁금합니다.
파이썬 프로그래밍 섹션 6의 3번문제인 DFS를 활용한 부분집합 구하기 문제에 대해 궁금증이 있어 문의를 남깁니다. 해당 문제는 사용하는 경우와 사용하지 않는 경우를 파악하기 위해 0,1로 사용여부를 판단하고 있습니다. 코드에서 ch=[0]*(n+1)이 초기화 하는 부분에서 1,2,3의 칸을 만들어 초기화 하고 있는데... 배열은 0부터 시작하는 것으로 판단이 되는데 왜 1,2,3으로 하셨는지 궁금합니다.. 저렇게 만들어지면 0,1,2,3의 칸이 만들어지는거 아닌가요? ㅠ
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
mysql이 아닌 mongodb 연결은?
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요. mysql이 아닌 mongodb 연결은 어떻게 할 수 있는지 궁금합니다. mongodb 연결시 RDS 사용은 하지 않아도 되는 것일까요?
-
해결됨[리뉴얼] React로 NodeBird SNS 만들기
안녕하세요 리덕스 툴킷 관련질문입니다.
안녕하세요. 리덕스 툴킷을 활용하려고 공부를 막 시작했습니다. cra템플릿을 인스톨해서 보고있는데 비동기요청하는 부분이 조금 헷갈려 질문드립니다. // typically used to make async requests. export const incrementAsync = createAsyncThunk( 'counter/fetchCount', async (amount) => { const response = await fetchCount(amount); // The value we return becomes the `fulfilled` action payload return response.data; } ); 위 함수를 extraReducers 내에서 extraReducers: (builder) => { builder .addCase(incrementAsync.pending, (state) => { state.status = 'loading'; }) .addCase(incrementAsync.fulfilled, (state, action) => { state.status = 'idle'; state.value += action.payload; }); }, 대기, 성공, 실패를 addCase해줘야한다 로 이해는 했는데요 그 다움 궁금한점은 api요청이 한가지 가 아닐텐데 많은 api요청들을 어떻게 추가해야하나요?
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part3: 유니티 엔진
다른 클래스 필드에 선언된 멤버변수 bool의 값을 실시간으로 받아오려면?
안녕하세요, 지난번 답변해주신 내용을 참고하여 이어서 작업을 해보다가... 이벤트 핸들러(UI_EventHandler)에 관한 질문을 한번 더 드려봅니다. 현재 제가 가장 헷갈리는 개념이 발생하는 지점은 UI_EventHandler의 Update에서 OnPointerDown시 bool isTouched로 체크해서 터치를 감지하고 있는 부분을 외부 클래스인 skillPopup(제가 만든 클래스 : 이는 UI_Base/UI_Popup을 상속받음) 에서 bool isTouched 값을 참조하고자 했는데, 이 값을 전혀 읽어오지 못해서였습니다. 저는 skillPopup의 Update에서, 혹은 다른 클래스가 UI_EventHandler의 bool값을 실시간으로 인지하길 원합니다. 이 값을 외부에서도 참조하려면 어떤 방법을 써야할까요? * 체크를 해주려는 이유는, 팝업창에서 버튼을 누르고 있는 동안 캐릭터 스탯을 += 1씩 올려주는 기능을 구현하기 위함인데요, 최초에는 매니저가 중앙에서 이를 대행해주길 원했지만 어려워서 일단 팝업에 구현해보고 있었는데 이 방법 조차 막혀서 어려운 상황이었습니다. 보통 이런 경우 매니저가 중앙에서 처리해주는 기능을 갖게되는게 맞나요? 어떤 방향으로 공부해보면 좋을지 힌트라도 주시면 정말 감사하겠습니다. 그럼 좋은 하루 되세요, 감사합니다.
-
해결됨[2026년 출제기준] 웹디자인개발기능사 실기시험 완벽 가이드
4분 55초 말 실수가 있으십니다.
웹디자인기능사 시험 보실 때 브라켓말고 vscode가 사용이 안된다고 하셔서 글 남깁니다.
-
미해결공공데이터로 파이썬 데이터 분석 시작하기
Stack과 Melt의 차이
안녕하세요, Stack과 Melt가 헷갈려 질문드립니다. Stack은 모든 칼럼명을 index로 가져오는 것이고, Melt는 id_vars와 value_vars를 통해 칼럼을 선택할 수 있는 것으로 이해하면 될까요? 좋은 강의 감사드립니다!
-
해결됨한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지
감성일기장 이미지 문의
안녕하세요 🙋♂️마지막 강의를 듣고 있는 수강생입니다. Open graph시 사진이 없어서 완강을 못하고 있어요! 업로드 부탁드립니다.
-
미해결[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
유사한 알고리즘 질문입니다.
안녕하세요 강사님, 늘 양질의 강의 잘 보고 있습니다. 현재 강의 주제와 논외긴 하지만 궁금하여 여쭙니다. 현재 YOLO V3에 대해 보고 있는데, 알고리즘이 UpSampling과 같은 Conv 연산이 이루어지는듯 한데요, 제가 얼마전 공부했던 U-Net과 플로우가 비슷한 양상을 띠고 있어서 혹 비슷한 맥락으로 YOLO V3도 이루어지는지, 다르다면 어떤 부분에서 다른건지 질문 드려도 될까요? 감사합니다.
-
해결됨따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
postman 관련 에러해결방법
저 같은 경우는 별다른 이상이 없는데 axios통신에러가 났었습니다. 저는 vscode에서 작업 중인데 우선 ctrl+c를 해서 서버를 끈 다음 저장을 다시 해주세요. 혹은 vscode 나갔다가 오셔야합니다. 그리고 npm run start를 했을 때 바로 동작이 되는 경우가 있습니다. 이래도 안되면 syntax에러일 확률이 높습니다. json타입으로 보낼 때 user.js에도 데이터 타입 다시확인 하시고요. (vscode의 마켓플레이스에 오탈자나 들여쓰기를 해결해주는 것들이 있습니다.) 콘솔로 DB연결과 서버연결이 되는지 순차적으로 확인 하시면서 따라가면 될겁니다 +axios 부분 post할 때 경로 확인하세요. const express = require('express') const app = express() const port = 5000 const bodyParser = require('body-parser'); const { User} = require("./models/User"); //application/x-www-form-urlencoded app.use(bodyParser.urlencoded({ extended: true})); //application/json app.use(bodyParser.json()); //mongodb 연결 const mongoose = require('mongoose') mongoose.connect('mongodb+srv://id:password@boilerplate.apclh.mongodb.net/myFirstDatabase?retryWrites=true&w=majority') .then(() => console.log('MongoDB Connected')) .catch(err => console.log('error')) app.get('/', (req,res) => res.send('Hello World')) app.post('/register',(req,res) => { //회원가입 할때 필요한 정보들을 client에서 가져오면 //그것들을 데이터 베이스에 넣어준다. const user = new User(req.body) user.save((err, userInfo) => { if(err) return res.json({ success:false, err}) console.log(userInfo.body); return res.status(200).json({ success: true }) }) }) app.listen(port, () => console.log('Example app listening on port ${port}!'))
-
미해결공공데이터로 파이썬 데이터 분석 시작하기
안녕하세요 강사님 chapter[9/20] boxplot 관련해서 질문 드립니다.
import pandas as pd import numpy as np import matplotlib.pyplot as plt import re import seaborn as sns plt.rc('font',family='Malgun Gothic') df1=pd.read_csv("전국 평균 분양가격(2013년 9월부터 2015년 8월까지).csv",header=0,index_col=0, encoding='cp949') df2=pd.read_csv("주택도시보증공사_전국 평균 분양가격(2019년 12월).csv",header=0,index_col=0, encoding='cp949') df2["분양가격(㎡)"]=pd.to_numeric(df2["분양가격(㎡)"],errors="coerce") df2["분양가/평"]=(df2["분양가격(㎡)"]*3.3) df2["전용면적"]=df2["규모구분"].str.replace("전용면적","") df2["전용면적"]=df2["전용면적"].str.replace("초과","~") df2["전용면적"]=df2["전용면적"].str.replace("이하","") df2["전용면적"]=df2["전용면적"].str.strip() df2["지역명"]=df2.index df2.drop("규모구분",axis=1,inplace=True) df2=df2.reset_index(drop=True) fig,ax=plt.subplots(1,1,figsize=(15,15)) pdf=pd.pivot_table(df2,values="분양가/평",index="월",columns="연도") pdf2=pd.pivot_table(df2,values="분양가/평",columns="연도").T pdf.plot.box(ax=ax) 여기까지는 잘 작동이 되는데요... 이 박스플롯에, 전체 평균을 오버랩 시켜서 그려보려고 했어요. fig,ax=plt.subplots(1,1,figsize=(15,15)) pdf=pd.pivot_table(df2,values="분양가/평",index="월",columns="연도") pdf2=pd.pivot_table(df2,values="분양가/평",columns="연도").T pdf.plot.box(ax=ax) pdf2.plot(ax=ax) 월로 세분화 되지 않은 , 연도별 총합 평균으로 구성한 dataframe을 ax에 그렸는데 안되더라구요. twinx 메소드로도 되지 않아요. 이런식으로 모든 연도가 가장 왼쪽에 박혀버립니다.. 문제가 무엇일까요
-
미해결[백문이불여일타] 데이터 분석을 위한 중급 SQL
2번과 3번문제 집계함수 질문
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 2. population census SELECT SUM(city.population) FROM city INNER JOIN country ON city.countrycode = country.code WHERE continent = 'Asia' 집계함수를 쓰면 groupby를 써야한다고 했는데 왜 여기선 groupby를 안썼나요? 3. average population of each continent SELECT country.continent , FLOOR(AVG(city.population)) FROM city INNER JOIN country ON city.countrycode = country.code -- GROUP BY country.continent group by를 안쓸경우 아래와 같은 에러코드가 나오는데 ERROR 1140 (42000) at line 1: In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'country.continent'; this is incompatible with sql_mode=only_full_group_by 이게 select문에 집계함수와 집계함수아닌 컬럼이있을때 groupby로 select에 있는 집계함수가 아닌 컬럼을 적어야 한다는 뜻인가요? 만약에 맞다면 select문에 그냥 집계함수만 있을경우에는 group by를 안적어도 괜찮은 건가요?
-
미해결[백문이불여일타] 데이터 분석을 위한 중급 SQL
african cites
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 제가 처음에 SELECT NAME FROM CITY INNER JOIN Country ON CITY.CountryCode = COUNTRY.Code WHERE continent = 'Africa' 이라고 하고 작동시켰을때 select문이 ambiguous하다고 해서 city.name이라고 명시해야한다고 하셨는데 그런데 이미 from에 city라고 적었으니 country에도 name이 있어도 city 의 name이라고 인식을 하지 않나요?? 그리고 where절에서 continent는 country.continent라고 안적어도 실행되는 이유가 혹시 continent 컬럼은 country에만 있으니까 굳이 country.continent라고 명시를 안해줘도 되는건가요?
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part3: 유니티 엔진
게임오브젝트와 컴포넌트의 차이
처음 만드신 Getchild 함수는 컴포넌트만 넣을수 있기때문에 GameObject를 제네릭에 넣었을때는 크래쉬가 난다고 하셨는데, Button이나 Text는 게임오브젝트가 아닌가요? Button이 게임오브젝트고 Button.transform 이런것들이 컴포넌트 아닌가요? 잘 모르겠습니다.
-
미해결Slack 클론 코딩[실시간 채팅 with React]
채널 생성시 404오류
안녕하세요!!! 강좌 열심히 따라하면서 배우는 중, 해결점을 찾을수 없는 부분이 있어서 질문합니다. *우선 리액트 v6를 사용하여 route가 아래와 같이 되었다는 것을 참고해주세요. **SWR역시 revalidate가 작동이 안되어, mutate사용하였습니다. [이슈사항] 채널 리스트는 잘 받아오는 것 같습니다. 하지만, 채널생성시 404에러가 발생합니다. 서버는 "존재하지 않는 워크스페이스입니다."라는 응답을 줍니다. 의심되는 것은 버전6 라우팅설정에 문제가 있지 않을까 생각되는데... 검색해봐도 딱히 잘못된것을 못 발견해서 이렇게 질문남깁니다. //CreateChannelModal 코드 import Modal from '@components/Modal';import React, { CSSProperties, useCallback, VFC } from 'react';import { Button, Input, Label } from '@pages/SignUp/styles';import useInput from '@hooks/useinput';import axios from 'axios';import { useParams } from 'react-router';import { toast } from 'react-toastify';import useSWR from 'swr';import { IChannel, IUser } from '@typings/db';import fetcher from '@utils/fetcher';interface Props { show: boolean; onCloseModal: () => void; setShowCreateChannelModal: (flag: boolean) => void;}const CreateChannelModal: VFC<Props> = ({ show, onCloseModal, setShowCreateChannelModal }) => { const [newChannel, onChangeNewChannel, setNewChannel] = useInput(''); const { workspace, channel } = useParams<{ workspace: string; channel: string }>(); const { data: userData, error, mutate } = useSWR<IUser | false>('http://localhost:3095/api/users', fetcher); const { data: channelData, mutate: mutateChannel } = useSWR<IChannel[]>( // 로그인하지 않은상태이면 호출안하고, null로 userData ? `http://localhost:3095/api/workspaces/${workspace}/channels` : null, fetcher, ); const onCreateChannel = useCallback( (e) => { e.preventDefault(); axios .post( 'http://localhost:3095/api/workspaces/${workspace}/channels', { name: newChannel, }, { withCredentials: true, }, ) .then(() => { setShowCreateChannelModal(false); mutateChannel(); setNewChannel(''); }) .catch((error) => { console.dir(error); toast.error(error.response?.data, { position: 'bottom-center' }); }); }, [newChannel], ); return ( <Modal show={show} onCloseModal={onCloseModal}> <form onSubmit={onCreateChannel}> <Label id="channel-label"> <span>채널 이름</span> <Input id="channel" value={newChannel} onChange={onChangeNewChannel} /> </Label> <Button type="submit">생성하기</Button> </form> </Modal> );};export default CreateChannelModal; //Workspace 코드import React, { VFC, useCallback, useState } from 'react';import useSWR, { mutate } from 'swr';import fetcher from '@utils/fetcher';import axios from 'axios';import { Routes, Route, Navigate, Link } from 'react-router-dom';import { Header, LogOutButton, ProfileImg, ProfileModal, RightMenu, WorkspaceWrapper, Workspaces, Channels, Chats, WorkspaceName, MenuScroll, WorkspaceButton, AddButton, WorkspaceModal,} from '@layouts/Workspace/styles';import gravatar from 'gravatar';import loadable from '@loadable/component';import Menu from '@components/Menu';import { IChannel, IUser } from '@typings/db';import { Button, Input, Label } from '@pages/SignUp/styles';import useInput from '@hooks/useinput';import Modal from '@components/Modal';import CreateChannelModal from '@components/CreateChannelModal';import { toast } from 'react-toastify';import { useParams } from 'react-router';const Channel = loadable(() => import('@pages/Channel'));const DirectMessage = loadable(() => import('@pages/DirectMessage'));const Workspace: VFC = () => { const [showUserMenu, setShowUserMenu] = useState(false); const [showCreateWorkspaceModal, setShowCreateWorkspaceModal] = useState(false); const [showWorkspaceModal, setShowWorkspaceModal] = useState(false); const [showCreateChannelModal, setShowCreateChannelModal] = useState(false); const [newWorkspace, onChangeNewWorkspace, setNewWorkspace] = useInput(''); const [newUrl, onChangeNewUrl, setNewUrl] = useInput(''); const { workspace } = useParams<{ workspace: string }>(); const { data: userData, error, mutate } = useSWR<IUser | false>('http://localhost:3095/api/users', fetcher); const { data: channelData } = useSWR<IChannel[]>( // 로그인하지 않은상태이면 호출안하고, null로 userData ? `http://localhost:3095/api/workspaces/${workspace}/channels` : null, fetcher, ); const onLogout = useCallback((e) => { e.preventDefault(); axios .post('http://localhost:3095/api/users/logout', null, { withCredentials: true, }) .then((response) => { mutate(false, false); }); }, []); const onCloseUserProfile = useCallback((e) => { e.stopPropagation(); setShowUserMenu(false); }, []); const onClickUserProfile = useCallback(() => { setShowUserMenu((prev) => !prev); }, []); const onClickCreateWorkspace = useCallback(() => { setShowCreateWorkspaceModal(true); }, []); const onCreateWorkspace = useCallback( (e) => { e.preventDefault(); if (!newWorkspace || !newWorkspace.trim()) return; if (!newUrl || !newUrl.trim()) return; axios .post( 'http://localhost:3095/api/workspaces', { workspace: newWorkspace, url: newUrl, }, { withCredentials: true, }, ) .then((response) => { mutate(response.data); setShowCreateWorkspaceModal(false); setNewWorkspace(''); setNewUrl(''); }) .catch((error) => { console.dir(error); toast.error(error.response?.data, { position: 'bottom-center' }); }); }, [newWorkspace, newUrl], ); const onCloseModal = useCallback(() => { setShowCreateWorkspaceModal(false); setShowCreateChannelModal(false); }, []); const toggleWorkspaceModal = useCallback(() => { setShowWorkspaceModal((prev) => !prev); }, []); const onClickAddChannel = useCallback(() => { setShowCreateChannelModal(true); }, []); if (!userData) { return <Navigate replace to="/login" />; } return ( <div> <Header> <RightMenu> <span onClick={onClickUserProfile}> <ProfileImg src={gravatar.url(userData.email, { s: '28px', d: 'retro' })} alt={userData.email} /> {showUserMenu && ( <Menu style={{ right: 0, top: 38 }} show={showUserMenu} onCloseModal={onCloseUserProfile}> <ProfileModal> <img src={gravatar.url(userData.email, { s: '36px', d: 'retro' })} alt={userData.email} /> <div> <span id="profile-name">{userData.email}</span> <span id="profile-active">Active</span> </div> </ProfileModal> <LogOutButton onClick={onLogout}>로그아웃</LogOutButton> </Menu> )} </span> </RightMenu> </Header> <WorkspaceWrapper> <Workspaces> {userData?.Workspaces?.map((ws) => { return ( <Link key={ws.id} to={'/workspace/${123}/channel/일반'}> <WorkspaceButton>{ws.name.slice(0, 1).toUpperCase()}</WorkspaceButton> </Link> ); })} <AddButton onClick={onClickCreateWorkspace}>+</AddButton> </Workspaces> {/*<Workspaces>*/} {/* {userData?.Workspaces.map((ws) => {*/} {/* return (*/} {/* <Link key={ws.id} to={`/workspace/${123}/channel/일반`}>*/} {/* <WorkspaceButton>{ws.name.slice(0, 1).toUpperCase()}</WorkspaceButton>*/} {/* </Link>*/} {/* );*/} {/* })}*/} {/* <AddButton onClick={onClickCreateWorkspace}>+</AddButton>*/} {/*</Workspaces>*/} <Channels> <WorkspaceName onClick={toggleWorkspaceModal}>Sleact</WorkspaceName> <MenuScroll> <Menu show={showWorkspaceModal} onCloseModal={toggleWorkspaceModal} style={{ top: 95, left: 80 }}> <WorkspaceModal> <h2>Sleact</h2> {/*<button onClick={onClickInviteWorkspace}>워크스페이스에 사용자 초대</button>*/} <button onClick={onClickAddChannel}>채널 만들기</button> <button onClick={onLogout}>로그아웃</button> </WorkspaceModal> </Menu> {channelData?.map((v) => ( <div>{v.name}</div> ))} </MenuScroll> </Channels> <Chats> chats <Routes> <Route path="/channel/:channel" element={<Channel />} /> <Route path="/dm/:id" element={<DirectMessage />} /> </Routes> </Chats> </WorkspaceWrapper> <Modal show={showCreateWorkspaceModal} onCloseModal={onCloseModal}> <form onSubmit={onCreateWorkspace}> <Label id="workspace-label"> <span>워크스페이스 이름</span> <Input id="workspace" value={newWorkspace} onChange={onChangeNewWorkspace} /> </Label> <Label id="workspace-url-label"> <span>워크스페이스 url</span> <Input id="workspace" value={newUrl} onChange={onChangeNewUrl} /> </Label> <Button type="submit">생성하기</Button> </form> </Modal> <CreateChannelModal show={showCreateChannelModal} onCloseModal={onCloseModal} setShowCreateChannelModal={setShowCreateChannelModal} /> </div> );};export default Workspace; //App코드입니다import React from 'react';import loadable from '@loadable/component';import { Routes, Route, Navigate } from 'react-router-dom';const LogIn = loadable(() => import('@pages/LogIn'));const SignUp = loadable(() => import('@pages/SignUp'));const Workspace = loadable(() => import('@layouts/Workspace'));const App = () => { return ( <Routes> <Route path="/" element={<LogIn />} /> <Route path="/login" element={<LogIn />} /> <Route path="/signup" element={<SignUp />} /> <Route path="/workspace/:workspace/*" element={<Workspace />} /> </Routes> );};export default App;
-
미해결따라하며 배우는 리액트 테스트 [2023.11 업데이트]
테스트 실행시간
테스트 실행시간이 너무 긴것같아 질문남깁니다. 코드는 clone 후 npm i로 설치하여 개인적인 코드는 추가하지 않은 상태입니다. 강의에서는 Time이 1s 이내에 완료되는데 저는 4s가 넘어버리내요...
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
failed to sign up 해결이 안됩니다 ㅠㅠ
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'push') 페이지 콘솔창에서 확인해보니 이런 오류가 나있고 계속 failed to sign up이 뜹니다 다른분들의 답변에서도 해결책을 찾을 수 없어 도움 청합니다 ... 포스트맨 사용하니 register success가 나오는거 같은데,, 깃허브 주소 첨부합니다ㅠ https://github.com/aurpo1/boilerplate
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
Validator 여러개
안녕하세요 강의 잘듣고 있습니다 validator를 global하게 적용할 때는 validator가 하나만 적용이되고 local에서 적용할때는 여러개를 등록할 수 있다고 생각 했는데 제 생각이 맞는지 궁금합니다! 추가적으로 local에 등록할 때 initBinder를 사용하여 add를 하는 부분이 있는데, 결국에는 이런식으로 초기화가 되어서 여러개(기본 global validator + 사용자 정의해서 등록해준 validator)의 validator를 가지게 되더라고요 그렇다면 Controller 매개변수에 있는 validator들에 적용 순위가 또한 존재하는 지 궁금합니다. 단순히 support로 구분하는지? 여기서 의심이 든 점이 global적용되는 validator가 정말 하나만 지원이 되는지 궁금합니다. 추가적으로 이런 궁금증으로 구글링 결과로 https://stackoverflow.com/questions/14533488/adding-multiple-validators-using-initbinder 내용을 보았는데 initBinder를 네이밍지어서 여러개의 binding을 할수 있다는 내용인데 해당 내용이 잘이해가지않아 추가 질문드립니다 감사합니다
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
1-I 1620번 문제 질문이 있습니다.
먼저 문제를 풀아보았는데, 자꾸 디버그 에러가 납니다. 예외 발생(0x00007FF63A1012C1, Baekjoon.exe): 0xC0000005: 0x00007FF63A1012C1 위치를 실행하는 동안 액세스 위반이 발생했습니다. 인터넷을 찾아 본 결과, 보통 위 디버그 에러는 1. 포인터에 값을 변경할 떄 2.할당 되지 않은 곳에 넣을 때 라고 했습니다. 근데 대체 그런 부분이 어디에 있는지 계속 고민을 해봐도 잘 모르겠습니다. 물론 올려주신 코드는 이해했습니다. 코드 지적 해주신다면 정말 감사하겠습니다 !!! #include <iostream> #include <map> #include <string> using namespace std; string name[100001]; map<string, int> Map; int input, cnt, a; int main() { cin >> input >> cnt; for (int i = 0; i < input; i++) { string s; cin >> s; name[i] = s; Map.insert({ s, i+1}); } for (int i = 0; i < cnt; i++) { string temp; cin >> temp; if (isdigit(temp[0]) == true) { a = stoi(temp); cout << name[a - 1] << endl; } else { auto iter = Map.find(temp); cout << iter->second << endl; } } }