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>.debounceUntilQuiescent(duration: Duration): Flow<T> = channelFlow { | |
var job: Job? = null | |
collect { value -> | |
job?.cancel() | |
job = launch { | |
delay(duration) | |
send(value) | |
job = null | |
} | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Description: | |
# This script will remove and disable OneDrive integration. | |
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\New-FolderForced.psm1 | |
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1 | |
Write-Output "Kill OneDrive process" | |
taskkill.exe /F /IM "OneDrive.exe" | |
taskkill.exe /F /IM "explorer.exe" |
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 <T> DropDown( | |
modifier: Modifier = Modifier, | |
padding: Dp = 16.dp, | |
items: List<T>, | |
defaultIndex: Int = 0, | |
onValueChanged: (T) -> Unit | |
) { | |
var selectedIndex by remember { mutableStateOf(defaultIndex) } | |
var itemsExpanded by remember { mutableStateOf(false) } |
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
void DiffusingHeatMap::_physics_process(float delta) | |
{ | |
clearBackBuffer(); | |
for(int yy = 0; yy < mapSize; ++yy) | |
{ | |
for(int xx = 0; xx < mapSize; ++xx) | |
{ | |
diffuse(xx, yy); | |
} |
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
# A drop in replacement for the Timer class | |
# This timer is completely framerate independent | |
# It can also be given a unix time stamp instead of a duration | |
# for when it should fire. This is useful for synchornizing events | |
# across multiple clients such as in Multiplayer | |
extends Node | |
class_name WallClockTimer, 'res://utilities/wallclock_timer/icon.png' | |
signal timeout | |
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
#################### | |
# Map_00.gd | |
#################### | |
func _ready(): | |
create_players(Network.players) | |
func create_players(players): | |
for player_id in players: | |
var player = players[player_id] | |
match player.type: |
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
/** | |
* Eases the Fragment.newInstance ceremony by marking the fragment's args with this delegate | |
* Just write the property in newInstance and read it like any other property after the fragment has been created | |
* | |
* Inspired by Adam Powell, he mentioned it during his IO/17 talk about Kotlin | |
*/ | |
class Argument<T : Any> : kotlin.properties.ReadWriteProperty<Fragment, T> | |
{ | |
var value: T? = null |
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
data class Movie(var name: String, var studio: String, var rating: Float) |
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
public class Movie { | |
private String name; | |
private String studio; | |
private float rating; | |
public Movie(String name, String studio, float rating) { | |
this.name = name; | |
this.studio = studio; | |
this.rating = rating; |
NewerOlder