목록분류 전체보기
Step-by-Step
https://expressjs.com/ Express - Node.js web application framework Fast, unopinionated, minimalist web framework for Node.js $ npm install express --save expressjs.com ExpressJS 공식문서 설명 : Fast, unopinionated, minimalist web framework for Node.js Node.js를 위한 빠르고 개방적인 간결한 웹 프레임워크 자체적인 최소한의 기능을 갖춘 라우팅 및 미들웨어 웹 프레임워크 NodeJS 공식문서 설명 : Chrome V8 JavaScript 엔진으로 빌드된 JavaScript 런타임 비동기 이벤트 주도 JavaScript..
https://leetcode.com/problems/string-compression/ String Compression - LeetCode Can you solve this real interview question? String Compression - Given an array of characters chars, compress it using the following algorithm: Begin with an empty string s. For each group of consecutive repeating characters in chars: * If the group's leng leetcode.com 알파벳1 - 연속된 수 (1제외) - 알파벳2 - 연속된 수 - ... 로 나타내는 작..
https://leetcode.com/problems/edit-distance/description/ Edit Distance - LeetCode Can you solve this real interview question? Edit Distance - Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three operations permitted on a word: * Insert a character * D leetcode.com DP 사용해서 문제인데, 사실 너무 감이 오지 않아서 여러 검색을 통해 푸는 방법을..
AUTO_INCREMENT 속성을 사용하게 되면, 3 rows를 INSERT 후 모두 DELETE 해도 다음 값이 1이 아니라 4가 된다 처음 테이블을 만들때 부터 중간에 데이터가 삭제되어도 브레이크 없이 계속 올라가는 특징이 있다. AUTO_INCREMENT 값을 ALTER로 초기화해 줄 수 있다. ALTER TABLE 테이블명 AUTO_INCREMENT = 초기값 최근 PK 값을 가져와서 등록해주려고 SQL문을 만들었는데, ALTER TABLE post AUTO_INCREMENT = (SELECT IF(count(*) = 0, 0, max()) FROM post) BUT 안된다.. 이유가 뭘까 그냥 두 가지 sql 문을 따로 실행해주었다. MyBatis에서 DDL은 안될거같았지만, Update로 해두..
PK의 최근 값 가져오기 SELECT last_insert_id() FROM 테이블명 만약 테이블에 데이터가 하나도 없을 경우 다음과 같이 작성해주면 된다 SELECT IF(count(*) = 0, 디폴드 값, last_insert_id()) FROM 테이블명
https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/ Capacity To Ship Packages Within D Days - LeetCode Capacity To Ship Packages Within D Days - A conveyor belt has packages that must be shipped from one port to another within days days. The ith package on the conveyor belt has a weight of weights[i]. Each day, we load the ship with packages on the conveyor leetcode.com 풀긴 풀었는..
https://leetcode.com/problems/single-element-in-a-sorted-array/description/ Single Element in a Sorted Array - LeetCode Can you solve this real interview question? Single Element in a Sorted Array - You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once. Return the single element leetcode.com HashMap을 ..

사용자 비밀번호를 DB에 저장하려고 PasswordEncoder를 썼더니, Spring Security가 활성화돼서 자동으로 로그인 폼이 생기고,, 모든 URL 접근이 불가능해졌다 (403 Forbidden) [1] 우선 Config 파일 하나 만들기 @EnableWebSecurity @Configuration public class SecurityConfig { } [2] 로그인 폼 없애주기 @EnableWebSecurity @Configuration public class SecurityConfig { @Bean public SecurityFilterChain configure(HttpSecurity http) throws Exception { // Security 로그인 페이지 안 뜨도록 설정 ht..