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
public class Conta{ | |
private double saldo; | |
public Conta(double saldo){ | |
this.saldo = saldo; | |
} | |
public void depositar(double valor){ |
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 | |
# protected $_path = 'media/images/uploads/produtos/'; | |
# $produtos = new Model_Produtos; | |
# $time_now = new DateTime(); | |
// validation file image | |
$files = Validation::factory($_FILES) | |
->rule('imagem', 'Upload::not_empty') | |
->rule('imagem', 'Upload::type', array(':value', array('jpg','jpeg','png','gif','JPG','JPEG','PNG','GIF'))) | |
->rule('imagem', 'Upload::image'); |
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
import java.util.ArrayList; | |
import java.util.Iterator; | |
import javax.swing.JOptionPane; | |
public class Pessoa { | |
public static void main(String[] args) { | |
String[] pessoas = new String[5]; |
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
<a href="teste.php?resposta=sim" >REPOSTA GET</a> | |
<?php | |
$resposta_get = $_GET['resposta'] ? $_GET['resposta'] : 'SEM PARAMETRO NA URL'; | |
echo $reposta_get; | |
?> |
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 | |
// validation file image | |
$files = Validation::factory($_FILES) | |
->rule('imagem', 'Upload::type', array(':value', array('jpg', 'png', 'gif'))); | |
// if file image is not empty, just do it bob!!! =:^D | |
if ($files->check() && !empty($_FILES['imagem']['name'][0])){ | |
// pega o ultimo ID do servicos |
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
-- author: Fabian Carlos | |
-- INSERT para testar as triggers | |
-- INSERT INTO "passageiros" VALUES(333, 'Fabian Carlos'); | |
-- insert into "voo" VALUES(1); | |
-- insert into "aeronaves" VALUES(1,'Boing 747'); | |
-- insert into "cidades" VALUES(1, 'Cuiabá', 'Brasil'); | |
-- insert into "aeroportos" VALUES(1, 'Aeroporto VG', 1); | |
-- insert into "assentos" VALUES(1, 'AA+'); |
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>ENVIO PARA EMAIL</title> | |
</head> | |
<body> | |
<?php | |
$nome = (!empty($_GET['nome'])) ? $_GET['nome'] : false; | |
$email = (!empty($_GET['email'])) ? $_GET['email'] : false; |
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
var c, n, s, i, j; | |
Number.prototype.formatMoney = function(c, d, t){ | |
n = this, c = isNaN(c = Math.abs(c)) ? 2 : c, d = d === undefined ? "," : d, t = t === undefined ? "." : t, s = n < 0 ? "-" : "", i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", j = (j = i.length) > 3 ? j % 3 : 0; | |
return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : ""); | |
}; |
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
String.prototype.trim = function () { | |
return this.replace(/^\s*/, "").replace(/\s*$/, ""); | |
}; |
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 preMessage(id_input, message_input){ | |
"use strict"; | |
id_input.val(message_input); | |
id_input.focusin(function(){ | |
checkInputFormsNull($(this), message_input); | |
}); | |
id_input.focusout(function(){ | |
checkInputFormsNull($(this), message_input); |
OlderNewer