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
Como fazer um formulário enviar os dados para a mesma página onde ele está localizado? | |
Basta incluir o nome da página na opção action da tag <form>. Para fazer isso existem duas formas: | |
1) Digitar o nome da página. | |
2) Usar a variável predefinida PHP_SELF, que contém o nome do script em execução. | |
Suponha que o formulário está localizado na página modelo.php . Veja os dois exemplos: | |
<form method="POST" action="modelo.php"> |
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
O Eclipse é uma IDE bastante utilizada por desenvolvedores Java. Também tem versões para outras linguagens de programação, mas a comunidade que mais o utiliza é a dessa linguagem. O Eclipse é muito criticado por sua performance que deteriora ao passar do tempo, mas a sua quantidade de ferramentas, principalmente a de Refatoração, na minha opinião, tornam essa IDE viciante, fazendo seus usuários tolerarem sua lentidão eventual. | |
Esse tutorial ensinará como instalá-lo no Ubuntu, mas deve funcionar para outras distribuições. Foi testado nas versões 11.10, 12.04 e 12.10, mas, como é bastante básico, deverá funcionar para outras versões do sistema. É bastante similar à instalação do Sublime Text 2 que está explicada em um post anterior. | |
Passo 1 – Baixar o Eclipse | |
Há diversas versões do Eclipse, cada uma com pacotes pré-instalados que procuram adequar a IDE para seu tipo de uso. Nada impede de que você baixe uma versão básica e vá instalando os plugins que forem necessários para o seu desenvolvimento. | |
Nesse tuto |
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
Esse script tem o objetivo de direcionar o cadastro para outra pagina. | |
function redirect_after_register_user($user_id) { | |
echo '<script type="text/javascript">window.location = "http://webeneural.com/wp-admin/user-edit.php?user_id='.$user_id.'"</script>'; | |
} | |
add_action( 'user_register', 'redirect_after_register_user'); | |
essa action precisa ser adcionada no function.php do wordpress. |
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 | |
/** | |
* Plugin Name: Email Confirmation | |
* Description: Send an email to the user with confirmation code and store form data in database until user confirms. | |
* Author: Cedric Ruiz | |
*/ | |
class EmailConfirmation | |
{ | |
const PREFIX = 'email-confirmation-'; |
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 colCheck(shapeA,shapeB){ | |
var vX = (shapeA.x + (shapeA.width/2)) - (shapeB.x + (shapeB.width/2)), | |
vY = (shapeA.y + (shapeA.height/2)) - (shapeB.y + (shapeB.height/2)), | |
hWdiths = (shapeA.width/2) + (shapeB.width/2), | |
hHeights =(shapeA.height/2) + (shapeB.height/2), | |
colDir = null; | |
if(Math.abs(vX) < hWdiths && Math.abs(vY) < hHeights){ | |
var oX = hWdiths - Math.abs(vX), | |
oY = hHeights - Math.abs(vY); |
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
$query_atraso = "SELECT bn_id | |
FROM tb_secao_projetos_tarefa | |
WHERE tb_responsavel_bn_id = '".$_SESSION['bope_id']."' | |
AND bd_entrega <= NOW() AND bn_status < 3"; |
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 | |
//Upload de arquivos | |
// verifica se foi enviado um arquivo | |
if(isset($_FILES['arquivo']['name']) && $_FILES["arquivo"]["error"] == 0) | |
{ | |
echo "Você enviou o arquivo: <strong>" . $_FILES['arquivo']['name'] . "</strong><br />"; | |
echo "Este arquivo é do tipo: <strong>" . $_FILES['arquivo']['type'] . "</strong><br />"; | |
echo "Temporáriamente foi salvo em: <strong>" . $_FILES['arquivo']['tmp_name'] . "</strong><br />"; | |
echo "Seu tamanho é: <strong>" . $_FILES['arquivo']['size'] . "</strong> Bytes<br /><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
How to install nodejs in debian wheezy | |
1 - Download curl | |
2 - execute curl -sL https://deb.nodesource.com/setup | sudo bash - | |
3 - install node execute command sudo apt-get install -y nodejs | |
4 the just enjoy node |
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
#!/bin/bash | |
# Script for creating Virtual Servers On Apache | |
# Check for the correct parameters | |
if [ $# -eq 0 ]; then | |
echo 'Você precisa passar o domínio a ser criado como parâmetro' | |
echo 'Uso: create-site your-domain.com' | |
exit 0 | |
fi |
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
doc para instalar o composer (https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) | |
Passo para instalar o composer no debian(GNU/Linux) | |
1 - baixar e instalar o composer | |
curl -sS https://getcomposer.org/installer | php | |
2 - apos baixar o composer iremos mover o composer para | |
mv composer.phar /usr/local/bin/composer |