본문 바로가기

분류 전체보기

(304)
[C언어(강의)] 25강~28강 (배열과 포인터) [ 흥달쌤 유투브 강의 정리 ] https://www.youtube.com/watch?v=kIwVLkLdACo  (25강) 배열과 포인터(1) => 37 47 57 67 77배열  a  :  a[0]  a[1] ........ a[9]      100     100  101 ....... 109   (번지수)int *ptr = a+3   => 100+3 = 103           i   :  0   1   2   3   4*(ptr + i)  : 40 50 60 70 80  (26강) 배열과 포인터(2) * 배열과 포인터의 관계int a[5]배열  a  :  a[0]  a[1]  a[2]  a[3]  a[4]        100    100  101  102  103  104   (번지수)int *b ..
[C언어(강의)] 21강~24강 (배열, 포인터, scanf) [ 흥달쌤 유투브 강의 정리 ] https://www.youtube.com/watch?v=wgdLUvIYprY  (21강) 배열(1) * 배열이란?같은 자료형의 변수를 연속적으로 묶어 놓은 저장공간. * 배열의 선언int a [ 5 ]      자료형/배열명 /개수=> a[0]  a[1]  a[2]  a[3]  a[4]  라는 5개의 메모리 공간 생성.a라는 변수는 첫번째 공간(배열의0번지)의 메모리 주소값을 가진다.( a[0]의 주소값이 '100'이라면 a가 가지는 주소값도 '100' )  * 이차원 배열같은 자료형의 변수를 행과 열의 연속적인 공간으로 묶어 놓은 것.총 6개의 공간 생성. (실제로는 1차원 배열처럼 나란히 저장.) => 2 msg[2] ~ msg[12] 일때 까지 반복. ( " H e..
[C언어(강의)] 19강~20강 (for, continue, break, 다중for문) [ 흥달쌤 유투브 강의 정리 ] https://www.youtube.com/watch?v=58Psz9TwlLA  (19강) for, continue, break * continue _ 더이상 아래 문장을 실행하지 않고 반복문 처음으로 돌아감.* break _ 반복문을 빠져나감. => 12  ( i가 3, 9일때만 sum += i 실행 )   (20강) 다중 For문, continue, break * continue => 2   * break=> 1 =>  j가 3, 6, 9 일때 continue  //   i가 4, 8 일때 breaki가 1일 때, j가 3, 6, 9 일때를 제외하면 sum = 6i가 9일때까지 7번 반복하면 (i가 4, 8일때 제외) sum = 42
[React] Debounce 를 활용한 검색기능. [ Debounce ]연속된 이벤트에서 마지막 이벤트만 처리.import React, { useRef } from "react";const useDebounce = (callback, delay) => { const debounceTimer = useRef(null); return (...args) => { if (debounceTimer.current) { clearTimeout(debounceTimer.current); } debounceTimer.current = setTimeout(() => { callback(...args); }, delay); };};export default useDebounce;debounceTimer 를 'useRef' 로 선..
[css] css단위 _ EM, REM EM  : 부모요소 font 크기에 비례.ex) 부모요소의 font-size : 20px => 1em : 20px=> 3em : 60px* 부모요소의 font-size마다 비율이 달라짐.* 중첩된 요소에서는 'em'단위가 누적되어 계산.  REM : 루트요소(HTML문서 '' 태그) font 크기에 비례.ex) 루트요소의 font-size : 16px => 1rem : 16px=> 3rem : 48px* 페이지 전체에서 일관된 비율 유지 가능.
[JPA] JPA_existBy~ / Querydsl 성능비교 (+ fetchOne(), fetchFirst()) * 아이디 중복확인 체크로직 두가지 방법으로 실행속도 비교1. JPA Repository 메소드 사용2. QueryDSL 사용  1. JPA  Repository _ existBy~ 메소드 * UserRepositorypublic interface UserRepository extends JpaRepository { boolean existsByUserIdAndCode(String userId, String code);} * UserService// 아이디 중복확인 체크 로직// param: String userId, String codeif(UserRepository.existsByUserIdAndCode(userId, code)){ throw new CustomExc..
[Spring / HTTP] ResponseEntity [ ResponseEntity ] 스프링 프레임워크(Spring Framework)에서 HTTP 응답을 상세하게 제어할 수 있도록 제공하는 클래스. * HttpEntity 를 상속받아 구현된 클래스. ( HttpEntity 클래스는 HttpHeader와 HttpBody를 포함. ) package org.springframework.http;public class ResponseEntity extends HttpEntity { private final HttpStatusCode status; // .....}=> 따라서 HTTP 응답의 body, status code, headers 등을 포함한다.  * 예시 *import org.springframework.http.ResponseEntit..
[JPA] List<Entity> 비교 * 자바 List 비교 참고https://phyho.tistory.com/317 [JS] 배열값 비교 (include, '===') / Java_List 비교* 배열요소 비교 ( include ) const arr = [1, 2, 3, 4, 5];console.log(arr.includes(2)); // true * includes() 함수는 내부적으로 '===' 연산자를 사용하여 요소를 비교하기 때문에 다른 타입은 비교 불가능.const mixedArr =phyho.tistory.com [ Entity 클래스 ]@Entity@Getter@Setter@Builder@NoArgsConstructor@AllArgsConstructorpublic class Entity { private String id..