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 | |
| declare(strict_types=1); | |
| $realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34]; | |
| print_r( | |
| $valeur = array_map( | |
| function($n):int{ | |
| return $n*$n; | |
| },array_filter($realNumberArray,function($v):bool{ | |
| return is_int($v) && $v >= 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
| const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34]; | |
| const squareList = (arr) => { | |
| "use strict"; | |
| const squaredIntegers = arr; | |
| const getIntpositiveValue = squaredIntegers.filter(val => { | |
| return Number.isInteger(val) && val >= 0; | |
| }); | |
| const getSquareValue = getIntpositiveValue.map(intVal => { | |
| return intVal* intVal; | |
| }); |
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> | |
| <title>Page Title</title> | |
| <style type='text/sass'> | |
| $x : 1; | |
| @while $x < 11 { | |
| .text-#{$x} {font-size: 5px * $x;} | |
| $x : $x + 1; | |
| } |
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> | |
| <title>Page Title</title> | |
| <style type='text/sass'> | |
| $colors: (blue, black, red); | |
| @each $color in $colors { | |
| .#{$color}-bg { | |
| background-color: $color; | |
| } |
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> | |
| <title>Page Title</title> | |
| <style type='text/sass'> | |
| @for $j from 1 to 6{ | |
| .text-#{$j} {font-size:10px*$j;} | |
| } | |
| </style> | |
| </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
| var gulp = require('gulp'); | |
| var sass = require('gulp-sass'); | |
| var concatTest = require('gulp-concat'); | |
| var rename = require('gulp-rename'); | |
| var uglify = require('gulp-uglify'); | |
| var cleanCSS = require('gulp-clean-css'); | |
| var scssSource = './source/sass/*.scss'; | |
| var scssDest = './dist/css'; | |
| var jsSource = './source/js/*.js'; | |
| var jsDest = './dist/js'; |
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 | |
| while (TRUE) | |
| { | |
| fscanf(STDIN, "%d %d", | |
| $x, | |
| $y | |
| ); | |
| fscanf(STDIN, "%d", | |
| $humanCount | |
| ); |
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 | |
| declare(strict_types = 1); | |
| function isFizz(int $value): bool { | |
| return ((($value % 3) == 0) && (($value % 5) != 0)); | |
| } | |
| function isBuzz(int $value): bool { | |
| return ((($value % 5) == 0) && (($value % 3) != 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
| <?php | |
| /** | |
| * Auto-generated code below aims at helping you parse | |
| * the standard input according to the problem statement. | |
| **/ | |
| fscanf(STDIN, "%d", | |
| $surfaceN // the number of points used to draw the surface of Mars. | |
| ); | |
| for ($i = 0; $i < $surfaceN; $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
| <?php | |
| /** | |
| * Auto-generated code below aims at helping you parse | |
| * the standard input according to the problem statement. | |
| * --- | |
| * Hint: You can use the debug stream to print initialTX and initialTY, if Thor seems not follow your orders. | |
| **/ | |
| fscanf(STDIN, "%d %d %d %d", | |
| $lightX, // the X position of the light of power |