I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
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.graphics.*; | |
| import com.squareup.picasso.Transformation; | |
| /** | |
| * Transforms an image into a circle representation. Such as a avatar. | |
| */ | |
| public class CircularTransformation implements Transformation | |
| { | |
| int radius = 10; |
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.pixite.fragment.widget; | |
| import android.content.res.Resources; | |
| import android.graphics.Canvas; | |
| import android.graphics.ColorFilter; | |
| import android.graphics.Rect; | |
| import android.graphics.drawable.Drawable; | |
| import android.graphics.drawable.Drawable.Callback; | |
| import android.view.Gravity; |
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
| /** | |
| * This class allows you to listen to when the user is entering the background (i.e. after a home button press, | |
| * or opening recent apps etc) and when the user resumes the application from the background. | |
| * | |
| * @author John McDonnell | |
| */ | |
| public class BetterActivityLifecycleCallbacks implements Application.ActivityLifecycleCallbacks { | |
| private int mForegroundActivities; |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
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
| task deployApks(type:Copy) { | |
| description = "Copies APKs and Proguard mappings to the deploy directory" | |
| def appName = "posture"; | |
| def versionDir = android.defaultConfig.versionName+"_"+android.defaultConfig.versionCode; | |
| println("Copies APK and Proguard to " + versionDir) | |
| from 'build/outputs/mapping/release/' | |
| include '**/mapping.txt' | |
| into '../.admin/deploy/' + versionDir |
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
| Apache License | |
| Version 2.0, January 2004 | |
| http://www.apache.org/licenses/ | |
| TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
| 1. Definitions. | |
| "License" shall mean the terms and conditions for use, reproduction, | |
| and distribution as defined by Sections 1 through 9 of this document. |
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
| function createTrigger() { | |
| // Trigger once a day | |
| ScriptApp.newTrigger('getCovidDataAndUpdateSpreadSheet') | |
| .timeBased() | |
| .atHour(8) | |
| .everyDays(1) // Frequency is required if you are using atHour() or nearMinute() | |
| .create(); | |
| } | |
| function getCovidDataAndUpdateSpreadSheet() { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.