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
SET @yds = 2016; | |
SET @yde = 2016; | |
SET @type = 'Semester'; | |
SELECT | |
* | |
FROM | |
school_calendar | |
WHERE | |
part_number = 1 |
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 | |
/** | |
* CourseEnrollmentEligibility | |
*/ | |
class CourseEnrollmentEligibility extends ModelService { | |
/** |
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 DeltaX\Aegis\ModelServices\GradesRegistry; | |
use DeltaX\Aegis\MenuServices\Checklist; | |
use Carbon\Carbon; | |
use DeltaX\Utilities as U; | |
class StudentChecklist extends Checklist { |
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 | |
public function setSort(array $items){ | |
$columnOrders = []; | |
foreach ($items as $item) { | |
$itemStartsWithAlpha = preg_match('/^\W[A-Za-z]*/', $item); | |
if (! $itemStartsWithAlpha) { |
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 | |
/** | |
* Accept an array of instances of | |
* MenuService. Each will process their | |
* input data then return their output | |
* data so the next instance can use | |
* the output data as their input data. | |
* When there is no instance left in | |
* the array, the last one shall be returned |
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 | |
public function getChecklist($request, $response, $urlParams){ | |
$input = $request->getQueryParams(); | |
$input['student_number'] = $urlParams['student_number']; | |
$output = (new MultipleReadModule ($input)) | |
->setRepository(new CentralRepository) | |
->setModelService('DeltaX\Aegis\ModelServices\GradesRegistry\StudentChecklist') |
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
def is_prime(x): | |
divisor = 1 | |
while divisor < x: | |
if divisor > 1 and (x % count) == 0: | |
return False | |
divisor += 1 | |
return True |
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
""" | |
## Derived from here: | |
## https://math.stackexchange.com/questions/1694311/is-sigma-sigma-a-mathematical-way-of-doing-a-for-loop/1694322 | |
## (c) CC-BY-SA 3.0 | |
""" | |
## Definition | |
def sum_notation(i=0, end=1, f= lambda x : x): | |
return f(i) + sum_notation(i+1, end, f) if (i <= end) else 0 |