{{ message }}

Instantly share code, notes, and snippets.

# Alain Pellaux gallib

Created Jan 26, 2021
Débuter avec Dart, exercice 7
View main.dart
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 number = 20; print('fibonacci(\$number) = \${fibonacci(number)}'); } int fibonacci(int number) { return number < 2 ? number : (fibonacci(number - 1) + fibonacci(number - 2)); }
Created Jan 26, 2021
Débuter avec Dart, exercice 6
View main.dart
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() { Map modules = { 'm105': true, 'm133': false, 'm226': false, 'm213': true }; modules.forEach((module, done) => done ? print('J\'ai déjà suivi le module \$module') : ''); }
Last active Jan 26, 2021
Débuter avec Dart, exercice 5
View main.dart
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() { transport(6); transport(18); transport(20); transport(32); transport(55); transport(75); }
Last active Jan 26, 2021
Débuter avec Dart, exercice 4
View main.dart
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() { double kilometers = 3; print('\$kilometers kilomètres est égal à \${kilometersToMiles(kilometers)} miles'); } double kilometersToMiles(double kilometers) { return kilometers / 1.609; }
Created Jan 26, 2021
Débuter avec Dart, exercice 3
View main.dart
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() { // Dart: Exercice n°3 // Avec une boucle for for (int i = 0; i <= 100; i++) { if (i % 2 == 0) { print('\$i est un nombre pair'); } }
Created Dec 9, 2018
Sublime Text preferences
View preferences.json
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
 { "always_show_minimap_viewport": true, "bold_folder_labels": true, "caret_extra_bottom": 1, "caret_extra_top": 1, "caret_extra_width": 1, "caret_style": "blink", "color_scheme": "Packages/Materialize/schemes/Material Monokai.tmTheme", "default_line_ending": "unix", "fade_fold_buttons": false,
Last active Jun 14, 2016
A list of resources for testing a website
Last active Dec 16, 2015
A placer dans functions.php. Utilisation: [gist id="xxx"]
View gist.php
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
 function embed_gist( \$atts ) { // Attributes extract( shortcode_atts( array( 'id' => '', ), \$atts ) ); // Code return '';
Created Dec 5, 2012
Gallib
View robot.js
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
 //FightCode can only understand your robot //if its class is called Robot var Robot = function(robot) { }; Robot.prototype.onIdle = function(ev) { var robot = ev.robot; robot.ahead(1000);