Skip to content

Instantly share code, notes, and snippets.

View SignUpInteractor.java
import me.vkarmane.domain.api.auth.SignUpResponse;
import retrofit2.Response;
import rx.Observable;
/**
* Created by Bogdan Kornev
* on 24.04.2017, 23:21.
*/
public class SignUpInteractor extends AuthApiInteractor {
View SessionInteractor.java
import javax.inject.Inject;
import me.vkarmane.business.cache.AppCache;
import me.vkarmane.domain.api.auth.SessionResponse;
import me.vkarmane.legacy.main.App;
import retrofit2.Response;
import rx.Observable;
/**
* Created by Bogdan Kornev
View RxUtils.java
import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
/**
* Created by Bogdan Kornev
* on 21.05.2017, 14:13.
*/
public class RxUtils {
View gist:6f134b220e3508c03d61754f8d676329
private Pattern phonePattern = Pattern.compile("^\\+[0-9]{9,15}$");
public boolean isValidPhone(String phone) {
Matcher phoneMatcher = phonePattern.matcher(phone);
return phoneMatcher.matches();
}
private void getSession(String phone) {
Subscription subscription = sessionInteractor.getSession()
.compose(RxUtils.applySchedulers())
View EmptyView.java
public class EmptyView {
public static boolean viewGroupCheckEmpty(ViewGroup viewGroup) {
int count = viewGroup.getChildCount();
boolean flag = true;
for (int i = 0; i < count; i++) {
View view = viewGroup.getChildAt(i);
if (checkIsEmpty(view))
flag = false;
View passport.json
{
"code": "123-122",
"dates": {
"delivery": "10.10.2010"
},
"deliveredBy": "Ssg",
"number": "123486",
"person": {
"birthDate": "01.01.1990",
"birthPlace": "Svsh",
View ImageUtils.java
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.media.ExifInterface;
import android.os.Environment;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
View CipherUtils.java
package me.vkarmane.business.utils;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public final class CipherUtils {
private static final String SALT = "investing2017";
private CipherUtils() {
// Utility classes should not have a public or default constructor.
View Xor
https://www-qa2.tcsbank.ru/api/v1/mobile_save_pin?pinHash=%EF%BF%BD%EF%BF%BD2%1E%EF%BF%BD%1F%EF%BF%BD%EF%BF%BD%16%EF%BF%BD%EF%BF%BD%EF%BF%BDL%EF%BF%BD2%EF%BF%BD%EF%BF%BD%EF%BF%BDbm%CC%97-%EF%BF%BD%EF%BF%BD%12%EF%BF%BD%EF%BF%BD%1D%EF%BF%BD|`%EF%BF%BDE%EF%BF%BD%EF%BF%BD%3DQ9?%0F%27%EF%BF%BD%EF%BF%BD%EF%BF%BDK%19%1B%EF%BF%BD%EF%BF%BD@H%EF%BF%BDa%EF%BF%BD(%EF%BF%BDz%EF%BF%BD}o%EF%BF%BD%EF%BF%BD&deviceId=2e0488c683d57f0b&sessionid=5LBJzndPtXqlGrOWo2ROiUjOlZpypbvk.qa-api02&origin=vkarmane&appVersion=4.1.0-dev
View CreditOptionsAdapter1.java
/**
* Created by Elvira Gabdullina
* on 25.04.2017, 17:20.
*/
public class CreditOptionsAdapter extends RecyclerView.Adapter<CreditOptionsAdapter.CreditOptionsViewHolder> {
List<CreditPrograms> programs;
List<CreditPurpose> purposes = new ArrayList<>();