This file contains hidden or 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 androidx.compose.animation.core.LinearOutSlowInEasing | |
| import androidx.compose.animation.core.animateDpAsState | |
| import androidx.compose.animation.core.animateFloatAsState | |
| import androidx.compose.animation.core.tween | |
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.layout.Box | |
| import androidx.compose.foundation.layout.Column | |
| import androidx.compose.foundation.layout.Spacer | |
| import androidx.compose.foundation.layout.fillMaxWidth | |
| import androidx.compose.foundation.layout.offset |
This file contains hidden or 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.arch.persistence.room.TypeConverter | |
| class FloatConverter { | |
| @TypeConverter | |
| fun stringToListOfFloat(value: String): List<Float> { | |
| return value.split(",").map { it.toFloat() } | |
| } | |
| @TypeConverter | |
| fun listOfFloatToString(list: List<Float>): String { |
This file contains hidden or 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.text.TextUtils; | |
| import org.junit.Before; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; | |
| import org.mockito.invocation.InvocationOnMock; | |
| import org.mockito.stubbing.Answer; | |
| import org.powermock.core.classloader.annotations.PrepareForTest; | |
| import org.powermock.modules.junit4.PowerMockRunner; | |
| import static org.mockito.Matchers.any; | |
| import static org.mockito.Mockito.when; |
This file contains hidden or 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
| /** | |
| * Created by hani on 12/6/16. | |
| */ | |
| public class DistanceCalculator { | |
| public String distance(double lat1, double lon1, double lat2, double lon2) { | |
| double theta = lon1 - lon2; | |
| Double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta)); | |
| dist = Math.acos(dist); | |
| dist = rad2deg(dist); |
This file contains hidden or 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
| /** | |
| * Created by Elijah Saounkine | |
| * Modified by Hani | |
| */ | |
| public class NumbersAbbreviationHelper { | |
| private char[] c = new char[]{'K', 'M', 'B', 'T'}; | |
| public String makeItFriendly(double n) { | |
| return makeItFriendly(n, 0); |
This file contains hidden or 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
| // usage: req.setRetryPolicy(new VolleyRetryPolicy(DefaultRetryPolicy.DEFAULT_TIMEOUT_MS * 4, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT)); | |
| public class VolleyRetryPolicy extends DefaultRetryPolicy { | |
| public VolleyRetryPolicy(int initialTimeoutMs, int maxNumRetries, float backoffMultiplier) { | |
| super(initialTimeoutMs, maxNumRetries, backoffMultiplier); | |
| } | |
| @Override | |
| protected boolean hasAttemptRemaining() { |
This file contains hidden or 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.oostaa.app.widgets; | |
| import android.content.Context; | |
| import android.support.v7.widget.LinearLayoutManager; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import java.util.List; |