Skip to content

Instantly share code, notes, and snippets.

View Wajahat-Jawaid's full-sized avatar
🎯
Focusing

Wajahat Jawaid Wajahat-Jawaid

🎯
Focusing
View GitHub Profile
package com;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class RocketLogics {
/** Please refer to https://gist.github.com/Wajahat-Jawaid/815da29116c18223ec365a3db745cea5
* for the test cases as multiple gists couldn't be linked */
package com;
import org.junit.Assert;
import org.junit.Test;
public class RocketLogicTest {
Integer[] expectedArray = new Integer[]{1, 3, 5, 7, 9, 2, 4, 6, 8, 10};
@Test
@Wajahat-Jawaid
Wajahat-Jawaid / LoginRegisterEmailPresenter.java
Created September 4, 2019 06:19
Based on the MVP structure, this is the presenter which handles login and registration through Email
package com.moblibo.pictabite.presenters.login;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.content.Context;
import android.databinding.ObservableField;
import android.os.Bundle;
<script src="https://gist.github.com/benstr/8744304.js"></script>
data class JetFile(
val name: String,
val modifiedAt: Long = 0,
val size: Long = 0,
val path: String = ""
)
/**
* A generic class that holds a value or an exception.
*/
sealed class Result<out R> {
data class Success<out T>(val data: T) : Result<T>()
data class Loading<out T>(val data: T?) : Result<Nothing>()
data class Error(val exception: Exception) : Result<Nothing>()
}
/**
* Dependency Injection container at the application level.
*/
interface AppContainer {
val fileRepository: FileRepository
}
/**
* Implementation for the Dependency Injection container at the application level.
*