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 | |
ini_set('display', 'On'); | |
error_reporting('E_ALL','STRICT'); | |
interface Salario | |
{ | |
function mostrarSalario(); | |
} | |
interface maiorSalario |
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
sudo apt-get install phpunit | |
sudo pear upgrade pear | |
# dependencias | |
sudo pear channel-discover pear.phpunit.de | |
sudo pear channel-discover components.ez.no | |
sudo pear channel-discover pear.symfony-project.com | |
sudo pear install --alldeps phpunit/PHPUnit |
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
*********************************************** | |
Problema dos Generais Bizantinos: | |
- Generais cercam uma cidade com suas tropas. | |
- Generais estão separados pelo relevo, somente podem | |
se comunicar através de mensageiros. | |
- Generais só vencem se todos atacarem ao mesmo tempo. | |
Teoremas: | |
1º - Se 2/3 + 1 dos generais (processos) forem leais (não falharem), |
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
********************************************************* | |
#Problema dos Generais Bizantinos | |
Generais cercam uma cidade com suas tropas. | |
- Generais estão separados pelo relevo, somente podem se comunicar através de mensageiros. | |
- Generais só vencem se todos atacarem ao mesmo tempo. | |
#Teoremas: |
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
/*Exemplo 2 | |
*Máquina de estados finitos. | |
*Se você está no estado y no tempo n, então a probabilidade | |
*de que você se mova para o estado x no tempo n + 1 não depende de | |
* n, e somente depende do estado atual y em que você está | |
* | |
*/ | |
public class ClasseSocialTest extends TestCase | |
{ |
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 | |
//Página index.php | |
require_once 'validacao-de-campos.php'; | |
?> | |
<html> | |
<head> | |
<meta charset="UTF-8"> |
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 | |
function conectar() | |
{ | |
try { | |
$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
<?php | |
error_reporting(E_ALL); | |
ini_set("display_errors", 1); | |
if (isset($_FILES ['file'])) { | |
$file = $_FILES['file']; |
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
//: Playground - noun: a place where people can play | |
func totalCusto ()->Int { | |
let watts = 300// pega os dados do input | |
let tensao = 100// pega os dados do input | |
let potencia = 420// pega os dados do input | |
let horas = 124 // pega os dados do input | |
let dias = 6779 // pega os dados do input | |
let kwh = 0.88447066 | |
if watts != 0 { |
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 arrayGaurd = [String]() | |
for m in money { | |
arrayGaurd += "\(money)$" | |
} | |
arrayGaurd = moneyArray.map({"\($0)€"}) |
OlderNewer