// define a function
function add(x, y) { return x + y; }
// define a function (wow! that is 8 chars shorter)
const add = (x, y) => x + y;
| <?php | |
| use Behat\Behat\Hook\Scope\ScenarioScope; | |
| trait Taggable | |
| { | |
| protected $tags = []; | |
| protected $tagLoaded = false; | |
| /** |
| <?php | |
| // on boucle 5 fois | |
| for ($i = 1; $i <= 5; $i++) { | |
| try { | |
| call_pangolin(); | |
| } catch (Exception $e) { | |
| // on affiche l'exception s'il y en a une | |
| echo 'Exception reçue : ', $e->getMessage(), "\n"; | |
| } |
Auto-height textarea using as minimum JS as possible.
Forked from Yair Even Or's Pen BEST Textarea auto-expand.
A Pen by Anonasaurus Rex on CodePen.
| <?php | |
| namespace ReflectGen\Bundle\Form; | |
| use FOS\UserBundle\Doctrine\UserManager; | |
| use ReflectGen\Bundle\Infra\Mailer; | |
| use Symfony\Component\Form\AbstractType; | |
| use Symfony\Component\Form\FormBuilderInterface; | |
| use Symfony\Component\Form\FormEvent; | |
| use Symfony\Component\Form\FormEvents; |
| <?php | |
| namespace ReflectGen\Bundle\Entity; | |
| use Doctrine\Common\Collections\ArrayCollection; | |
| use Doctrine\ORM\Mapping as ORM; | |
| use FOS\UserBundle\Model\User as BaseUser; | |
| use ReflectGen\Bundle\Entity\Traits\PlatformAwareTrait; | |
| use ReflectGen\Bundle\Framework\Validator\Constraints as ReflectGenAssert; | |
| use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; |
| Vagrant::Config.run do |config| | |
| config.vm.box = "squeeze64puppet3" | |
| config.vm.box_url = "http://l4bs.slynett.com/vagrant/squeeze64-puppet3.box" | |
| config.vm.customize [ "modifyvm", :id, "--name", "Default Symfony 2 VM 232a4e9ea0727b13c9f49c00d301f745" ] | |
| config.vm.customize [ "modifyvm", :id, "--memory", "1024", "--cpus", "2" ] | |
| config.vm.network :hostonly, "11.11.11.11" | |
| config.vm.host_name = "dev.local" |
| # Class: apache | |
| # | |
| # This class installs Apache | |
| # | |
| # Parameters: | |
| # | |
| # Actions: | |
| # - Install Apache | |
| # - Manage Apache service | |
| # |