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
(function($) { | |
return $.fn.extend({ | |
findLabel: function() { | |
var matched; | |
matched = []; | |
this.each(function() { | |
var $label, $this, id; | |
$this = $(this); | |
id = $this.attr('id'); | |
if (id != 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
(function($) { | |
return $.fn.resetInput = function(callback) { | |
return this.each(function() { | |
var $el, type; | |
$el = $(this); | |
type = this.type; | |
switch (type) { | |
case 'select-one': | |
case 'select-multiple': | |
$el.find('option').each(function() { |
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 | |
namespace CommonBundle\Form\Type; | |
use CommonBundle\Entity\Country; | |
use Doctrine\Common\Persistence\ManagerRegistry; | |
use Geocoder\ProviderAggregator; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | |
use Symfony\Component\Form\FormBuilderInterface; |
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
SELECT id, ST_Distance_Sphere(Point(-73.951368, 40.716743), geom) as distance_in_meters, tags, ST_AsText(geom) | |
FROM nodes | |
WHERE ST_Contains( ST_MakeEnvelope( | |
Point((-73.951368+(20/111)), (40.716743+(20/111))), | |
Point((-73.951368-(20/111)), (40.716743-(20/111))) | |
), geom ) | |
AND match(tags) against ("+thai +restaurant" IN BOOLEAN MODE) | |
ORDER BY distance_in_meters LIMIT 10 |
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
даніэлe <- pronounce the last e as if there was a consonant after. (like the е in шея) |
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 | |
/** | |
* Get service. | |
*/ | |
public function getService() | |
{ | |
if (null === $this->service) { | |
$this->service = $this->container->get($this->serviceName); | |
} | |
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 | |
// *Snip* | |
class CreditCardType extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
/** | |
* @var Entity\CreditCard $data |
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
SELECT | |
w.customer_id, | |
b.* | |
FROM l | |
INNER JOIN b ON l.id = b.lot_id | |
LEFT JOIN w ON l.id = w.lot_id | |
AND w.customer_id = b.customer_id | |
WHERE b.customer_id = 17 | |
# AND b.active = 1 |
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 | |
// AccountingInvoiceItem Entity | |
/** | |
* Transactions used to pay for this invoice item. | |
* | |
* @var AccountingTransaction[] | |
* | |
* @ORM\OneToMany(targetEntity="CommonBundle\Entity\AccountingTransaction", mappedBy="invoice_item", cascade={"persist"}) | |
*/ | |
private $transactions; |
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 app/console doctrine:generate:entity --entity=xyz | |
Welcome to the Doctrine2 entity generator | |
This command helps you generate Doctrine2 entities. | |
First, you need to give the entity name you want to generate. |