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
//Este código faz parte do artigo em http://alexandregama.wordpress.com | |
//Classe de Teste utilizando JUnit 4 | |
package artigotdd.calculadora.teste; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
public class CalculadoraTeste { |
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
//web.xml | |
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> | |
<display-name>caelum</display-name> | |
<welcome-file-list> | |
<welcome-file>index.html</welcome-file> | |
<welcome-file>index.htm</welcome-file> | |
<welcome-file>index.jsp</welcome-file> | |
<welcome-file>default.html</welcome-file> | |
<welcome-file>default.htm</welcome-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
//Código que faz parte do artigo para iniciantes em www.alexandregama.wordpress.com | |
//Primeira versão | |
import java.util.Scanner; | |
public class DivisaoDeNumeros { | |
public static void main(String[] args) { | |
//Criamos um objeto Scanner para capturar o que foi digitado | |
Scanner input = new Scanner(System.in); |
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
//Código que faz parte do artigo para iniciantes em www.alexandregama.wordpress.com | |
#include<stdio.h> | |
#include<stdlib.h> | |
int main() { | |
//Declaração das variáveis para guardar os valores | |
int dividendo; | |
int divisor; | |
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.com.json; | |
public class Carro { | |
private Long id; | |
private String modelo; | |
private String placa; | |
public Long getId() { | |
return id; | |
} |
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
/* Código que faz parte do artigo http://alexandregama.wordpress.com/2012/02/23/json-simples-e-pratico-parte-ii/ */ | |
/* Classe Http */ | |
package br.com.artigo.json; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.URL; |
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
//First, add repository for JDK6 | |
sudo add-apt-repository ppa:ferramroberto/java | |
//Now get update with the command | |
sudo apt-get update | |
//Then, install JDK6 with the command below | |
sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk | |
//Simple! Go ahead! |
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
Create EC2 Instance with Ubuntu Server (choose defaulf security group) | |
Generate Key Par and download the file | |
Open "Security Groups", select "default" group, choose SSH rule and add the source "0.0.0.0/0" (press Add rule and Apply rule changes) | |
Open SSH Client (SSH Cliente for Ubuntu or Putty for Windows) | |
Set special permission on file | |
chmod 400 yourkeypar.pem |
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 Departamento { | |
public void calculaNotaFiscal() { | |
// seu código para calculo da nota fiscal | |
} | |
public void calculaPagamentoDeFuncionarios() { | |
// seu código para cálculo do pagamento | |
} |
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 void calculaNotaFiscal() { | |
// seu código para calculo da nota fiscal | |
} | |
public void calculaPagamentoDeFuncionarios() { | |
// seu código para cálculo do pagamento | |
} | |
public void verificaInadimplenciaDeClientes() { | |
// seu código para a verificação de inadimplência |
OlderNewer