I hereby claim:
- I am ohjongin on github.
- I am ji5 (https://keybase.io/ji5) on keybase.
- I have a public key ASC3gWMsPjY16gZdvOCl2TLeMF8nr_UdC44E9L4uxnLLfQo
To claim this, I am signing this object:
| const hostname = 'sso.sisoul.kr' | |
| // const env = require('env.json'); | |
| const env = { | |
| "sso.sisoul.kr": { | |
| "node_env": "production", | |
| "api_server": "https://api.sisoul.kr" | |
| }, | |
| "sso.dev.sisoul.kr": { | |
| "node_env": "development", | |
| "api_server": "https://api.dev.sisoul.kr" |
I hereby claim:
To claim this, I am signing this object:
| /** @summary objectKeysToLowerCase( input, deep, filter ) | |
| * returns a new object with all own keys converted to lower case. | |
| * The copy can be shallow (default) or deep. | |
| * | |
| * Circular references is supported during deep copy and the output will have | |
| * the same structure. | |
| * | |
| * By default only objects that have Object as constructor is copied. | |
| * It can be changed with the "filter"-function. | |
| * |
| /** | |
| * (1)Get tweets by search keyword and (2)Stemming(Korean), (3)save to mysql finally | |
| */ | |
| var Promise = require('bluebird'); | |
| var TwitterKoreanText = require('twtkrjs'); | |
| var twitterKoreanText = new TwitterKoreanText({ | |
| stemmer: true, // (optional default: true) | |
| normalizer: true, // (optional default: true) |
| // from: http://www.senun.com/Left/Programming/Java/Jsp/jsp_syntax_hangul.htm | |
| // 유니코드를 한글코드로 변환 | |
| protected String uni2ksc (String Unicodestr) throws UnsupportedEncodingException { | |
| return new String (Unicodestr.getBytes("8859_1"),"KSC5601"); | |
| } | |
| // 한글코드를 유니코드로 변환 | |
| protected String ksc2uni(String str) throws UnsupportedEncodingException { | |
| return new String( str.getBytes("KSC5601"), "8859_1"); |
| @SuppressLint("NewApi") | |
| public class ContactsActivity extends ActionBarActivity implements View.OnClickListener, AdapterView.OnItemClickListener, SearchView.OnQueryTextListener, SearchView.OnCloseListener { | |
| @SuppressLint("NewApi") | |
| @Override | |
| public boolean onCreateOptionsMenu(Menu menu) { | |
| // Inflate the menu; this adds items to the action bar if it is present. | |
| getMenuInflater().inflate(R.menu.contacts, menu); |
| /* | |
| Copyright (C) 2013-2014. Jongin Oh | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |
| public static boolean hasPermission(Context context, String permission) { | |
| int res = context.checkCallingOrSelfPermission(permission); | |
| return (res == PackageManager.PERMISSION_GRANTED); | |
| } | |
| @SuppressLint("NewApi") | |
| public static String getUserDisplayName(Context context) { | |
| if (Build.VERSION.SDK_INT < 14) return ""; | |
| if (!hasPermission(context, "android.permission.READ_PROFILE")) return ""; |
| public boolean isPhoneNumber(String number) { | |
| if (number == null || TextUtils.isEmpty(number)) { | |
| return false; | |
| } | |
| // return Pattern.matches(PHONE_NUMBER_PATTERN, number.replace("-", "")); | |
| return android.util.Patterns.PHONE.matcher(number).matches(); | |
| } |
| PackageManager pm = getPackageManager(); | |
| ComponentName newComposer = new ComponentName(getApplicationContext(), ComposerActivity.class); | |
| pm.setComponentEnabledSetting( | |
| newComposer, | |
| is_new_composer ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED : PackageManager.COMPONENT_ENABLED_STATE_DISABLED, | |
| PackageManager.DONT_KILL_APP); | |
| ComponentName oldComposer = new ComponentName(getApplicationContext(), SendSMSActivity.class); | |
| pm.setComponentEnabledSetting( |