Skip to content

Instantly share code, notes, and snippets.

View yyu's full-sized avatar
🤖
⌨️

Yuan Yu yyu

🤖
⌨️
View GitHub Profile
@yyu
yyu / main.dart
Last active July 4, 2020 06:11
flutter 1 min timer using Stream<int> https://dartpad.dev/540806a5aa1b7b1b669804a9a665ed50
// https://medium.com/flutter-community/understanding-streams-in-flutter-dart-827340437da6
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
home: HomePage(),
title: 'Stream Demo',
));
}
main() {
print('main() starts');
foo();
print('main() goes on');
bar();
print('main() ends');
}
void foo() async {
print('foo() starts');
main() {
foo();
print('main() ends');
}
void foo() async {
print('foo() starts');
final stream = makeStream();
main() {
foo();
print('main() ends');
}
void foo() async {
print('foo() starts');
final stream = makeStream();
void main() {
foo();
for (int i = 0; i < 5; i++) {
print('hello ${i + 1}');
}
}
void foo() async {
print('foo() starts');
@yyu
yyu / main.dart
Last active July 4, 2020 04:29
hello dart
void main() {
for (int i = 0; i < 5; i++) {
print('hello ${i + 1}');
}
}
Waiting for build to start...
Cloning into '/tmp/repo2dockeryn8_h615'...
HEAD is now at c39a251 removing drawio since it is not compatible with the current JupyterLab
Building conda environment for python=3.6Using PythonBuildPack builder
Building conda environment for python=3.6Building conda environment for python=3.6Step 1/39 : FROM buildpack-deps:bionic
---> 22ba25303cb1
Step 2/39 : ENV DEBIAN_FRONTEND=noninteractive
---> Using cache
---> af1efc5e2036
Step 3/39 : RUN apt-get update && apt-get install --yes --no-install-recommends locales && apt-get purge && apt-get clean && rm -rf /var/lib/apt/lists/*