Skip to content

Instantly share code, notes, and snippets.

Problem 1
- Installation request for gushphp/gush dev-master -> satisfiable by gushphp/gush[dev-master].
- gushphp/gush dev-master requires gushphp/gush-github-adapter ~1.0 -> no matching package found.
Problem 2
- Installation request for gushphp/gush-github-adapter dev-master -> satisfiable by gushphp/gush-github-adapter[dev-master].
- gushphp/gush-github-adapter dev-master requires gushphp/gush ~1.3 -> no matching package found.
# plasma.py
# plasma fractal
# FB - 201003147
from PIL import Image
import math
import random
# image size
w = 512
h = 512
<?php
function FN_ae2umlaute($string)
{
return(str_replace(array("ae","oe","ue", "Ae","Oe","Ue") , array("ä","ö","ü", "Ä","Ö","Ü") ,$string));
}
$fp=fopen("soldatenvars.txt","r");
if($fp)
{
<?php
/**
* Klasse Farbrechner
* Berechnet aus den Farb-Gencodes der Eltern den Gencode des Fohlens
*/
class Farbrechner {
/**
<?php
$action = new KillACat();
$request = new KillACatRequest(3);
$response = $action->process($request);
echo $response->killedCats
use Silex\Application;
use Silex\CallbackResolver;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\Event\KernelEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\KernelEvents;
<?php
$hh = $id['act'];
//на сколько надо сместить массив
for ($i = 0; $i++ < $hh;) {
$arr = array_shift($ff);
$ff[] = $arr;
}
//смещение массива и вставка в конец массива
function voin($attackerId, $targetId, $counter)
<?php
$data = array(0 => array('gods' => '', 'ser' => '9068', 'group2' => 'pusto', 'zol' => '1000', 'op' => '447', 'id' => '1', 'fro' => 'users', 'gods1' => '0', 'login' => 'Xtra Strong', 'inc' => '10', 'pit' => 'Тьма', 'pit1' => 'Прыть', 'xp2' => '60', 'inte' => '23', 'xp' => '60', 'class' => 'Маг', 'urn' => '30', 'brn' => '14', 'murn' => '15', 'back' => '1', 'sth' => 'Огонь', 'uvr' => '8', 'krt' => '8', 'blc' => '7', 'tch' => '4', 'udh' => '0',), 1 => array('login' => 'Тьма', 'id' => '38', 'fro' => 'pit', 'inc' => '10', 'xp2' => '70', 'class' => 'Воин', 'urn' => '60', 'brn' => '10', 'murn' => '0', 'xp' => '70', 'inte' => '0', 'back' => '1', 'uvr' => '10', 'krt' => '10', 'blc' => '0', 'tch' => '10', 'udh' => '5', 'sth' => '',), 2 => array('login' => 'Прыть', 'id' => '37', 'fro' => 'pit', 'inc' => '7', 'xp2' => '100', 'murn' => '0', 'inte' => '0', 'back' => '1', 'uvr' => '5', 'xp' => '100', 'krt' => '7', 'blc' => '0', 'tch' => '15', 'udh' => '10', 'class' => 'Воин', 'urn' => '40', 'brn' => '30', 'sth' => '',)
@BlackScorp
BlackScorp / object.php
Last active August 29, 2015 14:22
Refactoring legacy code step by step
<?php
session_start();
require_once('./global.php');
exec_header();
//$bgEngine->gamenavigation->siteCheck("object.php");
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
$id = isset($_REQUEST['id']) ? (int)$_REQUEST['id'] : null;
$gameField = isset($bgEngine->gamefields->usergamefield[$id]) ? $bgEngine->gamefields->usergamefield[$id] : '';
@BlackScorp
BlackScorp / webworks.php
Last active August 29, 2015 14:23
refactoring legacy code part2
<?php
include("./include/config2.inc.php3");
include("$tools_dir/class.FastTemplate.php3");
/* Get Cookie und decrypt */
$admin_pass_enc = $HTTP_COOKIE_VARS["$cookiepassword"];
$admin_nick_enc = $HTTP_COOKIE_VARS["$cookienickname"];
$admin_pass = base64_decode($admin_pass_enc);