Skip to content

Instantly share code, notes, and snippets.

Avatar

Ted Park ParkSangGwon

View GitHub Profile
@ParkSangGwon
ParkSangGwon / KoreanUtil.java
Created Aug 4, 2016
안드로이드,JAVA에서 단어에 따라서 '을/를', '이/가','은/는' 구분하기
View KoreanUtil.java
public class KoreanUtil {
public static final String getComleteWordByJongsung(String name, String firstValue, String secondValue) {
char lastName = name.charAt(name.length() - 1);
// 한글의 제일 처음과 끝의 범위밖일 경우는 오류
if (lastName < 0xAC00 || lastName > 0xD7A3) {
return name;
}
@ParkSangGwon
ParkSangGwon / AvoidSmartManagerActivity.java
Last active Jul 22, 2016
SmartManager Issue TransActivity
View AvoidSmartManagerActivity.java
public class AvoidSmartManagerActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
overridePendingTransition(0, 0);
finish();
}
}
View MapsActivity.java
package com.gun0912.googlemapcustommarker;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.util.DisplayMetrics;
View MarkerItem.java
public class MarkerItem {
double lat;
double lon;
int price;
public MarkerItem(double lat, double lon, int price) {
this.lat = lat;
this.lon = lon;
View marker_layout.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<TextView
android:id="@+id/tv_marker"
View ClearEditText.java
/**
* Created by TedPark on 16. 4. 11..
*/
public class ClearEditText extends AppCompatEditText implements TextWatcher, View.OnTouchListener, View.OnFocusChangeListener {
private Drawable clearDrawable;
private OnFocusChangeListener onFocusChangeListener;
private OnTouchListener onTouchListener;
View jandiTest.js
var request = require('request');
var testJandi = function () {
var formData = {
body: '[[PizzaHouse]](http://url_to_text) You have a new Pizza order.', //Body text (Required)
connectColor: '#FAC11B', //Hex code color of attachment bar
connectInfo: [{
View AddCookiesInterceptor.java
public class AddCookiesInterceptor implements Interceptor {
@Override
public Response intercept(Chain chain) throws IOException {
Request.Builder builder = chain.request().newBuilder();
// Preference에서 cookies를 가져오는 작업을 수행
Set<String> preferences = SharedPreferenceBase.getSharedPreference(APIPreferences.SHARED_PREFERENCE_NAME_COOKIE, new HashSet<String>());
View call_popup_top.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#f00"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="16dp">
View CallingService.java
public class CallingService extends Service {
public static final String EXTRA_CALL_NUMBER = "call_number";
protected View rootView;
@InjectView(R.id.tv_call_number)
TextView tv_call_number;