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 | |
/** | |
* Create the INTERFACE | |
**/ | |
interface CharacterInterface{ | |
public function attack(); | |
public function dodge(); | |
public function heal(); |
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 | |
interface AnimalInterface{ | |
public function run(); | |
} | |
class Dog implements AnimalInterface{ | |
public function run() | |
{ |
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
$.ajax({ | |
url: '/ajax/url.php', | |
type:'POST', | |
data: data, | |
crossDomain: true, //essentials | |
xhrFields:{withCredentials:true}, //essentials | |
success: function(data) { | |
console.log(data); | |
} | |
}); |
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
sshfs -o -follow_symlinks username@server_or_ip:/path/to/remote/folder/ /path/to/local/mount/folder |
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 | |
$array = array( | |
'index.index','index.create','index.update','index.delete','role.index','role.create','role.update','role.delete' | |
); | |
$route_name = array('index','role'); |
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 | |
$n = 50; | |
$hash = str_repeat("#",$n); | |
for($x = $n;$x>=0;$x--){ | |
$test = preg_replace("/\#/"," ",$hash,$x); | |
if( !ctype_space($test) ){ | |
echo $test."\n"; | |
} |
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 | |
$handle = fopen ("php://stdin","r"); | |
fscanf($handle,"%d",$n); | |
$a = array(); | |
for($a_i = 0; $a_i < $n; $a_i++) { | |
$a_temp = fgets($handle); | |
$a[] = explode(" ",$a_temp); | |
array_walk($a[$a_i],'intval'); | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
tr > td { | |
height: 30px; | |
width:30px; | |
align: center; |
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 | |
function solution($A) { | |
$i = 0; | |
$k = 0; | |
$arr_count = count($A); | |
for( $j = 0;$j<=$arr_count;$j++ ){ | |
$k = $A[$i]; |
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 | |
function solution($N) { | |
//asuming $N is a range of numbers integr | |
for ($i = 1; $i <= $N; $i++){ | |
if( $i%3 == 0 && $i%5 == 0 && $i%7 == 0 ){ | |
echo "FizzBuzzWoof\n"; | |
}elseif( $i%3 == 0 && $i%5 == 0){ | |
echo "FizzBuzz\n"; | |
}elseif($i%3 == 0 && $i%7 == 0){ |
OlderNewer