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:io'; | |
| void main() { | |
| // 1. | |
| int monthCount = 3; | |
| switch (monthCount) { | |
| case 1: | |
| print('Январь'); | |
| break; | |
| case 2: |
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() { | |
| // 1. | |
| String text = 'hello world'; | |
| revert(text); | |
| // 2. | |
| var ar = [1, 22, 3, 40, 12]; | |
| var result = avg(ar); |
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
| // 1. | |
| class User { | |
| User(this.name, this.surname); | |
| String name; | |
| String surname; | |
| @override | |
| String toString() { | |
| return 'User(name: $name, surname: $surname)'; |
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:io'; | |
| Future<void> main() async { | |
| // 1. | |
| print('Что говорит собачка?'); | |
| var value = await userInput(); | |
| print('Введена строка $value'); | |
| print('\nЧто говорит кошка?'); | |
| userInput().then((value) => print('Введена строка $value')); |
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
| const http = require("http"); | |
| const esbuild = require("esbuild"); | |
| const serve = async (servedir, listen) => { | |
| // Start esbuild's local web server. Random port will be chosen by esbuild. | |
| const { host, port } = await esbuild.serve({ servedir }, {}); | |
| // Create a second (proxy) server that will forward requests to esbuild. | |
| const proxy = http.createServer((req, res) => { | |
| // forwardRequest forwards an http request through to esbuid. |
OlderNewer