Author Archives: Everton Gonçalves

About Everton Gonçalves

http://www.ctasoftware.com.br

Como o Facebook pode Alavancar suas Vendas

01 – Conhecer seu público Com uma fanpage, você tem conhecimento dos perfis do público que curte seu negócio, as suas preferências, idade, profissão, sexo e outros, além de nome, e-mail e a sua localidade. Com as informações você consegue fazer campanhas direcionadas para seu público-alvo e potencializar as suas vendas. 02 – Segmentação É […]

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> .NET, AngularJS, JavaScript, JQuery, Linux, MySQL, PHP, Prestashop, SharePoint, SQL | <span class="entry-utility-prep entry-utility-prep-tag-links">Tagged</span> , , | Leave a comment

Invocar/Chamar WEB API via PHP

Chamar API através de PHP. A função abaixo chama uma Web API através do PHP. [php] function CallAPI($method, $url, $data = false) { $curl = curl_init(); switch ($method) { case “POST”: curl_setopt($curl, CURLOPT_POST, 1); if ($data) curl_setopt($curl, CURLOPT_POSTFIELDS, $data); break; case “PUT”: curl_setopt($curl, CURLOPT_PUT, 1); break; default: if ($data) $url = sprintf(“%s?%s”, $url, http_build_query($data)); } […]

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> PHP | <span class="entry-utility-prep entry-utility-prep-tag-links">Tagged</span> | Leave a comment

Remover DIV pelo texto ou title

Simples forma de remover uma div pelo text ou title. [js] $(“[title=’Criar novo site de projeto’]”).remove(); $(“[text=’Criar novo site de projeto’]”).remove(); [/js]

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> JavaScript, JQuery | <span class="entry-utility-prep entry-utility-prep-tag-links">Tagged</span> , | Leave a comment

Anúncio GT Condomínio

Sistema de Gestão de Condomínio

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> Sem categoria | Leave a comment

Verificar se usuário faz parte de grupo SharePoint

A função abaixo retorna se o usuário SharePoint faz parte de um determinado grupo. Se o retorno for verdadeiro o usuário faz parte do grupo. [js] function isMember(groupName) { var obj = null; var url = _spPageContextInfo.webAbsoluteUrl + “/_api/web/sitegroups/getByName(‘”+groupName+”‘)/Users?$filter=Id eq ” + _spPageContextInfo.userId; var requestHeaders = { “accept” : “application/json;odata=verbose” }; $.ajax({ url : url, […]

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> JavaScript, SharePoint | <span class="entry-utility-prep entry-utility-prep-tag-links">Tagged</span> , , | Leave a comment

Função JavaScript para validação de CPF

Função para validação de CPF. [js] /*Função que valida Cpf*/ function validarCPF( campo ){ var cpf = campo.value; cpf = remove(cpf, “.”); cpf = remove(cpf, “-“); if(cpf.length != 11 || cpf == “00000000000” || cpf == “11111111111” || cpf == “22222222222” || cpf == “33333333333” || cpf == “44444444444” || cpf == “55555555555” || cpf […]

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> JavaScript | <span class="entry-utility-prep entry-utility-prep-tag-links">Tagged</span> | Leave a comment

Funções de Criptografia PHP

Duas funções básicas para criptografar e descriptografar em PHP. [php] function enc ($string) { $enc_string = base64_encode($string); $enc_string = str_replace(“=”,””,$enc_string); $enc_string = strrev($enc_string); $md5 = md5($string); $enc_string = substr($md5,0,3).$enc_string.substr($md5,-3); echo “O resultado do processo de Encriptação de $string é: $enc_string“; } function des($string){ $ini = substr($string,0,3); $end = substr($string,-3); $des_string = substr($string,0,-3); $des_string = substr($des_string,3); […]

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> PHP | <span class="entry-utility-prep entry-utility-prep-tag-links">Tagged</span> | Leave a comment

Sleep “Thread” em JavaScript

O exemplo que mostro a seguir mostra como fazer uma “thread sleep” via JavaScript. [js] function sleepFor( sleepDuration ){ var now = new Date().getTime(); while(new Date().getTime() < now + sleepDuration){ /* do nothing */ } } [/js] Exemplo de uso [js] function demo(){ sleepFor(2000); console.log("Olá! Eu sou um teste."); } demo(); [/js] Prático!

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> AngularJS, JavaScript | <span class="entry-utility-prep entry-utility-prep-tag-links">Tagged</span> | Leave a comment

Duplicar tabela MySQL

Apenas um comando para duplicar uma tabela utilizando MySQL [sql] CREATE TABLE tbFuncionario_old SELECT * FROM tbFuncionario; [/sql]

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> MySQL | <span class="entry-utility-prep entry-utility-prep-tag-links">Tagged</span> | Leave a comment

Formatação de Moeda Real AngularJS

Como sabemos para formatar moedas no AngularJS utilizamos o currency, porém a configuração de moeda é utilizada a do servidor onde nossa aplicação está publicada, ou seja, se tivermos em um servidor Norte Americano, será retornado o símbolo ‘$’ e não ‘R$’ como gostaríamos. Para correção utilize: [html] {{model.valor | currency: ‘R$’}} [/html] Se quiser […]

<span class="entry-utility-prep entry-utility-prep-cat-links">Posted in</span> AngularJS | <span class="entry-utility-prep entry-utility-prep-tag-links">Tagged</span> | Leave a comment