| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
- 꿀단집
- 유노코딩
- Azure
- 코딩테스트준비
- 클라우드컴퓨팅
- 99클럽
- 방송대컴퓨터과학과
- JavaScript
- 개발자취업
- 중간이들
- 코딩테스트
- TiL
- Python
- 데이터베이스시스템
- redis
- node.js
- 파이썬
- Git
- 파이썬프로그래밍기초
- 오픈소스기반데이터분석
- 방송대
- CSS
- aws
- HTML
- nestjs
- 프로그래머스
- 항해99
- 엘리스sw트랙
- 코드잇
- mongoDB
- Today
- Total
목록분류 전체보기 (243)
배꼽파지 않도록 잘 개발해요
const fs = require('fs');const data = fs.readFileSync('/dev/stdin').toString().trim().split('\n');const [M, N, K] = data[0].split(' ').map(Number);const rectangles = data.slice(1).map(line => line.split(' ').map(Number));function findAreasOfSeparatedRegions(M, N, rectangles) { let grid = Array.from({ length: M }, () => Array(N).fill(0)); rectangles.forEach(([x1, y1, x2, y2]) => { fo..
redisClient에 세션 ID를 넣어주는 코드를 작성하던 중 오류가 발생하였다.NestJS는 기본적으로 TypeScript로 만들어졌기 때문에 타입스크립트를 사용한다. 타입스크립트는 런타임이 아닌 컴파일 중 타입 오류를 발생시킨다. 그래서 코드 작성할 때 시간이 꽤 걸리지만 서버 실행 중 오류가 발생하는 것보다는 백배 낫다.Object literal may only specify known properties, and 'sessionId' does not exist in type 'Buffer'.ts(2353)(property) sessionId: Promise 현상객체를 set 메소드에 직접 전달할 때 타입 에러가 발생하고 있다.문제Object literal이 특정 타입에 맞춰서 작성되어야 하는데..
데이터베이스와의 연결 여부를 알 수 있는 healthcheck API를 만들다가 다음과 같은 오류가 발생하였다. Error: Nest can't resolve dependencies of the HealthCheckService (REDIS_CLIENT, ?). Please make sure that the argument default at index [1] is available in the HealthCheckModule context.Potential solutions:- Is HealthCheckModule a valid NestJS module?- If default is a provider, is it part of the current HealthCheckModule? - If ..
function countSheepGroups(grid, H, W) { const directions = [ [-1, 0], [1, 0], [0, -1], [0, 1] ]; function dfs(x, y) { if (x = H || y = W) return; if (grid[x][y] !== '#') return; grid[x][y] = '.'; for (let [dx, dy] of directions) { dfs(x + dx, y + dy); } } let sheepGroupCount = 0; for (let i = 0; i
/** * Definition for a binary tree node. * function TreeNode(val, left, right) { * this.val = (val===undefined ? 0 : val) * this.left = (left===undefined ? null : left) * this.right = (right===undefined ? null : right) * } *//** * @param {TreeNode} root * @param {number} distance * @return {number} */var countPairs = function(root, distance) { let result = 0; function dfs(node)..
프로젝트 생성 후 엔드포인트가 'sign-in'인 회원가입 API를 만들어보자. NestJS 프로젝트 생성 명령어npm install -g @nestjs/clinest new project-name 현재 우리 서비스에는 회원가입과 관련된 모듈은 auth 모듈과 users 모듈로, 2개가 있다.auth 모듈은 인증 및 인가와 관련된 기능을 담당하고, users 모듈은 회원 관리와 관련된 기능을 담당한다.먼저 회원 정보를 저장할 Users 엔티티를 생성한다. API 개발은 다음과 같은 순서로 진행될 것이다. 1. Entity 정의2. 의존성 주입 (DI, Dependency Injection)3. DTO 설계4. Service 구현 5. Controller 구현1. Entity 정의우선 'users' 모..
PS C:\Users\airyt\HoneyTouse_BE> git push origin googleTo https://github.com/HoneyTouse/HoneyTouse_BE.git ! [rejected] google -> google (non-fast-forward)error: failed to push some refs to 'https://github.com/HoneyTouse/HoneyTouse_BE.git'hint: Updates were rejected because the tip of your current branch is behindhint: its remote counterpart. If you want to integrate the remote changes,hin..
Docker를 사용하기 위해 공식 웹사이트에서 올바르게 설치한다.설치할 때는 우선 설치 파일을 다운 받고 관리자 권한으로 실행해야한다. 그렇지 않으면 에러가 날 수 있다. https://docs.docker.com/engine/install/ Install Docker EngineLearn how to choose the best method for you to install Docker Engine. This client-server application is available on Linux, Mac, Windows, and as a static binary.docs.docker.com 설레는 마음으로 실행버튼을 클릭했을 때 아래 사진과 같이 'Group membership check'라는 에러가 떴..
function numIslands(grid) { if (grid.length === 0) return 0; const directions = [ [-1, 0], [1, 0], [0, -1], [0, 1], [-1, -1], [-1, 1], [1, -1], [1, 1] ]; let count = 0; function dfs(x, y) { if (x = grid.length || y >= grid[0].length || grid[x][y] === '0') { return; } grid[x][y] = '0'; // Mark this cell as visited by setting it to '0' ..
function calculateDistances(N, connections) { // 트리 구조를 초기화 const tree = new Map(); for (let i = 1; i 0) { const current_pipe = queue.shift(); const current_distance = distance[current_pipe]; // 연결된 모든 파이프를 순회 for (const child of tree.get(current_pipe)) { if (distance[child] === -1) { // 아직 방문하지 않은 경우 distance[child] = curr..