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 { StyleSheet, Text, View, Platform, ScrollView } from 'react-native'; | |
import { Icon, Image, ListItem, Avatar, Header, Button } from 'react-native-elements'; | |
import { useEffect, useState } from 'react'; | |
import { useIsFocused } from '@react-navigation/native'; | |
import { getValueFor } from '../token/token'; | |
import axios from 'axios'; | |
export default function DisplayLojaView({ navigation, route }) { | |
const { idLoja } = route.params; | |
const [token, setToken] = useState(''); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct No { | |
int valor; | |
struct No* proximo; | |
} No; | |
No* pilha = NULL; |
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
/*Fila dinamica funcional*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct No{ | |
int valor; | |
struct No* proximo; | |
} No; | |
No* inserir(No* no, int 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
/*Implementação de lista dinâmica*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct No{ | |
int valor; | |
struct No* proximo; | |
} No; | |
No* adicionar(No* no, int 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
#include <stdio.h> | |
int push(int vetor[], int valor, int* topo, int tamanho) { | |
(*topo)++; | |
if (*topo < tamanho) { | |
vetor[*topo] = valor; | |
return 1; | |
} else { | |
return 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
<?php | |
/* Recebendo dados do formulário. Existe um modo mais seguro, mas pra abstrair deixei o modo simples */ | |
$codigo = $_POST['codigo']; | |
$nome = $_POST['nome']; | |
$email = $_POST['email']; | |
$data_nasc = $_POST['data_nasc']; | |
if (codigo_existe($codigo)) { | |
echo 'Já existe um cliente com este codigo!<br/>'; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Cadastro de Usuário</title> | |
</head> | |
<body> | |
<form action="adicionar_usuario.php" method="post"> |
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
#include <stdio.h> | |
int fibonacci(int n) { | |
if (n == 1) { | |
return 1; | |
} | |
if (n == 2) { | |
return 1; | |
} | |
return fibonacci(n - 1) + fibonacci(n - 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
#include <stdio.h> | |
/*Dado um vetor, calcule o produto de todos os elementos do vetor*/ | |
int produto(int vetor[], int tamanho) { | |
if (tamanho > 0) { | |
return vetor[tamanho - 1] * produto(vetor, tamanho - 1); | |
} | |
return 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
#include <stdio.h> | |
int fatorial(int num) { | |
if (num == 0 || num == 1) { | |
return 1; | |
} | |
if (num > 1) { | |
return num * fatorial(num - 1); | |
} | |
} |
NewerOlder