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
/** | |
* Máximo Divisor Comum recursivo | |
* @param a | |
* @param b | |
* @return O MDC de a e b | |
*/ | |
public static int mdc(int a, int b) { | |
if (b == 0) { | |
return a; | |
} |
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
/** | |
* Máximo Divisor Comum recursivo | |
* @param a | |
* @param b | |
* @return O MDC de a e b | |
*/ | |
public static int mdc(int a, int b) { | |
if (b == 0) { | |
return a; | |
} |
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
--Criação de uma chave primária | |
CREATE TABLE <nome_tabela> ( | |
id INT NOT NULL PRIMARY KEY GENERATED ALWAYS as IDENTITY(START WITH 1, INCREMENT by 1) | |
); | |
--Criação de chave estrangeira | |
ALTER TABLE <nome_tabela> ADD FOREIGN KEY(<chave_estrangeira) REFERENCES <tabela_chave_estrangeira>(<chave_da_outra_tabela); |
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
CREATE TABLE livro ( | |
id INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), | |
nome VARCHAR(30) | |
); | |
CREATE TABLE amigo ( | |
id INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1), | |
nome VARCHAR(30), | |
telefone VARCHAR(9) | |
); |
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 matrizes; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
/** | |
* | |
* @author bruce | |
*/ |
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
Este documento tem por objetivo fornecer instruções para deixar o sistema completo após a instalação do mesmo. | |
1. Pacotes essenciais | |
ethtool: útil para identificar se a interface de rede está recebendo sinal por um cabo de rede. Possui a mesma função do comando mii-tool. | |
less: um filtro que permite a leitura de arquivos longos diretamente na tela. | |
mc: o mc contém os programas Midnight Commander (mc) e mcedit. O mcedit é o editor de textos mais amigável para ambiente shell. | |
tcpdump: utilizado para resolver problemas quando a máquina estiver operando em redes de computadores. | |
Para instalar esses pacotes: |
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
<?php | |
parse_str(file_get_contents('php://input'), $vars); //Recebe as variaveis e guarda na variavel $vars | |
var_dump($vars); //Verifica as variáveis recebidas | |
?> |
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 com.validator; | |
/** | |
* Faz a validação do TIA (Terminal Informativo do Aluno) do Mackenzie | |
* @author gilson | |
*/ | |
public class TIAValidator { | |
private static final byte[] nums = {8, 7, 6, 5, 4, 3, 2}; |
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 get(name){ | |
if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search)) | |
return decodeURIComponent(name[1]); | |
} |
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
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
OlderNewer