묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결코딩으로 학습하는 리팩토링
객체의 필드 몇개만 전달할 경우, 통째로 넘기기 vs 여러개로 넘기기
class Member {String id;String name;String addr;int age;} 위와 같은 클래스가 있고, 그중 절반정도의 필드를 매개변수로 넘겨야 할 경우,아래 2가지중 하나를 선택하는 고민을 매번 하게 됩니다.1) void check(id, name); 으로 할것인가2) void check(Member member); 로 할것인가 클래스의 모든 필드를 참조한다면 , 당연히 객체를 통째로 넘기면 되나, 절반 정도만 사용한다면 고민이 됩니다. 범용적일 필요가 없는 메서드라고 하더라도, 불필요한 값들을 객체를 통째로 넘기므로, 이 객체필드중 어떤걸 사용하지? 하면서 '구현'을 찾아봐야 하는 단점이 있어 보입니다.사용하는것만 무조건 넘겨야 한다면, 매개변수 갯수가 늘어나거나, 전용 dto를 만들어야 하니 불편하고,통째로 넘기는걸 반복하다 보면 의미없는 필드가 더 많은 객체를 매개변수로 넘기는 것과 다름없는 문제가 있어보입니다.절충점을 어떻게 찾아야 할까요?
-
미해결피그마(Figma)를 활용한 UI디자인 입문부터 실전까지 A to Z
업무시 가장 시간이 가장많이 소요되는 부분은 어떤건가요?
스케치, 와이어프레임, 유저 플로우, UI디자인 등등.....
-
미해결피그마(Figma)를 활용한 UI디자인 입문부터 실전까지 A to Z
제플린 이해가 안가서요.
제플린에서 아이콘이나 버튼 이미지 등등 하나하나 이미지를 다 다운받아서 주는 개념인가요?즉 예전에 홈페이지 만들때 개발자한테 디자이너들이 이미지 잘라서 주듯이요.
-
미해결풀스택 리액트 토이프로젝트 - REST, GraphQL (for FE개발자)
[소스 다운로드 안됩니다]
안녕하십니까목록뷰 구현하기에서 Invalid Date 오류가 나서 소스 파일을 참조 하려고 파일을 다운로드 받아보니 안에 소스 파일이 없습니다.https://github.com/roy-jung/api-practiceapi-practice-main.zip [아래 코드는 강의에서 따라 한 것입니다. 아무래도 오류가 없는데.. Invalid Date 오류가 발생합니다]const MsgItem = ({ userId, tiemestamp, text }) => ( <li className="messages__item"> <h3> {userId}{" "} <sub> {new Date(tiemestamp).toLocaleString('ko-KR', { year: 'numeric', month: 'numeric', day: 'numeric', hour: '2-digit', minute: '2-digit', hour12: true, })} </sub> </h3> {text} </li> );
-
해결됨스프링 핵심 원리 - 기본편
isEqualTo 동작과정이 궁금합니다!
1.isEqualTo 동작과정이 궁금합니다!isEqualTo 양변이 Integer로 오토박싱이 일어난 후 Integerclass에 정의된 equals가 호출되면서 동등성 비교가 일어나는 건가요?2.isEqualTo vs isSameTo 가 헷갈립니다isSameTo는 동일성(객체주소) 비교고좌변 isEqualtTo는 좌변의 equals가 재정의가 되어 있지 않으면 동일성(객체주소)비교이고 재정의 되면 동등성(값비교)or재정의된 equals로 비교가 되는 걸로 정리하면 될까요?
-
미해결Vue.js 완벽 가이드 - 실습과 리팩토링으로 배우는 실전 개념
git 권한 요청 드립니다.
인프런 아이디 : jabpal07@naver.com인프런 이메일 : jabpal07@naver.com깃헙 아이디 : ldabinn@gmail.com깃헙 Username : dabin-lee
-
미해결[리뉴얼] 타입스크립트 올인원 : Part1. 기본 문법편
오버로딩 예제이지만, 저게 반공변성에 해당되는 건지 궁금합니다.
interface Add { (x: number, y: number): number; (x: string, y: string): string; } 이것도 넓은 타입의 파라미터를 좁은 타입의 파라미터에 넣은 것으로 보고 반공변성에 해당한다고 볼 수 있나요? const add: Add = (x: any, y: any) => x + y;
-
해결됨[코드캠프] 시작은 프리캠프
div 상자 안에 div가 안들어가져요
html<!DOCTYPE html> <html lang="kr"> <head> <title>Document</title> <link rel="stylesheet" href="../cyworld/styles/jukebox.css"> </head> <body> <div class="Bigframe"> <div class="pic"> <div class="pic_title"> <duv class="main_title">추억의 BGM</div> <div class="sub_title">TODAY CHOICE</div> </div> <div class="Line"></div> <div class="pics"> <div class="pic1"> <img src="./images/y사진.png" class="album_pic"> <div class="song_title">Y(Please Tell Me Why)</div> <div class="artist">프리스타일</div> </div> <div class="pic1"> <img src="./images/snow.png" class="album_pic"> <div class="song_title">눈의 꽃</div> <div class="artist">박효신</div> </div> <div class="pic1"> <img src="./images/love.png" class="album_pic"> <div class="song_title">사랑했나봐</div> <div class="artist">윤도현</div> </div> </div> </div> <div class="list"> <div class="pic_title"> <duv class="main_title">추억의 BGM</div> <div class="sub_title">TODAY CHOICE</div> </div> <table class="music_list"> <tr> <th class="checkbox"><input type="checkbox"></th> <th class="number">번호</th> <th class="song">곡명</th> <th class="artist">아티스트</th> </tr> <tr> <td class="checkbox1"><input type="checkbox"></td> <td class="number1">1</td> <td class="song1">눈의 꽃</td> <td class="artist1">박효신</td> </tr> <tr> <td class="checkbox1"><input type="checkbox"></td> <td class="number1">2</td> <td class="song1">사랑스러워</td> <td class="artist1">김종국</td> </tr> <tr> <td class="checkbox1"><input type="checkbox"></td> <td class="number1">3</td> <td class="song1">내사람:Partner For Life</td> <td class="artist1">SG워너비</td> </tr> <tr> <td class="checkbox1"><input type="checkbox"></td> <td class="number1">4</td> <td class="song1">Love Love Love</td> <td class="artist1">에픽하이</td> </tr> <tr> <td class="checkbox1"><input type="checkbox"></td> <td class="number1">5</td> <td class="song1">애인...있어요</td> <td class="artist1">이은미</td> </tr> </table> </div> </div> </body> </html>css*{ box-sizing: border-box; margin: 0px; padding: 0px; } body,html{ width:100%; height: 100%; } .Bigframe{ display: flex; flex-direction: column; width: 100%; padding: 20px 30px; justify-content: space-between; align-items: center; } .pic{ width: 100%; } .pic_title{ width: 100%; display: flex; flex-direction: row; } .main_title{ color: #55B2E4; font-size: 13px; font-weight: 700; } .sub_title{ font-size: 8px; padding-left: 5px; display: flex; flex-direction: column; justify-content: flex-end; } .Line{ width: 100%; border-top: 1px solid gray; } .pics{ display: flex; flex-direction: row; justify-content: space-around; padding-top: 12px; } .album_pic{ width: 120px; height: 120px; padding: 5px; } .song_title{ font-family: 'Malgun Gothic'; font-weight: bold; font-size: 11px; color: #0F465E; display: flex; flex-direction: row; justify-content: center; } .artist{ font-family: 'Malgun Gothic'; font-weight: 700; font-size: 10px; display: flex; flex-direction: row; font-weight: bold; justify-content: center; } .list{ width: 100%; } .music_list{ width: 100%; padding-top: 8px; border-spacing: 0px; } .music_list th{ height: 20px; font-size: 10px; font-weight: bold; color: gray; background-color: #eeeeee; border-top: 1px solid gray; border-bottom: 1px dashed gray; } .music_list td{ height: 20px; font-size: 10px; color: #0f465e; border-bottom: 1px dashed gray; } .checkbox1{ width:5%; text-align: center; } .number1{ width:10%; text-align: center; } .song1{ width:45%; text-align: left; } .artist1{ width:30%; text-align: center; } 실행 시Bigframe(wrapper)안에 두 상자가 다 안담아져요어디가 문제 일까요..?ㅠㅠ
-
미해결따라하며 배우는 도커와 CI환경 [2023.11 업데이트]
dokcer Volume 를 이용한 빌드 이용시 컨테이너 2개
궁금한게 볼륨을 사용하여 빌드를 하면 반영을 도커 컨테이너가 로컬을 바라보고 변경사항이 사소할경우 빠르게 빌드가 진행된다고 이해를 하고 있습니다. 여기서 궁금한점은 볼륨을 활용하여 다시 빌드를 하여도 컨테이너가 2개가 어차피 생기는데 맞을까요>
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part3: 유니티 엔진
강의소스 다운로드요..
밑에 강의소스 다른 문의글을 봤는데저는 중간중간에 구름모양이 안보이는데어떻게 받을수 있을까요?
-
해결됨[코드캠프] 훈훈한 Javascript
섹션 7 추가 문제에 대한 답안은 없나요??
advanced 문제 답안 보고 싶은데 없어서 질문드립니다🥲
-
미해결[코드팩토리] [초급] Flutter 3.0 앱 개발 - 10개의 프로젝트로 오늘 초보 탈출!
Wrap with Column이 없습니다
wrap with center 다음wrap with container만 있고,컬럼은 안보이네요...
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: 오류
다음과 같은 오류로 구글링 한 결과구글링에서 위 두가지 방법을 알려줘서 했더니 그래도 오류가 나서 문의드립니다..ㅜㅜ
-
미해결
파이썬이랑 자바중에 머가 더 괜찮을까여?
지금 면접본곳 2곳이 합격을 했는데 어디가야할지 모르겠어서 여쭤봅니다국비학원에서 알선해준 곳중소에 인원5명, 일하는곳은 공기업 안에서 일함언어는 자바 사용제가 사람인 보고 지원한 곳여기도 중소이며 인원은 15명정도고 언어는 파이썬 사용함제가 학원에서 배운게 자바랑 파이썬인데 주로 배운게 자바,근데 미래 생각하면 자바랑 파이썬 중에 어디 가는게 좋을지 결정을 못 하겠네여...참고로 급여는 둘이 똑같습니다.아 그리고 1번은 밥 다 나오고 2번은 밥값이 월급에 포함 돼서 나옵니다. 그리고 2번은 톨게이트비용까지 왕복 4400으로 계산해야해여. 그리고 오늘 1번 잠깐 들리라고해서 갔는데 2/1일부터 출근해줄 수 있냐고 여쭤보셨고 알겠다 했습니다. 그리고 직원분들에게 떡값 주시는데 저도 주시더라구여...
-
미해결[백문이불여일타] 데이터 분석을 위한 중급 SQL
Type of Triangle
SELECT *, CASE WHEN A=B AND B=C THEN 'Equilateral' WHEN A+B <= C OR B+C <= A OR C+A <= B THEN 'Not A Triangle' WHEN A=B OR B=C OR C=A THEN 'Isosceles' ELSE 'Scalene' END FROM TRIANGLES계속 Test case가 1개 있다고 실패로 뜨는데 어디가 문제일까요?ㅠㅠRun Code해볼 때는 SELECT 뒤에 *, 지우고 했습니다.
-
미해결모두의 깃 & 깃허브
소스트리 사용 질문 드리고 싶어요.
안녕하세요. 강의를 잘 듣고 소스트리를 활용해서 편리하게 깃을 활용하고 있습니다. 쓰다보니 조금 궁금한 부분이 생겨 질문드립니다.브랜치든, 마스터든 새로운 줄기를 만들면 기본적으로 보여지는 코드뭉치가 변경사항에 대한 - 와 + 로 표현이 되는데 이런 보기 옵션말고 소스트리에서 그냥 코드그자체를 볼 수 있는 방법도 있을까요?이전 버전과의 변경사항 비교를 보는 것도 유용한데 가끔은 해당 버전의 코드 그자체를 보고 싶을때도 있는데 그 때마다 되돌려서vsCode 나 안드로이드스튜디오를 열어보거나 깃허브에 따로 접속해서 버전을 돌려가며 확인하는 것이 조금은 불편합니다. 그냥 소스트리 화면에서 해당 깃버전의 코드 자체를 볼 수 있는 방법이 있는지 알려주신다면 감사드리겠습니다. 연말 행복하게 잘 보내세요. 감사합니다.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
프로젝트 생성 단계, build.gradle 오픈시 오류
build.gradle를 오픈하자마자 다음과 같은 오류가 뜹니다ㅜㅜ 자바는 11버전 설치했고 강의 제일 처음, build.gradle부터 오픈하자마자 저런 오류가 났고 아무것도 안건들었습니다. <오류코드>- 일부만 가져왔습니다.A problem occurred configuring root project 'hello-spring'.> Could not resolve all files for configuration ':classpath'.> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1.Required by:project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.1> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.1 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6' but:- Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a library, packaged as a jar, and its dependencies declared externally:- Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11- Other compatible attribute:- Doesn't say anything about org.gradle.plugin.api-version (required '7.6')- Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a component, and its dependencies declared externally:- Incompatible because this component declares documentation and the consumer needed a library- Other compatible attributes:- Doesn't say anything about its target Java version (required compatibility with Java 11)- Doesn't say anything about its elements (required them packaged as a jar)- Doesn't say anything about org.gradle.plugin.api-version (required '7.6')- Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 declares a library, packaged as a jar, and its dependencies declared externally:- Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11- Other compatible attribute:- Doesn't say anything about org.gradle.plugin.api-version (required '7.6')- Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:- Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 11- Other compatible attribute:- Doesn't say anything about org.gradle.plugin.api-version (required '7.6')
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
JdbcSourcdConnector 에서 mariadb 드라이버 복사 질문
제가 ./m2 > repository > org 에 접속을 하면 여러 db가 보이는데 mariadb만 안보입니다. 도대체 이게 어떻게 된 일이죠...? 그래서 이제 MariaDB 사용하기 위해서 해당 jar 파일을 복사 해서 원하는 위치에 넣어야 하는데...그걸 못해서 진도가 안나가고 있습니다...
-
해결됨[코드캠프] 시작은 프리캠프
과제는 완성할때까지 해야하나요?
구글링해가면서 여기까진 왔는데 막혀서 도저히 진행이 안되네요어떻게 과제는 성공할때까지 잡고있어야하나요 아니면 우선 넘어갔다가 추후에 다시 돌아봐도 되는건가요?
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
로그인이 안된 사람이 커뮤니티 생성 페이지 접근 금지 부분에서 getServerSideProps 부분에 코드가 들어가는 이유를 알고자 합니다
강의 잘 듣고 있습니다대체로 강좌 맘에 듭니다만 getServerSideProps 에 대한 설명이 부족한듯 하여 아쉽네요.로그인이 안된 사람이 커뮤니티 생성 페이지 접근 금지하는 코드 부분이 왜 getServerSideProps 에 들어가는지에 대한 설명이 별로 없어서 그 이유를 알고자 합니다. 답변 기다리겠습니다감사합니다