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
// Given an array of integers `nums` and an integer `target`, | |
// return indices of the two numbers such that they add up to target. | |
// | |
// You may assume that each input would have exactly one solution, and you may not use the same element twice. | |
// | |
// You can return the answer in any order. | |
void main() { | |
check(twoSum([2, 7, 11, 15], 9),[0,1]); | |
check(twoSum([3,2,4], 6),[1,2]); |
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
launch(UI) { | |
editText.onTextChanged() | |
.debounce(1, TimeUnit.SECONDS) | |
.consumeEach { | |
Log.d("DebounceTest", "value: $it") | |
} | |
} | |
} | |
fun EditText.onTextChanged(): ReceiveChannel<String> = |
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 AnimatedFab extends StatefulWidget { | |
final Function() onPressed; | |
final String tooltip; | |
final IconData icon; | |
AnimatedFab({this.onPressed, this.tooltip, this.icon}); | |
@override |