묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트
해결되지 않은 템플릿 참조오류가 뜹니다
Commonwsgi & asgiurls.pylayout.htmlroot.html웹 페이지파이참 django 프로젝트내에서 왜인지 모르게 static파일이랑 templates 경로를 인식하지 못하는거 같습니다.그런데 runserver로해서 구동했을경우에는 정상적으로 적용이돼서 나오네요. settings다만 settings 파일을 원래경로에 다시 만들고 BASE_DIR = dirname(dirname(abspath(__file__)))으로 dirname을 한단계 내리게되면 참조 오류가 해결이됩니다. 왜 이러는걸까요?
-
미해결파이썬(Python)으로 데이터 기반 주식 퀀트 투자하기 Part1
마크다운 글꼴 질문
강사님 화면과 달리 마크다운 언어에서 작은 따옴표 안에 글씨 폰트가 달라집니다.해결방안을 알 수 있을까요?감사합니다.
-
미해결실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)
Book.java Kotlin으로 변경 후 오류 문의
안녕하세요. 12강 에서 처럼 Book.java를 Book.kt kotlin 코드로 변경하고 나서 테스트코드 수행하면 아래와 같은 오류가 발생합니다. 확인해야 될 사항이 뭐가 있을까요. Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bookRepository' defined in com.group.libraryapp.domain.book.BookRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a managed type: class com.group.librayapp.domain.book.Book
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
디버그창에 문제가 생겨서 질문합니다
alter table orders 이렇게 한줄로 쭉 나오는데 강의에서 보면 문단이 내려가더라구요 제가 무슨 설정을 잘못해서 이렇게 된걸까요 한줄로 보니까 더 불편합니다
-
미해결[2026년 출제기준] 웹디자인개발기능사 실기시험 완벽 가이드
참고자료 다운로드 '포토샵-이미지제작-A01(학생-실습용).zip' 파일에 이미지 원본 파일이 없습니다.
"실습파일을 먼저 다운로드 받고 압축을 풀어주세요.실습파일은 참고자료 다운로드에 '포토샵-이미지제작-A01(학생-실습용).zip' 파일을 받으시면 됩니다." 라고 되어 있는데 이미지 원본 파일이 없습니다. 어디서 구합니까?
-
미해결자바(Java) 알고리즘 문제풀이 입문: 코딩테스트 대비
String, ArrayList 런타임 에러 질문
import java.util.*; public class Main { public String solution(int n, int k, int[] num) { HashMap<Integer, Integer> tmp = new HashMap<Integer, Integer>(); String result=""; int lt=0, rt=k; for(int i=0; i<k; i++) { tmp.put(num[i], tmp.getOrDefault(num[i], 0)+1); } result += tmp.size() + " "; for(int i=lt; i<n-k; i++){ tmp.put(num[lt], tmp.get(num[lt])-1); if(tmp.get(num[lt]) == 0) tmp.remove(num[lt]); lt++; tmp.put(num[rt], tmp.getOrDefault(num[rt], 0)+1); rt++; result += tmp.size() + " "; } return result; } public static void main(String[] args) { Main T = new Main(); Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); int[] num = new int[n]; for(int i=0; i<n; i++) { num[i] = in.nextInt(); } System.out.print(T.solution(n, k, num)); } } 안녕하세요.질문이 있어 게시판에 글 남깁니다!위의 코드는 제가 작성한 코드인데 로직은 강사님의 설명과 같습니다.유일한 차이점은 결과값을 return 하는 부분이 강사님은 ArrayList에 담아서 출력하였고,저는 String에 담아서 += 으로 이어붙여서 출력하였는데타임리밋에러가 발생하여 String과 ArrayList 시간 소요 차이가 왜 그렇게 나는지 궁금하여 문의 남깁니다.제 생각에는 ArrayList 출력 구문은 for문도 한 번 더 돌아야 하기 때문에 만약 answer값이 굉장히 길다면 소요시간도 오래걸릴거라 생각하고 바로 string에 담아 출력했는데 예상과 달라 문의 남깁니다.답변 주시면 감사합니다!
-
미해결[아파치 카프카 애플리케이션 프로그래밍] 개념부터 컨슈머, 프로듀서, 커넥트, 스트림즈까지!
카프카 클러스터 질문이 있습니다.
미러 메이커 2를 이용해 보려고 하고 있습니다.현재 주키퍼 앙상블을 따로 구축했고 카프카 클러스터 한 개를 우선 만들었습니다.미러 메이커를 사용하여 새로운 카프카 클러스터(2)로 보내려고 하는데 새로 만드는 클러스터를 원래 있던 주키퍼 앙상블에 연결해야 하는지 아니면 새로운 주키퍼를 구축해야 하는지 궁금합니다.
-
미해결[코드팩토리] [중급] Flutter 진짜 실전! 상태관리, 캐시관리, Code Generation, GoRouter, 인증로직 등 중수가 되기 위한 필수 스킬들!
변수 선언 위치 개념
초급, 중급 강의를 다 구매해서 듣고 있습니다.LoginScreen 에서 username,password 변수선언 위치와storage, dio 변수선언 위치가 Widget build 안, 밖으로 구분되어 있는데어떤 기준으로 나눠지는지 궁금합니다.제가 초급강의에서 개념을 놓친걸까요?class LoginScreen extends StatefulWidget { const LoginScreen({Key? key}) : super(key: key); @override State<LoginScreen> createState() => _LoginScreenState(); } class _LoginScreenState extends State<LoginScreen> { String username = ''; String password = ''; @override Widget build(BuildContext context) { final storage = FlutterSecureStorage(); final dio = Dio();
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
3-D 불! 메모리초과
소스코드: http://boj.kr/057ac029ef1f4805bd46df65cf5474b5제한 메모리는 256mb인데 어떤 부분에서 초과됐는지 궁금합니다.dfs의 매개변수와 지역변수가 대략 int형으로 7개정도 있습니다(y, x, d, size, i, ny, nx). 그래서 한번 호출 시 스택에 쌓이는 메모리 용량은 대략 28바이트겠죠?백만번째 호출 때 스택에 변수의 메모리 합이 28mb 밖에 되지 않는 것 같은데요. 어떻게 메모리 초과가 났을까요?아 그리고 pair대신에 struct를 정의해 사용했는데 좋지 않은 방법일까요?
-
미해결[초중급편] 안드로이드 데이팅 앱 만들기(Android Kotlin)
cardStackView 구현 오류
강의는 cardStackView 구현 부분을 보고 있습니다.gradle에 cardStack 파일 설치하고,,강의랑 코드도 동일한데 계속 이런 오류가 생겨요. 왜그럴까요?오류메세지 : Can't determine type for tag '<macro name="m3_comp_bottom_app_bar_container_color">?attr/colorSurface</macro>' gradle(module부분)plugins { id 'com.android.application' id 'kotlin-android' } android { compileSdk 33 defaultConfig { applicationId "com.ipari.datingapp" minSdk 16 targetSdk 33 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { implementation 'androidx.core:core-ktx:1.9.0' implementation 'androidx.appcompat:appcompat:1.5.1' implementation 'com.google.android.material:material:1.7.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' implementation "com.yuyakaido.android:card-stack-view:2.3.4" }gradle(project부분)// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() mavenCentral() } dependencies { classpath "com.android.tools.build:gradle:7.0.2" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } task clean(type: Delete) { delete rootProject.buildDir }item_card.xml 파일입니다.<?xml version="1.0" encoding="utf-8"?> <androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <ImageView android:id="@+id/profileImageArea" android:src="@drawable/no" android:layout_width="match_parent" android:layout_height="match_parent"/> </androidx.cardview.widget.CardView>activity_main.xml파일입니다.<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <com.yuyakaido.android.cardstackview.CardStackView android:id="@+id/cardStackView" android:layout_width="match_parent" android:layout_height="match_parent"/> </androidx.constraintlayout.widget.ConstraintLayout>CardStackAdapter 파일입니다.package com.ipari.datingapp.slider import android.content.Context import android.text.Layout import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.ipari.datingapp.R class CardStackAdapter(val context : Context, val items : List<String>) : RecyclerView.Adapter<CardStackAdapter.ViewHolder>() { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CardStackAdapter.ViewHolder { val inflater = LayoutInflater.from(parent.context) val view : View = inflater.inflate(R.layout.item_card, parent, false) return ViewHolder(view) } override fun onBindViewHolder(holder: CardStackAdapter.ViewHolder, position: Int) { holder.binding(items[position]) } override fun getItemCount(): Int { return items.size } inner class ViewHolder(itemView : View) : RecyclerView.ViewHolder(itemView) { fun binding(data : String) { } } }MainActivity 파일입니다.package com.ipari.datingapp import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.view.View import com.ipari.datingapp.slider.CardStackAdapter import com.yuyakaido.android.cardstackview.CardStackLayoutManager import com.yuyakaido.android.cardstackview.CardStackListener import com.yuyakaido.android.cardstackview.CardStackView import com.yuyakaido.android.cardstackview.Direction class MainActivity : AppCompatActivity() { lateinit var cardStackAdapter: CardStackAdapter lateinit var manager: CardStackLayoutManager override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) val cardStackView = findViewById<CardStackView>(R.id.cardStackView) manager = CardStackLayoutManager(baseContext, object : CardStackListener { override fun onCardDragging(direction: Direction?, ratio: Float) { } override fun onCardSwiped(direction: Direction?) { } override fun onCardRewound() { } override fun onCardCanceled() { } override fun onCardAppeared(view: View?, position: Int) { } override fun onCardDisappeared(view: View?, position: Int) { } }) val testList = mutableListOf<String>() testList.add("a") testList.add("b") testList.add("c") cardStackAdapter = CardStackAdapter(baseContext, testList) cardStackView.layoutManager = manager cardStackView.adapter = cardStackAdapter } }
-
미해결선형대수학개론
1-5 Solution Sets of Linear Systems 질문
제가 수학을 제대로 배우지 않아서 그런거일 수도 있겠으나.. 세번째 식에서 x3가 나오는 이유가 무엇인가요? 0=0이면 무조건 맞는 식이니 free variable인 x3를 넣은것인가요?
-
미해결설계독학맛비's 실전 Verilog HDL Season 1 (Clock부터 Internal Memory까지)
맛비님 Sec2. CH5 질문있습니다!
- 강의 내용외의 개인 질문은 받지 않아요. (개인 과제, 영상과 다른 접근방법 후 디버깅 요청, 고민 상담 등..)- 저 포함, 다른 수강생 분들이 함께보는 공간입니다. 보기좋게 남겨주시면 좋은 QnA 문화가 될 것 같아요. (글쓰기는 현업에서 중요한 능력입니다!)- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 앗 우선 강의에서 문법은 다루지 않는다고 했는데 혹시 문법 관련 질문도 금지라면 빠르게 글 삭제하겠습니다!추천해주신 교재를 구매했지만 아직 도착하지 않아서, 이렇게 문의글을 남깁니다ㅠㅠ위 사진에서 빨간 동그라미친 부분에 1'b0은 무슨 의미인가요?각 자리마다 format이 있는 것 같은데 자리별 역할?(의미)가 궁금합니다. ex) 1의자리: 비트크기'의자리: `timescale처럼 그냥 지켜야할 형식?b: 비트?0:0 or 1 (true or false) 처럼 자리마다 형식이 있는건가요? 아니면 제가 생각하지 못한 다른 문법인지 궁금합니다 ㅠㅠ
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
limit에 대해 질문드립니다.
const profilePosts = await User.findOne({ where: { id: userId }, attributes: [], include: [ { model: Post, include: [ { model: User, attributes: ["id", "nickname", "department", "avatar"], }, { model: User, as: "PostLikeUsers", attributes: ["id"], }, { model: Comment, attributes: ["id"], }, ], }, ], });include 안에서 Post model에 limit을 두고 싶습니다.예를 들어, Post model에 16개의 게시글이 저장되어 있으면 5개만 불러오고 싶습니다.어떻게 하면 될까요?시도했던 방법1. include: [ { model: Post, limit: 5, subQuery: false, include: [ { model: User, attributes: ["id", "nickname", "department", "avatar"], }, { model: User, as: "PostLikeUsers", attributes: ["id"], }, { model: Comment, attributes: ["id"], }, ], }, ], 2.include: [ { model: Post, attributes: ["id", "UserId"], separate: true, limit: 5, include: [ { model: User, attributes: ["id", "nickname", "department", "avatar"], }, { model: User, as: "PostLikeUsers", attributes: ["id"], }, { model: Comment, attributes: ["id"], }, ], }, ],
-
미해결Node.js의 모든 것
설정이 잘 안 되는데, 전체 소스코드 한 번 알려주실 수 있을까요?
올려주신 대로 작성하고 있는데 잘 설정이 안되네요 ㅎㅎ 혹시 가능하다면 전체 소스코드나 혹은, 패키지 버전을 알고 싶습니다!
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
Kafka sink connector를 통해서 단일 데이터베이스 저장을 했을 때 장점?
안녕하세요.Kafka Connect 를 활용한 단일 데이터베이스를 사용 파트를 듣고 있는데요.Multiple Order Service가 같은 DB URL을 가지고, JPA를 통해서 데이터 저장을 하면 될 것 같은데, 굳이 Kafka Sink Connector를 통해서 데이터 저장을 하는 이유가 따로 있을까요?JPA를 쓰면 Persistence Manager가 제공하는 여러 장점을 이용할 수 있을 것 같은데, Kafka sink connector는 그런 장점을 이용할 수 없을 것 같아서요.. 실제 현업에서 많이 사용되는 테크닉인지 궁금하고, 만약 사용한다면 장점은 무엇인지 궁금합니다!
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
기본키매핑-24:30
아래와 같이 에러가납니다.테이블 drop 치고 실행했을 때 입니다.사진과 같이 에러나는 이유가 뭐죠?Caused by: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "ID"; SQL statement:
-
미해결아이폰 앱 개발 입문 2편
open static func ...
"프레임워크 만들기" 강의에서 open class Logger 함수에서 Open static func .. 으로 선언하니까 에러가 발생하는 데요. 강의상에는 에러가 나지 않는 것으로 보여서요. 뭔가 변경된 걸까요?(강의중)(실습중)
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
웹뷰 프로젝트 관련 질문입니다.
휴대폰에서는 웹뷰가 잘 작동합니다.구글 크롬으로 빌드를 하니, 에러창이 다음과 같이 뜹니다.내용을 보니까 "플랫폼에 대하여 윈도우로 설정된 값을 사용하려 했고 그에 해당하는 디폴트는 없다"라고 이해를 했는데..TargetPlatform.Windows를 보니 Enum값으로 해당 플랫폼에 대해서 설정할 수 있도록 만든 것 같아요.해결 방법이 있는지 궁금합니다.
-
미해결스프링 시큐리티
addlogouthandler에서요 ~
안녕하세요 선생님 !! addlogouthandler여기서 세션무효화, 토큰 삭제 외에 추가작업을 한다고 하셨는데 여기서 제가 만들 핸들러를 집어넣으면 1)세션 무효화 ,토큰 삭제 + 알파로 제가 만든 기능이 추가된다는 건가요?? 2)그냥 제가 만든 기능만 추가된다는 것인가요?? 그래서 따로 무효화와 토큰을 구현해줘야 한다는 ....? 1번과 2번중에 어떤거죠??
-
미해결스프링과 JPA 기반 웹 애플리케이션 개발
M1 mac 에서 gradle로 빌드하시려는 분들께 공유 하고싶어 글을 남겨요!
Requirementsstatic/node_module로 package.json에 선언된 의존성을 다운로드 받아야한다gradle build 시 package.json에 선언된 의존성을 확인하고 다시 다운로드 받아야 한다.뭔가 간단하게 끝내고 싶다 !!!Actionhttps://github.com/node-gradle/gradle-node-plugin/blob/master/docs/usage.md다양한 관련 플러그인 들이 있지만, 위의 플러그인을 설치 했습니다.2번의 요구사항은 gradle의 증분 컴파일(?)이 해주는 것 같습니다. (정확하지 않음 추측이에요)3번은 관련 자료를 찾던 도중 processResources 를 발견했고, Copies production resources into the production resources directory. 라고 설명 되어 있습니다.(공식 홈페이지)따라서, npm install 시 node_module 파일을 static 이하로 떨어 뜨리면 되겠구나!그리고 processResources를 "npm install 동작을하는 " Task를 의존하게 하면 되겠구나!-- 주석이 많아 가독성이 떨어지지만, 한번 읽어보시면 더 도움이 될거라 생각해서 위의 깃헙에 있는 주석 그대로 복사 붙여넣기 합니다. 수정한 부분은 nodeProjectDir 부분과processResources.dependsOn 부분 입니다.추가로 package.json 도 아래분이 잘 정리 해주셔서 함께 복사 붙여넣기 합니다.(고맙습니다!!)-인텔리제이 빌드시(gradle로 설정안했을 경우 동작안해요!)-gradle 탭 누르셔서 npm Task 들어오는지 확인해주세요!{ "name": "static", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "@yaireo/tagify": "^3.5.1", "bootstrap": "^4.4.1", "cropper": "^4.1.0", "font-awesome": "^4.7.0", "jdenticon": "^2.2.0", "jquery": "^3.4.1", "jquery-cropper": "^1.0.1", "mark.js": "^8.11.1", "moment": "^2.24.0", "summernote": "^0.8.16" } }plugins { id "com.github.node-gradle.node" version "3.5.0" id 'org.springframework.boot' version '2.7.5' id 'io.spring.dependency-management' version '1.0.15.RELEASE' id 'java' } group = 'me.studyOlle' version = '0.0.1-SNAPSHOT' sourceCompatibility = '17' configurations { compileOnly { extendsFrom annotationProcessor } } repositories { mavenCentral() } node { // Whether to download and install a specific Node.js version or not // If false, it will use the globally installed Node.js // If true, it will download node using above parameters // Note that npm is bundled with Node.js download = true // Version of node to download and install (only used if download is true) // It will be unpacked in the workDir version = "16.14.0" // Version of npm to use // If specified, installs it in the npmWorkDir // If empty, the plugin will use the npm command bundled with Node.js npmVersion = "" // Version of Yarn to use // Any Yarn task first installs Yarn in the yarnWorkDir // It uses the specified version if defined and the latest version otherwise (by default) yarnVersion = "" // Base URL for fetching node distributions // Only used if download is true // Change it if you want to use a mirror // Or set to null if you want to add the repository on your own. distBaseUrl = "https://nodejs.org/dist" // Specifies whether it is acceptable to communicate with the Node.js repository over an insecure HTTP connection. // Only used if download is true // Change it to true if you use a mirror that uses HTTP rather than HTTPS // Or set to null if you want to use Gradle's default behaviour. allowInsecureProtocol = null // The npm command executed by the npmInstall task // By default it is install but it can be changed to ci npmInstallCommand = "install" // The directory where Node.js is unpacked (when download is true) workDir = file("${project.projectDir}/.gradle/nodejs") // The directory where npm is installed (when a specific version is defined) npmWorkDir = file("${project.projectDir}/.gradle/npm") // The directory where yarn is installed (when a Yarn task is used) yarnWorkDir = file("${project.projectDir}/.gradle/yarn") // The Node.js project directory location // This is where the package.json file and node_modules directory are located // By default it is at the root of the current project nodeProjectDir = file("${project.projectDir}/src/main/resources/static") // Whether the plugin automatically should add the proxy configuration to npm and yarn commands // according the proxy configuration defined for Gradle // Disable this option if you want to configure the proxy for npm or yarn on your own // (in the .npmrc file for instance) nodeProxySettings = ProxySettings.SMART } dependencies { // View Template Engine implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' // Security implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5' //Web implementation 'org.springframework.boot:spring-boot-starter-mail' implementation 'org.springframework.boot:spring-boot-starter-web' implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: '2.7.5' //Persistence implementation 'org.springframework.boot:spring-boot-starter-data-jpa' runtimeOnly 'com.h2database:h2' runtimeOnly 'com.mysql:mysql-connector-j' // LomBok compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' // Dev developmentOnly 'org.springframework.boot:spring-boot-devtools' annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' //Test Implementation testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' } tasks.named('test') { useJUnitPlatform() } processResources.dependsOn('npmInstall')