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
| final class Weight { | |
| final int _grams; | |
| const Weight.fromGrams(final int grams) : _grams = grams; | |
| const Weight.fromKilograms(final int kilograms) : _grams = kilograms * 1000; | |
| const Weight.fromOunces(final int ounces) | |
| : _grams = ounces * ouncesPerGrams ~/ 1; | |
| const Weight.fromPounds(final int pounds) | |
| : _grams = pounds ~/ ouncesPerPounds * ouncesPerGrams ~/ 1; | |
| const Weight.fromStones(final int stones) |
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 'package:benchmark_harness/benchmark_harness.dart'; | |
| import 'package:dart_eval/dart_eval.dart'; | |
| class EvalBenchmark extends BenchmarkBase { | |
| EvalBenchmark() : super('EvalBenchmark'); | |
| @override | |
| void run() { | |
| const a = ''' | |
| for (int i = 0; i < 100; i++) { |
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
| {"name":"Python + Postgre","icon":"game","settings":"{\"settings\":\"{\\r\\n \\\"workbench.iconTheme\\\": \\\"material-icon-theme\\\",\\r\\n \\\"[dart]\\\": {\\r\\n \\\"editor.formatOnSave\\\": true,\\r\\n \\\"editor.formatOnType\\\": true,\\r\\n \\\"editor.rulers\\\": [80],\\r\\n \\\"editor.selectionHighlight\\\": false,\\r\\n \\\"editor.suggest.snippetsPreventQuickSuggestions\\\": false,\\r\\n \\\"editor.suggestSelection\\\": \\\"first\\\",\\r\\n \\\"editor.tabCompletion\\\": \\\"onlySnippets\\\",\\r\\n \\\"editor.wordBasedSuggestions\\\": \\\"off\\\"\\r\\n },\\r\\n \\\"redhat.telemetry.enabled\\\": true,\\r\\n \\\"dart.debugExternalPackageLibraries\\\": false,\\r\\n \\\"dart.debugSdkLibraries\\\": false,\\r\\n \\\"explorer.confirmDragAndDrop\\\": false,\\r\\n \\\"dart.showInspectorNotificationsForWidgetErrors\\\": false,\\r\\n \\\"editor.codeActionsOnSave\\\": {\\r\\n \\\"source.fixAll\\\": \\\"explicit\\\",\\r\\n \\\"source.organizeImports\\\": \\\"explicit\\\"\\r\\n |
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
| /* | |
| * Use labels for loops | |
| * https://gist.github.com/meg4cyberc4t/4c639ec89dcc4d1e9e01c82a51541107 | |
| * https://dartpad.dev/?id=4c639ec89dcc4d1e9e01c82a51541107 | |
| * Igor Molchanov <molchanovia.dev@gmail.com>, 25 May 2024 | |
| * | |
| * Program output: | |
| * outside started | |
| * inside started | |
| */ |
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 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({super.key}); | |
| @override |