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 | |
// A função abaixo demonstra o uso de uma expressão regular que identifica, de forma simples, telefones válidos no Brasil. | |
// Nenhum DDD iniciado por 0 é aceito, e nenhum número de telefone pode iniciar com 0 ou 1. | |
// Exemplos válidos: +55 (11) 98888-8888 / 9999-9999 / 21 98888-8888 / 5511988888888 | |
function phoneValidate($phone) | |
{ | |
$regex = '/^(?:(?:\+|00)?(55)\s?)?(?:\(?([1-9][0-9])\)?\s?)?(?:((?:9\d|[2-9])\d{3})\-?(\d{4}))$/'; | |
if (preg_match($regex, $phone) == false) { |
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 myFunction() { | |
var str = "a Raposa Matou o rato no NatO"; | |
var res = str.toLowerCase().split(" "); | |
var htmlFinal = ""; | |
for(let i = 0; i < res.length; i++){ | |
palavra = res[i].split(""); | |
for(let i2 = 0; i2 < palavra.length; i2++){ | |
console.log(palavra[i2]); | |
} | |
} |
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
##### | |
# | |
# Example .htaccess file for TYPO3 CMS - for use with Apache Webserver | |
# | |
# This file includes settings for the following configuration options: | |
# | |
# - Compression | |
# - Caching | |
# - MIME types | |
# - Cross Origin requests |
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 | |
/* | |
Let’s say we are dealing with sending data over the internet, to make it simple, assume this plain text, in order to save some bandwidth we want to compress it, according to the following function: | |
compress(aaaaca) -> ax4ca | |
compress(aaaaaabbbcaaa) -> ax6bx3cax3 | |
compress(mississippi) -> misx2isx2ipx2i | |
*/ |
OlderNewer