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
wget --mirror -p --convert-links -P ./LOCAL http://website.address.com |
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 calcAge(birth_date) { | |
var today = new Date; | |
var age = { | |
years: 0, | |
months: 0 | |
}; | |
age.years = today.getFullYear() - birth_date.getFullYear(); |
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
import java.util.PriorityQueue; | |
import java.util.List; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
/** | |
* Classe que representa um vértice do grafo, | |
* implementa uma interface para permitir comparações | |
*/ | |
class Vertice implements Comparable<Vertice> { |
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
public class Ex2 { | |
public static void main(String[] args) { | |
Conjunto a = new Conjunto("A"), | |
b = new Conjunto("B"); | |
a.init(); | |
b.init(); | |
int sizeA = a.tamanho(), | |
sizeB = b.tamanho(); |
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
import java.util.Iterator; | |
import java.util.TreeSet; | |
import java.util.Scanner; | |
public class Conjunto { | |
/** | |
* Conjunto de elementos Foi Escolhido TreeSet(Integer) devido a impossibilidade de duplicidade em | |
* Collections to tipo Set, e TreeSet, devido a sua ordenação automática | |
*/ | |
private TreeSet<Integer> elementos; |
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
import java.util.Iterator; | |
import java.util.TreeSet; | |
import java.util.Scanner; | |
public class Ex4 { | |
public static void main(String[] args) { | |
int valor, i; | |
Scanner in = new Scanner(System.in); | |
TreeSet<Integer> conjuntoA = new TreeSet<Integer>(), | |
conjuntoB = new TreeSet<Integer>(); |
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
import java.util.Iterator; | |
import java.util.TreeSet; | |
import java.util.Scanner; | |
public class Ex3 { | |
public static void main(String[] args) { | |
int valor, i; | |
Scanner in = new Scanner(System.in); | |
TreeSet<Integer> conjuntoA = new TreeSet<Integer>(), | |
conjuntoB = new TreeSet<Integer>(); |
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
import java.util.Iterator; | |
import java.util.TreeSet; | |
import java.util.Scanner; | |
public class Ex2 { | |
public static void main(String[] args) { | |
int valor, i; | |
Scanner in = new Scanner(System.in); | |
TreeSet<Integer> conjuntoA = new TreeSet<Integer>(), | |
conjuntoB = new TreeSet<Integer>(); |
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
import java.util.Iterator; | |
import java.util.TreeSet; | |
import java.util.Scanner; | |
public class Ex1 { | |
public static void main(String[] args) { | |
int valor, i; | |
Scanner in = new Scanner(System.in); | |
TreeSet<Integer> conjuntoA = new TreeSet<Integer>(); | |
boolean first = true; |
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
public class Bissexto { | |
public static void main(String[] args) { | |
for(int i = 1800; i <= 2100; i++) { | |
if(i % 4 == 0 && i % 100 != 0 || i % 400 == 0) { | |
System.out.print("\033[1m" + i + "\033[0m "); | |
} else { | |
System.out.print(i + " "); | |
} | |
} | |
} |