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
/** Gerar ID's para usuários **/ | |
add_action( 'user_register', 'my_on_user_register' ); | |
function my_on_user_register( $user_id ) { | |
$unique_id = 6395730800131050 + $user_id; | |
update_user_meta( $user_id, 'my_unique_id', $unique_id ); | |
} | |
//display decal code on profile | |
add_action('show_user_profile', 'my_extra_user_profile_fields'); | |
add_action('edit_user_profile', 'my_extra_user_profile_fields'); | |
function my_extra_user_profile_fields($user){ |
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 add_new_member() { | |
if(isset($_POST['cpf']) && wp_verify_nonce($_POST['register_nonce'], 'register-nonce')) { | |
$user_cpf = $_POST['user_cpf']; | |
$user_nasc = $_POST['data_nasc']; | |
$user_medicamento = $_POST['medicamento']; | |
$user_crm = $_POST['user_crm']; | |
$user_uf = $_POST['user_uf']; | |
$user_nome = $_POST['user_nome']; | |
$user_sexo = $_POST['user_sexo']; | |
$user_email = $_POST['email']; |
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
<script type="text/javascript"> | |
document.getElementById('username').onblur = function validarCPF(cpf){ | |
var cpf = document.getElementById('username').value; | |
var cpfStr = cpf.toString(); | |
if(cpfStr.length != 11 || cpfStr.replace(eval('/'+cpfStr.charAt(1)+'/g'),'') == '') | |
{ | |
alert('CPF inválido'); | |
} | |
else | |
{ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
div.hr { | |
width:70%; | |
height: 1px; | |
background: #7F7F7F; | |
} | |
div.hr:after { |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define LINHAS 3 | |
#define COLUNAS 6 | |
// Contrua matriz 3x6 de real | |
// que leia números digitados pelo usuário | |
// Se houverem números negativos | |
// trocar pelo numero 1 | |
// Mostrar todos os números |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define LINHAS 6 | |
#define COLUNAS 6 | |
// Faça uma Matriz de 6x6 | |
// para os usuarios preencherem | |
// com elementos do tipo INT | |
// Em seguida, apresente na tela | |
// somente os valores PARES |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define LINHAS_A 4 | |
#define COLUNAS_A 5 | |
#define ELEMENTOS_B 4 | |
#define ELEMENTOS_C 5 | |
// Efetuar a leitura de 20 valores | |
// inteiros em uma Matriz A com 4 linhas | |
// e 5 colunas |
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
<VirtualHost *:80> | |
# The ServerName directive sets the request scheme, hostname and port that | |
# the server uses to identify itself. This is used when creating | |
# redirection URLs. In the context of virtual hosts, the ServerName | |
# specifies what hostname must appear in the request's Host: header to | |
# match this virtual host. For the default virtual host (this file) this | |
# value is not decisive as it is used as a last resort host regardless. | |
# However, you must set it for any further virtual host explicitly. | |
#ServerName www.example.com |
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
$('div.sideview-close-btn').click(function() { | |
// comando que pausa o vídeo | |
$('#popup-youtube-player')[0].contentWindow.postMessage('{"event":"command","func":"stopVideo","args":""}', '*'); | |
}); |
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 hiddenEmailAddress(email) { | |
var emailLength = email.length; | |
var atPosition = email.search('@'); | |
var unhiddenPortion = email.slice(atPosition, emailLength); | |
var i; | |
var hiddenEmail = ''; | |
for(i = 0; i < atPosition; i++) { | |
if(i === 0 || i === atPosition - 1) { | |
hiddenEmail += email[i]; |
OlderNewer