| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 반복줄이기
- 타입스크립트
- React Native
- 레이아웃쪼개기
- 공통컴포넌트
- javascript
- 성능최적화
- TSDoc
- reactjs
- 타입좁히기
- 누구나 자료구조와 알고리즘
- 개발콘텐츠
- NonNullable
- 커스텀
- returnType
- CSS
- vue.js
- React.js
- JS console
- 티스토리꾸미기
- const 단언문
- 리액트
- react
- Chart.js
- 제네릭
- 2022
- typescript
- 폰트적용하기
- utilty type
- click and drag
- Today
- Total
목록Development (400)
몽땅뚝딱 개발자
function solution(cacheSize, cities) { const HIT = 1, MISS = 5 const cache = [] let totalTime = 0 if (cacheSize === 0) return MISS * cities.length for (let i = 0; i = cacheSize) { cache.shift() } } cache.push(searchTarget) } return totalTime}
1. indexOf로 배열자체의 위치를 바꿨다가 시간초과되고... (‼️)2. Map으로 풀었다. function solution(players, callings) { const playerIndexes = {}; players.forEach((player, index) => { playerIndexes[player] = index; }); callings.forEach(name => { const currentPlayerPosition = playerIndexes[name]; const prevPlayer = players[currentPlayerPosition - 1]; players[currentPlayerPosition] = ..
처음에 읽자마자 "이건 트리다!"라고 당당하게 생각한 뒤 코드를 짰다. 그런데.. 최소경로를 구하기위해 DFS로 접근하려고보니 트리라는 자료구조가 이 문제와 맞지 않다는 판단이 들었다. 더 정리를 해보자면 단순히 부모-자식 관계를 갖고있고 노드를 순차적으로 방문할 수 있다는 사실 하나로 트리로 접근했지만... 상위 부모가 하나인 트리가 이상해보였다. 그리고 키패드 구조상 트리처럼 단방향이 아닌 서로 연결될 수 있는 양방향 연결이 가능하고 싸이클이 존재하는 자료구조가 필요하다는 사실을 깨닫는다. 예전에 공부했던 자료구조 책을 펼쳐보고 '이건 그래프로 풀어야 하는거구나' 이마를 탁 치고 그래프로 접근했다. (조금 성장한 듯..) 그래프에 대해 공부하며 맨해튼 거리에 대해서도 알게됐다. 알고리즘 넘 재밌어....
처음 구구절절 Date로 풀다가 테스트케이스 3번이 해결되지않아서 힌트를 봤더니 prev를 한 뒤 현재 이동한 시간이 오프닝 시간 내에 있는지 검사했어야 헸다. Date로 하다보니 너무 코드가 구구절절했지만 푼게 아까워서 집착하다가.... 결국 버리고 새롭게 품..^0 ^ const prev = (time) => { time -= 10 return time { time += 10 return time > videoLength ? videoLength : time}const checkOpeningTime = (time, openingStartTime, openingEndTime) => { return time >= openingStartTime && time { const [mm, ss] ..
function solution(totalCount, limit, power) { let result = 0 for (let i = 1; i limit ? power : count) } return result}
// answer 1const 정답패턴 = { 1: [1, 2, 3, 4, 5], 2: [2, 1, 2, 3, 2, 4, 2, 5], 3: [3, 3, 1, 1, 2, 2, 4, 4, 5, 5],}function solution(answers) { const 학생별정답을찍는패턴 = {} const 학생별정답의수 = {} const 정답 = new Array(answers.length).fill().map((_, index) => answers[index % answers.length]) Object.values(정답패턴).forEach((array, index) => { 학생별정답을찍는패턴[index + 1] = new Array(answers.length).fill().map((_, ..
프로덕션 배포를 하려고하니 광고 ID에 대한 정책을 업데이트하라고 해서 광고를 사용하지 않으니 "아니오"로 선언했으나..자꾸 문제라고 하는 것이다 ^^ !! 콱👊🏻 알고보니 추가했던 관련 설정들이 문제였다.Firebase Crashlytics와 Firebase Analytics를 연동했다면 AD_ID 권한이 자동으로 들어간다고 한다. https://github.com/firebase/firebase-android-sdk/issues/2582 Firebase-analytics adds Ad dependecy · Issue #2582 · firebase/firebase-android-sdkWhen I'm using com.google.firebase:firebase-analytics:18.0.2 p..
보호되어 있는 글입니다.
✨ 트러블 슈팅- use_expo_modules!config = use_native_modules!pod 'GoogleUtilities', :modular_headers => true // hereuse_frameworks! :linkage => :static // here - flipper 설정 끄기# :flipper_configuration => flipper_config
갖가지 핑계로 미루고 미루다가..... 드뎌 적용,,^^ 1. App.tsx를 감싸준다.import { registerRootComponent } from 'expo'import 'react-native-gesture-handler'import * as Sentry from '@sentry/react-native'import App from './App'Sentry.init({ dsn: {settings > DNS 정보에서 가져온 key}, tracesSampleRate: 0.5,})registerRootComponent(Sentry.wrap(App)) 2. 에러가 발생한 부분에 적용한다.Sentry.captureException의 두번째 파라미터는 hint로 자세한 정보를 보낼 수 있다...