Skip to content

Instantly share code, notes, and snippets.

class BoostPython < Formula
desc "C++ library for C++/Python interoperability"
homepage "https://www.boost.org/"
url "https://downloads.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.tar.bz2"
sha256 "beae2529f759f6b3bf3f4969a19c2e9d6f0c503edcb2de4a61d1428519fcb3b0"
head "https://github.com/boostorg/boost.git"
bottle do
cellar :any
sha256 "3b47066b435fc7b9acb677969bf2fa54e634a45ee91d089f222169d012ab487a" => :sierra
// https://leetcode.com/problems/valid-parentheses/description/
class Parentheses {
public boolean isValid(String s) {
boolean isValid = true;
if (s.length()%2 != 0) {
isValid = false;
return isValid;
}
const int pwm = 6 ; //initializing pin 2 as pwm
const int in_1 = 30 ;
const int in_2 =31 ;
//For providing logic to L298 IC to choose the direction of the DC motor
void setup()
{
pinMode(pwm,OUTPUT) ; //we have to set PWM pin as output
pinMode(in_1,OUTPUT) ; //Logic pins are also set as output
services:
lexik_form_filter.type.filter_entity_name:
class: BVD\PetroleumBundle\Util\EntityNameFilterType
tags:
- { name: form.type, alias: filter_entity_name }
lexik_form_filter.transformer.entity_name:
class: BVD\PetroleumBundle\Util\FilterEntityNameTransformer
tags:
- { name: lexik_form_filter.transformer, alias: filter_transformer_entity_name }
<?php
namespace BVD\PetroleumBundle\Util;
use Lexik\Bundle\FormFilterBundle\Filter\Transformer\FilterTransformerInterface;
use Symfony\Component\Form\FormInterface;
class FilterEntityNameTransformer implements FilterTransformerInterface
{
<?php
namespace BVD\PetroleumBundle\Util;
use Lexik\Bundle\FormFilterBundle\Filter\Extension\Type\TextFilterType;
use Lexik\Bundle\FormFilterBundle\Filter\Extension\Type\FilterTypeInterface;
use Lexik\Bundle\FormFilterBundle\Filter\Extension\Type\AbstractFilterType;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
@slavik112211
slavik112211 / gist:3901055
Created October 16, 2012 18:22
Filtering association field
<?php
namespace BVD\PetroleumBundle\Util;
use Lexik\Bundle\FormFilterBundle\Filter\Extension\Type\TextFilterType;
use Lexik\Bundle\FormFilterBundle\Filter\Extension\Type\FilterTypeInterface;
use Lexik\Bundle\FormFilterBundle\Filter\Extension\Type\AbstractFilterType;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;