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 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); |
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 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 배열) |
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 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) { |
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
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); |
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 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), |
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
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; |
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
#-----------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 ---------- |
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
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; |
OlderNewer