Skip to content

Instantly share code, notes, and snippets.

View EdgeJH's full-sized avatar

KimJeongHeon EdgeJH

View GitHub Profile
public class MainActivity extends AppCompatActivity {
Button button;
TextView textView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
button = (Button) findViewById(R.id.button);
textView = (TextView) findViewById(R.id.text);
public class RSAUtils {
static byte[] encrypt(String string){
try {
KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");
keyPairGenerator.initialize(2048);
KeyPair keyPair = keyPairGenerator.genKeyPair();
Key publicKey = keyPair.getPublic(); // 공개키
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
byte[] arrCipherData = cipher.doFinal(string.getBytes()); // 암호화된 데이터(byte 배열)
public class SquareButton extends Button {
public SquareButton(Context context) {
super(context);
}
public SquareButton(Context context, AttributeSet attrs) {
super(context, attrs);
}
public SquareButton(Context context, AttributeSet attrs, int defStyleAttr) {
public class SharedPreference {
public SharedPreference() {
super();
}
private final static String PREF_NAME = "myapp.pref";
public class MarketVersionChecker {
public static String getMarketVersion(String packageName) {
try {
Document doc = Jsoup.connect(
"https://play.google.com/store/apps/details?id="
+ packageName).get();
Elements Version = doc.select(".content");
for (Element mElement : Version) {
var express = require('express');
var router = express.Router();
var morgan = require('morgan');
var schedule = require('node-schedule');
var pool = require('./mysql/dbconfig.js');
var success = { message: 'success' }
var fail = { message: 'fail' }
schedule.scheduleJob({ hour: 00, minute: 00}, function (err, result) {
if (err) {
console.log('err : ', err);
public class LoadingProgress {
private static Dialog mDialog;
public static ProgressDialog mProgressDialog;
public static void showDialog(Context context, Boolean touch) {
mDialog = new Dialog(context, R.style.LoadingDialog);
mDialog.addContentView(
new ProgressBar(context),
package com.edge.cosignapp.Utils;
import android.animation.ObjectAnimator;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
#-----------Begin retrofit2 proguard ---------------
-dontnote retrofit2.Platform
# Platform used when running on Java 8 VMs. Will not be used at runtime.
-dontwarn retrofit2.Platform$Java8
# Retain generic type information for use by reflection by converters and adapters.
-keepattributes Signature
# Retain declared checked exceptions for use by a Proxy instance.
-keepattributes Exceptions
##---------------Begin: proguard configuration for Gson ----------
import android.annotation.SuppressLint;
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.provider.MediaStore;