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() { | |
| List<List<int>> lists = [ | |
| [1, -10, 9, -1], | |
| [-1, -2, -3], | |
| [], | |
| [1, 2], | |
| ]; | |
| for (var list in lists) { | |
| int sum = 0; |
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() { | |
| List<List<String>> lists = [ | |
| ['a', 'ab', 'abc'], | |
| ['abcde', 'ab', 'abc'], | |
| [], | |
| ]; | |
| for (var list in lists) { | |
| int sum = 0; | |
| list.forEach((el) => (sum += el.length)); |
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() { | |
| List<String> list = ["dart", "abc", "good luck"]; | |
| List<int> results = []; | |
| for (int i = 0; i < list.length; i++) { | |
| int weight = getStringWeight(list[i]); | |
| results.add(weight * (i + 1)); | |
| } | |
| print(results); |
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() { | |
| List<String> list = ["dart", "abc", "good luck"]; | |
| List<int> results = []; | |
| for (int i = 0; i < list.length; i++) { | |
| int weight = getStringWeight(list[i]); | |
| results.add(weight * (i + 1)); | |
| } | |
| print(results); |
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() { | |
| var list = [60, 999, 14, "dart1", 45, 95, "dart", 1]; | |
| var values = ["dart", 15]; | |
| for (var value in values) { | |
| print(list.contains(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
| void main() { | |
| int i; | |
| double century; | |
| var numbers = [1705, 1900, 1601, 2000]; | |
| for (int number in numbers) { | |
| century = number / 100; | |
| print(century.ceil()); | |
| } | |
| } |
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() { | |
| int i; | |
| var numbers = [0, 7, 33, 4545, 129955]; | |
| for (dynamic number in numbers) { | |
| i = 0; | |
| if (number == 0) { | |
| print(1); | |
| continue; | |
| } |
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() { | |
| int i; | |
| for (i = 1; i < 100; i++) { | |
| if (i % 3 == 0 && i % 5 ==0) { | |
| print('Super Quiz'); | |
| continue; | |
| } | |
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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
| <?php | |
| namespace App\Service\Storage; | |
| use Gaufrette\Extras\Resolvable\ResolvableFilesystem; | |
| use Gaufrette\Extras\Resolvable\Resolver\AwsS3PublicUrlResolver; | |
| use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | |
| use Symfony\Component\DependencyInjection\ContainerBuilder; | |
| use Symfony\Component\DependencyInjection\Reference; |
NewerOlder