Skip to content

Instantly share code, notes, and snippets.

<?php
echo 'test';
<?php
class A {
public function test() {
$this->abc[] = 'test';
}
}
class B extends A {
public $abc = array('pre-test');
}
@parap
parap / Network PHP file
Created January 31, 2013 19:56
Test task for Olexander Bondarenko
<?php
/**
* @task Write a php class Network.
* The constructor should take a positive integer value indicating the number of elements in the set.
* Passing in an invalid value should throw InvalidArgumentException.
*
* The class should also provide two public methods, connect and query.
*
* The first method, connect will take two integers indicating the elements to connect.
@parap
parap / gist:4685904
Created January 31, 2013 20:00
PHP Network class for Olexander Bondarenko
<?php
/**
* @task Write a php class Network.
* The constructor should take a positive integer value indicating the number of elements in the set.
* Passing in an invalid value should throw InvalidArgumentException.
*
* The class should also provide two public methods, connect and query.
*
* The first method, connect will take two integers indicating the elements to connect.
protected function displayResponse()
{
// $this->
// (new EchoFormatApi())->output($this->request, $this->response);
$parser = new TemplateNameParser();
$loader = new FilesystemLoader(
array(
SYS_LAYOUTS_PATH . '/Pages/%name%.php',
@parap
parap / gist:4959846
Created February 15, 2013 11:30
qwewqe
protected function displayResponse()
{
// $this->
// (new EchoFormatApi())->output($this->request, $this->response);
$parser = new TemplateNameParser();
$loader = new FilesystemLoader(
array(
SYS_LAYOUTS_PATH . '/Pages/%name%.php',
asdasdasdasdasdasdasd
@parap
parap / index.php
Created March 22, 2013 08:22
test gist
<?php
use Symfony\Component\HttpFoundation\Request;
use frontend\model\Initializer;
include_once('config.php');
include_once('lib/autoload.php');
include_once('app/bootstrap.php');
$initializer = new Initializer();
@parap
parap / log.txt
Created January 31, 2016 14:52
Log of failed vich/uploader-bundle installation for symfony 3
composer require vich/uploader-bundle
Using version ^0.14.0 for vich/uploader-bundle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install symfony/symfony v3.0.1
- Installation request for vich/uploader-bundle ^0.14.0 -> satisfiable by vich/uploader-bundle[v0.14.0].
function onresize(event) {
//canvas.width=document.documentElement.clientWidth
o.resizelist[1].x = o.resizelist[3].x = document.documentElement.clientWidth-1;
o.resizelist[2].x = 2;
var main_width = 980;
if (document.documentElement.clientWidth > main_width) {
o.resizelist[0].x = o.resizelist[4].x = document.documentElement.clientWidth / 2;
} else {