Skip to content

Instantly share code, notes, and snippets.

@kasperpeulen
kasperpeulen / index.html
Last active August 29, 2015 14:26
tutorial1/examp
<!doctype html>
<html>
<head>
<!--material design lite-->
<link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.0/material.indigo-indigo.min.css">
<link rel="stylesheet" href="styles.css">
</head>
<body>
@kasperpeulen
kasperpeulen / index.html
Created August 7, 2015 01:57
tutorial1/example2
<!doctype html>
<html>
<head>
<!--material design lite-->
<link rel="stylesheet" href="https://storage.googleapis.com/code.getmdl.io/1.0.0/material.indigo-indigo.min.css">
<link rel="stylesheet" href="styles.css">
</head>
<body>
@kasperpeulen
kasperpeulen / main.dart
Created August 7, 2015 02:02
streams/last_positive
// Copyright (c) 2015, the Dart project authors.
// Please see the AUTHORS file for details.
// All rights reserved. Use of this source code is governed
// by a BSD-style license that can be found in the LICENSE file.
import 'dart:async';
Future<int> lastPositive(Stream<int> stream) async {
var lastValue = null;
await for (var value in stream) {
@kasperpeulen
kasperpeulen / main.dart
Created August 7, 2015 02:02
streams/simple_stream
// Copyright (c) 2015, the Dart project authors.
// Please see the AUTHORS file for details.
// All rights reserved. Use of this source code is governed
// by a BSD-style license that can be found in the LICENSE file.
import 'dart:async';
Future<int> sumStream(Stream<int> stream) async {
var sum = 0;
await for (var value in stream) {
@kasperpeulen
kasperpeulen / main.dart
Created August 7, 2015 02:02
streams/throw_error
// Copyright (c) 2015, the Dart project authors.
// Please see the AUTHORS file for details.
// All rights reserved. Use of this source code is governed
// by a BSD-style license that can be found in the LICENSE file.
import 'dart:async';
Future<int> sumStream(Stream<int> stream) async {
var sum = 0;
try {
<!-- Copyright (c) 2012, the Dart project authors.
Please see the AUTHORS file for details.
All rights reserved. Use of this source code
is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!DOCTYPE html>
<html>
@kasperpeulen
kasperpeulen / index.html
Created August 7, 2015 02:03
its_all_about_you
<!-- Copyright (c) 2012, the Dart project authors.
Please see the AUTHORS file for details.
All rights reserved. Use of this source code
is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!DOCTYPE html>
<html>
<!-- Copyright (c) 2012, the Dart project authors.
Please see the AUTHORS file for details.
All rights reserved. Use of this source code is
governed by a BSD-style license that can be found
in the LICENSE file.
-->
<!DOCTYPE html>
<html>
@kasperpeulen
kasperpeulen / index.html
Created August 7, 2015 02:03
mini_with_style
<!-- Copyright (c) 2012, the Dart project authors.
Please see the AUTHORS file for details.
All rights reserved. Use of this source code is
governed by a BSD-style license that can be found
in the LICENSE file.
-->
<!DOCTYPE html>
<html>
@kasperpeulen
kasperpeulen / index.html
Created August 7, 2015 02:03
portmanteaux
<!-- Copyright (c) 2012, the Dart project authors.
Please see the AUTHORS file for details.
All rights reserved. Use of this source code
is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<!DOCTYPE html>
<html>