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
class VideoDownloader extends AsyncTask<Void, Long, Boolean> { | |
@Override | |
protected void onPreExecute() { | |
super.onPreExecute(); | |
} | |
@Override | |
protected Boolean doInBackground(Void... params) { |
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
{ | |
"meta": { "theme": "onepage" }, | |
"basics": { | |
"name": "Marcus Gabilheri", | |
"label": "Senior Android Software Engineer", | |
"picture": "", | |
"email": "marcusandreog@gmail.com", | |
"phone": "+1(405)385-1224", | |
"website": "", | |
"summary": "Hi, I'm Marcus and I have fun writing code.", |
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
100% — FF | |
95% — F2 | |
90% — E6 | |
85% — D9 | |
80% — CC | |
75% — BF | |
70% — B3 | |
65% — A6 | |
60% — 99 | |
55% — 8C |
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 androidx.annotation.MainThread | |
import androidx.fragment.app.Fragment | |
import kotlin.reflect.KClass | |
interface ViewModelContractProvider { | |
fun <T : Any> provideViewModelContract(clazz: KClass<T>): T | |
val supportedContracts: Set<KClass<*>> | |
} | |
/** |
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 androidx.annotation.MainThread | |
import androidx.fragment.app.Fragment | |
import kotlin.reflect.KClass | |
interface ViewModelContractProvider { | |
fun <T : Any> provideViewModelContract(clazz: KClass<T>): T | |
val supportedContracts: Set<KClass<*>> | |
} | |
/** |
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 java.util.*; | |
public class PostfixCalc { | |
// Commands | |
private static final String QUIT = "quit"; | |
private static final String VAR = "var"; | |
private static final String CLEAR = "clear"; | |
private static ArrayList<String> variableNames = new ArrayList<String>(); |
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.gabrielbauman.gist; | |
import java.util.regex.Pattern; | |
public enum CardType { | |
UNKNOWN, | |
VISA("^4[0-9]{12}(?:[0-9]{3}){0,2}$"), | |
MASTERCARD("^(?:5[1-5]|2(?!2([01]|20)|7(2[1-9]|3))[2-7])\\d{14}$"), | |
AMERICAN_EXPRESS("^3[47][0-9]{13}$"), |
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 PaletteUtils { | |
public static PaletteColors getPaletteColors(Palette palette) { | |
PaletteColors colors = new PaletteColors(); | |
//figuring out toolbar palette color in order of preference | |
if (palette.getDarkVibrantSwatch() != null) { | |
colors.setToolbarBackgroundColor(palette.getDarkVibrantSwatch().getRgb()); | |
colors.setTextColor(palette.getDarkVibrantSwatch().getBodyTextColor()); | |
colors.setTitleColor(palette.getDarkVibrantSwatch().getTitleTextColor()); |
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 Foundation | |
import UIKit | |
extension UIImage { | |
func scaleAndRotateImage(maxSize: CGFloat) -> UIImage { | |
let imgRef = self.CGImage | |
let width = CGFloat(CGImageGetWidth(imgRef)) |
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.support.annotation.IntRange; | |
import android.support.annotation.LayoutRes; | |
import android.support.annotation.NonNull; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import java.util.ArrayList; | |
import java.util.List; |
NewerOlder