This file contains hidden or 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 * FROM artigos WHERE texto LIKE 'lorem%' |
This file contains hidden or 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 * FROM artigos WHERE texto LIKE '%lorem%' |
This file contains hidden or 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
<script type="text/javascript"> | |
var gaJsHost = (("https:" == document.location.protocol ) ? "https://ssl." : "http://www."); | |
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | |
</script> | |
<script type="text/javascript"> | |
try { | |
var pageTracker = _gat._getTracker("UA-xxxxx-x"); | |
pageTracker._trackPageview(); | |
pageTracker._addTrans( | |
'99999', // Código do Pedido |
This file contains hidden or 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 str = 'Hello world!'; | |
var return = str.substr(2,3); | |
// Retorno será: llo |
This file contains hidden or 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
/* VERMELHO */ | |
p.vermelho::selection { | |
background: #FF0000; | |
color: #FFF; | |
} | |
p.vermelho::-moz-selection { | |
background: #FF0000; | |
color: #FFF; | |
} | |
p.vermelho::-webkit-selection { |
This file contains hidden or 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 | |
if (count($array) == count($array, COUNT_RECURSIVE)) { | |
echo 'array is not multidimensional'; | |
} | |
else { | |
echo 'array is multidimensional'; | |
} | |
?> |
This file contains hidden or 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 | |
$feed = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat <image>http://lorempixel.com/100/100/</image>'; | |
// Remover a Tag e o Conteúdo de <image>lalalala</image> | |
$feed = preg_replace( "/\<image\>(.*?)\<\/image\>/s", "", $feed); | |
echo $feed; | |
?> |
This file contains hidden or 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
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
$('#form_contato').submit(function(){ | |
var er = new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/); | |
var nome = $('#txt_nome').val(); | |
var email = $('#txt_email').val(); | |
if( nome == '' ) { alert('Preencha o campo nome'); return false; } | |
if( email == '' || !er.test(email) ) { alert('Preencha o campo email corretamente'); return false; } |
This file contains hidden or 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
window.onload = function() { | |
var array = new Array('Teste 1', 'Teste 2', 'Teste 3',[['Teste 4', 'Teste 5'],['Teste 6','Teste 7',['Teste 8','Teste 9']]]) | |
document.write( '<pre>' + print_r( array ) + '</pre>' ); | |
} |
This file contains hidden or 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
/** | |
* JavaScript print_r | |
* | |
* PHP print JavaScript version | |
* | |
* @package print_r | |
* @author Bruno Augusto | |
* @version 0.1 | |
* | |
* @params string Input |