This file contains 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 'dart:html'; | |
void main() { | |
// 每一組 10 人 | |
int num = 10; | |
// 組序由 1 開始 | |
int gth = 1; | |
// 迴圈序號變數 | |
int i; | |
// 每組學員暫存數列 |
This file contains 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
void main() { | |
var prices = ['99', '27', '10000', '20000000']; | |
prices.sort((String a, String b)=>int.parse(a).compareTo(int.parse(b))); | |
print('Lowest price is ${prices[0]}!'); | |
} | |
/* | |
Dart2 strong sound typing example | |
void main() { | |
List<int> prices = ['99', '27', '10000', '20000000']; | |
This file contains 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 json | |
def get_gist(gisturl, filename): | |
url = 'https://api.github.com/gists/' + gisturl | |
# info is string | |
info = open(url).read() | |
gist = json.loads(info) | |
return gist["files"][filename]["content"] | |
print(get_gist("d9d4fe5b22d0af855603a683c153236e", "get_gist_file.py")) |
This file contains 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
<!-- | |
其他應用, 可以直接在網際繪製來自平面機構分析 (Solvespace) 所得到的座標點位置, 例如: | |
http://cpgx.kmol.info/2016fallcadp_ag100/blog/git-submodule-zai-dian-nao-fu-zhu-she-ji-shang-de-ying-yong.html | |
也可直接在網際解出 Geometric Constrain Solver, 直接根據使用者輸入, 進行平面機構的模擬分析, 例如: | |
http://cpgx.kmol.info/2016fallcadp_ag100/blog/2016fall-ping-mian-ji-gou-mo-ni.html | |
其他參考資料: https://github.com/google/cassowary.dart | |
https://github.com/google/codemirror.dart | |
https://github.com/google/charted | |
https://github.com/google/vector_math.dart | |
https://github.com/google/dart-gif-encoder |
This file contains 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
<div id="wrapper"> | |
<canvas id="canvas" width="450" height="450"></canvas> | |
</div> |
This file contains 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
<p id="text1"> | |
origin text | |
</p> |
This file contains 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
//https://github.com/SamuelAG/Graph-Dart | |
class Graph { | |
Node root; | |
int vertex; | |
Graph() { | |
this.vertex = 0; | |
this.root = null; | |
} |
This file contains 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
<!-- 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. --> | |
<!doctype html> | |
<html lang="en" data-framework="dart"> | |
<head> | |
<meta charset="utf-8"> | |
<title>The Solar sample from DartPad</title> | |
<link rel="stylesheet" href="styles.css"> | |
</head> |
This file contains 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
<h1>Hello, <span id="name"></span></h1> | |
<input type="text" id="name_box"> | |
<input type="submit" value="Say Hello" id="button"> |
This file contains 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
After <input type="number" id="years" value="5" min="1" max="30"> Years | |
<input type="button" id="submit" value="Calculate"/> | |
<br/>Number of rabbits: <label id="output"></label> |
OlderNewer