[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? ( 페치 조인 질문있습니다! - 인프런 | 질문 & 답변 (inflearn.com) 이것을 작성했었던 글쓴이인데 아직 이해가 덜되어서 질문합니다! 제 질문과 영한님의 답변을 요약하면 제 질문은 1대 다 에서는 fetch join을 고려하고 다대1에서 batch size를 이용해서 최적화하는게 좋았는데 다대1에서 그러면 역으로 1대다기준으로 fetch join 쓰면 안되냐는게 질문이였고 그에 대한 영한님의 답변은 다쪽(위에 질문에서는 중간테이블) 을 기준으로 조회하기 어려운 경우가 있는데 그 경우는 1쪽기준으로 페이징을 한다면 다쪽에서 페이징이 모호하다. 라는 것이였습니다.(제가 제대로 이해한 것 맞겠죠?) @Query("select pc from Person_Club pc join fetch pc.club where pc.person.id=:personId ORDER BY pc.club.name DESC") List<Person_Club> findTop5ByPersonIdOrderByClubName(@Param("personId") Long personId,Pageable pageable); 위 코드는 정확히 기억이 안나는데 Person_Club은 person과 Club의 다대다 중간테이블로 만들었고 where 절 로 persinID를 받아서 범위를 제한하고 페이징을 했던걸로 기억하는데 이런 경우는 1쪽기준으로 페이징을 한다면(where 절로 범위 제한) 다쪽에서 페이징이 모호해지지 않지 않나요?? 부족한 설명죄송합니다
큰돌님 안녕하세요? 어쩌다보니 구형 / 신형 교안 섞여서 갖고 있는데 구형교안에는 5-L이 bitmask와 combination 두개의 풀이가 있는것을 보았습니다. 신형으로 넘어오면서 combination풀이는 삭제된 것을 알 수 있었는데, 어떤 의도가 있어서 삭제 하셨을거 같아서 문의 드립니다. 답변 미리 감사합니다. 수강자 드림.
[코드팩토리] [초급] NestJS REST API 백엔드 완전 정복 마스터 클래스 - NestJS Core
비동기 로직을 호출만 하고 끝나는게 아니라 결과값을 활용해야할 때 async, await를 활용해야 한다고 이해하고 있는데요. 한가지 이해가 잘 가지 않는 부분이 Auth Service에서 async registerWithEmail( user: Pick<UsersModel, 'nickname' | 'email' | 'password'>, ) { const hash = await bcrypt.hash(user.password, HASH_ROUNDS); const newUser = await this.usersService.createUser({ ...user, password: hash, }); return this.loginUser(newUser); } async 함수는 결국 Promise를 반환하니까 Auth Controller에서 @Post('/register/email') registerByEmail( @Body('nickname') nickname: string, @Body('email') email: string, @Body('password') password: string, ) { return this.authService.registerWithEmail({ nickname, email, password, }); } async, await를 사용하지 않으면 제대로 동작하지 않을 줄 알았는데 비동기 호출의 결과인 token이 잘 반환되더라구요. 혹시 이유를 알 수 있을까요? async, await를 판단하는 강사님 만의 기준이 혹시 있으신지, 그리고 굳이 async, await가 필요 없는 곳에도 사용하게되면 성능의 차이가 생기는지도 궁금합니다.
영상보면서 따라하고 있는데, 어플 이름 변경하고 npm run android 명령어로 실행하면 BUILD FAILED in 36s Failed to install the app. 라고 나오는데 3일동안 구글링하면서 환경 변수도 다시 점검해보고 관리자권한으로 vscode 실행해서 다시 해보고 껐다 켰다도 해봤는데 안되네요. 도와주세요 ㅠㅠ
안녕하세요! 제가 지금 진행 중인 프로젝트가 있는 데 어려움을 겪어서 질문 드립니다! queryDsl을 사용해서 DTO로 바로 조회도 되고 값이 담겨져 있는 것도 로그를 찍어서 확인할 수 있습니다. 근데 PostMan이나 스웨거로 값을 반환받았을 때 isAuthenticated 값은 잘 채워져서 나오는 데 CulturalEventDetail값이 자꾸 null로 반환이 됩니다! 아무리 찾아봐도 답이 안 나와서 질문 드립니다.. 아래는 코드 입니다! @Getter @Builder @NoArgsConstructor @AllArgsConstructor @ToString public class CulturalEventDetailsResponseDTO { private CulturalEventDetail culturalEventDetail; private boolean isAuthenticated; } public CulturalEventDetailsResponseDTO getCulturalEventDetails(final int culturalEventId, final int userId) { return queryFactory.select(Projections.fields(CulturalEventDetailsResponseDTO.class, culturalEvent.culturalEventDetail, visitAuth.isAuthenticated)) .from(culturalEvent) .leftJoin(visitAuth) .on( culturalEvent.id.eq(visitAuth.culturalEvent.id), visitAuth.user.id.eq(userId)) .where( culturalEvent.id.eq(culturalEventId) ) .fetchOne(); } public CulturalEventDetailsResponseDTO getCulturalEventDetails(final int culturalEventId, final User user) { final CulturalEventDetailsResponseDTO culturalEventDetails = culturalEventQueryRepository.getCulturalEventDetails(culturalEventId, user.getId()); culturalEventRepository.updateVisitCount(culturalEventId); log.info("culturalEventDetails = {}", culturalEventDetails); return culturalEventDetails; } 2023-11-12T04:44:46.017+09:00 INFO 10556 --- [nio-8080-exec-1] e.c.c.s.c.CulturalEventService : culturalEventDetails = CulturalEventDetailsResponseDTO(culturalEventDetail=CulturalEventDetail( category=CONCERT, d, ....), isAuthenticated=true) @RestController @RequiredArgsConstructor @RequestMapping("/cultural-event") public class CulturalEventController { private final CulturalEventService culturalEventService; @GetMapping("/{culturalEventId}") public ResponseEntity<CulturalEventDetailsResponseDTO> getCulturalEventDetails(final @PathVariable int culturalEventId, final @AuthenticationPrincipal User user) { return ResponseEntity.ok(culturalEventService.getCulturalEventDetails(culturalEventId, user)); }
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] <b>태그가 Hello에도 적용되어 보입니다. escape, unescape가 잘적용된거같은데 위와 같이 보이는지 궁금합니다
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 비슷하지만 없는 것 같습니다. 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) 예 [질문 내용] 강의 극 초반인데 h2 데이터베이스 문제로 시작도 못 하구 있습니다. ㅠㅜ 영한쌤과 같은 버전으로 하려고 했는데 start.spring.io 에서는 2.2.1이 안되더라구요ㅠㅜ 그래서 3.xx 버전을 사용하고 있습니다. 따라서 h2데이터베이스도 2.1xx 버전을 깔았습니다. 근데 자꾸 h2연결이 안되어서 run도 안되고 데이터베이스 연결도 안 되더라구요ㅠㅜ db이름도 datajpa, data-jpa 등등 바꿔서도 해보고 이름도 바꿔서도 해보고 해도 안되네요. 그리고 db파일은 생성이 원래 되었었는데, 지금 현재 안되서 프로젝트와 db파일을 지우고 첨부터 다시 해보고를 반복하면서 지웠었는데, 이제는 아예 생성이 안되더라구요...ㅎㅎ 어떻게 해야할까요>?ㅠㅜ h2연결이 안되서 강의 진도를 못 나가고 있습니다. h2데이터베이스는 어떻게 생성을 하는건가요? 그냥 yml설정해주고 빌드를 하고 h2 console에 연결 하면 생기는 건가요? 아니면 생긴걸 확인하고 console로 들어가는건가요? 감사합니다.
학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! 질문과 관련된 영상 위치를 알려주면 더 빠르게 답변할 수 있어요 먼저 유사한 질문이 있었는지 검색해보세요 5-1 작업형2 모의문제 7:26 에서안녕하세요. object명의 컬럼 아예 없애버리는 방법으로4-2 작업형1 모의문제 4번에서 풀었던 방식처럼코드를 이렇게 실행하면 안되는걸까요? # object명의 컬럼을 아예 없애버리기 cols = train.select_dtypes(exclude = 'object').columns cols train = train[cols] train.head()
def nf(num): def fif(num): print(num) print('in func') fif(num + 100) nf(100) 강의 중 함수안의 함수는 출력이나 호출은 할 수 없다고 말씀주셨는데요, 해당 부분이 잘 이해가 가지 않습니다. 여기서 200이 출력되고 난 다음에 100이 출력되어야 하는거 아닌가요??
안녕하세요 우선 좋은 강의 감사합니다! 현재 namespace 강의를 듣고 있는 중이고, 한 namespace 내 pod에서 다른 namespace의 pod ip로 curl 명령치는 테스트 실습해보고 있는데요 curl 명령어를 찾을 수 없다는 에러가 뜨는데, curl을 직접 설치하고자 apt update 부터 했는데요 아래와 같이 404 not found가 떠서요... 이런식으로 curl 설치하는게 아닌가요? root@pod-1:/# apt update Ign:1 http://deb.debian.org/debian stretch InRelease Ign:2 http://deb.debian.org/debian stretch-updates InRelease Err:3 http://deb.debian.org/debian stretch Release 404 Not Found Err:4 http://deb.debian.org/debian stretch-updates Release 404 Not Found Ign:5 http://security.debian.org/debian-security stretch/updates InRelease Err:6 http://security.debian.org/debian-security stretch/updates Release 404 Not Found [IP: 151.101.2.132 80] Reading package lists... Done E: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. Namespace, ResourceQuota, LimitRange - Namespace, ResourceQuNamespace, Resource Quota, LimitRange - 실습ota, LimitRange - 실습
7.5 시퀄라이즈 사용하기 강좌 부분입니다.피피티와 동일하게 작성했는데 sync에러가 자꾸 뜹니다. 어떻게 고쳐야할지 모르겠습니다. app.js const express = require('express'); const path = require('path'); const morgan = require('morgan'); const nunjucks = require('nunjucks'); const { sequelize } = require('./models'); const app = express(); app.set('port', process.env.PORT || 3001); app.set('view engine', 'html'); nunjucks.configure('views', { express: app, watch: true, }); sequelize.sync({ force: false }) .then(() => { console.log('데이터베이스 연결 성공'); }) .catch((err) => { console.error(err); }); app.use(morgan('dev')); app.use(express.static(path.join(__dirname, 'public'))); app.use(express.json()); app.use(express.urlencoded({ extended: false })); app.use((req, res, next) => { const error = new Error(`${req.method} ${req.url} 라우터가 없습니다.`); error.status = 404; next(error); }); app.use((err, req, res, next) => { res.locals.message = err.message; res.locals.error = process.env.NODE_ENV !== 'production' ? err : {}; res.status(err.status || 500); res.render('error'); }); app.listen(app.get('port'), () => { console.log(app.get('port'), '번 포트에서 대기 중'); }); index.js const Sequelize = require('sequelize'); const env = process.env.NODE_ENV || 'development'; const config = require('../config/config')[env]; const db = {}; const sequelize = new Sequelize(config.database, config.username, config.password, config); db.seqelize = sequelize; module.exports = db; error ->[nodemon] restarting due to changes...[nodemon] starting node app.js C:\Users\jyoun\udr_node\lecture\app.js:15sequelize.sync({ force: false }) ^TypeError: Cannot read properties of undefined (reading 'sync') at Object.<anonymous> (C:\Users\jyoun\udr_node\lecture\app.js:15:11) at Module._compile (node:internal/modules/cjs/loader:1241:14) at Module._extensions..js (node:internal/modules/cjs/loader:1295:10) at Module.load (node:internal/modules/cjs/loader:1091:32) at Module._load (node:internal/modules/cjs/loader:938:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) at node:internal/main/run_main_module:23:47Node.js v20.7.0[nodemon] app crashed - waiting for file changes before starting... [제로초 강좌 질문 필독 사항입니다] 질문에는 여러분에게 도움이 되는 질문과 도움이 되지 않는 질문이 있습니다. 도움이 되는 질문을 하는 방법을 알려드립니다. https://www.youtube.com/watch?v=PUKOWrOuC0c 0. 숫자 0부터 시작한 이유는 1보다 더 중요한 것이기 때문입니다. 에러가 났을 때 해결을 하는 게 중요한 게 아닙니다. 왜 여러분은 해결을 못 하고 저는 해결을 하는지, 어디서 힌트를 얻은 것이고 어떻게 해결한 건지 그걸 알아가셔야 합니다. 그렇지 못한 질문은 무의미한 질문입니다. 1. 에러 메시지를 올리기 전에 반드시 스스로 번역을 해야 합니다. 번역기 요즘 잘 되어 있습니다. 에러 메시지가 에러 해결 단서의 90%를 차지합니다. 한글로 번역만 해도 대부분 풀립니다. 그냥 에러메시지를 올리고(심지어 안 올리는 분도 있습니다. 저는 독심술사가 아닙니다) 해결해달라고 하시면 아무런 도움이 안 됩니다. 2. 에러 메시지를 잘라서 올리지 않아야 합니다. 입문자일수록 에러메시지에서 어떤 부분이 가장 중요한 부분인지 모르실 겁니다. 그러니 통째로 올리셔야 합니다. 3. 코드도 같이 올려주세요. 다만 코드 전체를 다 올리거나, 깃헙 주소만 띡 던지지는 마세요. 여러분이 "가장" 의심스럽다고 생각하는 코드를 올려주세요. 4. 이 강좌를 바탕으로 여러분이 응용을 해보다가 막히는 부분, 여러 개의 선택지 중에서 조언이 필요한 부분, 제 경험이 궁금한 부분에 대한 질문은 대환영입니다. 다만 여러분의 회사 일은 질문하지 마세요. 5. 강좌 하나 끝날 때마다 남의 질문들을 읽어보세요. 여러분이 곧 만나게 될 에러들입니다. 6. 위에 적은 내용을 명심하지 않으시면 백날 강좌를 봐도(제 강좌가 아니더라도) 실력이 늘지 않고 그냥 코딩쇼 관람 및 한컴타자연습을 한 셈이 될 겁니다.