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
start %~dp0bin/mysqld.exe --datadir=%~dp0data --console | |
exit |
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 | |
error_reporting(-1); | |
ini_set('display_errors', true); | |
abstract class CalculatorFactory | |
{ | |
public static function create($string, $value) | |
{ | |
$className = ucfirst($string) . 'Calculator'; | |
if (!class_exists($className)) { |
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 | |
$width = 800; | |
$height = 800; | |
$centerX = $width / 2; | |
$centerY = $height / 2; | |
$img = imagecreate($width, $height); | |
$backgroundColor = imagecolorallocate($img, 220, 220, 220); | |
$orange = imagecolorallocate($img, 255, 165, 0); | |
$black = imagecolorallocate($img, 0, 0, 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
<IfModule mod_rewrite.c> | |
Options +FollowSymlinks -Indexes | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME) !-d | |
RewriteRule ^ index.php [L,QSA] | |
</IfModule> |
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 | |
$rootDir = __DIR__.'/classes/'; | |
$autoload = function($className) use($rootDir){ | |
$fileName = ''; | |
if($lastNameSpacePosition = strpos($className,'\\')){ | |
$namespace = substr($className, 0,$lastNameSpacePosition); | |
$className = substr($className,$lastNameSpacePosition+1); | |
$fileName = str_replace('\\',DIRECTORY_SEPARATOR,$namespace).DIRECTORY_SEPARATOR; |
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 | |
error_reporting(-1); | |
ini_set('display_errors', 'On'); | |
$array = [ | |
['Row 1','Row 2','Row 3'], | |
['Col 1','Col 2','Col 3'], | |
['Col 1','Col 2','Col 3'], | |
]; |
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 | |
error_reporting(-1); | |
ini_set('display_errors', 'On'); | |
function render(string $path,array $data){ | |
if(!is_file($path)){ | |
trigger_error('Datei "'.$path.'" wurde nicht gefunden'); | |
return 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 | |
function render(string $path, array $data) { | |
if (defined('TEMPLATE_DIR')) { | |
$path = TEMPLATE_DIR . DIRECTORY_SEPARATOR . $path; | |
} | |
if (!is_file($path)) { | |
trigger_error('Datei "' . $path . '" wurde nicht gefunden'); | |
return 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 | |
function event(string $name, array $data = [],callable $action = null,int $priority = 0){ | |
static $events = []; | |
if($action){ | |
$events[$name][]=[ | |
'priority' => $priority, | |
'action' => $action | |
]; | |
return 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 | |
error_reporting(-1); | |
ini_set('display_errors', 'On'); | |
$url = 'https://www.green-secure.de/podcast/'; | |
$domDocument = new DOMDocument(); |