Skip to content

Instantly share code, notes, and snippets.

zend_extension=xdebug.so
xdebug.max_nesting_level=250
xdebug.var_display_max_depth=10
xdebug.remote_enable=true
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_port=9000
xdebug.remote_host=127.0.0.1
xdebug.idekey=phpstorm-xdebug
xdebug.remote_autostart=1
<?php
namespace VisualCraft\Bundle\VioskFrontendBundle\DataFixtures;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\DataFixtures\ReferenceRepository;
use Doctrine\Common\DataFixtures\SharedFixtureInterface;
use Hautelook\AliceBundle\Alice\DataFixtureLoader;
abstract class BaseDataFixtureLoader extends DataFixtureLoader implements OrderedFixtureInterface, SharedFixtureInterface
<?php
namespace DesignPatterns\Creational\Prototype;
require_once '../../vendor/autoload.php';
$fooPrototype = new FooBookPrototype();
// now lets say we need 10,000 books of foo and 5,000 of bar ...
$maxObjects = 6000000;
void QThermalConductivity::ev_solid_foil()
{
double l = thickness[2];
double kapa_s;
double H = thickness[3];
T_temp[N[1] - 1] = T[N[1] - 1] + 1.0/chcapacity[2]/ro[2]/H*(-2*kapa[1]*kapa[2]/(kapa[1]*H + kapa[2]*dx)*(T[N[1] - 1] - T[N[1] - 2]) +2/(H+l)*kapa_s*(T[N[1]] - T[N[1] - 1]))*dt;
bool t1 = (!flag && (f <= 0) && (T[N[1]] > T_evt) );
bool t2 = (!flag && (f >= 1) && (T[N[1]] < T_evt) );
<?php
namespace Harentius\SiteBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* Products
*
<!-- Форма -->
<h3>Выбрать нужные дни недели из периода: 01.01.2016 - 31.01.2016</h3>
<form action="<?php $_SERVER['PHP_SELF'] ?>" method = "post">
<label>Пн.<input type="checkbox" name="input[]" value="1"></label>
<label>Вт.<input type="checkbox" name="input[]" value="2"></label>
<label>Ср.<input type="checkbox" name="input[]" value="3"></label>
<label>Чт.<input type="checkbox" name="input[]" value="4"></label>
<label>Пт.<input type="checkbox" name="input[]" value="5"></label>
<button type='submit'>Посчитать количество всех дней</button>
</form> *********************************************************************<br/><br/>
<!-- Форма -->
<h3>Выбрать нужные дни недели из периода: 01.01.2016 - 31.01.2016</h3>
<form action="<?php $_SERVER['PHP_SELF'] ?>" method = "post">
<label>Пн.<input type="checkbox" name="input[]" value="1"></label>
<label>Вт.<input type="checkbox" name="input[]" value="2"></label>
<label>Ср.<input type="checkbox" name="input[]" value="3"></label>
<label>Чт.<input type="checkbox" name="input[]" value="4"></label>
<label>Пт.<input type="checkbox" name="input[]" value="5"></label>
<button type='submit'>Посчитать количество всех дней</button>
</form> *********************************************************************<br/><br/>
@harentius
harentius / gulpfile.js
Created May 26, 2016 05:54
gulpfile for coffeescript, less, watch and with spec project
var gulp = require('gulp'),
less = require('gulp-less'),
coffee = require('gulp-coffee'),
concat = require('gulp-concat'),
watch = require('gulp-watch'),
batch = require('gulp-batch'),
fs = require('fs'),
argv = require('yargs').argv
;
{
"kind": "customsearch#search",
"url": {
"type": "application/json",
"template": "https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&lr={language?}&safe={safe?}&cx={cx?}&cref={cref?}&sort={sort?}&filter={filter?}&gl={gl?}&cr={cr?}&googlehost={googleHost?}&c2coff={disableCnTwTranslation?}&hq={hq?}&hl={hl?}&siteSearch={siteSearch?}&siteSearchFilter={siteSearchFilter?}&exactTerms={exactTerms?}&excludeTerms={excludeTerms?}&linkSite={linkSite?}&orTerms={orTerms?}&relatedSite={relatedSite?}&dateRestrict={dateRestrict?}&lowRange={lowRange?}&highRange={highRange?}&searchType={searchType}&fileType={fileType?}&rights={rights?}&imgSize={imgSize?}&imgType={imgType?}&imgColorType={imgColorType?}&imgDominantColor={imgDominantColor?}&alt=json"
},
"queries": {
"request": [
{
"title": "Google Custom Search - site:johnstonpress.iannounce.mobi/thestarcouk/obituary obituary",
@harentius
harentius / renderTransition.coffee
Created August 8, 2016 18:59
renderTransition
renderTransition: (text, showingTime = 1500) ->
deferred = new Deferred()
setTimeout(() ->
deferred.resolve()
# displaying code
, showingTime)
return deferred