Frontend

    애니메이션 기본

    애니메이션 기본

    애니메이션 넣기 mesh 회전시키기 import * as THREE from "three"; /* 그리기 */ function draw() { // 애니메이션 추가 // mesh.rotation.y += 0.1; // 각도는 Radian을 사용, 360도는 2파이 mesh.rotation.y += THREE.MathUtils.degToRad(1); mesh.position.y += 0.01; if (mesh.position.y > 3) { mesh.position.y = 0; } renderer.render(scene, camera); // window.requestAnimationFrame(draw); renderer.setAnimati..

    Task Scheduling

    Task Scheduling

    NestJS의 Task Scheduling원하는 time interval, 또는 정해진 시간과 날짜에 fuction을 실행할 수 있다.고정된 날짜/시간, 반복 간격 또는 지정된 간격마다 특정 메서드나 함수를 한 번 실행되도록 예약할 수 있다.  NestJS 문서Task SchedulingTask scheduling allows you to schedule arbitrary code (methods/functions) to execute at a fixed date/time, at recurring intervals, or once after a specified interval. In the Linux world, this is often handled by packages like cron at the..

    relationship 옵션 ( eager relationships, Lazy relations)

    relationship 옵션 ( eager relationships, Lazy relations)

    eager relationships@ManyToMany(type => Category, category => category.questions, {eager: true})@JoinTable()categories: Category[];Eager relation은 데이터베이스에서 엔티티를 로드할 때마다 자동으로 relation 필드들을 로드한다.너무 많은걸 load 하면 서버 부하가 심하므로 주의해야 한다.// 나쁜예 - 많은 정보를 load 하고 있다.subscription { cookedOrders { restaurant { name } total customer { email restaurants { owner { email..

    for...of와 forEach 차이

    for...of와 forEach 차이

    🧐 for...of 루프- 반복을 중간에 멈출 수 있다🧐 forEach 메서드- 중간에 반복을 멈출 수 없다.- 예외를 던지는 방법을 사용하면 멈출 수는 있지만 권장되지 않음  const items = [ { name: 'Pickle', extra: 1 }, { name: 'Size', choices: ['Small', 'Medium', 'Large'] }];  for...of 루프for (const item of items) { console.log(item.name);}for...of 루프는 배열이나 다른 이터러블 객체의 요소를 반복하는 데 사용된다.반복을 중간에 멈출 수 있다.  forEach 메서드items.forEach(item => { console.log(item.name);});..