앱 아이콘이 런처에 보이지 않는 문제 Github OAuth를 적용하기 위해 처음에 아래처럼 intent-filter 를 구성했다. 그런데 적용한 후 실행해보니 앱의 아이콘이 앱 런처에 나타나지 않았다. <activity android:name=".presentation.login.LoginActivity" android:exp...
[프로그래머스] 도둑질
문제 주소 https://programmers.co.kr/learn/courses/30/lessons/42897 #include <string> #include <vector> using namespace std; int solution(vector<int> money) { int answer = 0...
[프로그래머스] 등굣길
문제 주소 https://programmers.co.kr/learn/courses/30/lessons/42898 #include <string> #include <vector> using namespace std; // D[i][j] = D[i-1][j] + D[i][j-1]; // puddles 행렬이 반대 int ...
[프로그래머스] 단속카메라
풀이방법 진출지점으로 배열을 오름차순 정렬한다. 첫번째 차의 진출지점에는 무조건 카메라가 있어야 한다. 다음차들부터는 진입지점이 이전 차의 진출지점 이하일 경우에는 제거한다. #include <string> #include <vector> #include <algorithm> #include <...
[프로그래머스] 섬 연결하기
최소 신장 트리 문제 크루스칼 알고리즘 이용 바킹독 최소 신장 트리 참고했음 #include <string> #include <vector> #include <algorithm> #include <iostream> using namespace std; bool compare(vector<...
[프로그래머스] 구명보트
#include <string> #include <vector> #include <algorithm> #include <deque> #include <iostream> using namespace std; /** * * 제한사항에서 구출할 수 없는 경우는 없다고 했으므로 모두 빠져 나갈때...
버튼 커스텀 drawable 적용이 안될 때
개요 라운드된 버튼을 만들기 위해 drawable을 만들어 background에 사용하려고 했었다. drawable <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape...
Coroutine 취소 및 예외처리
일반적인 코루틴 예외처리 방법 (CoroutineExceptionHandler) 코루틴에서 예외를 처리하는 일반적인 방법은 CoroutineScope을 이용해 새 코루틴을 생성할 때 CoroutineExceptionHandler를 이용해 예외를 처리할 수 있다. 코드 import kotlinx.coroutines.* import java.io.IOE...
Coroutine에서 Retrofit 사용 시 알아둘 점
이전에 안드로이드 앱을 구현하면서 Coroutine에서 Retrofit을 사용한 적이 있었다. 그때 당시에는 인터넷 예제에서는 대부분 아래와 같이 구현되어 있었다. interface XXXService { @GET("api/YYYY") suspend fun getData(): Call<ZZZZ> // 또는 Response&l...
Coroutine 원리
최종 수정 날짜 : 2022-05-06 16:58:38 +0900 Coroutine 원리 코루틴이 어떻게 작동되는가에 대해 공부한 내용을 정리해보았다. 이전 글을 참고해보면, 코루틴은 처음 생성될 때 사용한 스레드가 아닌 다른 스레드에서도 실행될 수 있다고 했다. 그게 가능한 이유는 아래 gif를 참고해보자. 스레드에서 코루틴이 suspen...