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
public function __construct($data) { | |
$address = array('name', 'post_code'); | |
$business = array('name', 'address', 'post_code', 'intro'); | |
if ($data['type] == 'business') $fields = $business; | |
else $fields = $address; | |
if (count(array_intersect($fields, array_keys($data))) != count($fields)) { | |
throw new Exception("Required data was not supplied to the Address 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
<?php | |
class Invoice { | |
private $_items; | |
private $_totalAmount = 0; | |
private $_sentDate; | |
public function isSent() { | |
return !is_null($this->_sentDate); | |
} |
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
{ | |
"require": { | |
"phpunit/phpunit": "=3.5" | |
} | |
} |
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 | |
$params = array( | |
'query' => 'something', | |
'page' => 1, | |
'items' => 10 | |
); | |
$url = 'http://someapi.com/search'; |
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
/** | |
* Invokes a matcher or proxies the method call to the intercepted object | |
* magic call method, if one exists | |
* | |
* @param string $method | |
* @param array $args | |
* @return boolean|mixed | |
*/ | |
public function __call($method, $args) |
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
$sql = ("UPDATE schedule SET Shift_ID = '$shift' WHERE (`Date` BETWEEN '$from' AND '$to') AND (Emp_ID = '$emp_id')"); | |
if(!$result_shift_update_query = $mysqli->query($sql)) | |
{ | |
echo "INSERT ERROR 1 HERE"; | |
} | |
echo "Shift UPDATE SQL: " . $sql . "<br><br>";//error checking | |
$sql = ("SELECT `Date` FROM schedule WHERE (`Date` BETWEEN '$from' AND '$to') AND (Emp_ID = '$emp_id')"); | |
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 | |
if(isset($_POST['submit'])) | |
{ | |
if(isset($_POST['offdays'])) | |
{ | |
//$off is set through the config settings// | |
$shift = $_POST['shift']; | |
$from = $_POST['from']; | |
$to = $_POST['to']; |
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 | |
$defaults = array( | |
'month' => 'january', | |
'day' => 1, | |
'hour' => 0, | |
'minute' => 0, | |
'second' => 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
FROM ubuntu:16.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
g++ make binutils autoconf automake autotools-dev libtool pkg-config \ | |
zlib1g-dev libcunit1-dev libssl-dev libxml2-dev libev-dev libevent-dev libjansson-dev \ | |
libjemalloc-dev cython python3-dev python-setuptools |
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
Verifying my Blockstack ID is secured with the address 1ANvqvSYdjiDDFh5YAMMHJRnrWrgmSBoM9 https://explorer.blockstack.org/address/1ANvqvSYdjiDDFh5YAMMHJRnrWrgmSBoM9 |
OlderNewer