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
| // Prototype that stores information about a given polynomial. | |
| function Polynomial(data) { | |
| // Support providing already existing Polynomials. | |
| this.polynomial = data instanceof Polynomial ? data.polynomial : data; | |
| } | |
| // Rank all coefficients in the polynomial and return the largest. | |
| Polynomial.prototype.getLargestCoefficient = function() { | |
| var re = /(\d+)/g, match, max = 0; | |
| while(match = re.exec(this.getPolynomial())) |
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
| input { | |
| padding: 5px; | |
| background: #30302d14; | |
| outline: none; | |
| font-size: 18px; | |
| border-radius: 8px; | |
| box-shadow: inset 2px 2px 7px -1px grey; | |
| } | |
| button { |
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 | |
| use \App\Controllers\Tests; | |
| use \App\Middleware; | |
| $app->get('/tests/testroute/{name}', Tests\newTestController::class . ':getT')->add(new Middleware\testMiddleware()); |
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\Controllers\Tests; | |
| use Psr\Http\Message\ResponseInterface as Response; | |
| use Psr\Http\Message\ServerRequestInterface as Request; | |
| //use Slim\Psr7\Response; | |
| use Slim\Views\PhpRenderer; | |
| public function getT(Request $request, Response $response, $args) { | |
| //$name = $args['name']; |