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
function adwords_conversion(google_conversion_id, google_value, google_conversion_label) { | |
var img = new Image(); | |
img.src = 'https://www.googleadservices.com/pagead/conversion/' + google_conversion_id + '/?value='+google_value+'&label='+google_conversion_label+'&script=0'; | |
img.height = 1; | |
img.width = 2; | |
document.body.appendChild(img); | |
} |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
uglify: { | |
options: { | |
mangle: false | |
}, | |
app: { | |
files: { | |
'public/assets/javascripts/js/main.min.js': [ // arquivo minificado |
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
<select name="uf" id="uf" class="input input-uf" required> | |
<option value="">UF</option> | |
<option value="AC" {{ Input::old('city') == 'AC' ? 'selected="selected"' : null }}>AC</option> | |
<option value="AL" {{ Input::old('city') == 'AL' ? 'selected="selected"' : null }}>AL</option> | |
<option value="AP" {{ Input::old('city') == 'AP' ? 'selected="selected"' : null }}>AP</option> | |
<option value="AM" {{ Input::old('city') == 'AM' ? 'selected="selected"' : null }}>AM</option> | |
<option value="BA" {{ Input::old('city') == 'BA' ? 'selected="selected"' : null }}>BA</option> | |
<option value="CE" {{ Input::old('city') == 'CE' ? 'selected="selected"' : null }}>CE</option> | |
<option value="DF" {{ Input::old('city') == 'DF' ? 'selected="selected"' : null }}>DF</option> | |
<option value="ES" {{ Input::old('city') == 'ES' ? 'selected="selected"' : null }}>ES</option> |
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
POST /servico/nododoarquivo.asmx HTTP/1.1 | |
Host: sofis.servehttp.com | |
Content-Type: text/xml; charset=utf-8 | |
Content-Length: length | |
SOAPAction: "http://servidor/NomeDaFuncao" | |
<?xml version="1.0" encoding="utf-8"?> | |
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> | |
<soap:Header> | |
<Credenciais xmlns="http://sofis.com.br/"> |
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 | |
$xml = '<Credenciais xmlns="http://sofis.com.br/"><codigo>'.self::CODIGO.'</codigo><senha>'.self::SENHA.'</senha></Credenciais>'; | |
$soapAuthVar = new SoapVar($xml, XSD_ANYXML, null, null, null); | |
$soapAuthHeader = new SoapHeader(self::WSDL, 'Credenciais', $soapAuthVar); | |
$this->soap->__setSoapHeaders( array($soapAuthHeader) ); |
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 | |
$Produto = EscapeWork::getClass('Produto'); |
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 | |
$texto = 'Lorem Ipsum is simply dummy text of the printin'; | |
echo limitar($texto, 15); | |
// Escreve na tela "<strong>Lorem Ipsum i...</strong>" |
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 | |
function limitar($string, $tamanho, $encode = 'UTF-8') { | |
if( strlen($string) > $tamanho ) | |
$string = mb_substr($string, 0, $tamanho - 3, $encode) . '...'; | |
else | |
$string = mb_substr($string, 0, $tamanho, $encode); | |
return $string; | |
} |
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 | |
$cep = new Cep('SEU CEP'); | |
echo $cep->uf; | |
echo $cep->cidade; | |
echo $cep->bairro; | |
echo $cep->logradouro; |
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 | |
$texto = 'ESTA É UMA FRASE COM ACENTUAÇÃO'; | |
echo strtolower( $texto ); // escreve: 'esta �� uma frase com acentua����o' | |
echo mb_strtolower( $texto, 'UTF-8' ); // escreve: 'esta é uma frase com acentuação' |
OlderNewer