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
<?php | |
namespace App\Http\Middleware; | |
use Illuminate\Http\Request; | |
class PermissionsPolicy | |
{ | |
/** | |
* Handle the request and return a response. |
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
<?php | |
$results = []; | |
$results[0] = gmp_init(1); | |
$results[1] = gmp_init(1); | |
$n = $argv[1] ?? 1000; | |
if ($n < 2 || $n > PHP_INT_MAX) { | |
throw new InvalidArgumentException('N cannot be less than 2 or greater than ' . number_format(PHP_INT_MAX) . '.'); |
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
<?php | |
$n = $argv[1] ?? 1000; | |
$data = [ | |
// | |
]; | |
/** | |
* Sort an array by recursively merging a left and right sub array in order. |
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
<?php | |
namespace PhpBenchmarks; | |
use SplStack; | |
use SplQueue; | |
const NUM_TEST_ITEMS = 100000; | |
const DATA_SIZE = 32; //Bytes. |
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
/* | |
White elephant gift for Degeneratesmas 2017 | |
By: Andrew DalPino | |
*/ | |
#include <Metro.h> | |
#include <Adafruit_NeoPixel.h> | |
#include <Bounce2.h> | |
#define PIXEL_PIN 3 |