Skip to content

Instantly share code, notes, and snippets.

View pensiero's full-sized avatar
🍕
Eating a Pizza

Oscar Fanelli pensiero

🍕
Eating a Pizza
View GitHub Profile
$('.bs-sidebar').affix({
offset: {
top: $('.bs-sidebar').offset().top,
bottom: function () {
return (this.bottom = $('body > footer').outerHeight(true) + 50)
}
}
});
SELECT DISTINCT t1.sess
FROM (
wp_cf7groups AS t1
INNER JOIN wp_cf7dbplugin_submits AS t2 ON ( t1.cf1 = t2.submit_time
OR t1.cf2 = t2.submit_time )
)
WHERE t2.form_name
IN (
'Azienda1', 'Azienda2'
)
class Tile extends Entity {
/**
* @ORM\OneToOne(
* targetEntity="Domino\Entity\Tile",
* mappedBy="tileLeft",
* cascade={"persist", "merge"}
* )
* @var Tile
*/
object(Zend\Http\Response)[1337]
protected 'recommendedReasonPhrases' =>
array (size=57)
100 => string 'Continue' (length=8)
101 => string 'Switching Protocols' (length=19)
102 => string 'Processing' (length=10)
200 => string 'OK' (length=2)
201 => string 'Created' (length=7)
202 => string 'Accepted' (length=8)
203 => string 'Non-Authoritative Information' (length=29)
$application = $event->getTarget();
$application->getEventManager()->attach(
MvcEvent::EVENT_ROUTE,
function (MvcEvent $event) {
/* @var $route Route\PageRoute */
$route = $event
->getApplication()
->getServiceManager()
->get(__NAMESPACE__ . '\Route\PageRoute');
/**
* Magic getter to expose protected properties.
*
* @param string $property
* @return mixed
*/
public function __get($property) {
return $this->{'get'.ucfirst($property)}();
}
// strip table tag
$doc = new \DOMDocument();
$doc->loadHTML($text);
$xpath = new \DOMXPath($doc);
foreach ($xpath->query('//table') as $node) {
$node->parentNode->removeChild($node);
}
$textWithoutTable = $doc->saveHTML();
// controlla che ci siano almeno X paragrafi
<?php
$job = $this->_jobManager->get('Toms\Job\VisitJob');
$this->_queue->push($job);
<?php
function printOdds() {
$i = 0;
while ($i <= 100) {
if ($i % 2 != 0) {
echo $i . " ";
}
$i++;
}
<?php
$cars = [
[
'engine' => 'gasoline',
'doors' => 3,
'color' => 'red',
'cc' => '1200',
'release' => '2016',
],