Skip to content

Instantly share code, notes, and snippets.

@jcollins-g
jcollins-g / index.html
Last active Oct 19, 2018 — forked from devoncarew/index.html
WebSocket test
View index.html
<!-- Copyright 2015 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>A WebSocket test using echo.websocket.org</h2>
<br>
<p>Enter text to echo:</p>
View main.dart
// Copyright 2015 the Dart project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
void main() {
var i = 20;
print('fibonacci($i) = ${fibonacci(i)}');
}
/// Computes the nth Fibonacci number.
@jcollins-g
jcollins-g / main.dart
Last active Oct 19, 2018 — forked from devoncarew/main.dart
helloworld
View main.dart
// Copyright 2015 the Dart project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
void main() {
for (var i = 0; i < 4; i++) {
print('hello $i');
}
}
View index.html
<!-- Copyright 2011 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>Dr. Fibonacci's Sunflower Spectacular</h2>
<div>
<canvas id="canvas" width="300" height="300"></canvas>
</div>
View .metadata.json
{
"origin": "dartlab.org",
"url": "http://dartlab.org/#:gistId",
"history": []
}
View index.html
<!-- Copyright 2011 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>Solar System</h2>
<div id="container">
<canvas id="area" height="300px"></canvas>
</div>