This file contains hidden or 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:math"; | |
| void main(){ | |
| final int voterCount = 30; | |
| final int maxVote = 100; | |
| final int sampleCount = 7; |
This file contains hidden or 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:convert"; | |
| import "dart:typed_data"; | |
| void main(){ | |
| final List<int> mg = CotecBinMagic(0, 18, 3, true).asBinary; | |
| print("len: ${mg.length}"); | |
| print("mgc: ${mg.map<String>((int e) => e.toRadixString(16)).join(" ")}"); | |
| print("chr: «${utf8.decode(mg.skip(4).toList())}»"); | |
| print("ch2: «${utf8.decode(mg)}»"); | |
| } |
This file contains hidden or 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(){ | |
| print((5).lcm(2)); | |
| print((4).lcm(3)); | |
| } | |
| extension LCM on int { | |
| int lcm(int other) => (this * other) ~/ this.gcd(other); | |
| } |
This file contains hidden or 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:convert"; | |
| import "dart:math" as math; | |
| void main() { | |
| run("YMO","TMS"); | |
| } | |
| void run(String a, String b){ | |
| print(a.asLIB); | |
| print(b.asLIB); | |
| print(a.asLI - b.asLI); | |
This file contains hidden or 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:math"; | |
| void main() {} | |
| bool isEfficientToShorten(int len, int count, [int margin = 0]){ | |
| if(len<0||count<0||margin<0){ | |
| throw Error(); | |
| } | |
| int repPadLen = log10(len).ceil()+log10(count).ceil()+3; | |
| return repPadLen<len*(count-1)+margin; | |
| } | |
| double log10(num x)=>log(x)/log(10); |
This file contains hidden or 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() { | |
| final dp = Domain("dev-pack.org"); | |
| print(dp.supply("sorakim")); | |
| print(dp.supply("made.in.apple")); | |
| print(dp.supply("sorakim.made.in.apple")); | |
| } | |
| int maxIntegerOnHex(final int hexLen)=>int.parse("f" * hexLen, radix: 16); | |
| extension on int{ | |
| int foldInTo(final int hexLen){ | |
| final int max = maxIntegerOnHex(hexLen); |
This file contains hidden or 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:typed_data"; | |
| import "dart:math"; | |
| //仮想処理装置 (尺寸符号化データ&微細指令) | |
| //Virtual Processor (Aligned Binary Data & Microcode) | |
| typedef TrailOperandFmt = List<OperandUnitFmt>; | |
| void main() { | |
| } | |
| class VProcessor{ |
This file contains hidden or 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:collection"; | |
| void main() { | |
| final RadialNumber rn = RadialNumber.basic([17, 3, 10], isCyclic: true); | |
| rn.of(13592); | |
| print(rn.toString()); | |
| print(rn()); | |
| rn.next(); | |
| print(rn.toString()); | |
| print(rn()); |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Sortable Table</title> | |
| <link rel="stylesheet" href="styles.css"> | |
| <script type="application/dart" src="main.dart"></script> | |
| </head> |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>World Time in Offsets Table</title> | |
| <link rel="stylesheet" href="styles.css"> | |
| <script type="application/dart" src="main.dart"></script> | |
| </head> |
NewerOlder