Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
using namespace std;
void swap(int arr[], int a, int b) {
int tmp = arr[a];
arr[a] = arr[b];
arr[b] = tmp;
}
@ihoneymon
ihoneymon / how-to-write-by-markdown.md
Last active April 18, 2024 07:19
마크다운(Markdown) 사용법

[공통] 마크다운 markdown 작성법

영어지만, 조금 더 상세하게 마크다운 사용법을 안내하고 있는
"Markdown Guide (https://www.markdownguide.org/)" 를 보시는 것을 추천합니다. ^^

아, 그리고 마크다운만으로 표현이 부족하다고 느끼신다면, HTML 태그를 활용하시는 것도 좋습니다.

1. 마크다운에 관하여

@ericelliott
ericelliott / essential-javascript-links.md
Last active March 28, 2024 23:01
Essential JavaScript Links
@akshaydeo
akshaydeo / EfficientThreadPoolExecutor
Created October 21, 2014 11:57
EfficientThreadPoolExecutor
/**
* Thread pool executor
* Author: akshay
* Date : 9/30/13
* Time : 2:55 PM
*/
public class EfficientThreadPoolExecutor extends ThreadPoolExecutor {
/**
* Logger
@blixtra
blixtra / Android Memory Management Notes.md
Created May 7, 2014 20:20
Notes taken while looking into memory issues on low-RAM devices

Android Memory Management

Android has a unique memory management model. Below, are the notes taken while we try to understand it thoroughly.

Activity Manager

Overview

The ActivityManager, among other things, is responsible for making sure that apps that are most important to the user and/or essential remain active. It does this by dynamically assigning values that roughly indicate the app's importance. When memory gets low these values are used to find the apps that need to be "trimmed." The memory from these "trimmed" apps is freed, making more available for the more important apps.

@benelog
benelog / AsyncTask-executor-problem.md
Last active August 27, 2021 16:15
AsyncTask 분석

변경이력

  • 2013/10/15: Dianne Hackborn의 언급에 대한 번역은 안세원님이 교정해주신 내용으로 교체합나디.

AsyncTask는 API Level 13이상 버전이 설치된 기기에서 android:targetSdkVersion가 13이상 일 때 여러 개의 AsyncTask가 동시에 실행되어도 순차적으로 호출됩니다.

기기의 버전뿐만 아니라 targetSDK 설정에도 영향을 받으므로 target SDK 설정을 변경할 때 유의해야 합니다. 그리고 가능하다면 목적별로 스레드풀을 분리하고, 스레드의 갯수가 늘어나는 것에 대비해 무작정 큰 최대값을 주는것보다는 Timeout과 RejectionPolicy로 관리를 하는 편이 바람직합니다.

@romannurik
romannurik / SwipeDismissListViewTouchListener.java
Last active May 1, 2021 10:16
**BETA** Android 4.0-style "Swipe to Dismiss" sample code
Moved to
https://github.com/romannurik/android-swipetodismiss
@skhatri
skhatri / quality.gradle
Created February 24, 2012 00:45
Gradle Checkstyle HTML Reporting
apply plugin: 'checkstyle'
checkstyleMain {
ignoreFailures = false
reports {
include ( '**/*.java')
xml {
destination "${rootProject.buildDir}/reports/checkstyle/main.xml"
}
}