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 Base | |
*/ | |
Class Base { | |
/** | |
* @param $name | |
* @return string | |
*/ |
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 | |
/** | |
* Interface ApplicantAPI | |
*/ | |
interface ApplicantAPI { | |
/** | |
* @param $title | |
* @return int|null | |
*/ |
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 | |
$jsonInput = ' | |
[{ | |
"_id": "58b5c92eb2f1c45f9b7d5bfd", | |
"ap_mac": "80:2a:a8:80:d8:f3", | |
"authorized_by": "api", | |
"end": 1496084526, | |
"mac": "00:26:08:db:ec:d4", | |
"site_id": "58261efcaa83e82c6b230cff", |
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 Supervisor { | |
private $prop1; | |
private $prop2; | |
protected $key; | |
protected function set($key, $val) { | |
$this->$key = $val; | |
} |
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 Supervisor { | |
private $prop1; | |
private $prop2; | |
protected $key; | |
protected function set($key, $val) { | |
$this->$key = $val; | |
} |
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
SELECT * | |
FROM table_one | |
WHERE NOT EXISTS(SELECT * | |
FROM table_two | |
WHERE table_one.id = table_two.table_one_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
package main | |
import ( | |
"fmt" | |
"strings" | |
) | |
func main() { | |
testStop() |
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
cat access.log.2016-09-18 | grep '{search_term}' | grep -v '/css' | grep -v '/js' | grep -v '/img' |
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
SELECT EXISTS(SELECT 1 FROM table_name WHERE id = 1); | |
If it id exists then it will return 1 otherwise it will return 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
//The values in this arrays contains the names of the indexes (keys) that should exist in the data array | |
$required = array('key1', 'key2', 'key3' ); | |
$data = array( | |
'key1' => 10, | |
'key2' => 20, | |
'key3' => 30, | |
'key4' => 40 | |
); |
NewerOlder