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
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 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
$(function(){ | |
// CONFIG | |
var abreGaleria = 0; | |
var total; | |
var indice = -1; | |
var indiceAnt; | |
var _left = 0; | |
var interval; | |
/*$("#galeria").hover(function(){ |
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
package javaapplication1; | |
import java.io.*; | |
public class JavaApplication1 { | |
public static void main(String[] args) { | |
try { | |
// Conteudo | |
String content = "Teste"; |
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
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() | |
*/ |
NewerOlder