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 | |
/** | |
* Sequência de Fibonacci em PHP | |
* @author Renato Ribeiro <[email protected]> | |
* | |
*/ | |
//função que gera a sequência de fibonacci e retorna em array | |
function fibonacci($q, $zero = false){ | |
if($q >= 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
import random | |
def euclides (e, phi): | |
r, r1 = e, phi | |
d, v = 1, 0 | |
u1, v1 = 0, 1 | |
while r1 != 0: | |
q = int(r / r1) # pega apenas a parte inteira |
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 | |
require_once "../conexao/Conexao.php"; | |
class Produto { | |
private $codigo; | |
private $titulo; | |
private $preco; | |
private $categoria; |
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
#TESTE 1: assim funciona .then((result:any)=>{ | |
this.userProvider.createAccount(this.model.email, this.model.password).then((result:any)=>{ | |
this.toast.create({ message: 'sucesso. Token: ' + result.token, position: 'bottom', duration: 2000 }).present(); | |
}).catch( ); | |
#TESTE 2: usando funcao anonima ao inves de arrow function nao funciona .then(function(result:any) { |
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
/* | |
print_time() returns a string in the format mm-dd-yyyy hh:mm:ss | |
*/ | |
#include "RTClib.h" | |
#include <SD.h> | |
#include <SPI.h> | |
RTC_DS1307 rtc; | |
const int chipSelect = 10; |
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
funcao inicio() | |
{ | |
inteiro numero | |
escreva("informe um número para obter seu antecessor e sucessor") | |
leia(numero) | |
escreva("o numero é ", numero) | |
escreva("\no antecessor é ", numero - 1) |
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
<style> | |
input[type="file"]{ | |
position: absolute; | |
top: -500px; | |
} | |
div.file-listing{ | |
width: 200px; | |
} |
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
programa | |
{ | |
funcao inicio() | |
{ | |
real precoDolar = 1300.0 | |
real cotacaoDoDia = 5.0 | |
real precoReal = precoDolar * cotacaoDoDia | |
real economia | |
real dolaresQueFaltam |
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 br.biblioteca; | |
import java.io.IOException; | |
import java.util.List; | |
import javax.servlet.RequestDispatcher; | |
import javax.servlet.ServletException; | |
import javax.servlet.annotation.WebServlet; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; |
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 | |
$numeros; | |
$lista = [10]; | |
for ($i = 0; $i < 10; $i++) { | |
print "($i) Dgite um numero inteiro: "; | |
$numeros = (float) fgets(STDIN); | |
$lista[$i] = $numeros; | |
} | |
print "\n"; |
OlderNewer