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 | |
| $myPOST = $request->getParsedBody(); |
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 | |
| $app->add(function ($req, $res, $next) { | |
| //DO SOMETHING BEFORE THE REQUEST IS PROCESSED | |
| $res = $next($req, $res); //PROCESS THE REQUEST | |
| //DO SOMETHING AFTER THE REQUEST HAS BEEN PROCESSED | |
| if ($res->getStatusCode() > 500) { | |
| //Do something with a server error, maybe email someone or submit a bug report | |
| } |
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
| $near = "SELECT c.id, c.name, c.email, c.phone, c.logo, c.banner, c.description, cl.lat, cl.lng, | |
| ACOS( SIN( RADIANS( cl.lat ) ) * SIN( RADIANS( '$lat' ) ) + COS( RADIANS( cl.lat ) ) | |
| * COS( RADIANS( '$lat' )) * COS( RADIANS( cl.lng ) - RADIANS( '$lng' )) ) * 6380 AS distance | |
| FROM CLIENT_LOCATION cl | |
| INNER JOIN CLIENT c | |
| on cl.client_id = c.id | |
| WHERE | |
| ACOS( SIN( RADIANS( cl.lat ) ) * SIN( RADIANS( ? ) ) + COS( RADIANS( cl.lat ) ) | |
| * COS( RADIANS(? )) * COS( RADIANS( cl.lng ) - RADIANS( ? )) ) * 6380 < 10 | |
| ORDER BY distance ASC"; |
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
| # eve-text-mud | |
| ## Player States: | |
| Space | |
| Docked | |
| # Command List | |
| ### Space Commands | |
| - .dock <object> |
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
| Project Agreement | |
| - Project will start once a 50% payment of ($_____.00) has been paid | |
| - The project will take no less than __ weeks to complete | |
| - Project Code will be kept in a repository owned by the contractor, and the IP rights of the code will be in the sole ownership of the contractor. | |
| - The IP rights will be transferred after the remainder of the payment of ($_____.00) has been received. | |
| - Upon delivery, a 30 day license for the code will be provided. Upon expiration you will be invoiced ($_____.00) each month for a monthly licence. |
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; | |
| use App\Services\ServerProviderFactory; | |
| use Illuminate\Database\Eloquent\Model; | |
| class Provider extends Model | |
| { | |
| public function service() |
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
| class UserRequestValidator | |
| { | |
| public function __invoke(Request $request, Response $response $next) | |
| { | |
| $validator = new Validator(); | |
| //rules |
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
| //Problem: Given an array of integers, find the pair of adjacent elements that has the largest product and return that product. | |
| //[-23, 4, -3, 8, -12] | |
| // -23 * 4 = -92 | |
| // 4 * -3 = -12 | |
| // -3 * 8 = -24 | |
| // 8 * -12 = -96 | |
| // Return -12 | |
| //Loop N-1 times starting at pos 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
| Count 14687 | |
| tongue : 4312 | |
| laperm : 3325 | |
| raisedbrow : 2400 | |
| limegreen : 1393 | |
| tigerpunk : 1279 |
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
| Count 17463 / 104000 | |
| violet : 1 | |
| cerulian : 2 | |
| googly : 5 | |
| chartreux : 6 | |
| spock : 8 | |
| whixtensions : 8 | |
| skyblue : 13 | |
| peach : 13 | |
| bloodred : 15 |