묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
요약본 질문
안녕하세요! 여기다가 질문을 적어도 되는지 모르겠는데, 혹시 몰라 적어보겠습니다. 현재 요약본을 보면서 공부를 하고 있는데, 재귀함수가 너무 어려워 작은 해설을 부탁드리고 싶습니다 #include <cstdio> #include <vector> #include <algorithm> #include <iostream> using namespace std; int a[3] = {1, 2, 3}; vector<int> v; void printV(vector<int> &v){ for(int i = 0; i < v.size(); i++){ cout << v[i] << " "; } cout << "\n"; } void makePermutation(int n, int r, int depth){ cout << "depth : " << depth << '\n'; if(r == depth) { printV(v); return; } cout << "depth = " << depth << '\n'; for(int i = depth; i < n; i++) { swap(v[i], v[depth]); makePermutation(n, r, depth + 1); swap(v[i], v[depth]); } return; } int main(){ for(int i = 0; i < 3; i++) v.push_back(a[i]); makePermutation(3, 3, 0); return 0; } 결과 depth : 0 depth = 0 depth : 1 depth = 1 depth : 2 depth = 2 depth : 3 1 2 3 <= 여기까지는 이해가 갑니다만 depth : 2 <= 이 값이 어째서 3이 아닌 2로 줄어들었는지 궁금합니다 depth = 2 depth : 3 1 3 2 depth : 1 depth = 1 depth : 2 depth = 2 depth : 3 2 1 3 depth : 2 depth = 2 depth : 3 2 3 1 depth : 1 depth = 1 depth : 2 depth = 2 depth : 3 3 2 1 depth : 2 depth = 2 depth : 3 3 1 2
-
미해결[코드팩토리] [입문] Dart 언어 4시간만에 완전정복
21분15초 부분
다른 함수가 있으면 실행한다고 설명해주시는데 void main() async { Future<String> name = Future.value("dnb"); Future<int> number = Future.value(1); await addNumbers(1,1); await addNumbers(2,2); hello();} Future<void> addNumbers(int num1, int num2) async { print("계산 시작 : $num1 + $num2"); //서버 시뮬레이션 await Future.delayed(Duration(seconds: 2), (){ print("계산 완료 $num1 + $num2 = ${num1+num2}"); }); print("함수 완료");} void hello() { print("hello");} 이렇게 하면 다 기다린다음 hello 출력하는데 설명해주시는건 무엇을 의미하나요 다 기다린다음 hello출력하는건 맞는건 알겠는데 다른함수가있으면 실행가능하다고,,, 이런 경우엔 놀고있는 thread는 어디서 사용하는건가요
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
Repository에 대해서 궁금한점이 있습니다.
강의에서는 repository를 직접 class로 만들어서 사용하셨는데, spring-data-jpa의 jpaRepository에서 제공하는 기능을 사용하는게 더 효율적인 방향아닌가요? 왜 직접 class로 entityManager를 사용해서 구현했는지 궁금합니다 수강생의 이해를돕기위해 그런건지? 아니면 실무에서도 이렇게 직접구현해서 사용하는지? 궁금해용
-
미해결Vue.js 완벽 가이드 - 실습과 리팩토링으로 배우는 실전 개념
권한요청드립니다.
인프런 아이디 : mju6013 인프런 이메일 : mju6013@naver.com 깃헙 아이디 : mju6013@naver.com 깃헙 Username : kjhqwaszx 감사합니다 :)
-
해결됨로그프레소 엔터프라이즈 - 대시보드
리스트 선택 컨트롤 추가질문
아 제가 질문을 이상하게 하였습니다. ㅠ 죄송합니다. 리스트 선택 컨트롤에는 저런식으로 들어가고 log - {IP:1.1.1.1, is_vpn:is_vpn} - {IP:1.1.1.2, is_vpn:is_vpn, is_mobile: is_mobile} - {IP:1.1.1.3, is_snort:is_snort} - {IP:1.1.1.4, is_proxy:is_pory, is_mobile:is_mobile} 로그형태가 위와 같을때 json 파서를 사용을하면 아래 사진과 같이 칼럼이 형성되게 됩니다. 리스트 선택의 매게변수를 가져와서 해당 매게변수가 있는 로그만 추출하고 싶습니다!
-
미해결배달앱 클론코딩 [with React Native]
앱이 지도를 그리다가 갑자기 꺼집니다 - iOS
데이터를 터치하면 토글이 열리고 지도를 그리다가 앱이 종료되버립니다. 위 화면이 잠깐 뜨고 바로 꺼져버립니다. 에러 로그도 뜨지 않아 해당 이슈가 왜 생기는지 모르겠습니다. m1쓰고 있고, iOS에서 생기는 이슈입니다. Xcode 꺼져있어도 네이버 맵이 그려지다가 앱이 종료됩니다 . 혹시 몰라 문제 리포트 추가합니다.
-
미해결배달앱 클론코딩 [with React Native]
여러장의 이미지
사진첩에서 한장 말고 여러장을 가져올수 있나요???
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
행렬에서 y x순서 질문있습니다.
선생님께서 a[dy][dx] 처럼 행 자리에 y 열 자리에 x를 넣으라 하셨는데 더 좋은 이유가 따로 있나요?? 이중 for문 만들때나 변수 설정할 때 조금 헷갈려서요ㅠ 이렇게 연습하는게 더 좋다면 익숙해지겠습니다!
-
미해결파이썬 무료 강의 (기본편) - 6시간 뒤면 나도 개발자
helloworld.py 실행시킬때 에러가 뜹니다.
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. The terminal process failed to launch: Windows cannot open this program because it has been prevented by a software restriction policy. For more information, open Event Viewer or contact your system Administrator. 바쁘실테지만 확인해주시면 정말 감사드리겠습니다. 감사합니다!!
-
미해결[D.P.(DappProject)] 디앱 프로젝트(NFT 생성, NFT 구매 및 판매)
구매 함수 질문입니다 :>
안녕하세요! 강의 올려주신거 잘 봤습니다 :> 올려주신 코드 참고하면서 공부하던 중 구매 함수에 safetransferfrom 함수에서 "ERC721: caller is not token owner nor approved". 에러가 나는데 이 경우 nft 소유하고 있는 지갑에서 approve(구매자, 토큰아이디) 실행 해주면 구매자가 구매 함수 실행 시 잘 넘어가는데 이렇게 해결을 하려면 판매자가 구매자 주소를 알아야 가능해서 어떻게 적용을 해야할 지 감이 잡히질 않습니다. approve 작업을 컨트랙트 주소에다가 해줬지만 이 경우도 실패를 하네요. 혹시 방법이 있을까요? setApprovealForAll 함수를 해줘도 저 부분에서 같은 에러를 도출하네요 .. ㅠ
-
미해결따라하며 배우는 리액트 A-Z[19버전 반영]
강의 잘 듣고 있습니다.
강의 잘 보고 있습니다. 13:02 부분에 !ref.current를 어떤 상황을 이유로 추가를 하셨는지 궁금해서 질문 드립니다.. modal부분이 없는 경우가 어떤 상황인지 전혀 떠오르지 않습니다 ㅠ 그리고 useOnClickOutside hook에서 useEffect를 안써도 잘 잘동이 하는데 왜 썻는지도 너무 궁금합니다 ! 바쁘신데 죄송합니다 답변 기다리겠습니다 ! ㅠ
-
미해결Vue.js + TypeScript 완벽 가이드
깃헙 권한 요청드립니다 : )
username : nowin89 vue-advanced 권한 요청드립니다. 감사합니다 : )
-
미해결(2025 최신 업데이트)리액트 : 프론트엔드 개발자로 가는 마지막 단계
429 에러
429 에러가 떠서 찾아보니까 너무 많은 요청을 해서 api의 속도 제한에 도달한거라고 하네요 해결방법을 보니까 크롬 쿠키를 지우거나 기다리면 된다고 하는데 다른 방법은 없나요? 궁금합니다!
-
해결됨스프링 DB 1편 - 데이터 접근 핵심 원리
트랜잭션 이해- 트랜잭션-적용1 부분 질문입니다.
MemberServiceV1Test에서 assertThat(findMemberA.getMoney()).isEqualTo(8000); assertThat(findMemberB.getMoney()).isEqualTo(12000); 에서는 정상적으로 테스트가 되는데 assertThat(memberA.getMoney()).isEqualTo(8000); assertThat(memberB.getMoney()).isEqualTo(12000); 로 바꾸면 테스트가 실패하는 이유를 알고 싶습니다.
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
Whitelabel 에러 원인
[질문 내용]http://localhost:8080/basic/items URL 로 호출하면 아래와 같은 오류가 뜹니다. templates/basic/items.html 파일이 정상적으로 위치하고, controller 내부로직에는 들어와서 sysout으로 찍어봤을때, item 객체를 정상적으로 찍는 거 같은데, 마지막 리턴하는 부분에서 view를 못찾아 발생하는 것으로 추정됩니다. 혹시 static폴더가 아닌 templates 폴더를 보게끔 별도로 설정을 변경해줘야 할까요? applicationProperites.properties 설정 파일에 spring.thymeleaf.prefix=classpath:/templates/ 등 설정을 추가 해봤지만 동일한 결과를 리턴받습니다. 어떤 부분에서 매핑이 잘못되었는지 도움 부탁드립니다. 감사합니다.
-
미해결탄탄한 백엔드 NestJS, 기초부터 심화까지
XSS를 방지하기 위해 NESTJS에서 설정할 수 있는 것들이 있을까요?
현재 개발 중인 서비스가 XSS 공격에 취약하여 이를 방지하기 위한 NESTJS에서 할 수 있는 부분이 있을까 궁금합니다.
-
미해결
Is Cash App Borrow Facility Available To All?
Do you want to take a loan from Cash App with the help of Cash App Borrow feature?As of now, Cash App borrow feature is not available for all Cash App account holders as this facility is still under a testing phase. To apply for the same feature to take a loan on Cash App, you have to check whether you are eligible or not. Besides, if you are still not able to borrow money on Cash App, you have to visit the official sources.
-
미해결
Off White x Nike a London garden awakening
In shades inspired by Burberry fabrics, the retractable pen with exceptional colour payoff has a built-in sharpener. Using the puffers felt unexpected, a break from the typical. It's so nice when you find your true self and you stay true to that, Browne said before the show. Additionally, Cohen redoubled his efforts around sustainability. Nike x Off White Shoes One of the biggest trends spotted this season is monochrome, best seen in an all-ivory ensemble in Milan. Silk, nylon, and of course true waterproof fabrics will fit any vacation scenario this season. Introducing Her Eau de Toilette, the free-spirited scent for the modern woman. Stick to core categories and mood boosting colors and prints that you will want to reach for over and over. Introducing My Burberry Blush, a fruity floral Eau de Parfum with a sparkling twist. Stepping back into Off White x Nike a London garden awakening in the first light of day, My Burberry Blush captures the senses as blossoming flowers pop with spirited energy. The flipside of this collection's tailoring was an emphasis on corset dressing, a signature if ever there were one. Corsets shaped micro dresses and length sheaths in lustrous satin, second skin knits, and even glossy puffers. Revitalising notes of neroli and green mandarin are grounded with scents of cedarwood, cardamom and musk. While the women's resort shows made the case for feathers for day, this men's street style look makes a convincing case for sequins. Bio-acetate is also biodegradable. Frames are shipped with demonstration lenses which must be replaced before use. While the women's resort shows made the case for feathers for day, this men's street style look makes a convincing case for sequins. By pairing a shimmering statement top with menswear staples like pleated trousers, button-up shirts, and Chelsea boots, the top becomes cool for daytime wear. Who was a part of the show and who wasn't? What we saw after a month of spring 2022 collections was a stirring new way of dressing that kicked away boundaries and embraced individuality over groupthink. My favorite childhood memory is my mom saving enough money to buy satellite television, he remembers on a Zoom call. All richly scented with Nike x Off-White spice. In this enthralling, bold eau de parfum, black amber and aromatic black pepper meet fragrant thyme and myrrh, softened with a heart of rose and lavender and invigorated with ginger. In between, editors, retailers, models, and more will take in Parisian classics like Christian Dior, Balenciaga, Saint Laurent, and Chanel as well as a new generation that spans Vaquera to Rokh. Now he's putting those materials to work on those party pants and a matching slip dress, as well as on contrast linings that elevate his tailoring and as fabric covered stone appliques on an evening dress. A new wave of cases threatened to derail Seoul's first in-person Fashion Week since before the pandemic, but the faithful fashion crowd is still making its way to the city's Museum of Craft Art and Han Collection to see the week's best hybrid collections. Minimalism and streetwear continue to trend in Seoul, with black as the color of choice.
-
미해결다양한 사례로 익히는 SQL 데이터 분석
일별 잔존율 SQL 로직에서 궁금증이 있습니다.
안녕하세요. 강사님의 강의를 잘 듣고 있는 와중, 일별 잔존율 SQL문에서 궁금증이 생겼습니다. SQL 로직을 보면 사용자 테이블과 세션 테이블을 left join 한 다음, 사용자 아이디, 생성일자, 방문일자로 그룹화하고, 다시 생성일자로 그룹화 한 후 생성일 기준 고유 사용자 수와 D+N 별 고유 사용자 수를 구하는 것으로 이해했습니다. 다만 세 컬럼으로 그룹화를 하게 되면, 아이디 생성일자 방문일자 U0179281 2016-10-24 2016-10-25U0179281 2016-10-24 2016-10-26 와 같은 케이스가 나오게 되는데, 이를 다시 생성일자로 그룹화한 다음 count(*) 로 생성일 기준 모수를 구하게 되면 사용자 아이디는 중복으로 집계되는 것이 아닌지 궁금합니다. 생성일 기준 고유 사용자 수(모수)를 구하려면 10월 24일에 생성한 사용자 U0179281 1개만 집계되어야 하는게 아닌가 싶어 질문드립니다.
-
미해결실전! 스프링 데이터 JPA
강의 파일에 대해서
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용] 다른 강의에서는 강의시 사용하는 pdf와 소스파일이 함께 제공되었는데 이번 강의에서는 따로 소스파일이 없어서 혹시 제공이 안되는 것인지 궁금해서 질문 남깁니다..