A summary on the talks that happened in GDG SG X Kotlin User Group SG - Kotlin/Everywhere Meetup on 24 September 2019.
Talks:
A summary on the talks that happened in GDG SG X Kotlin User Group SG - Kotlin/Everywhere Meetup on 24 September 2019.
Talks:
| /* Copyright 2019 Google LLC. | |
| SPDX-License-Identifier: Apache-2.0 */ | |
| fun animateVisibility(view: View, visible: Boolean) { | |
| val targetAlpha = if (visible) 1f else 0f | |
| if (view.alpha == targetAlpha) return | |
| view.visibility = View.VISIBLE | |
| val spring = view.spring(SpringAnimation.ALPHA) | |
| (view.getTag(R.id.tag_pending_end_listener) as? | |
| DynamicAnimation.OnAnimationEndListener)?.let { |
How to setup a development environment where Git from WSL integrates with native Windows applications, using the Windows home folder as the WSL home and using Git from WSL for all tools.
Note if using Git for Windows, or any tool on the Windows side that does not use Git from WSL then there will likely be problems with file permissions if using those files from inside WSL.
These are the tools I use:
wslgit)A long time ago, it was possible to inline images from all kinds of external sources. Since the switch from HTTP to HTTPS, this is no longer possible; only HTTPS sources are allowed. This leads to ugly blurbs like
instead of a nicely formatted page with images. Sometimes, the links don't even work anymore, even with HTTPS images, which will show like this: 
I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.
But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.
Svelte is a language.
Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?
A few projects that have answered this question:
| #!/usr/bin/env bash | |
| # I've found that the "Migrate to AndroidX" converter in Android Studio doesn't work very | |
| # well, so I wrote my own script to do the simple job of converting package names. | |
| # | |
| # You can download a CSV of package names here: https://developer.android.com/topic/libraries/support-library/downloads/androidx-class-mapping.csv | |
| # | |
| # It'll run faster on a clean build because then there are fewer files to scan over. | |
| # | |
| # Uses `gsed` because I'm on a Mac. Can easily replace with `sed` if you don't have `gsed`. |
| package com.your.package | |
| import android.app.Dialog | |
| import android.os.Bundle | |
| import com.your.package.R | |
| import com.google.android.material.bottomsheet.BottomSheetDialog | |
| import com.google.android.material.bottomsheet.BottomSheetDialogFragment | |
| /** | |
| * BottomSheetDialog fragment that uses a custom |
The PATH is an important concept when working on the command line. It's a list
of directories that tell your operating system where to look for programs, so
that you can just write script instead of /home/me/bin/script or
C:\Users\Me\bin\script. But different operating systems have different ways to
add a new directory to it:
| const readline = require('readline'); | |
| const reader = readline.createInterface({ | |
| input: process.stdin, | |
| output: process.stdout | |
| }); | |
| class LoseYourself { | |
| constructor(oneShot = [[3,2,1],[],[]]) { | |
| this.oneShot = oneShot; |