분류 전체보기

    [android] 토이프로젝트

    코로나의 여파로 무기력증도 좀 있고, 몸상태가 그렇게 좋지는 않지만 가만히 있으면 좀먹는 느낌이라 주제가 생각난 김에 토이프로젝트를 진행하려고 한다. 우선 was를 사용하지 않아도 되는, 순수 android를 통해서 만드는 것으로 하고 flutter를 이용하는 것으로 하려했으나, 우선 native를 통해 만들고 배포하는 것을 목표로 한다. 사용 스텍 1. kotlin 2. custom view 3. aac 4. mvvm pattern 4. livedata 5. di injection 6. coroutine + flow 7. navigation 8. room / sql lite 이중에서 얼마나 또 어느정도 사용될 지는 모르겠지만 목표로 잡고 사용해보려고 한다. 퇴근 후 조금씩 작성해보자 12/21 start

    [android] context 란

    정말 흔하게 사용되는 context. 아무 생각없이 공기처럼 사용되는 녀석이지만 잘못사용할 경우 memory leak이 빈번하게 발생 할 수 있다. https://developer.android.com/reference/android/content/Context Context | Android Developers developer.android.com 응용 프로그램 환경에 대한 전역 정보에 대한 인터페이스입니다. Android 시스템에서 구현을 제공하는 추상 클래스입니다. 애플리케이션별 리소스 및 클래스에 대한 액세스는 물론 시작 활동, 브로드캐스팅 및 인텐트 수신 등과 같은 애플리케이션 수준 작업에 대한 상향 호출을 허용합니다. 라고 설명이 되어있는대, 크게 애플리케이션의 현재 상태 값, 액티비티 / ..

    [codillity] kotlin - lesson4. MaxCounters

    You are given N counters, initially set to 0, and you have two possible operations on them: increase(X) − counter X is increased by 1, max counter − all counters are set to the maximum value of any counter. A non-empty array A of M integers is given. This array represents consecutive operations: if A[K] = X, such that 1 ≤ X ≤ N, then operation K is increase(X), if A[K] = N + 1 then operation K i..

    [codillity] kotlin - lesson4. PermCheck

    A non-empty array A consisting of N integers is given. A permutation is a sequence containing each element from 1 to N once, and only once. For example, array A such that: A[0] = 4 A[1] = 1 A[2] = 3 A[3] = 2 is a permutation, but array A such that: A[0] = 4 A[1] = 1 A[2] = 3 is not a permutation, because value 2 is missing. The goal is to check whether array A is a permutation. Write a function:..

    [codillity] kotlin - lesson4. FrogRiverOne

    A small frog wants to get to the other side of a river. The frog is initially located on one bank of the river (position 0) and wants to get to the opposite bank (position X+1). Leaves fall from a tree onto the surface of the river. You are given an array A consisting of N integers representing the falling leaves. A[K] represents the position where one leaf falls at time K, measured in seconds. ..

    [codillity] kotlin - lesson3. TapeEquilibrium

    A non-empty array A consisting of N integers is given. Array A represents numbers on a tape. Any integer P, such that 0 < P < N, splits this tape into two non-empty parts: A[0], A[1], ..., A[P − 1] and A[P], A[P + 1], ..., A[N − 1]. The difference between the two parts is the value of: |(A[0] + A[1] + ... + A[P − 1]) − (A[P] + A[P + 1] + ... + A[N − 1])| In other words, it is the absolute differ..

    [codillity] kotlin - lesson3. PermMissingElem

    An array A consisting of N different integers is given. The array contains integers in the range [1..(N + 1)], which means that exactly one element is missing. Your goal is to find that missing element. Write a function: class Solution { public int solution(int[] A); } that, given an array A, returns the value of the missing element. For example, given array A such that: A[0] = 2 A[1] = 3 A[2] =..

    [codillity] kotlin - lesson3. FrogImp

    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: class Solution { public int solution(int X, int Y, int D); } that, given three inte..