This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<item> | |
<shape android:shape="rectangle"> | |
<gradient | |
android:startColor="#66000000" | |
android:centerColor="#33000000" | |
android:centerY="0.2" | |
android:endColor="@android:color/transparent" | |
android:angle="90" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<TextView | |
android:id="@+id/tv1" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A non-empty array A consisting of N integers is given. The consecutive elements of array A represent consecutive cars on a road. | |
Array A contains only 0s and/or 1s: | |
0 represents a car traveling east, | |
1 represents a car traveling west. | |
The goal is to count passing cars. We say that a pair of cars (P, Q), where 0 ≤ P < Q < N, is passing when P is traveling to the east and Q is traveling to the west. | |
For example, consider array A such that: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// N을 넘을때마다 max를 찾아서 일괄 적용후 진행하는 방식은 O(n^2) 만큼의 시간소요 | |
// N을 넘을때마다 임시로 저장된 값으로 max를 설정해 적용하고 나중에 max 적용안된 부분을 일괄적으로 적용하는 방법 O(N+M) | |
class Solution { | |
public int[] solution(int N, int[] A) { | |
// write your code in Java SE 8 | |
int answer[] = new int[N]; | |
int max = 0, temp = 0; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. 설치 | |
https://flutter.dev/docs/get-started/install/macos | |
위 경로로 들어가서 mac 버전 flutter를 다운로드 받는다 | |
home에 develepment 폴더(자유) 만들고 압축해제하면 flutter 폴더가 생긴다 | |
export PATH="$PATH:`pwd`/flutter/bin" | |
터미널로 위 명령어를 실행하여 flutter를 환경변수에 세팅해야 하지만 이렇게하면 터미널을 껏다가 킬때마다 실행해야한다. | |
.bash_profile ( home에 숨겨져있음) 에서 값을 수정해야 한다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
style.xml 파일에서 | |
<resources> | |
<!-- Base application theme. --> | |
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> | |
<!-- Customize your theme here. --> | |
<item name="colorPrimary">@color/colorPrimary</item> | |
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | |
<item name="colorAccent">@color/colorAccent</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Android Studio IDE를 통해 Release Signing Key를 생성한다. | |
아래 명령어를 통해 사이닝키 SHA-1 값을 Base64로 인코딩한 값을 출력하여 페이스북, 카카오 API에 해시를 등록할 수 있다. | |
keytool -exportcert -alias allcommunity -keystore /Users/kim/Desktop/allcommunity.jks | openssl sha1 -binary | openssl base64 | |
만약 구글 플레이 개발자 콘솔에서 Google play app signing 기능을 활성화시키셨다면 | |
구글 플레이에 앱이 릴리즈되기 전에 개발자의 로컬 개발 환경에서 릴리즈 키스토어의 시그너쳐가 삭제되고 | |
구글 서버에 저장되어 있는 사이닝키의 시그너쳐로 교체됩니다. 그렇기 때문에 이 사이닝키로 생성한 키해시 또한 등록해줘야 합니다. | |
google play console > 해당 앱 선택 > 메뉴에서 출시관리 > 앱서명 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class SwipeDismissBaseActivity extends AppCompatActivity { | |
private static final int SWIPE_MIN_DISTANCE = 120; | |
private static final int SWIPE_MAX_OFF_PATH = 250; | |
private static final int SWIPE_THRESHOLD_VELOCITY = 200; | |
private GestureDetector gestureDetector; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
gestureDetector = new GestureDetector(new SwipeDetector()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The issue is resolved by these changes: | |
Close Android Studio | |
Go to C:\Users\UserName.android and rename the build-cache folder to buildcache.bak | |
Go to C:\Users\UserName.AndroidStudio3.2\system and rename these folders | |
(1) caches to caches.bak | |
(2) compiler to compiler.bak | |
(3) compile-server to compile-server.bak | |
(4) conversion to conversion.bak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DonutView extends View { | |
Context context; | |
int value = 0; | |
int size; | |
int strokeSize; | |
int textSize; | |
int width; | |
int height; |
NewerOlder