When using this prompts, make sure to reply to Clyde's last message to continue the prompt. Everytime you ping Clyde, you start a new session.
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
| @Composable | |
| fun FloatingHeartsAnimation() { | |
| var showHearts by remember { mutableStateOf(false) } | |
| val heartList = remember { mutableStateListOf<Int>() } | |
| var sliderValue by remember { mutableFloatStateOf(0.5f) } | |
| val scale = remember { Animatable(1f) } | |
| val scope = rememberCoroutineScope() | |
| val config = HeartConfig( | |
| radiusMultiplier = lerp(0.5f, 2f, sliderValue), |
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
| apply plugin: 'maven-publish' | |
| afterEvaluate { | |
| publishing { | |
| publications { | |
| maven(MavenPublication) { | |
| groupId project.ext.pomGroupID | |
| artifactId project.name | |
| version project.ext.pomVersion |
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
| # Check these threads before proceeding: | |
| # https://github.com/microsoft/WSL/discussions/5857 | |
| # https://github.com/microsoft/WSL/issues/5821 | |
| if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { | |
| $CmdLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments | |
| Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CmdLine | |
| Exit | |
| } | |
| # Restart the Host Network Service | |
| Restart-Service -Force -Name hns |
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
| @echo off | |
| setlocal | |
| rem Change to suit your configuration. | |
| set netmask=192.168 | |
| rem Set adb. | |
| if [%1] == [] ( | |
| set adb=%ANDROID_HOME%\platform-tools\adb.exe | |
| ) else ( |
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
| fun <T> Flow<T>.throttle(waitMillis: Int) = flow { | |
| coroutineScope { | |
| val context = coroutineContext | |
| var nextMillis = 0L | |
| var delayPost: Deferred<Unit>? = null | |
| collect { | |
| val current = SystemClock.uptimeMillis() | |
| if (nextMillis < current) { | |
| nextMillis = current + waitMillis |
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 io.pivotal | |
| import com.sun.net.httpserver.HttpExchange | |
| import com.sun.net.httpserver.HttpHandler | |
| import com.sun.net.httpserver.HttpServer | |
| import java.net.InetSocketAddress | |
| fun main(args: Array<String>) { | |
| val server = HttpServer.create(InetSocketAddress(8000), 0) | |
| server.createContext("/test", MyHandler()) |
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.example | |
| import android.arch.lifecycle.LiveData | |
| import android.content.Context | |
| import android.location.Location | |
| import com.google.android.gms.location.LocationCallback | |
| import com.google.android.gms.location.LocationRequest | |
| import com.google.android.gms.location.LocationResult | |
| import com.google.android.gms.location.LocationServices | |
| import com.google.android.gms.tasks.OnSuccessListener |
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 example | |
| import android.support.v7.recyclerview.extensions.AsyncDifferConfig | |
| import android.support.v7.recyclerview.extensions.AsyncListDiffer | |
| import android.support.v7.util.DiffUtil | |
| import android.support.v7.util.ListUpdateCallback | |
| import android.support.v7.widget.RecyclerView | |
| /** | |
| * {@link RecyclerView.Adapter RecyclerView.Adapter} base class based on |
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.app.Application; | |
| import android.arch.lifecycle.LiveData; | |
| import android.content.Context; | |
| import android.database.ContentObserver; | |
| import android.database.Cursor; | |
| import android.net.Uri; | |
| import android.os.AsyncTask; | |
| import android.os.Handler; | |
| import android.support.annotation.NonNull; | |
| import android.support.annotation.Nullable; |
NewerOlder