This file contains 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 | |
// put this in your controller | |
protected function getErrorsFromForm(FormInterface $form) | |
{ | |
$errors = array(); | |
foreach ($form->getErrors() as $error) { | |
$errors[] = $error->getMessage(); | |
} |
This file contains 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
<aplicativoposxml xmlns="http://tempuri.org/posxml.xsd"> | |
<pagina nome="principal"> | |
<editaarquivo nomearquivo="config.dat" chave="iphost" valor="50.16.188.58" /> | |
<editaarquivo nomearquivo="config.dat" chave="portahost" valor="8087" /> | |
<editaarquivo nomearquivo="config.dat" chave="withssl" valor="0" /> | |
<variavelint valor="0" variavel="iMenu"/> | |
<menu opcoes="1 - Download Param\2 - Download apps\3 - Menu de servicos\" variavel="$(iMenu)"/> | |
<if variavel="$(iMenu)" operador="igual" valor="1"> | |
<chamafuncao nome="WalkServicesDownloadParamFile" /> |
This file contains 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
<stringvariable value="" variable="sBuffer" /> | |
<stringvariable value="POST " variable="sVerb" /> | |
<!-- Path --> | |
<stringvariable value=' /ping ' variable="sPath" /> | |
<!-- Data to be sent --> | |
<stringvariable value='{"times": "3", "foo":"3698"}' variable="sPayload" /> | |
<!-- Headers, comma separated: header1:value1,header2:value2 --> | |
<stringvariable value="Accept:application/json,Content-type:application/json" variable="sHeaders" /> | |
<!-- Concatenate the strings in this order: Method (sVerb), Headers (sHeaders), Path (sPath), Payload (sPayload) --> |
This file contains 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
var sessions = [ | |
{ | |
'userId': "132", | |
'deviceType': "ios", | |
'startDate': ISODate('2018-02-23'), | |
'endDate': ISODate('2018-02-28') | |
}, | |
{ |
This file contains 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
# coding: utf-8 | |
from __future__ import print_function | |
""" | |
Para padronização será realizado: | |
Requerer o tipo de medição (1 = Pré | 2 = Pós); | |
Coluna A é o ID do status do registro; | |
Coluna B padronizar data/hora como dd/mm/aaaa hh:mm; | |
Desconsiderar colunas L até R; |
This file contains 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 | |
date_default_timezone_set('UTC'); | |
/** | |
* Note: Excel stores dates as sequential serial numbers so that they can be used in calculations. | |
* January 1, 1900 is serial number 1, and | |
* January 1, 2008 is serial number 39448 because it is 39,447 days after January 1, 1900. | |
* You will need to change the number format (Format Cells) in order to display a proper date. | |
* | |
* | |
* ex.: 14-03-2012 => 40982 dias |
This file contains 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
import sys | |
import os | |
DROP_ON_RESTORE = True | |
dump_dir = sys.argv[1] | |
databases = [ | |
'database1', | |
'database2', | |
] |
This file contains 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
fetch('http://<HOST>:5984/<DATABASE>/_find', { | |
method: 'POST', | |
headers: {'Content-type':'application/json'}, | |
body: JSON.stringify({"selector": {"param": "51"}}) | |
}).then(function (response) { | |
response.json().then(function (value) { console.log(value) }) | |
}); |
This file contains 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
#!/usr/bin/env bash | |
MONGODB_VERSION=3.2 | |
MONGODB_PHP_DRVIVER_VERSION=1.3.0 | |
GPG_KEY=EA312927 | |
if [ -f /home/vagrant/.mongo ] | |
then |
This file contains 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
https://wiki.debian.org/JavaPackage | |
baixw o java oficial e instale o pacote acima para construir um deb file desses arquivos |