묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결(2025 최신 업데이트)리액트 : 프론트엔드 개발자로 가는 마지막 단계
5.리덕스 유용한 툴 소개
npm install --save redux-devtools-extension설치명령어 실행시 에러가 난다면 터미널에서npm install --save @redux-devtools/extension 설치 후 store.js에서 import 하기import { composeWithDevTools } from '@redux-devtools/extension' 출처 누나슬랙 학생분께서 찾으신 자료
-
미해결스프링 핵심 원리 - 기본편
PrototypeBean 클래스는 Static 영역과 Heap 영역 모두에 존재하나요?
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]너무 기초 질문인가 싶지만 제가 맞게 이해하고 있는지 확신이 안 돼서 질문드립니다. 제가 이해하고 있는 내용들을 적었습니다. 아래 코드에서 static class PrototypeBean으로 되어 있는 PrototypeBean 클래스는 클래스 로더가 클래스들을 로딩할 때 Method Area(Static Area)에 적재되며, 이 Method 영역에선 인스턴스 객체들처럼 여러 개로 존재하는 것이 아니다. getBean(PrototypeBean.class)을 통해 조회할 때마다 생성되는 프로토타입 빈들은 Heap 영역에 생성되는 객체들이다.(마치 PrototypeBean이 static 클래스가 아닌 것처럼)결론적으로 PrototypeBean은 static임에도 불구하고 Heap 영역에 객체 형태로도 여러 개 존재한다.(조회되는 만큼) 혹시 위 내용들 중에 제가 잘못 이해하고 있는 부분이 있을까요? 자바 기본 문법을 배웠을 땐 static으로 지정하는 것들은 Method Area에만 있고, 객체별로 관리되는 게 아니기 때문에 Heap 영역엔 없는 거로 이해하고 있었는데, PrototypeBean의 경우엔 static임에도 Heap 영역에도 있어서 좀 생소하긴 합니다. 그래도 이 강의를 들으면서 프로토타입 스코프에 대해 이해한 대로면 위에 정리한 1, 2, 3처럼 생각되기는 하는데 제가 혹시 이해를 잘못한 부분이 있나 해서 확인받고 싶습니다. public class PrototypeTest { @Test public void prototypeBeanFind() { AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(PrototypeBean.class); System.out.println("find prototypeBean1"); PrototypeBean prototypeBean1 = ac.getBean(PrototypeBean.class); System.out.println("find prototypeBean2"); PrototypeBean prototypeBean2 = ac.getBean(PrototypeBean.class); System.out.println("prototypeBean1 = " + prototypeBean1); System.out.println("prototypeBean2 = " + prototypeBean2); assertThat(prototypeBean1).isNotSameAs(prototypeBean2); prototypeBean1.destroy(); prototypeBean2.destroy(); ac.close(); } @Scope("prototype") static class PrototypeBean { @PostConstruct public void init() { System.out.println("PrototypeBean.init"); } @PreDestroy public void destroy() { System.out.println("PrototypeBean.destroy"); } } }
-
해결됨배달앱 클론코딩 [with React Native]
keyboardavoidingView 관련 질문 입니다.
안녕하세요 아래 코드의 bottomSheet 내부에 채팅 창을 넣고자 합니다.. 그리고 카톡에서 키보드가 올라오면 보던 내용이 키보드를 피해 올라가는 것을 구현하고자 하고 있습니다. 아래 코드에서 BottomSheet 내부를 KeyboardAvodingView로 감싸주었을 떄는 내부 scroll이 동작을 안 하였습니다.. FlatList만 KeyboardAvoidingView를 사용하였을 때는 .. FlatList의 내용이 가린채로 키보드가 올라왔습니다..KeyboardAwareScrollview또한 내부 스크롤이 동작안하고 있었습니다.. 혹시 아래처럼 bottomSheet를 사용해 내부 요소들을 보여줄 때 보던 내용이 키보드가 올라와도 보여질 수 있도록 자동으로 밀려올라가는(스크롤되는,,) 방법이 없을까요?감사합니다.. import React, { useCallback, useRef, useMemo } from "react"; import { StyleSheet, View, Text, Button, KeyboardAvoidingView } from "react-native"; import BottomSheet, { BottomSheetFlatList } from "@gorhom/bottom-sheet"; import { FlatList, ScrollView, TextInput } from "react-native-gesture-handler"; import { KeyboardAwareFlatList, KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view"; const BottomExample = () => { // hooks const sheetRef = useRef<BottomSheet>(null); // variables const data = useMemo( () => Array(50) .fill(0) .map((_, index) => `index-${index}`), [] ); const snapPoints = useMemo(() => ["25%", "50%", "100%"], []); // callbacks const handleSheetChange = useCallback((index: any) => { console.log("handleSheetChange", index); }, []); const handleSnapPress = useCallback((index: any) => { sheetRef.current?.snapToIndex(index); }, []); const handleClosePress = useCallback(() => { sheetRef.current?.close(); }, []); // render const renderItem = useCallback( ( {item} : { item : string } ) => ( <View style={styles.itemContainer}> <Text>{item}</Text> </View> ), [] ); return ( <View style={styles.container}> <Button title="Snap To 90%" onPress={() => handleSnapPress(2)} /> <Button title="Snap To 50%" onPress={() => handleSnapPress(1)} /> <Button title="Snap To 25%" onPress={() => handleSnapPress(0)} /> <Button title="Close" onPress={() => handleClosePress()} /> <BottomSheet ref={sheetRef} snapPoints={snapPoints} onChange={handleSheetChange} > <FlatList data={data} keyExtractor={(i) => i} renderItem={renderItem} contentContainerStyle={styles.contentContainer} /> < style ={{ backgroundColor : "blue"}}>all good all fine</TextInput> </BottomSheet> </View> ); }; const styles = StyleSheet.create({ container: { flex: 1, paddingTop: 200, }, contentContainer: { backgroundColor: "white", }, itemContainer: { padding: 6, margin: 6, backgroundColor: "#eee", }, }); export default BottomExample;
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
jdbc 연결 오류
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.https://drive.google.com/file/d/13B3t74Z3Xy8CyY0XTSTYjosfFZOhgOMB/view?usp=sharing위는 프로젝트 파일입니다.db연결 까지 완료 했고 테이블까지 생성 했습니다.하지만, 홈 화면에서 회원 목록을 조회 하려고 하면,인텔리제이 콘솔창에 이와 같은 오류가 발생합니다.select * from member [42104-224]] with root causeorg.h2.jdbc.JdbcSQLSyntaxErrorException: Table "MEMBER" not found (this database is empty); SQL statement:select * from member [42104-224]db까지 연결을 잘 했다고 생각하는데, 대체 어디가 잘 못 되어 member테이블을 찾지 못하는지 모르겠습니다.
-
미해결실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
DTO 선언할 때 @AllArgsConstructor 붙여준 이유
DTO 선언 시 @AllArgsConstructor를 붙여주셨는데 그 이유가 궁금합니다.Jackson 라이브러리가 정상적으로 JSON 데이터를 객체에 바인딩 해주기 위해 모든 인스턴스 변수를 포함한 생성자가 필요해서 그런 것인가요?혹은 단순히 컨트롤러 메서드에서 DTO 데이터를 전체적으로 초기화하기 위함인가요?
-
미해결유니티 AR로 만드는 FPS 게임
자동완성 기능은 어떻게 추가 하나요 ?
C# 스크립트 작성시 오타가 많이 나는데 자동완성 기능은 어떻게 추가하나요 ?
-
미해결[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
수동으로 클래스 만들어도 되는건가요?
retrofit을 쓰다가@Get(path)Future<레스토랑디테일모델> get레스토랑디테일…요롷게 쓰셨는데 선생님께서 말씀해주시길 클래스 타입과 json타입이 딱 맞아야 한다고 해주셨잖아요 여기서 반환되는 클래스 타입을 json 시리얼라이즈 로 편하게 만들고 있는데 , json 시리얼라이데이션 안쓰고 수동으로 클래스를 만들어도 사실 되는거죠??!
-
미해결[리뉴얼] 처음하는 파이썬 데이터 분석 (쉽게! 전처리, pandas, 시각화 전과정 익히기) [데이터분석/과학 Part1]
IOPub data rate exceeded. 영구 설정 방법, 디렉토리 경로 변경 문의
USvideos.csv 2.8메가 파일 open 하는 과정에서 대용량의 ? 파일이라 열 수 없는 에러가 나왔습니다IOPub data rate exceeded. The Jupyter server will temporarily stop sending output to the client in order to avoid crashing it. To change this limit, set the config variable `--ServerApp.iopub_data_rate_limit`. Current values: ServerApp.iopub_data_rate_limit=1000000.0 (bytes/sec) ServerApp.rate_limit_window=3.0 (secs)찾아보니 jupyter notebook 커맨드에서 jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10 해당 명령어를 치니 재실행과 함께 일시적으로 동작이 되다 다시 파일을 끄니 동일한 에러가 발생 하였습니다. 해당 명령어를 영구적으로 열어주는 방법명령어 이후 디렉토리 위치가 "/Document"가 디폴트로 지정 되었습니다 원래 작업 하던 경로로 옮기는 방법이 궁금합니다
-
미해결[핵집] 2025 빅데이터 분석기사(필기)_과목 1~2
수업자료
안녕하세요,수업자료 통합본 요청드립니다.wjustdoit15@gmail.com 으로 부탁드립니다.감사합니다.
-
미해결Next + React Query로 SNS 서비스 만들기
회원가입 리다이렉트 오류
현재 상태는 201로 불러와도 redirect가 되지 않습니다.console.log()로 찍어보니 await signIn 이후로는 console.log()가 찍히지가 않았습니다.axios로 바꿔봐도 그대로이고 버전도 @auth/core 버전도 바꿔보았는데 꿈쩍 않습니다 ㅠ 물론 DB에도 정상적으로 데이터가 저장되고요.. 시간만 날리다가 도저히 안되겠기에 질문 남깁니다..signup.ts"use server"; import { signIn } from "@/auth"; import { redirect } from "next/navigation"; // import axios from "axios"; export default async (prevState: any,formData: FormData) => { // 입력값이 없거나 || 빈칸이 존재하지않을때 if (!formData.get("id") || !(formData.get("id") as string)?.trim()) { return { message: "no_id" }; } if (!formData.get("name") || !(formData.get("name") as string)?.trim()) { return { message: "no_name" }; } if (!formData.get("password") || !(formData.get("password") as string)?.trim()) { return { message: "no_password" }; } if (!formData.get("image")) { return { message: "no_image" }; } formData.set("nickname", formData.get("name") as string); let shouldRedirect = false; try { const response = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/api/users`,{ method : 'post', body: formData, credentials: "include", // 쿠기 전달 가능캐 함 }); console.log("회원가입상태 : ",response.status); // 회원가입시 이미 가입되어있을때 if (response.status === 403) { return { message: "user_exists" }; } shouldRedirect = true; await signIn("credentials", { username: formData.get('id'), password: formData.get('password'), redirect: false, }) } catch (err) { console.error(err); return {message : null}; } console.log("11") if (shouldRedirect) { console.log("리다이랙트"); redirect("/home"); } return { message: null}; };
-
해결됨[LV1] Jetpack Compose - UI 연습하기
강의자료 링크에 접근이 되지 않습니다.
강사님 해당 강의자료 링크에 접근이 되지 않습니다.일정이 급해 빠른 확인 부탁 드립니다!https://gainful-topaz-82f.notion.site/LV1-JETPACK-COMPOSE-UI-5ee7e194eb8c487780c4fa586b37c3fe?pvs=4 Error : Bad gateway Error reference number: 502
-
미해결눈떠보니 코딩테스트 전날
노션 링크가 안뜨는데 확인해주세요ㅠ!
자바스크립트 강의자료로 공유된 노션 링크가 없는 페이지라고 나옵니다. 파이썬 강의 노션페이지의 경우 전체 리스트는 나오는데 각 섹션이 없는 페이지라고 뜨거나 로딩속도가 느려 보이지 않습니다.
-
해결됨개발자를 위한 컴퓨터공학 1: 혼자 공부하는 컴퓨터구조 + 운영체제
동기화 기법과 그냥 반복문 돌리는 것의 차이
생산자 소비자 문제는 상품의 개수라는 전역 변수이자 공유 자원이 핵심이고, 이를 위해서 상호배제를 위한 동기화가 필요합니다.하지만 2회독을 하면서,예를들어 생산 1000번, 소비 1000번 한다고 했을 때그냥 생산 반복문 1000번, 소비 반복문 1000번 돌리면 상품의 개수가 0이 되어서 문제가 없지 않나..?그렇다면 동기화 기법이 왜 필요하지..? 라는 의문점이 들었습니다.한번 더 생각해보면 실제로 현실에서는 생산 1000번, 소비 1000번이 순서대로 일어나지 않으니까 동기화 기법이 필요한건가..?라는 나름의 해답도 떠올랐는데,둘의 차이를 어떻게 봐야 할까요?
-
미해결이득우의 언리얼 프로그래밍 Part2 - 언리얼 게임 프레임웍의 이해
ini 파일을 만들고 싶습니다.
안녕하세요. 이득우 교수님ini 파일을 만들어 볼려는데 Copy Reference 를 해서+NPCMeshes=/Game/ExternAssets/FemaleMilitaryOfficer/Characters/Meshes/SK_Tubaki.SK_Tubaki수정을 해서 만들었습니다. 하지만LoginId:3dc4af0c4070a86513781b8b1c7912c5EpicAccountId:586b13a4063f42dc921a1047434c2edcAssertion failed: (Index >= 0) & (Index < ArrayNum) [File:C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 771] Array index out of bounds: 0 from an array of size 0 오류라는 질문과 같은 크래쉬가 났습니다. 어떻게 해결해야 하나요?파일명은 ltInfinieAbyss 로 했습니다.
-
해결됨ChatGPT API 입문 강의 - 30분 만에 다국어 번역기 웹 풀스택 개발하기
ChatGPT 프롬프트? 설정관련
강의 감사합니다, 신현님추가로 더 궁금한 점이 있는데ChatGPT API를 사용해서 웹에서 스무고개 게임을 하는 지피티를 만들고 싶은데 어떤 말투나(친구처럼 친근하게), 20회 답변 제한 등의 조건들을 구현할 수 있을까요?
-
미해결[중급편] 친절한 JETPACK 개론 <상> (Android Kotlin)
Retrofit + ViewModelScope + RecyclerView + Glide 강의중에서
CustomAdapter.kt 파일내 Glide.with(context)이부분에서 빨간줄이 생기고 Unresolved reference: Glide라는 에러메세지가 생기네요build.gradle.ktsimplementation("com.github.bumptech.glide:glide:4.13.0'") annotationProcessor("com.github.bumptech.glide:compiler:4.14.2")
-
미해결Next + React Query로 SNS 서비스 만들기
auth 쓸때 name 외 정보들은 확인이 안되네요
https://github.com/nextauthjs/next-auth/discussions/10399#discussion-6417675 next-auth 쪽에도 help 쪽에 질의를 해놨는데요, 원래 이슈로 쓰려했는데 reproduce url을 요구하더라구요 ㅠㅠ 현재 auth는 이슈가 적다고 하신 라이브러리를 쓰고있어요 "@auth/core": "^0.27.0", "next": "14.0.4", "next-auth": "^5.0.0-beta.11", 를 사용중이고요, custom login 페이지를 두었는데 credentials 정보는 잘 넘어와서 login api 도 잘 타는데 그 내용을 토대로 클라이언트에서 useSession으로 유저 정보를 확인하려해도 name 만 정상적으로 리턴이되네요.. import NextAuth from "next-auth"; import CredentialsProvider from "next-auth/providers/credentials"; import { NextResponse } from "next/server"; export const { handlers: { GET, POST }, auth, signIn, } = NextAuth({ pages: { signIn: "/login", }, providers: [ CredentialsProvider({ async authorize(credentials) { console.log( "credentials info: " + credentials.email + " " + credentials.password ); const params = new URLSearchParams( `empNo=${credentials.email}&empPassword=${credentials.password}` ); console.log(params); const authResponse = await fetch( `http://?????:9080/api/getempinfo`, { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded", }, body: params, } ); if (!authResponse.ok) { return null; } const user = await authResponse.json(); console.log("user", user); // user.retData[0] inside informations are all string. // { // user_id: '*******', // user_name: 'jinyoung', // sert_num: '*********', // user_rgst_patr_code: '001', // rdp_code: '000' // } console.log("user.retdata.user_id =", user.retData[0].user_id); console.log( "user.retdata.user_name=", user.retData[0].user_name ); const id = user.retData[0].user_id; return { // mapping info // id?: string // name?: string | null // email?: string | null // image?: string | null id: id, name: user.retData[0].user_name, ...user.retData[0], }; }, }), ], // secret: , trustHost: true, }); 아래는 useSession 을 사용하는 클라이언트 컴포넌트에요 "use client"; import React, { useEffect, useState } from "react"; ... // import useSWR from "swr"; import { useSession } from "next-auth/react"; ... const Home = () => { const { data: session, status } = useSession(); console.log("status?"); console.log("status=" + status); console.log("session="); console.log(session?.user); useEffect(() => { if (session) { console.log("session useEffected = "); console.log(session); } }, [session]); 아래는 콘솔 찍어본 내용이에요
-
미해결프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
강의자료부탁드립니다!
안녕하세요! 강의자료 부탁드립니다gksrudwn09@naver.com감사합니다!
-
미해결퍼블리싱 핵심이론 PDF 교재 및 예제파일(HTML+CSS+FLEX+JQUERY)
임시이미지 사이트 close
HTML 교재 19 페이지 http://placehold.it 열리지 않아요, 없어진것 같음 다른 사이트 알려주세요 그리고 13페이지 한글입숨 사이트 열리지 않아요, 일시적인지 는 몰라도 찾아보니http://guny.kr/stuff/klorem/여기 지원되네요
-
미해결[C++과 언리얼로 만드는 MMORPG 게임 개발 시리즈] Part1: C++ 프로그래밍 입문
rsp값에 대해
강의 마지막 부분을 보면 add rsp, 16을 한뒤에pop rbxpop rax를 하셨는데요, 이과정에서 실질적으로 push 5, 2가 pop이 되지 않았는데도정상적으로 rbx에 값이 이전에 push했던 값으로 돌아오는것을확인 하였습니다. 그렇다면 현재 stack에 Top에 해당하는 주소값은 사실상 rsp라고 생각 되는데 맞는건지 궁금해서 질문 드립니다.