전체 글
-
[codility] Time Complexity - FrogJmpAlgorithm 2021. 9. 22. 22:49
문제 A small frog wants to get to the other side of the road. The frog is currently located at position X and wants to get to a position greater than or equal to Y. The small frog always jumps a fixed distance, D. Count the minimal number of jumps that the small frog must perform to reach its target. Write a function: public func solution(_ X : Int, _ Y : Int, _ D : Int) -> Int that, given three i..
-
[codility] Arrays - OddOccurrencesInArray 문제풀이Algorithm 2021. 9. 22. 21:44
문제 원본 O(N) or O(N*log(N)) A non-empty array A consisting of N integers is given. The array contains an odd number of elements, and each element of the array can be paired with another element that has the same value, except for one element that is left unpaired. For example, in array A such that: A[0] = 9 A[1] = 3 A[2] = 9 A[3] = 3 A[4] = 9 A[5] = 7 A[6] = 9 the elements at indexes 0 and 2 have ..
-
[AWS Amplify] Amplify 설치와 적용이유Programming/iOS 2021. 9. 9. 13:56
안녕하세요. 자비스 입니다. 최근에 시작한 프로젝트에 aws s3에 이미지 업로드 기능을 붙이기 위해 iam, cognito, aws sdk 등을 세팅하고 있었는데 Amplify 라는 서비스가 보이더군요. Mobile Hub가 Amplify로 대체한다고요!? 저는 위 링크글을 보고 aws가 밀고있는 모바일 개발 프레임워크 라는 의미로 해석했습니다. 그럼 Amplify란 무엇인가요? 자세한 내용 Amplify 모바일 및 프런트 엔드 웹 개발자가 AWS 에서 제공하는 안전하고 확장 가능한 전체 스택 애플리케이션을 구축하고 배포할 수 있도록 지원하는 제품 및 도구 세트입니다. 여기에는 클라이언트 앱 개발을 위한 종합적인 SDK, 라이브러리, 도구 및 설명서가 포함되어 있습니다. serverless로 개발할 때..
-
[codility] Arrays - CyclicRotation 문제풀이Algorithm 2021. 9. 8. 09:14
문제 원본 An array A consisting of N integers is given. Rotation of the array means that each element is shifted right by one index, and the last element of the array is moved to the first place. For example, the rotation of array A = [3, 8, 9, 7, 6] is [6, 3, 8, 9, 7] (elements are shifted right by one index and 6 is moved to the first place). The goal is to rotate array A K times; that is, each el..
-
[codility] Iterations - BinaryGap 문제풀이Algorithm 2021. 9. 6. 12:56
문제 원본 A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N. For example, number 9 has binary representation 1001 and contains a binary gap of length 2. The number 529 has binary representation 1000010001 and contains two binary gaps: one of length 4 and one of length 3. The number 20 has bi..
-
Xcode Text macro 적용Programming/iOS 2021. 8. 20. 10:40
안녕하세요. 자비스입니다. xcode 파일 생성시에 자동으로 달리는 주석을 수정하는 방법에 대해 알아보겠습니다. 디폴트는 파일명, 프로젝트명, 파일 생성 유저, 날짜 정보 입니다. 애플이 친절하게 Text Macro 문서를 정리를 잘 해두었네요. https://help.apple.com/xcode/mac/9.0/index.html?localePath=en.lproj#/dev7fe737ce0 https://help.apple.com/xcode/mac/9.0/index.html?localePath=en.lproj#/dev7fe737ce0 To see this page, you must enable JavaScript. Pour afficher cette page, vous devez activer JavaS..
-
express, jwt 사용자 인증 기능 구현 (1)Programming/Node.js 2021. 7. 20. 11:04
안녕하세요. 자비스 입니다. 지난시간에 이어서 node.js express 기반의 api서버에 사용자 인증 기능을 구현해보겠습니다. jsonwebtoken 설치 $ npm install jsonwebtoken --save secret key 생성 /config/jwt.js 파일 생성 let jwtObj = {}; jwtObj.secret = "jarvis" module.exports = jwtObj 토큰 발급 /routes/accounts.js 파일 생성 var express = require('express'); var router = express.Router(); var { User } = require('../models/index'); let jwt = require("jsonwebtoken")..
-
express-generator, Sequelize 설치 및 사용법Programming/Node.js 2021. 7. 18. 17:41
안녕하세요. 자비스입니다. node.js api 서버 개발시 필요한 express, sequilize 설치 및 사용방법 관련하여 기록합니다. 설치에 앞서 node 및 npm 설치가 필요합니다. 프로젝트 신규 생성 node.js express framework 는 프로젝트 초기 설정이 까다로운 편입니다. 편리하게 초기 프로젝트 생성을 도와주는 express-generator 으로 생성을 해보겠습니다. npm을 이용해 express-generator 전역 설치 $npm i -g express-generator express 프로젝트 생성하기 $ express --view=pug npm 모듈 설치 $ cd $ npm install 설치가 완료되면 npm start를 통해 express-generator으로 생..