- http://stackoverflow.com/questions/804115 (
rebasevsmerge). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebasevsmerge) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
resetvscheckoutvsrevert) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse) - http://stackoverflow.com/questions/292357 (
pullvsfetch) - http://stackoverflow.com/questions/39651 (
stashvsbranch) - http://stackoverflow.com/questions/8358035 (
resetvscheckoutvsrevert)
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
| /** | |
| * Fade a view to visible or gone. This function is idempotent - it can be called over and over again with the same | |
| * value without affecting an in-progress animation. | |
| */ | |
| fun View.fadeTo(visible: Boolean, duration: Long = 500, startDelay: Long = 0, toAlpha: Float = 1f) { | |
| // Make this idempotent. | |
| val tagKey = "fadeTo".hashCode() | |
| if (visible == isVisible && animation == null && getTag(tagKey) == null) return | |
| if (getTag(tagKey) == visible) return |
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 at.favre.lib.bytes.otherPackage; | |
| import org.junit.Test; | |
| import javax.crypto.Cipher; | |
| import javax.crypto.SecretKey; | |
| import javax.crypto.spec.GCMParameterSpec; | |
| import javax.crypto.spec.SecretKeySpec; | |
| import java.nio.ByteBuffer; | |
| import java.nio.charset.StandardCharsets; |
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 'package:flutter/material.dart'; | |
| class FadeOnScroll extends StatefulWidget { | |
| final ScrollController scrollController; | |
| final double zeroOpacityOffset; | |
| final double fullOpacityOffset; | |
| final Widget child; | |
| FadeOnScroll( | |
| {Key key, |
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 kotlinx.coroutines.Dispatchers | |
| import kotlinx.coroutines.test.TestCoroutineDispatcher | |
| import kotlinx.coroutines.test.TestCoroutineScope | |
| import kotlinx.coroutines.test.resetMain | |
| import kotlinx.coroutines.test.setMain | |
| import org.junit.jupiter.api.extension.AfterAllCallback | |
| import org.junit.jupiter.api.extension.AfterEachCallback | |
| import org.junit.jupiter.api.extension.BeforeAllCallback | |
| import org.junit.jupiter.api.extension.ExtendWith | |
| import org.junit.jupiter.api.extension.ExtensionContext |
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
| /** | |
| * Looks like there is no adequate way to listen to this permission change, so do workaround here. | |
| * Normally, we check the permission every 0.5 second. But on Oreo this won't work as Settings.canDrawOverlays still | |
| * returns false after activation but before returning to the app (bug https://issuetracker.google.com/issues/66072795). | |
| * Use OnOpChangedListener on Oreo. | |
| */ | |
| public class DrawOverPermissionActivationListener implements LifecycleObserver { | |
| private AppCompatActivity activity; | |
| private final OverlayManager overlayManager; | |
| private final Class activityToBringToFrontOnDetection; |
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 'dart:math'; | |
| import 'package:flutter/cupertino.dart'; | |
| import 'package:flutter/material.dart'; | |
| Widget buildAppleRefreshIndicator( | |
| BuildContext context, | |
| RefreshIndicatorMode refreshState, | |
| double pulledExtent, | |
| double refreshTriggerPullDistance, |
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 com.bumptech.glide.manager.Lifecycle | |
| import com.bumptech.glide.manager.LifecycleListener | |
| import com.bumptech.glide.util.Util | |
| import java.util.* | |
| /** | |
| * A [com.bumptech.glide.manager.Lifecycle] implementation for tracking and notifying | |
| * listeners of [com.bluelinelabs.conductor.Controller] lifecycle events. | |
| */ | |
| class ControllerLifecycle : Lifecycle { |
Do you need a refresher on git? Go through Codecademy's git course.
-
Using your terminal/command line, get inside the folder where your project files are kept:
cd /path/to/my/codebase. → You cannot do this simply by opening the folder normally, you must do this with the command line/terminal.
→ Do you need a refresher on using your command line/terminal? I've compiled my favorite resources here. -
Check if git is already initialized:
git status
NewerOlder