<?php
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
error_reporting(E_ALL);
set_time_limit(0);
date_default_timezone_set('UTC');
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 | |
class baseClass { | |
protected $a; | |
protected $b; | |
public function __construct($a, $b = null) { | |
$this->a = $a; | |
$this->b = $b; | |
} |
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
Title: | |
Deploying straight to Production: A Scientist approach with Experiments | |
Summary: | |
Deploying directly to production and testing in live can be scary, especially when your business can’t afford to lose any of | |
its traffic; but having a staging environment isn’t always an option, and with the right approach, the risks of deploying | |
straight to production can be mitigated. | |
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
Home Page | |
Today’s tech, tomorrow’s mindset, yesterday’s problems. => Todays tech, tomorrows mindset, yesterdays problems. | |
(no apostrophes) | |
You ideate, validate and prototype. => You bring the ideas, | |
Unsure exactly what you're saying here | |
on fluffy clouds | |
??? in the cloud? | |
Company |
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 | |
class evidenceController { | |
public function getDetails($id){ | |
$course = Course::with(['courseType']) | |
->checkEstablishmentOnView() | |
->excludeArchived() | |
->findOrFail($id); | |
$view = View::make('courses/parts/details') | |
->with('course', $course); |
Trying a little experiment with PHP's SPLHeap, but puzzled by the fact that iterating over the heap seems to be removing each entry as I access it.
The code
class ExtendedSPLHeap extends \SPLHeap {
protected function compare($a, $b) {
if ($a->latitude == $b->latitude) {
return 0;
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
Verifying that +markbaker is my blockchain ID. https://onename.com/markbaker |
For the Open Source PHPExcel library (https://github.com/PHPOffice/PHPExcel):
-
Autodetect separator, enclosure and line endings for CSV Reader
An autodetect option that will identify the separator (e.g. comma, semicolon, pipe, tab, etc), the enclosure (e.g. quote, double quote), enclosure escape character (e.g. "" or ") and line endings for csv files, and set them up for the CSV reader.
-
Helper Wizards for number format masks
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
function duplicateKeys($string) { | |
$string = strtolower($string); | |
$length = strlen($string); | |
for ($i = 0; $i < $length; ++$i) { | |
yield ord(strpos($string, $string[$i])) => $string[$i]; | |
} | |
} | |
foreach (duplicateKeys('badass') as $i => $value) { | |
echo $i , ' -> ' , $value, PHP_EOL; |
NewerOlder