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 getEndereco() { | |
// Se o campo CEP não estiver vazio | |
if($.trim($("#campoCep").val()) != ""){ | |
/* | |
Para conectar no serviço e executar o json, precisamos usar a função | |
getScript do jQuery, o getScript e o dataType:"jsonp" conseguem fazer o cross-domain, os outros | |
dataTypes não possibilitam esta interação entre domínios diferentes | |
Estou chamando a url do serviço passando o parâmetro "formato=javascript" e o CEP digitado no formulário | |
http://cep.republicavirtual.com.br/web_cep.php?formato=javascript&cep="+$("#cep").val() | |
*/ |
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
package javaapplication1; | |
import java.io.*; | |
public class JavaApplication1 { | |
public static void main(String[] args) { | |
try { | |
// Conteudo | |
String content = "Teste"; |
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(){ | |
// CONFIG | |
var abreGaleria = 0; | |
var total; | |
var indice = -1; | |
var indiceAnt; | |
var _left = 0; | |
var interval; | |
/*$("#galeria").hover(function(){ |
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
def index | |
@produto = Produto.find_by_slug(params[:produto]) | |
nvisitas = @produto.nvisitas ||= 0 | |
nvisitas += 1 | |
if @produto.update_attribute(:nvisitas, nvisitas) | |
@produto | |
end |
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
SELECT a.idanuncio, | |
a.titulo, | |
a.estado, | |
(CASE WHEN a.preco_machos = 0 AND a.preco_femeas != 0 THEN a.preco_femeas WHEN a.preco_femeas = 0 && a.preco_machos != 0 THEN a.preco_machos WHEN a.preco_machos <= a.preco_femeas THEN a.preco_machos ELSE a.preco_femeas END) as preco, | |
ga.titulo AS imagem, | |
a.identificacao | |
FROM anuncio AS a | |
INNER JOIN galeria_anuncio AS ga ON a.idanuncio = ga.idanuncio | |
WHERE ga.posicao = 0 | |
GROUP BY a.idanuncio |
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
+----+------------+-------------------+ | |
| id | produto_id | picture_file_name | | |
+----+------------+-------------------+ | |
| 1 | 1 | K185A2617.jpg | | |
| 2 | NULL | K185A0001.jpg | | |
| 3 | NULL | K185A0002.jpg | | |
| 4 | NULL | K185A0003.jpg | | |
| 5 | NULL | K185A0004.jpg | | |
| 6 | NULL | K185A0005.jpg | | |
| 8 | NULL | K185A0006.jpg | |
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
-- PRINCIPAIS | |
CREATE TABLE vagas( | |
id_vaga INT NOT NULL AUTO_INCREMENT | |
,cargo_vaga VARCHAR(100) | |
,descricao_vaga TEXT | |
,requisitos_vaga TEXT | |
,diferenciais_vaga TEXT | |
,local_vaga VARCHAR(100) | |
,id_faixa_salarial_vaga INT NOT NULL | |
,info_remun_vaga TEXT |
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
$exec = $this->_conn->prepare('INSERT INTO usuarios(nome_usuario, email_usuario, senha_usuario) VALUES (":nome_usuario", ":email_usuario", ":senha_usuario")'); | |
$exec->bindValue(":nome_usuario", $dados['nome_usuario'], PDO::PARAM_STR); | |
$exec->bindValue(":email_usuario", $dados['email_usuario'], PDO::PARAM_STR); | |
$exec->bindValue(":senha_usuario", $dados['senha_usuario'], PDO::PARAM_STR); |
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
SELECT | |
OBJECT_NAME(id) AS Tabela, | |
Name AS Coluna | |
FROM | |
sys.syscolumns | |
WHERE | |
name = 'campo_desejado' |
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
<html> | |
<head> | |
<title>Armando Gay</title> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<div id="guardaProjetos"> | |
<ul id="projetos"> | |
<!-- PROJETO --> |
OlderNewer