묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결더 개발자, 인터뷰 가이드
문제 오타가 있는거 같습니다.
예) numbers = [2, 3, 5, 7] target = 7, 7을 만들 수 있는 2, 3, 5의 인덱스인 0, 1, 2를 배열로 리턴해야 한다. tartget = 10일까요?
-
미해결Javascript ES6+ 제대로 알아보기 - 중급
콜백에대해 질문이 있습니다.
안녕하세요 재남님 강의 너무 유익합니다~^_^ 두고두고 봐도 좋은 강의네요 b 콜백에 대한 질문이 있는데요 이 질문을 이 챕터에서 해도되나... 마땅한곳이 생각나지 않아서 이곳에서 질문 올립니다.프론트엔드개발영역에서 어떤 개발자들은 꼭 사용해야할 곳을 제외하고는 콜백사용을 지양한다는 글을 봤었습니다. 그렇다면 콜백이 async & await으로 대체 가능하기 때문인가요? 문법의 간결함과 동기적으로 데이터를 받아와서 처리해야할때 async await이 아주 유용할것 같습니다. 그리고 꼭 사용할곳이라면 자바스크립트 내장 API에서 제공하는 콜백들 예를들어 Array의 map(callback)사용시, setTimout(callback)사용시 API사용 문법상 콜백을 사용할수 밖에 없는경우는 사용을 하는것이 맞고, 그외 다른 비동기 처리는 콜백으로 구현하게 되면 단점이 흔히 말하는 콜백지옥, 콜백지옥으로 부터 생기는 디버깅의 어려움등 때문에 기피하는건가... 제가 바로 이해한게 맞는지 궁금합니다^^ 아직 초보라 프론트앤드영역에서 실무로 여러 프로젝트를 한 사람들의 의견에 그 이유에 대한 궁금증이 생겨서 질문 남깁니다.
-
미해결비전공자를 위한 진짜 입문 올인원 개발 부트캠프
span 줄바꿈 스타일이 적용되지 않습니다
<html> <head> <title>그랩마켓</title> <link href="index.css" type="text/css" rel="stylesheet" /> </head> <body> <div id="header"> <div id="header-area"> <img src="images/icons/logo.png" /> </div> </div> <div id="body"> <div id="banner"> <img src=" images/banners/banner1.png" /> </div> <h1>판매되는 상품들</h1> <div id="product-list"> <div class="product-card"> <div> <img class="product-img" src="images/products/basketball1.jpeg" /> </div> <div class="product-contents"> <span>농구공 1호</span> <span>50000원</span> </div> </div> </div> </div> <div id="footer"></div> </body> </html> - 스타일부분 * { margin: 0; padding: 0; } #header { height: 64px; display: flex; justify-content: center; border-bottom: 1px solid gray; } #body { height: 100%; width: 1024px; margin: 0 auto; padding-bottom: 24px; } #footer { height: 200px; background-color: red; } #banner { height: 300px; background-color: yellow; } #header-area { width: 1024px; height: 100%; display: flex; align-items: center; } #header-area > img { width: 128px; height: 36px; margin-left: 5px; } #banner > img { width: 100%; } #body > h1 { margin-top: 16px; } #product-list { display: flex; flex-wrap: wrap; margin-top: 12px; } .product-card { width: 180px; height: 300px; margin-left: 12px; margin-right: 12px; margin-bottom: 12px; border: 1px solid rgb(230, 230, 230); border-radius: 12px; } .product-img { width: 100%; height: 210px; } .product-contents { display: : flex; flex-direction : column; padding : 8px; } .product-name { font-size: 14px; } .product-price { font-size: 16px; font-weight : 600; } .product-seller { display: flex; align-items: center; } .product-avatar { width: 24px; } // 위 소스로 진행했을때 농구공 1호와 50000원 사이에 줄바꿈 스타일이 적용되지 않습니다ㅠㅠ 확인 부탁드립니다.
-
미해결스프링 핵심 원리 - 기본편
AutoAppConfigTest 결과에 WARNING이 뜨는 문구의 의미가 궁금합니다.
AutoAppConfigTest 결과에 WARNING이 뜨는 문구의 의미가 궁금합니다. 저는 Java 11버전입니다. 인터넷 검색 시 아래와 같은 설명이 있습니다. "원인은 JDK 9 이상의 환경에서 CGLIB의 JDK API 내부에서 발생한 것으로, Spring Framework 4.3 기준 실행중 문제는 없다고 한다." 00:36:51.018 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: file [C:\Study\core\out\production\classes\hello\core\discount\RateDiscountPolicy.class] 00:36:51.031 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: file [C:\Study\core\out\production\classes\hello\core\member\MemberServiceImpl.class] 00:36:51.033 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: file [C:\Study\core\out\production\classes\hello\core\member\MemoryMemberRepository.class] 00:36:51.041 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: file [C:\Study\core\out\production\classes\hello\core\order\OrderServiceImpl.class] WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils (file:/C:/Users/%ea%b9%80%ec%84%9c%ec%a7%84/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/5.3.5/633de7c79bfeccf05c81a0d4a32b3336010f06ab/spring-core-5.3.5.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations 00:36:51.675 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerProcessor' WARNING: All illegal access operations will be denied in a future release 00:36:51.684 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory' 00:36:51.693 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' 00:36:51.698 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'
-
미해결Vue로 Nodebird SNS 만들기
도커에서 sequelize 연결
goorm IDE 를 이용중인 수강생 입니다. IDE 에는 mysql 이 깔려있고 현재 접속이 잘 되는 상태입니다. ('mysql -u root -p' 로 정상적인 접속 가능) 하지만 백엔드를 실행시킬때마다 자꾸 오류가 사진과 같이 뜹니다.. app.js 는 강의와 똑같이 하였습니다. stack over flow 에선 저와같은 문제점이 있었는데 답변이 없어서 해결을 도저히 못하겠습니다..
-
해결됨[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part4: 게임 서버
SocketAsyncEventArgs 재설정에 관하여
안녕하세요 수업을 듣던중 궁금한점이 생겨 질문드리게되었습니다. AcceptAsync를 사용할 때에는 다시 예약할 때 args.AcceptSocekt = null과같은 작업을 해주고 등록을 시켰는데요 ReceiveAsync를 사용할 때에는 다시 예약할 때 args의 버퍼를 다시 비워준다는지 등의작업은 안해도 되는건가요?
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
탈락되면 어떻게 되나요?
마지막에 들어주신 예시 content type : text/html@RequestBody HelloData data 의 경우는 3개의 컨버터를 모두 지나쳐서 탈락하게 된다고 하셨는데요. 그러면 어떻게 되나요? 객체일 때는 null이 넘어오고 primitive 타입일 때는 기본값이 넘어오는 건가요?
-
해결됨홍정모의 따라하며 배우는 C++
17:00 &의 위치
void printElement(int &arr[4]) 라고 입력을 했을때 오류가 생깁니다..... 반면에 강의처럼 void printElement(int (&arr)[4]) 라고 입력을 하면 오류가 생기지 않는데... 왜 그런 걸까요? 저 괄호를 굉장히 의도하고 쓰신거 같은데 딱히 설명을 안되어 있네요.
-
미해결스프링 핵심 원리 - 기본편
PrototypeProviderTest 클래스 내부 코드 질문입니다
클래스 PrototypeProviderTest의 메서드인 providerTest()에서 AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(ClientBean.class, PrototypeBean.class); 를 통해 만든 컨테이너 ac를 클래스 ClientBean의 필드에서 @Autowired private ApplicationContext ac; 와 같은 형태로 outer class에 선언한 컨테이너 ac를 끌어와 쓰고 있는데, 질문1) 컨테이너가 초기화 될 때, 자기 자신도 bean으로 등록하기 때문에, 위와 같이 컨테이너 자체를 auto wiring할 수 있는 건가요? 질문2) 컨테이너가 '@Component' annotation에 대해 scan하는 default 범위가 같은 패키지 내부인 것과 마찬가지로 @Autowired를 적용하는 범위도 같은 패키지 내부이기 때문에, 위와 같이 클래스 ClientBean이 outer class로부터 컨테이너를 auto wiring을 할 수 있는 것인가요? 질문3) "스프링"에서 '컨테이너'라는 것은 하나의 프로젝트 안에서 단 1개로 global하게 존재하는 객체가 아닌, 이곳저곳에 여러 개로 존재할 수 있는 독립적인 객체인가요? 질문4) 메서드 providerTest()의 첫번째 줄인 AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(ClientBean.class, PrototypeBean.class); 라는 "코드1"과 클래스 ClientBean의 필드인 @Autowired private ApplicationContext ac; 라는 "코드2" 이 두 코드는 서로 상호 의존적인 것 같습니다. 왜냐하면 코드1이 수행되려면 (ClientBean.class를 사용하므로) 코드2를 포함하고 있는 클래스 ClientBean의 초기화가 선행되어야 하고 코드2가 수행되려면 코드1의 컨테이너 ac의 초기화가 선행되어야 하기 때문입니다. 서로가 서로를 선행해야 하는 상황인데 어떻게 문제 없이 잘 동작하는지가 의문입니다.
-
미해결스프링 핵심 원리 - 기본편
OCP 위반인지 여쭤봅니다
안녕하세요 선생님, 강의 듣고나서 궁금한 점이 생겨 여쭤봅니다. int discountPrice = discountService.discount(member, 10000, "fixDiscountPolicy"); int rateDiscountPrice = discountService.discount(member, 20000, "rateDiscountPolicy"); 이렇게 호출하게 되면 결국 구현체의 빈 이름을 명시하게 된 것이라고 이해되는데, 추후 빈의 이름이 변경되거나 하는 등의 사항이 발생하면 클라이언트에도 영향이 미치기 때문에 OCP 위반이라고 볼 수 있는건가요 ?? 혹시 그렇다면 , 이건 여러개의 구현체 중 하나를 골라야하는 상황이기 때문에 어쩔 수 없다고 생각하면 되는건가요 ??
-
미해결반응형 웹사이트 포트폴리오(Architecture Agency)
섹션 plan 01 질문입니다
인라인 블럭은 넓이값도 가지고 있고 마진값도 있는데 왜 margin:auto가 적용이 안된건가요? 25분대 보면 hr.bar를 display:inline-block 바꿔주니깐 마진 오토가 적용이 안된게 잘 이해가 안가요.
-
미해결쉽고 자연스럽게 배워보는 Javascript 입문 - 코드스쿼드 마스터즈 코스 레벨1
줄바꿈
<br>태그를 document.write(str + "<br>"); 여기다가 이렇게 두면 줄바꿈이 잘 되는데 왜 사진과 같이 했을 때는 줄바꿈이 안될까요?
-
미해결프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
역 슬래쉬 사용
멀티라인 입력할때 \ 를 사용해도 에러가 나네요 뭐가 문제인걸까요
-
미해결단 두 장의 문서로 데이터 분석과 시각화 뽀개기
replace 질문
4분 25초에서 replace는 전부 다 일치할때만 사용할 수 있다는게 어떤 의미인지 잘 이해가 되지 않습니다. 6.30. 에서 6과30은 숫자타입이고 .은 문자타입이기에 두 타입이 달라서 사용이 안된다는 의미인가요?
-
미해결모든 개발자를 위한 HTTP 웹 기본 지식
Stateless 관련 영한센세 발표 동영상 링크 공유 드립니다.
발표 동영상 1월 20일에 영한센세께서 발표하신 강의와 관련 있는 흥미로운 동영상이 있어 공유드립니다. 관련 내용은 (6:42) 에 있습니다 ㅎㅎ! “저작물에 대한 인터넷 링크를 하는 행위는 개개 저작물의 웹 위치 정보나 경로를 나타내는 것에 불과하고 ‘복제’, ‘전송’의 방법으로 저작물을 이용하는 행위가 아니므로, 저작권 침해에 해당하지 않는다”출처 : 스마트경제(http://www.dailysmart.co.kr) 라고해서... 링크 올려봅니당...! (저는 관련 회사 개발자가 아닙니당 ㅎㅎ 그냥 팬이에용)
-
미해결프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
예제 파일이 안열리네요
메모장파일을 열리는데 python 파일이 안열리는데 무엇이 잘못 됬을까요?
-
미해결Slack 클론 코딩[실시간 채팅 with React]
바벨과 웹펙 설정하기에서 질문 있습니다
npm run build를 통해 dist 폴더에 app.js가 잘 생겨서 index.html을 켜보니 문구가 안뜨고 브라우저 콘솔에 ReferenceError: $RefreshReg$ is not defined 이런 에러가 뜹니다. 무슨 문제인지 아실까요 아래는 제 package.json 파일입니다 "dependencies": { "@emotion/babel-plugin": "^11.2.0", "@types/react": "^17.0.3", "@types/react-dom": "^17.0.3", "babel-core": "^6.26.3", "cross-env": "^7.0.3", "css-loader": "^5.2.0", "react": "^17.0.2", "react-dom": "^17.0.2", "style-loader": "^2.0.0", "typescript": "^4.2.3" }, "devDependencies": { "@babel/core": "^7.13.10", "@babel/preset-env": "^7.13.12", "@babel/preset-react": "^7.12.13", "@babel/preset-typescript": "^7.13.0", "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3", "@types/node": "^14.14.35", "@types/webpack": "^4.41.26", "babel-loader": "^8.2.2", "eslint": "^7.22.0", "eslint-config-prettier": "^8.1.0", "eslint-plugin-prettier": "^3.3.1", "prettier": "^2.2.1", "react-refresh": "^0.9.0", "type-fest": "^1.0.1", "webpack": "^5.28.0", "webpack-cli": "^4.5.0", "ts-node": "^9.1.1"
-
미해결Vue.js 시작하기 - Age of Vue.js
영상보고 똑같이 했는데..
localhost 의 포트넘버가 계속 바뀌네요 ㅠㅠ 어떨떈 8081, 어떨땐 8082.. 동작상엔 문제가 없긴 하지만 혹시 원인 알고계시다면 알려주시면 감사하겠습니다!
-
미해결실전! 스프링 데이터 JPA
entity listener 관련 질문드립니다.
안녕하세요, 강의 자체와 밀접한 관련은 아니지만, entity listener을 사용해보려던 중 궁금한 점이 생겨 질문드립니다. postUpdate, preUpdate ... 등등 엔티티가 변경되거나 등록되거나 삭제된 전후로 감시하는 것이 아니라, 항시 감시하려고 할 때도 entity listener을 이용하나요? 원하는 로직은, 상품 엔티티가 있고, 유통기한 컬럼을 감시해서 날짜가 지났을 시 삭제하는 등의 처리를 하고 싶습니다. 이러한 경우에는 어떤식으로 사용할 수 있을지 질문드립니다. 항상 좋은 강의 감사합니다.
-
미해결단 두 장의 문서로 데이터 분석과 시각화 뽀개기
파일명 작성시 f 관련 질문
파일명 작성에서 파일명 앞에 f가 문자열 포매팅 해주는 것인가요?