I hereby claim:
- I am michael-wang on github.
- I am michaelwang (https://keybase.io/michaelwang) on keybase.
- I have a public key ASDbx619up2f69orMLmWxFmDVparpOEJTRE7YI_yxQcWYQo
To claim this, I am signing this object:
import 'package:flutter/widgets.dart'; | |
import 'package:provider/provider.dart'; | |
class MultiValueNotifier<E extends Enum, T> extends ChangeNotifier { | |
// Map of name to value. | |
final values = <E, T>{}; | |
add(E name, T value) { | |
values[name] = value; | |
notifyListeners(); |
part 'auth.g.dart'; | |
// The key to become Listenable, is to implement Listenable... | |
// And notify listener when state changed of course. | |
@Riverpod(keepAlive: true) | |
class Auth extends _$Auth implements Listenable { | |
VoidCallback? _callback; | |
@override | |
void addListener(VoidCallback listener) { |
Description: | |
mit-scheme don't support Mac with M1 chip | |
A work around here: | |
https://kennethfriedman.org/thoughts/2021/mit-scheme-on-apple-silicon/ | |
In case above website gone, here are steps: | |
1. Download x86 Scheme | |
2. Run Terminal in Emulation Mode (Rosetta mode) | |
3. Fix the Source Code |
set nocompatible | |
set number | |
"set cursorline | |
"set cursorcolumn | |
set showmatch | |
set hlsearch | |
set tabstop=4 | |
set shiftwidth=4 |
I hereby claim:
To claim this, I am signing this object:
public class FrameRateCalculator extends Observable { | |
private static final long DEFAULT_NOTIFY_INTERVAL = 1000L; | |
public FrameRateCalculator() { | |
this(DEFAULT_NOTIFY_INTERVAL); | |
} | |
public FrameRateCalculator(long notifyObserverIntervalInMs) { | |
NOTIFY_OBSERVER_INTERVAL = notifyObserverIntervalInMs; |
public class Foo { | |
private static class InstanceHolder { | |
public static final Foo instance = new Foo(); | |
} | |
public static Foo getInstance() { | |
return InstanceHolder.instance; | |
} | |
} |