Skip to content

Instantly share code, notes, and snippets.

<?php
namespace CuatroOchenta\BackOfficeBundle\Form;
use Symfony\Component\Form\FormConfigInterface;
use Symfony\Component\Form\FormInterface;
class FormOptionReplacer
{
/**
Privacy Policy
Retrosoft ("developer") built the Dashy Ball! app as an Ad Supported app. This SERVICE
("app") is provided by at no cost and is intended for use as is.
This privacy policy is used to inform you regarding policies with the collection, use, and
disclosure of Personal Information if anyone decided to use this Service.
@newradius
newradius / install-php7.2-mcrypt.sh
Created April 6, 2018 13:50 — forked from arzzen/install-php7.2-mcrypt.sh
Install PHP 7.2 MCrypt extension
#
# Check version php and pecl
#
php -v # if default php is not 7.2 then use /usr/bin/php7.2 instead php
pecl version
#
# Install mcrypt extension
# see http://pecl.php.net/package-info.php?package=mcrypt&version=1.0.1
#
@newradius
newradius / materialize_form_theme.html.twig
Created March 28, 2017 14:12 — forked from JusteLeblanc/materialize_form_theme.html.twig
Symfony2 form theme to integrate Materialize in your Symfony2 forms
{% extends 'form_div_layout.html.twig' %}
{% block form_row -%}
<div class="row{% if (not compound or force_error|default(false)) and not valid %} has-error{% endif %}">
<div class="input-field col s12">
{{- form_widget(form) -}}
{{- form_label(form) -}}
{{- form_errors(form) -}}
</div>
</div>
@newradius
newradius / Test.java
Created January 11, 2016 22:33
Recursividad
// Reveal neightbours with recursion
public void findNeighbors(int row, int col) {
if ((row >= 0 && row <= BOARD_SIZE - 1) && (col >= 0 && col <= BOARD_SIZE - 1)) { //Check if row and col is not out of board
if ((cell[row][col].getState() != ButtonState.OPEN) && (((Integer) (cell[row][col].getTag())) != -1)
&& (cell[row][col].getState() != ButtonState.FLAG) && (cell[row][col].getState() != ButtonState.INTERROGANT)
&& (((Integer) (cell[row][col].getTag())) == 0)) {
cell[row][col].setBackgroundResource(R.drawable.boton_opened);
cell[row][col].setState(ButtonState.OPEN);
findNeighbors(row - 1, col);
findNeighbors(row - 1, col - 1);