├── .gitignore ├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── vcs.xml ├── encodings.xml ├── modules.xml ├── libraries │ ├── Maven__junit_junit_3_8_1.xml │ ├── Maven__joda_time_joda_time_2_2.xml │ ├── Maven__commons_io_commons_io_2_4.xml │ ├── Maven__org_apache_commons_commons_lang3_3_1.xml │ └── Maven__org_apache_directory_studio_org_apache_commons_io_2_4.xml ├── compiler.xml ├── misc.xml └── uiDesigner.xml ├── Prueba.class ├── .settings ├── org.eclipse.core.resources.prefs └── org.eclipse.m2e.core.prefs ├── src ├── main │ └── java │ │ └── com │ │ └── frre │ │ ├── practica │ │ ├── tsp │ │ │ ├── labii │ │ │ │ ├── exceptions │ │ │ │ │ ├── exceptions │ │ │ │ │ │ ├── NoCustomerOrShopsException.java │ │ │ │ │ │ └── ZeroComprasException.java │ │ │ │ │ ├── db │ │ │ │ │ │ ├── Database.java │ │ │ │ │ │ └── ConcreteDB.java │ │ │ │ │ └── model │ │ │ │ │ │ ├── Customer.java │ │ │ │ │ │ └── Compra.java │ │ │ │ ├── hilos │ │ │ │ │ ├── Comprable.java │ │ │ │ │ ├── DataStore.java │ │ │ │ │ ├── ProcesoCompra.java │ │ │ │ │ ├── Main.java │ │ │ │ │ └── ProcesoLargo.java │ │ │ │ ├── Main.java │ │ │ │ ├── RegistrationSystem.java │ │ │ │ ├── files │ │ │ │ │ └── Main.java │ │ │ │ └── Persona.java │ │ │ ├── programacioni │ │ │ │ ├── arreglos │ │ │ │ │ ├── ComparadorPersonas.java │ │ │ │ │ ├── ordenamiento │ │ │ │ │ │ └── Main.java │ │ │ │ │ ├── matrices │ │ │ │ │ │ └── Main.java │ │ │ │ │ ├── codeforces │ │ │ │ │ │ └── Main.java │ │ │ │ │ ├── Main.java │ │ │ │ │ ├── Persona.java │ │ │ │ │ ├── busqueda │ │ │ │ │ │ └── Main.java │ │ │ │ │ └── omegaup │ │ │ │ │ │ └── BuscandoParejas.java │ │ │ │ └── archivos │ │ │ │ │ ├── Bono.java │ │ │ │ │ ├── lectura │ │ │ │ │ ├── Main.java │ │ │ │ │ └── Almuerzo.java │ │ │ │ │ ├── Alumno.java │ │ │ │ │ ├── Cliente.java │ │ │ │ │ ├── Empleado.java │ │ │ │ │ ├── Auto.java │ │ │ │ │ └── crear │ │ │ │ │ └── Main.java │ │ │ └── programacionii │ │ │ │ ├── Nodo.java │ │ │ │ ├── arboles │ │ │ │ ├── NodoArbol.java │ │ │ │ └── MainArboles.java │ │ │ │ ├── ejerciciolistas │ │ │ │ ├── Main.java │ │ │ │ ├── Nodo.java │ │ │ │ └── MiLista.java │ │ │ │ └── Main.java │ │ └── isi │ │ │ └── algoritmos │ │ │ ├── archivos │ │ │ ├── Bono.java │ │ │ ├── lectura │ │ │ │ └── Main.java │ │ │ ├── Usuario.java │ │ │ ├── Alumno.java │ │ │ ├── Cliente.java │ │ │ ├── Auto.java │ │ │ ├── crear │ │ │ │ └── Main.java │ │ │ ├── Empleado.java │ │ │ ├── mezcla │ │ │ │ └── Main.java │ │ │ ├── corte │ │ │ │ └── Main.java │ │ │ └── indexados │ │ │ │ └── Main.java │ │ │ └── genericos │ │ │ └── Main.java │ │ └── library │ │ ├── Clave.java │ │ ├── IBinaryTree.java │ │ ├── archivos │ │ ├── OcurrenceLimiter.java │ │ ├── LectorArchivos.java │ │ ├── FuncionesDeArchivos.java │ │ ├── EscritorDeArchivos.java │ │ └── GeneradorArchivos.java │ │ ├── data │ │ └── Constants.java │ │ ├── Ordenar.java │ │ ├── Fecha.java │ │ ├── Generador.java │ │ └── Utils.java └── test │ └── java │ └── com │ └── frre │ └── programacion │ └── AppTest.java ├── algoritmos ├── Prueba2.algoritmo ├── Prueba.java ├── Prueba3.algoritmo └── Prueba.algoritmo ├── .project ├── libProg.iml ├── README.md ├── pom.xml ├── Musimundo └── archivos ├── clientes └── usuarios /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | libProg -------------------------------------------------------------------------------- /Prueba.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/justomiguel/libProg/HEAD/Prueba.class -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/exceptions/exceptions/NoCustomerOrShopsException.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii.exceptions.exceptions; 2 | 3 | /** 4 | * Created by jvargas on 10/2/15. 5 | */ 6 | public class NoCustomerOrShopsException extends Exception { 7 | 8 | public NoCustomerOrShopsException(Throwable cause) { 9 | super(cause); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/hilos/Comprable.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii.hilos; 2 | 3 | /** 4 | * Created by jvargas on 9/11/15. 5 | */ 6 | public interface Comprable { 7 | 8 | public boolean getStatusCompra(); 9 | public void setStatusCompra(boolean comprada); 10 | 11 | public int getCantComprada(); 12 | public void setCantComprada(int cantComprada); 13 | } 14 | -------------------------------------------------------------------------------- /algoritmos/Prueba2.algoritmo: -------------------------------------------------------------------------------- 1 | Accion Prueba es; 2 | 3 | Ambiente 4 | numero:entero; 5 | 6 | Algoritmo 7 | 8 | Escribir("Comenzando"); 9 | numero = 0; 10 | Repetir 11 | numero := numero +1; 12 | Si(numero mod 2 == 0)entonces 13 | Escribir(numero) 14 | Fin_si 15 | Hasta(numero < 100); 16 | 17 | Fin_Algoritmo 18 | 19 | Fin_Accion; -------------------------------------------------------------------------------- /algoritmos/Prueba.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | public class Prueba { 3 | 4 | //ambiente 5 | 6 | static Scanner sc; 7 | static int edad; 8 | static int anio; 9 | static String nombre; 10 | //algoritmo 11 | public static void main(String[] args){ 12 | System.out.println("Ingrese nombre y anio de nacimiento") 13 | sc.next(); 14 | sc.nextInt(); 15 | edad = 2016 - anio; 16 | System.out.println(nombre+" tiene "+edad+" anios.") 17 | } 18 | } -------------------------------------------------------------------------------- /src/main/java/com/frre/library/Clave.java: -------------------------------------------------------------------------------- 1 | package com.frre.library; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | /** 9 | * Created by jvargas on 8/28/15. 10 | */ 11 | @Retention(RetentionPolicy.RUNTIME) 12 | @Target(ElementType.FIELD) //can use in method only. 13 | public @interface Clave { 14 | } 15 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | libProg 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.m2e.core.maven2Builder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.m2e.core.maven2Nature 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/arreglos/ComparadorPersonas.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.arreglos; 2 | 3 | import java.util.Comparator; 4 | 5 | /** 6 | * Created by justo on 12/05/16. 7 | */ 8 | public class ComparadorPersonas implements Comparator { 9 | @Override 10 | public int compare(Persona o1, Persona o2) { 11 | return o1.getNombre().compareTo(o2.getNombre()); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /algoritmos/Prueba3.algoritmo: -------------------------------------------------------------------------------- 1 | Accion Prueba es; 2 | 3 | Ambiente 4 | numero:entero; 5 | i:entero; 6 | 7 | Algoritmo 8 | 9 | Escribir("Comenzando"); 10 | numero = 0; 11 | Para(i=0 hasta 50, i:=i+2)hacer 12 | numero := numero +1; 13 | Escribir(numero) 14 | Si(numero mod 6 == 0)entonces 15 | Escribir("****") 16 | Fin_si 17 | Fin_para 18 | 19 | Fin_Algoritmo 20 | 21 | Fin_Accion; -------------------------------------------------------------------------------- /.idea/libraries/Maven__junit_junit_3_8_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__joda_time_joda_time_2_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /algoritmos/Prueba.algoritmo: -------------------------------------------------------------------------------- 1 | Accion Prueba es; 2 | 3 | Ambiente 4 | nombre: AlfaNumerico; 5 | apellido: AlfaNumerico; 6 | 7 | Algoritmo 8 | 9 | Escribir("Ingrese nombre"); 10 | Leer(nombre); 11 | Escribir("Ingrese apellido"); 12 | Leer(apellido); 13 | Si(apellido = "Vargas" and nombre == "Migue" or nombre == "Martin")entonces; 14 | Escribir("Grande ",apellido," ",nombre); 15 | sino 16 | Escribir("La cagamos") 17 | Fin_si 18 | 19 | Fin_Algoritmo 20 | 21 | Fin_Accion; -------------------------------------------------------------------------------- /src/main/java/com/frre/library/IBinaryTree.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package com.frre.library; 6 | 7 | /** 8 | * 9 | * @author developer 10 | */ 11 | public interface IBinaryTree { 12 | 13 | public void setValue(Object a); 14 | 15 | public Object getValue(); 16 | 17 | public IBinaryTree getLeftSon(); 18 | 19 | public IBinaryTree getRighSon(); 20 | 21 | public void setLeftSon(IBinaryTree a); 22 | 23 | public void setRighSon(IBinaryTree a); 24 | } 25 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_io_commons_io_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_lang3_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/exceptions/db/Database.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii.exceptions.db; 2 | 3 | import com.frre.practica.tsp.labii.exceptions.exceptions.ZeroComprasException; 4 | import com.frre.practica.tsp.labii.exceptions.model.Compra; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by jvargas on 10/2/15. 10 | */ 11 | public abstract class Database { 12 | 13 | public abstract void open(); 14 | 15 | public abstract void close(); 16 | 17 | public abstract List getRecordsForUser(int user) throws ZeroComprasException; 18 | 19 | public abstract double getAveragePerUser(int user); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/exceptions/exceptions/ZeroComprasException.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii.exceptions.exceptions; 2 | 3 | import com.frre.practica.tsp.labii.exceptions.model.Compra; 4 | 5 | /** 6 | * Created by jvargas on 10/2/15. 7 | */ 8 | public class ZeroComprasException extends Exception { 9 | 10 | private static final String MESSAGE = "El usuario posee una compra de valor 0"; 11 | 12 | private final Compra compra; 13 | 14 | public ZeroComprasException(Compra compra) { 15 | super(MESSAGE); 16 | this.compra = compra; 17 | } 18 | 19 | public Compra getCompra() { 20 | return compra; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/isi/algoritmos/archivos/Bono.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.isi.algoritmos.archivos; 2 | 3 | import com.frre.library.Clave; 4 | 5 | /** 6 | * Created by jvargas on 8/28/15. 7 | */ 8 | public class Bono { 9 | 10 | @Clave 11 | private String provincia; 12 | 13 | private double bono; 14 | 15 | public String getProvincia() { 16 | return provincia; 17 | } 18 | 19 | public void setProvincia(String provincia) { 20 | this.provincia = provincia; 21 | } 22 | 23 | public double getBono() { 24 | return bono; 25 | } 26 | 27 | public void setBono(double bono) { 28 | this.bono = bono; 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/archivos/Bono.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.archivos; 2 | 3 | import com.frre.library.Clave; 4 | 5 | /** 6 | * Created by jvargas on 8/28/15. 7 | */ 8 | public class Bono { 9 | 10 | @Clave 11 | private String provincia; 12 | 13 | private double bono; 14 | 15 | public String getProvincia() { 16 | return provincia; 17 | } 18 | 19 | public void setProvincia(String provincia) { 20 | this.provincia = provincia; 21 | } 22 | 23 | public double getBono() { 24 | return bono; 25 | } 26 | 27 | public void setBono(double bono) { 28 | this.bono = bono; 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_directory_studio_org_apache_commons_io_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/arreglos/ordenamiento/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.arreglos.ordenamiento; 2 | 3 | import java.util.Arrays; 4 | 5 | /** 6 | * Created by justo on 12/05/16. 7 | */ 8 | public final class Main { 9 | 10 | private Main() throws InstantiationException { 11 | throw new InstantiationException("This class is not created for instantiation"); 12 | } 13 | 14 | public static void main(String[] args){ 15 | int[] arreglo = {7,51,1,12,34}; 16 | String[] nombres = {"Jose","Luis","Zapata","Hector"}; 17 | 18 | Arrays.sort(nombres); 19 | 20 | for (int i = 0; i < nombres.length; i++) { 21 | System.out.println(nombres[i]); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacionii/Nodo.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacionii; 2 | 3 | /** 4 | * Created by jvargas on 8/21/15. 5 | */ 6 | public class Nodo { 7 | 8 | private String valor; 9 | private Nodo next; 10 | private Nodo before; 11 | 12 | @Override 13 | public String toString() { 14 | return "Nodo{" + 15 | "valor='" + valor + '\'' + 16 | '}'; 17 | } 18 | 19 | public String getValor() { 20 | return valor; 21 | } 22 | 23 | public void setValor(String valor) { 24 | this.valor = valor; 25 | } 26 | 27 | public Nodo getNext() { 28 | return next; 29 | } 30 | 31 | public void setNext(Nodo next) { 32 | this.next = next; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/exceptions/model/Customer.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii.exceptions.model; 2 | 3 | /** 4 | * Created by jvargas on 10/2/15. 5 | */ 6 | public class Customer { 7 | 8 | private int idUsuario; 9 | private String nombre; 10 | 11 | public int getIdUsuario() { 12 | return idUsuario; 13 | } 14 | 15 | public void setIdUsuario(int idUsuario) { 16 | this.idUsuario = idUsuario; 17 | } 18 | 19 | public String getNombre() { 20 | return nombre; 21 | } 22 | 23 | public void setNombre(String nombre) { 24 | this.nombre = nombre; 25 | } 26 | 27 | @Override 28 | public String toString() { 29 | return "Customer{" + 30 | "idUsuario=" + idUsuario + 31 | ", nombre='" + nombre + '\'' + 32 | '}'; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/test/java/com/frre/programacion/AppTest.java: -------------------------------------------------------------------------------- 1 | package com.frre.programacion; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestCase; 5 | import junit.framework.TestSuite; 6 | 7 | /** 8 | * Unit test for simple App. 9 | */ 10 | public class AppTest 11 | extends TestCase 12 | { 13 | /** 14 | * Create the test case 15 | * 16 | * @param testName name of the test case 17 | */ 18 | public AppTest( String testName ) 19 | { 20 | super( testName ); 21 | } 22 | 23 | /** 24 | * @return the suite of tests being tested 25 | */ 26 | public static Test suite() 27 | { 28 | return new TestSuite( AppTest.class ); 29 | } 30 | 31 | /** 32 | * Rigourous Test :-) 33 | */ 34 | public void testApp() 35 | { 36 | assertTrue( true ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/archivos/lectura/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.archivos.lectura; 2 | 3 | import java.io.File; 4 | 5 | import static com.frre.library.archivos.FuncionesDeArchivos.*; 6 | 7 | /** 8 | * Created by jvargas on 8/20/15. 9 | */ 10 | public final class Main { 11 | 12 | private Main() throws InstantiationException { 13 | throw new InstantiationException("This class is not created for instantiation"); 14 | } 15 | 16 | public static void main(String[] args){ 17 | //muestra de funciones con archivos 18 | File archivo = abrir("/home/justo/Desktop/JuanSegundo"); 19 | Almuerzo pp = new Almuerzo(); 20 | pp = leer(archivo, pp); 21 | while (!FDA(archivo)){ 22 | System.out.println(pp); 23 | pp = leer(archivo, pp); 24 | } 25 | cerrar(archivo); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/arreglos/matrices/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.arreglos.matrices; 2 | 3 | /** 4 | * Created by justo on 26/05/16. 5 | */ 6 | public final class Main { 7 | 8 | private Main() throws InstantiationException { 9 | throw new InstantiationException("This class is not created for instantiation"); 10 | } 11 | 12 | public static void main(String[] args){ 13 | int[][] matriz = new int[4][4]; 14 | 15 | int cont = 0; 16 | for (int i = 0; i < 4; i++) { 17 | for (int j = 0; j < 4; j++) { 18 | matriz[i][j] = cont; 19 | cont++; 20 | } 21 | } 22 | 23 | //recorro la matriz 24 | for (int i = 0; i < 4; i++) { 25 | for (int j = 0; j < 4; j++) { 26 | System.out.print(matriz[i][j]+" "); 27 | } 28 | System.out.println(""); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/isi/algoritmos/archivos/lectura/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.isi.algoritmos.archivos.lectura; 2 | 3 | import com.frre.practica.isi.algoritmos.archivos.Cliente; 4 | import static com.frre.library.archivos.FuncionesDeArchivos.*; 5 | 6 | import java.io.File; 7 | 8 | /** 9 | * Created by jvargas on 8/20/15. 10 | */ 11 | public final class Main { 12 | 13 | private Main() throws InstantiationException { 14 | throw new InstantiationException("This class is not created for instantiation"); 15 | } 16 | 17 | public static void main(String[] args){ 18 | //muestra de funciones con archivos 19 | File archivo = abrir("/home/jvargas/clientes"); 20 | Cliente pp = new Cliente(); 21 | pp = leer(archivo, pp); 22 | while (!FDA(archivo)){ 23 | System.out.println(pp); 24 | pp = leer(archivo, pp); 25 | } 26 | cerrar(archivo); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii; 2 | 3 | import com.frre.library.Generador; 4 | 5 | import java.util.HashMap; 6 | import java.util.Map; 7 | import java.util.Set; 8 | 9 | /** 10 | * Created by jvargas on 8/21/15. 11 | */ 12 | public final class Main { 13 | 14 | private Main() throws InstantiationException { 15 | throw new InstantiationException("This class is not created for instantiation"); 16 | } 17 | 18 | public static void main(String[] args){ 19 | Map myMap = new HashMap(); 20 | 21 | for (int i = 0; i < 15; i++) { 22 | String clave = Generador.generarNombreAleatorio(); 23 | String valor = Generador.generarLocalidadAleatorio(); 24 | myMap.put(clave, valor); 25 | } 26 | 27 | Set claves = myMap.keySet(); 28 | for(String clave : claves){ 29 | System.out.println(clave+":"+myMap.get(clave)); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/arreglos/codeforces/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.arreglos.codeforces; 2 | 3 | /** 4 | * Created by justo on 19/05/16. 5 | */ 6 | public final class Main { 7 | 8 | private Main() throws InstantiationException { 9 | throw new InstantiationException("This class is not created for instantiation"); 10 | } 11 | 12 | public static void main(String[] args){ 13 | 14 | } 15 | } 16 | 17 | class Dragon { 18 | 19 | private int fuerza; 20 | private int bono; 21 | 22 | public Dragon(int fuerza, int bono) { 23 | this.fuerza = fuerza; 24 | this.bono = bono; 25 | } 26 | 27 | public int getFuerza() { 28 | return fuerza; 29 | } 30 | 31 | public void setFuerza(int fuerza) { 32 | this.fuerza = fuerza; 33 | } 34 | 35 | public int getBono() { 36 | return bono; 37 | } 38 | 39 | public void setBono(int bono) { 40 | this.bono = bono; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacionii/arboles/NodoArbol.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacionii.arboles; 2 | 3 | /** 4 | * Created by jvargas on 8/28/15. 5 | */ 6 | public class NodoArbol { 7 | 8 | private T value; 9 | private NodoArbol hijoIzquierdo; 10 | private NodoArbol hijoDerecho; 11 | 12 | public T getValue() { 13 | return value; 14 | } 15 | 16 | public void setValue(T value) { 17 | this.value = value; 18 | } 19 | 20 | public NodoArbol getHijoIzquierdo() { 21 | return hijoIzquierdo; 22 | } 23 | 24 | public void setHijoIzquierdo(NodoArbol hijoIzquierdo) { 25 | this.hijoIzquierdo = hijoIzquierdo; 26 | } 27 | 28 | public NodoArbol getHijoDerecho() { 29 | return hijoDerecho; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "NodoArbol{" + 35 | "value=" + value + 36 | '}'; 37 | } 38 | 39 | public void setHijoDerecho(NodoArbol hijoDerecho) { 40 | this.hijoDerecho = hijoDerecho; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacionii/ejerciciolistas/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacionii.ejerciciolistas; 2 | 3 | import com.frre.library.Generador; 4 | 5 | /** 6 | * Created by jvargas on 8/28/15. 7 | */ 8 | public final class Main { 9 | 10 | private Main() throws InstantiationException { 11 | throw new InstantiationException("This class is not created for instantiation"); 12 | } 13 | 14 | public static void main(String[] args){ 15 | 16 | MiLista miLista = new MiLista(); 17 | 18 | for (int i = 0; i < 23; i++) { 19 | Nodo nodo = new Nodo(); 20 | nodo.setValue(Generador.generarPciaAleatorio()); 21 | miLista.agregar(nodo); 22 | } 23 | 24 | int longitud = miLista.longitud(); 25 | System.out.println("Longitud " + longitud); 26 | 27 | for (int i = 0; i 0){ 18 | int afterPurchase = cantProductos - cantAComprar; 19 | if (afterPurchase <= 0){ 20 | productoComprable.setCantComprada(cantProductos); 21 | cantProductos = 0; 22 | } else { 23 | productoComprable.setCantComprada(cantAComprar); 24 | cantProductos = afterPurchase; 25 | } 26 | productoComprable.setStatusCompra(true); 27 | } else { 28 | productoComprable.setStatusCompra(false); 29 | } 30 | 31 | //System.out.println("Stock "+ cantProductos); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/arreglos/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.arreglos; 2 | 3 | import com.frre.library.Generador; 4 | 5 | import java.util.Arrays; 6 | import java.util.Comparator; 7 | 8 | /** 9 | * Created by justo on 02/05/16. 10 | */ 11 | public final class Main { 12 | 13 | private Main() throws InstantiationException { 14 | throw new InstantiationException("This class is not created for instantiation"); 15 | } 16 | 17 | public static void main(String[] args){ 18 | //se define un numero para el arreglo 19 | int SIZE = 3; 20 | 21 | //Se crea un arreglo de Personas 22 | Persona[] personas = new Persona[SIZE]; 23 | 24 | 25 | int sizeSobreNombres = Generador.generarEnteroAleatorio(0,100); 26 | //cargo el arreglo 27 | for (int j = 0; j < sizeSobreNombres; j++) { 28 | System.out.print(Generador.generarPalabraSinArticuloAleatoria()); 29 | int blancos = Generador.generarEnteroAleatorio(0,15); 30 | for (int i = 0; i < blancos; i++) { 31 | System.out.print(" "); 32 | } 33 | } 34 | 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/frre/library/archivos/OcurrenceLimiter.java: -------------------------------------------------------------------------------- 1 | package com.frre.library.archivos; 2 | 3 | import java.util.ArrayList; 4 | 5 | /** 6 | * Created by jvargas on 8/21/15. 7 | */ 8 | public class OcurrenceLimiter { 9 | 10 | private final Class type; 11 | private final int size; 12 | private final ArrayList listaValores; 13 | 14 | public OcurrenceLimiter(int size, Class type) { 15 | this.size = size; 16 | this.type = type; 17 | this.listaValores = new ArrayList(size); 18 | } 19 | 20 | public int getSize() { 21 | return size; 22 | } 23 | 24 | public boolean contains(Object o) { 25 | return listaValores.contains(o); 26 | } 27 | 28 | public int indexOf(Object o) { 29 | return listaValores.indexOf(o); 30 | } 31 | 32 | public boolean isEmpty() { 33 | return listaValores.isEmpty(); 34 | } 35 | 36 | public Object get(int index) { 37 | return listaValores.get(index); 38 | } 39 | 40 | public boolean add(Object obj) { 41 | return listaValores.add(obj); 42 | } 43 | 44 | public void add(int index, Class element) { 45 | listaValores.add(index, element); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/RegistrationSystem.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii; 2 | 3 | import java.util.HashMap; 4 | import java.util.Scanner; 5 | 6 | /** 7 | * Created by jvargas on 8/21/15. 8 | */ 9 | public final class RegistrationSystem { 10 | 11 | private RegistrationSystem() throws InstantiationException { 12 | throw new InstantiationException("This class is not created for instantiation"); 13 | } 14 | 15 | public static void main(String[] args){ 16 | Scanner scanner = new Scanner(System.in, "UTF-8"); 17 | int cantString = scanner.nextInt(); 18 | 19 | HashMap mapaValores = new HashMap(); 20 | 21 | for (int i = 0; i < cantString; i++) { 22 | String actual = scanner.next(); 23 | 24 | Integer cantOcurrencias = mapaValores.get(actual); 25 | if (cantOcurrencias == null){ 26 | System.out.println("OK"); 27 | mapaValores.put(actual, 1); 28 | } else { 29 | System.out.println(actual+cantOcurrencias); 30 | cantOcurrencias+=1; 31 | mapaValores.put(actual, cantOcurrencias); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/archivos/lectura/Almuerzo.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.archivos.lectura; 2 | 3 | /** 4 | * Created by justo on 26/05/16. 5 | */ 6 | public class Almuerzo { 7 | 8 | private String nombreDelPlato; 9 | private double precio; 10 | private int cantComensales; 11 | 12 | public String getNombreDelPlato() { 13 | return nombreDelPlato; 14 | } 15 | 16 | public void setNombreDelPlato(String nombreDelPlato) { 17 | this.nombreDelPlato = nombreDelPlato; 18 | } 19 | 20 | public double getPrecio() { 21 | return precio; 22 | } 23 | 24 | public void setPrecio(double precio) { 25 | this.precio = precio; 26 | } 27 | 28 | public int getCantComensales() { 29 | return cantComensales; 30 | } 31 | 32 | public void setCantComensales(int cantComensales) { 33 | this.cantComensales = cantComensales; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return "Almuerzo{" + 39 | "nombreDelPlato='" + nombreDelPlato + '\'' + 40 | ", precio=" + precio + 41 | ", cantComensales=" + cantComensales + 42 | '}'; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /libProg.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/isi/algoritmos/archivos/Usuario.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.isi.algoritmos.archivos; 2 | 3 | import com.frre.library.Clave; 4 | 5 | /** 6 | * Created by jvargas on 8/28/15. 7 | */ 8 | public class Usuario { 9 | 10 | @Clave 11 | private String domicilio; 12 | @Clave 13 | private int dni; 14 | private String nombre; 15 | private int edad; 16 | 17 | 18 | public int getDni() { 19 | return dni; 20 | } 21 | 22 | public void setDni(int dni) { 23 | this.dni = dni; 24 | } 25 | 26 | public String getNombre() { 27 | return nombre; 28 | } 29 | 30 | public void setNombre(String nombre) { 31 | this.nombre = nombre; 32 | } 33 | 34 | public int getEdad() { 35 | return edad; 36 | } 37 | 38 | public void setEdad(int edad) { 39 | this.edad = edad; 40 | } 41 | 42 | public String getDomicilio() { 43 | return domicilio; 44 | } 45 | 46 | public void setDomicilio(String domicilio) { 47 | this.domicilio = domicilio; 48 | } 49 | 50 | @Override 51 | public String toString() { 52 | return "Empleado{" + 53 | "dni=" + dni + 54 | ", nombre='" + nombre + '\'' + 55 | ", edad=" + edad + 56 | ", domicilio='" + domicilio + '\'' + 57 | '}'; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/isi/algoritmos/archivos/Alumno.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.isi.algoritmos.archivos; 2 | 3 | import com.frre.library.Clave; 4 | 5 | /** 6 | * Created by jvargas on 8/20/15. 7 | */ 8 | public class Alumno { 9 | 10 | 11 | @Clave 12 | private int legajo; 13 | 14 | @Clave 15 | private String nomYApell; 16 | 17 | private int dni; 18 | private double promedio; 19 | 20 | public int getLegajo() { 21 | return legajo; 22 | } 23 | 24 | public void setLegajo(int legajo) { 25 | this.legajo = legajo; 26 | } 27 | 28 | public String getNomYApell() { 29 | return nomYApell; 30 | } 31 | 32 | public void setNomYApell(String nomYApell) { 33 | this.nomYApell = nomYApell; 34 | } 35 | 36 | public int getDni() { 37 | return dni; 38 | } 39 | 40 | public void setDni(int dni) { 41 | this.dni = dni; 42 | } 43 | 44 | public double getPromedio() { 45 | return promedio; 46 | } 47 | 48 | public void setPromedio(double promedio) { 49 | this.promedio = promedio; 50 | } 51 | 52 | @Override 53 | public String toString() { 54 | return "Alumno{" + 55 | "legajo=" + legajo + 56 | ", nomYApell='" + nomYApell + '\'' + 57 | ", dni=" + dni + 58 | ", promedio=" + promedio + 59 | '}'; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/archivos/Alumno.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.archivos; 2 | 3 | import com.frre.library.Clave; 4 | 5 | /** 6 | * Created by jvargas on 8/20/15. 7 | */ 8 | public class Alumno { 9 | 10 | 11 | @Clave 12 | private int legajo; 13 | 14 | @Clave 15 | private String nomYApell; 16 | 17 | private int dni; 18 | private double promedio; 19 | 20 | public int getLegajo() { 21 | return legajo; 22 | } 23 | 24 | public void setLegajo(int legajo) { 25 | this.legajo = legajo; 26 | } 27 | 28 | public String getNomYApell() { 29 | return nomYApell; 30 | } 31 | 32 | public void setNomYApell(String nomYApell) { 33 | this.nomYApell = nomYApell; 34 | } 35 | 36 | public int getDni() { 37 | return dni; 38 | } 39 | 40 | public void setDni(int dni) { 41 | this.dni = dni; 42 | } 43 | 44 | public double getPromedio() { 45 | return promedio; 46 | } 47 | 48 | public void setPromedio(double promedio) { 49 | this.promedio = promedio; 50 | } 51 | 52 | @Override 53 | public String toString() { 54 | return "Alumno{" + 55 | "legajo=" + legajo + 56 | ", nomYApell='" + nomYApell + '\'' + 57 | ", dni=" + dni + 58 | ", promedio=" + promedio + 59 | '}'; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/isi/algoritmos/archivos/Cliente.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.isi.algoritmos.archivos; 2 | 3 | import com.frre.library.Clave; 4 | import com.frre.library.Fecha; 5 | 6 | /** 7 | * Created by jvargas on 8/28/15. 8 | */ 9 | public class Cliente { 10 | 11 | 12 | @Clave 13 | private int legajo; 14 | private String nombre; 15 | private Fecha fecha; 16 | private double importe; 17 | 18 | @Override 19 | public String toString() { 20 | return "Cliente{" + 21 | "legajo=" + legajo + 22 | ", nombre='" + nombre + '\'' + 23 | ", fecha=" + fecha + 24 | ", importe=" + importe + 25 | '}'; 26 | } 27 | 28 | public int getLegajo() { 29 | return legajo; 30 | } 31 | 32 | public void setLegajo(int legajo) { 33 | this.legajo = legajo; 34 | } 35 | 36 | public String getNombre() { 37 | return nombre; 38 | } 39 | 40 | public void setNombre(String nombre) { 41 | this.nombre = nombre; 42 | } 43 | 44 | public Fecha getFecha() { 45 | return fecha; 46 | } 47 | 48 | public void setFecha(Fecha fecha) { 49 | this.fecha = fecha; 50 | } 51 | 52 | public double getImporte() { 53 | return importe; 54 | } 55 | 56 | public void setImporte(double importe) { 57 | this.importe = importe; 58 | } 59 | } 60 | 61 | 62 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/arreglos/Persona.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.arreglos; 2 | 3 | import java.util.Arrays; 4 | import java.util.Date; 5 | 6 | /** 7 | * Created by jvargas on 8/21/15. 8 | */ 9 | public class Persona { 10 | 11 | private String nombre; 12 | private Integer legajo; 13 | private String[] sobreNombres; 14 | 15 | public Persona(String nombre, int legajo, String[] sobreNombres) { 16 | this.nombre = nombre; 17 | this.legajo = legajo; 18 | this.sobreNombres = sobreNombres; 19 | } 20 | 21 | @Override 22 | public String toString() { 23 | return "Persona{" + 24 | "nombre='" + nombre + '\'' + 25 | ", legajo=" + legajo + 26 | ", sobreNombres=" + Arrays.toString(sobreNombres) + 27 | '}'; 28 | } 29 | 30 | public String[] getSobreNombres() { 31 | return sobreNombres; 32 | } 33 | 34 | public void setSobreNombres(String[] sobreNombres) { 35 | this.sobreNombres = sobreNombres; 36 | } 37 | 38 | public String getNombre() { 39 | return nombre; 40 | } 41 | 42 | public void setNombre(String nombre) { 43 | this.nombre = nombre; 44 | } 45 | 46 | public int getLegajo() { 47 | return legajo; 48 | } 49 | 50 | public void setLegajo(int legajo) { 51 | this.legajo = legajo; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/archivos/Cliente.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.archivos; 2 | 3 | import com.frre.library.Clave; 4 | import com.frre.library.Fecha; 5 | 6 | /** 7 | * Created by jvargas on 8/28/15. 8 | */ 9 | public class Cliente { 10 | 11 | 12 | @Clave 13 | private int legajo; 14 | private String nombre; 15 | private Fecha fecha; 16 | private double importe; 17 | 18 | @Override 19 | public String toString() { 20 | return "Cliente{" + 21 | "legajo=" + legajo + 22 | ", nombre='" + nombre + '\'' + 23 | ", fecha=" + fecha + 24 | ", importe=" + importe + 25 | '}'; 26 | } 27 | 28 | public int getLegajo() { 29 | return legajo; 30 | } 31 | 32 | public void setLegajo(int legajo) { 33 | this.legajo = legajo; 34 | } 35 | 36 | public String getNombre() { 37 | return nombre; 38 | } 39 | 40 | public void setNombre(String nombre) { 41 | this.nombre = nombre; 42 | } 43 | 44 | public Fecha getFecha() { 45 | return fecha; 46 | } 47 | 48 | public void setFecha(Fecha fecha) { 49 | this.fecha = fecha; 50 | } 51 | 52 | public double getImporte() { 53 | return importe; 54 | } 55 | 56 | public void setImporte(double importe) { 57 | this.importe = importe; 58 | } 59 | } 60 | 61 | 62 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/archivos/Empleado.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.archivos; 2 | 3 | import com.frre.library.Clave; 4 | 5 | /** 6 | * Created by jvargas on 8/28/15. 7 | */ 8 | public class Empleado { 9 | 10 | 11 | private int sucursal; 12 | private int zona; 13 | private int dni; 14 | private String nombre; 15 | private int edad; 16 | private double sueldo; 17 | 18 | public double getSueldo() { 19 | return sueldo; 20 | } 21 | 22 | public void setSueldo(double sueldo) { 23 | this.sueldo = sueldo; 24 | } 25 | 26 | public int getDni() { 27 | return dni; 28 | } 29 | 30 | public void setDni(int dni) { 31 | this.dni = dni; 32 | } 33 | 34 | public String getNombre() { 35 | return nombre; 36 | } 37 | 38 | public void setNombre(String nombre) { 39 | this.nombre = nombre; 40 | } 41 | 42 | public int getEdad() { 43 | return edad; 44 | } 45 | 46 | public void setEdad(int edad) { 47 | this.edad = edad; 48 | } 49 | 50 | public int getZona() { 51 | return zona; 52 | } 53 | 54 | public void setZona(int zona) { 55 | this.zona = zona; 56 | } 57 | 58 | public int getSucursal() { 59 | return sucursal; 60 | } 61 | 62 | public void setSucursal(int sucursal) { 63 | this.sucursal = sucursal; 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/isi/algoritmos/archivos/Auto.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.isi.algoritmos.archivos; 2 | 3 | import com.frre.library.Clave; 4 | 5 | /** 6 | * Created by jvargas on 8/21/15. 7 | */ 8 | public class Auto { 9 | 10 | @Clave 11 | private String localidad; 12 | private String patente; 13 | private String propietario; 14 | private int modelo; 15 | 16 | @Override 17 | public String toString() { 18 | return "Auto{" + 19 | "localidad='" + localidad + '\'' + 20 | ", patente='" + patente + '\'' + 21 | ", propietario='" + propietario + '\'' + 22 | ", modelo=" + modelo + 23 | '}'; 24 | } 25 | 26 | public String getLocalidad() { 27 | return localidad; 28 | } 29 | 30 | public void setLocalidad(String localidad) { 31 | this.localidad = localidad; 32 | } 33 | 34 | public String getPatente() { 35 | return patente; 36 | } 37 | 38 | public void setPatente(String patente) { 39 | this.patente = patente; 40 | } 41 | 42 | public String getPropietario() { 43 | return propietario; 44 | } 45 | 46 | public void setPropietario(String propietario) { 47 | this.propietario = propietario; 48 | } 49 | 50 | public int getModelo() { 51 | return modelo; 52 | } 53 | 54 | public void setModelo(int modelo) { 55 | this.modelo = modelo; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/isi/algoritmos/archivos/crear/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.isi.algoritmos.archivos.crear; 2 | 3 | import com.frre.practica.isi.algoritmos.archivos.Usuario; 4 | import com.frre.library.Generador; 5 | import static com.frre.library.archivos.FuncionesDeArchivos.*; 6 | 7 | import java.io.File; 8 | 9 | /** 10 | * Created by jvargas on 8/20/15. 11 | */ 12 | public final class Main { 13 | 14 | 15 | //ambiente 16 | //archivo 17 | private static File archivo; 18 | //registro 19 | private static Usuario nuevoUsuario; 20 | 21 | private Main() throws InstantiationException { 22 | throw new InstantiationException("This class is not created for instantiation"); 23 | } 24 | 25 | //algoritmo 26 | public static void main(String[] args){ 27 | //muestra de funciones con archivos 28 | //aqui creamos un archivo 29 | archivo = abrir("usuarios", true); 30 | //agregamos 500 registros; 31 | for (int i = 0; i < 500; i++) { 32 | nuevoUsuario = new Usuario(); 33 | nuevoUsuario.setNombre(Generador.generarNombreAleatorio()); 34 | nuevoUsuario.setDni(Generador.generarDNIAleatorio()); 35 | nuevoUsuario.setDomicilio(Generador.generarLocalidadAleatorio()); 36 | nuevoUsuario.setEdad(Generador.generarEnteroAleatorio(15, 99)); 37 | 38 | grabar(archivo, nuevoUsuario); 39 | } 40 | 41 | cerrar(archivo); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacionii/ejerciciolistas/Nodo.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacionii.ejerciciolistas; 2 | 3 | /** 4 | * Created by jvargas on 8/28/15. 5 | */ 6 | public class Nodo{ 7 | 8 | private T value; 9 | private Nodo siguiente; 10 | private Nodo anterior; 11 | 12 | public T getValue() { 13 | return value; 14 | } 15 | 16 | public void setValue(T value) { 17 | this.value = value; 18 | } 19 | 20 | public Nodo getSiguiente() { 21 | return siguiente; 22 | } 23 | 24 | public void setSiguiente(Nodo siguiente) { 25 | this.siguiente = siguiente; 26 | } 27 | 28 | public Nodo getAnterior() { 29 | return anterior; 30 | } 31 | 32 | public void setAnterior(Nodo anterior) { 33 | this.anterior = anterior; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return "Nodo{" + 39 | "value=" + value + 40 | '}'; 41 | } 42 | 43 | @Override 44 | public boolean equals(Object o) { 45 | if (this == o) return true; 46 | if (!(o instanceof Nodo)) return false; 47 | 48 | Nodo nodo = (Nodo) o; 49 | 50 | return !(getValue() != null ? !getValue().equals(nodo.getValue()) : nodo.getValue() != null); 51 | 52 | } 53 | 54 | @Override 55 | public int hashCode() { 56 | return getValue() != null ? getValue().hashCode() : 0; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/archivos/Auto.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.archivos; 2 | 3 | import com.frre.library.Clave; 4 | 5 | /** 6 | * Created by jvargas on 8/21/15. 7 | */ 8 | public class Auto { 9 | 10 | @Clave 11 | private String localidad; 12 | private String patente; 13 | private String propietario; 14 | private int modelo; 15 | 16 | @Override 17 | public String toString() { 18 | return "Auto{" + 19 | "localidad='" + localidad + '\'' + 20 | ", patente='" + patente + '\'' + 21 | ", propietario='" + propietario + '\'' + 22 | ", modelo=" + modelo + 23 | '}'; 24 | } 25 | 26 | public String getLocalidad() { 27 | return localidad; 28 | } 29 | 30 | public void setLocalidad(String localidad) { 31 | this.localidad = localidad; 32 | } 33 | 34 | public String getPatente() { 35 | return patente; 36 | } 37 | 38 | public void setPatente(String patente) { 39 | this.patente = patente; 40 | } 41 | 42 | public String getPropietario() { 43 | return propietario; 44 | } 45 | 46 | public void setPropietario(String propietario) { 47 | this.propietario = propietario; 48 | } 49 | 50 | public int getModelo() { 51 | return modelo; 52 | } 53 | 54 | public void setModelo(int modelo) { 55 | this.modelo = modelo; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/files/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii.files; 2 | 3 | import java.io.*; 4 | 5 | /** 6 | * Created by jvargas on 9/12/15. 7 | */ 8 | public final class Main { 9 | 10 | private Main() throws InstantiationException { 11 | throw new InstantiationException("This class is not created for instantiation"); 12 | } 13 | 14 | public static void main(String[] args){ 15 | File dir = new File("./fotos"); 16 | 17 | if (dir.isDirectory()) { // make sure it's a directory 18 | for (final File f : dir.listFiles()) { 19 | System.out.println(f.getName()); 20 | String fileName = f.getName().substring(4,12); 21 | String year = fileName.substring(0, 4); 22 | String month = fileName.substring(4,6); 23 | String day = fileName.substring(6,8); 24 | String seconds = f.getName().substring(15, 19); 25 | System.out.println(year+"-"+month+"-"+day+" 16.46."+seconds); 26 | File newfile = new File(year+"-"+month+"-"+day+" 16.46."+seconds+".jpg"); 27 | if (f.renameTo(newfile)) { 28 | System.out.println("Rename succesful"); 29 | } else { 30 | System.out.println("Rename failed"); 31 | } 32 | // TODO: handle exception 33 | 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/hilos/ProcesoCompra.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii.hilos; 2 | 3 | import java.util.Random; 4 | 5 | /** 6 | * Created by jvargas on 9/11/15. 7 | */ 8 | public class ProcesoCompra implements Comprable, Runnable{ 9 | 10 | private String nombreProducto; 11 | private boolean exito; 12 | private int cantComprada; 13 | private final DataStore dataStore; 14 | 15 | public ProcesoCompra(DataStore dataStore) { 16 | this.dataStore = dataStore; 17 | } 18 | 19 | @Override 20 | public boolean getStatusCompra() { 21 | return exito; 22 | } 23 | 24 | @Override 25 | public void setStatusCompra(boolean comprada) { 26 | this.exito = comprada; 27 | } 28 | 29 | @Override 30 | public int getCantComprada() { 31 | return cantComprada; 32 | } 33 | 34 | @Override 35 | public void setCantComprada(int cantComprada) { 36 | this.cantComprada = cantComprada; 37 | } 38 | 39 | @Override 40 | public void run() { 41 | Random r = new Random(); 42 | int cant = Math.abs(r.nextInt()%4)+1; 43 | // System.out.println(this+ " Por comprar "+cant); 44 | comprarProducto(cant); 45 | // System.out.println(this + " Status compra:" + getStatusCompra()); 46 | // System.out.println(this +" Cant compra:"+getCantComprada()); 47 | 48 | } 49 | 50 | private void comprarProducto(int cantAComprar) { 51 | dataStore.comprar(this, cantAComprar); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/arreglos/busqueda/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.arreglos.busqueda; 2 | 3 | import java.util.Arrays; 4 | 5 | /** 6 | * Created by justo on 12/05/16. 7 | */ 8 | public final class Main { 9 | 10 | private Main() throws InstantiationException { 11 | throw new InstantiationException("This class is not created for instantiation"); 12 | } 13 | 14 | public static void main(String[] args){ 15 | int[] arreglo = {7,51,1,12,34,1,23,45,67}; 16 | String[] nombres = {"Jose","Luis","Zapata","Hector"}; 17 | 18 | //busqueda lineal 19 | for (int i = 0; i < arreglo.length; i++) { 20 | if (arreglo[i] == 1){ 21 | System.out.println("Encontrado en pos "+i); 22 | } 23 | } 24 | 25 | //lineal con centinela 26 | int i = 0; 27 | while (i < arreglo.length && arreglo[i] != 1){ 28 | i++; 29 | } 30 | if(i < arreglo.length){ 31 | System.out.println(arreglo[i]+" encontrado en la pos "+i); 32 | } 33 | 34 | //lineal con centinela con for 35 | for (i = 0; i < arreglo.length; i++) { 36 | if (arreglo[i] == 1){ 37 | System.out.println("Encontrado en pos "+i); 38 | break; 39 | } 40 | } 41 | 42 | Arrays.sort(arreglo); 43 | 44 | int pos = Arrays.binarySearch(arreglo, 23); 45 | 46 | System.out.println(pos); 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/hilos/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii.hilos; 2 | 3 | 4 | import java.util.ArrayList; 5 | 6 | /** 7 | * Created by jvargas on 8/28/15. 8 | */ 9 | public final class Main { 10 | 11 | private Main() throws InstantiationException { 12 | throw new InstantiationException("This class is not created for instantiation"); 13 | } 14 | 15 | public static void main(String[] args) throws Exception { 16 | 17 | System.out.println("Testing 1 - Send Http GET request"); 18 | 19 | // ExecutorService executor = Executors.newFixedThreadPool(7); 20 | 21 | DataStore dataStore = new DataStore("Leche", 10); 22 | 23 | ArrayList hilos = new ArrayList(); 24 | ArrayList procesoCompras = new ArrayList(); 25 | for (int i = 0; i < 1000; i++) { 26 | ProcesoCompra procesoCompra = new ProcesoCompra(dataStore); 27 | Thread nuevoHilo = new Thread(procesoCompra); 28 | hilos.add(nuevoHilo); 29 | procesoCompras.add(procesoCompra); 30 | } 31 | 32 | for (int i = 0; i < hilos.size(); i++) { 33 | hilos.get(i).start(); 34 | } 35 | 36 | for (int i = 0; i < procesoCompras.size(); i++) { 37 | if (procesoCompras.get(i).getStatusCompra()){ 38 | System.out.println(procesoCompras.get(i).getCantComprada()); 39 | } 40 | } 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | } 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/archivos/crear/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.archivos.crear; 2 | 3 | import static com.frre.library.Generador.*; 4 | 5 | import com.frre.practica.tsp.programacioni.archivos.Empleado; 6 | 7 | import java.io.File; 8 | 9 | import static com.frre.library.archivos.FuncionesDeArchivos.*; 10 | 11 | /** 12 | * Created by jvargas on 8/20/15. 13 | */ 14 | public final class Main { 15 | 16 | 17 | //ambiente 18 | //archivo 19 | private static File archivo; 20 | //registro 21 | private static Empleado nuevoUsuario; 22 | 23 | private Main() throws InstantiationException { 24 | throw new InstantiationException("This class is not created for instantiation"); 25 | } 26 | 27 | //algoritmo 28 | public static void main(String[] args){ 29 | //muestra de funciones con archivos 30 | //aqui creamos un archivo 31 | archivo = abrir("Musimundo", true); 32 | //agregamos 500 registros; 33 | 34 | for (int i = 0; i < 500; i++) { 35 | nuevoUsuario = new Empleado(); 36 | nuevoUsuario.setNombre(generarNombreAleatorio()); 37 | nuevoUsuario.setDni(generarDNIAleatorio()); 38 | nuevoUsuario.setZona(generarEnteroAleatorio(0,10)); 39 | nuevoUsuario.setEdad(generarEnteroAleatorio(15, 99)); 40 | nuevoUsuario.setSucursal(generarEnteroAleatorio(0,15)); 41 | nuevoUsuario.setSueldo(generarDecimalAleatorio(1,10)); 42 | grabar(archivo, nuevoUsuario); 43 | } 44 | 45 | cerrar(archivo); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacionii/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacionii; 2 | 3 | import com.frre.library.Generador; 4 | 5 | /** 6 | * Created by jvargas on 8/21/15. 7 | */ 8 | public final class Main { 9 | 10 | private Main() throws InstantiationException { 11 | throw new InstantiationException("This class is not created for instantiation"); 12 | } 13 | 14 | public static void main(String[] args){ 15 | 16 | Nodo first = null; 17 | for (int i = 0; i < 50; i++) { 18 | Nodo nuevo = new Nodo(); 19 | nuevo.setValor(Generador.generarPalabraConArticuloAleatoria()); 20 | //apilar 21 | //nuevo.setNext(first); 22 | //first = nuevo; 23 | 24 | //encolar 25 | if (first == null){ 26 | first = nuevo; 27 | } else { 28 | Nodo aux = first; 29 | while (aux.getNext()!=null){ 30 | aux = aux.getNext(); 31 | } 32 | aux.setNext(nuevo); 33 | } 34 | } 35 | 36 | //recorrer y eliminar 37 | Nodo aux = first; 38 | Nodo anterior = null; 39 | while (aux!=null){ 40 | if (aux.getValor().equalsIgnoreCase("PAPA")){ 41 | //elimino 42 | if (aux == first){ 43 | first = aux.getNext(); 44 | } else { 45 | anterior.setNext(aux.getNext()); 46 | } 47 | } 48 | anterior = aux; 49 | aux = aux.getNext(); 50 | } 51 | 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/isi/algoritmos/archivos/Empleado.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.isi.algoritmos.archivos; 2 | 3 | import com.frre.library.Clave; 4 | 5 | /** 6 | * Created by jvargas on 8/20/15. 7 | */ 8 | public class Empleado { 9 | 10 | @Clave 11 | private String provincia; 12 | @Clave 13 | private String localidad; 14 | @Clave 15 | private int dni; 16 | private String nomYAp; 17 | private double sueldo; 18 | 19 | public String getProvincia() { 20 | return provincia; 21 | } 22 | 23 | public void setProvincia(String provincia) { 24 | this.provincia = provincia; 25 | } 26 | 27 | public String getLocalidad() { 28 | return localidad; 29 | } 30 | 31 | public void setLocalidad(String localidad) { 32 | this.localidad = localidad; 33 | } 34 | 35 | public String getNomYAp() { 36 | return nomYAp; 37 | } 38 | 39 | public void setNomYAp(String nomYAp) { 40 | this.nomYAp = nomYAp; 41 | } 42 | 43 | public int getDni() { 44 | return dni; 45 | } 46 | 47 | public void setDni(int dni) { 48 | this.dni = dni; 49 | } 50 | 51 | public double getSueldo() { 52 | return sueldo; 53 | } 54 | 55 | public void setSueldo(double sueldo) { 56 | this.sueldo = sueldo; 57 | } 58 | 59 | @Override 60 | public String toString() { 61 | return "Empleado{" + 62 | "localidad='" + localidad + '\'' + 63 | ", nomYAp='" + nomYAp + '\'' + 64 | ", dni=" + dni + 65 | ", sueldo=" + sueldo + 66 | '}'; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | LibProg es una libreria espcialmente construida para la catedra de Programacion I & II, Laboratorio 2 y Algoritmos de la carrera de TSP e ISI de la UTN FRRe. 2 | 3 | ## Como Usarla 4 | 5 | 1. Para poder bajar el codigo fuente deberan de tener instalado GIT en su computadora... Para bajarse pueden descargarse GIT desd aqui... 6 | 7 | https://git-scm.com/downloads 8 | 9 | 2. Y luego realizar por la consola de comandos lo siguiente: 10 | 11 | git clone https://github.com/justomiguel/libProg.git 12 | 13 | 3. Descargarse Maven (Seguir los pasos de la pagina y despues por consola hacer), de esa forma les bajara las dependencias, esto es opcional ya que la ide trae maven por defecto pero seria bueno que lo hagan 14 | 15 | https://maven.apache.org/install.html 16 | 17 | mvn clean install 18 | 19 | 4. Pueden usar la libreria con una IDE de preferencia o bien usar INTELLIJ IDEA desde aqui! Bajense el community! Un abrazo! 20 | 21 | https://www.jetbrains.com/idea/download/ 22 | 23 | ## License 24 | 25 | Copyright 2016 Justo Vargas 26 | 27 | Licensed under the Apache License, Version 2.0 (the "License"); 28 | you may not use this file except in compliance with the License. 29 | You may obtain a copy of the License at 30 | 31 | http://www.apache.org/licenses/LICENSE-2.0 32 | 33 | Unless required by applicable law or agreed to in writing, software 34 | distributed under the License is distributed on an "AS IS" BASIS, 35 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 36 | See the License for the specific language governing permissions and 37 | limitations under the License. -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacioni/arreglos/omegaup/BuscandoParejas.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacioni.arreglos.omegaup; 2 | 3 | /** 4 | * Created by justo on 19/05/16. 5 | */ 6 | 7 | import java.util.Arrays; 8 | import java.util.Collections; 9 | import java.util.Comparator; 10 | import java.util.Scanner; 11 | 12 | public final class BuscandoParejas { 13 | 14 | private BuscandoParejas() throws InstantiationException { 15 | throw new InstantiationException("This class is not created for instantiation"); 16 | } 17 | 18 | //ambiente 19 | 20 | //algoritmo 21 | public static void main(String[] args){ 22 | Scanner sc = new Scanner(System.in, "UTF-8"); 23 | 24 | int cantHombres = sc.nextInt(); 25 | int cantMujeres = sc.nextInt(); 26 | 27 | Integer[] hombres = new Integer[cantHombres]; 28 | int[] mujeres = new int[cantMujeres]; 29 | 30 | if (cantHombres <= cantMujeres){ 31 | System.out.println("No hay solteros"); 32 | } else { 33 | 34 | for (int i = 0; i < cantHombres; i++) { 35 | hombres[i] = sc.nextInt(); 36 | } 37 | for (int i = 0; i < cantMujeres; i++) { 38 | mujeres[i] = sc.nextInt(); 39 | } 40 | 41 | Arrays.sort(hombres, new Comparator() { 42 | @Override 43 | public int compare(Integer o1, Integer o2) { 44 | return o1.compareTo(o2)*-1; 45 | } 46 | }); 47 | 48 | 49 | System.out.println(Math.abs((cantMujeres - cantHombres)) + " " + hombres[cantHombres-1]); 50 | 51 | } 52 | 53 | } 54 | } -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/exceptions/model/Compra.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii.exceptions.model; 2 | 3 | /** 4 | * Created by jvargas on 10/2/15. 5 | */ 6 | public class Compra { 7 | 8 | private Customer usuario; 9 | private int idProducto; 10 | private int cant; 11 | private double precioUnitario; 12 | private double precioTotal; 13 | 14 | @Override 15 | public String toString() { 16 | return "Compra{" + 17 | "usuario=" + usuario + 18 | ", idProducto=" + idProducto + 19 | ", cant=" + cant + 20 | ", precioUnitario=" + precioUnitario + 21 | ", precioTotal=" + precioTotal + 22 | '}'; 23 | } 24 | 25 | public Customer getUsuario() { 26 | return usuario; 27 | } 28 | 29 | public void setUsuario(Customer usuario) { 30 | this.usuario = usuario; 31 | } 32 | 33 | public int getIdProducto() { 34 | return idProducto; 35 | } 36 | 37 | public void setIdProducto(int idProducto) { 38 | this.idProducto = idProducto; 39 | } 40 | 41 | public int getCant() { 42 | return cant; 43 | } 44 | 45 | public void setCant(int cant) { 46 | this.cant = cant; 47 | } 48 | 49 | public double getPrecioUnitario() { 50 | return precioUnitario; 51 | } 52 | 53 | public void setPrecioUnitario(double precioUnitario) { 54 | this.precioUnitario = precioUnitario; 55 | } 56 | 57 | public double getPrecioTotal() { 58 | return precioTotal; 59 | } 60 | 61 | public void setPrecioTotal(double precioTotal) { 62 | this.precioTotal = precioTotal; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/hilos/ProcesoLargo.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii.hilos; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.InputStreamReader; 5 | import java.net.HttpURLConnection; 6 | import java.net.URL; 7 | import java.nio.charset.StandardCharsets; 8 | 9 | /** 10 | * Created by jvargas on 8/28/15. 11 | */ 12 | public class ProcesoLargo extends Thread { 13 | 14 | private static final String USER_AGENT = "Mozilla/5.0"; 15 | 16 | @Override 17 | public void run() { 18 | try { 19 | String url = "http://www.google.com/search?q=mkyong"; 20 | 21 | URL obj = new URL(url); 22 | HttpURLConnection con = (HttpURLConnection) obj.openConnection(); 23 | 24 | // optional default is GET 25 | con.setRequestMethod("GET"); 26 | 27 | //add request header 28 | con.setRequestProperty("User-Agent", USER_AGENT); 29 | 30 | int responseCode = con.getResponseCode(); 31 | System.out.println("\nSending 'GET' request to URL : " + url); 32 | System.out.println("Response Code : " + responseCode); 33 | 34 | BufferedReader in = new BufferedReader( 35 | new InputStreamReader(con.getInputStream(), StandardCharsets.UTF_8)); 36 | String inputLine; 37 | StringBuffer response = new StringBuffer(); 38 | 39 | while ((inputLine = in.readLine()) != null) { 40 | response.append(inputLine); 41 | } 42 | in.close(); 43 | 44 | Thread.sleep(50000); 45 | //print result 46 | System.out.println(response.toString()); 47 | } catch (Exception e){ 48 | 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/frre/library/data/Constants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package com.frre.library.data; 6 | 7 | /** 8 | * 9 | * @author justomiguel 10 | */ 11 | public final class Constants { 12 | 13 | public static final String DATE_SEPARATOR = "/"; 14 | public static final String SPACE = " "; 15 | public static final String SLASH = "/"; 16 | public static final String SET = "set"; 17 | public static final String GET = "get"; 18 | public static final String EXCEPCION_OCURRIDA_ = "Excepcion ocurrida "; 19 | public static final String FIELD_SEPARATOR = ":"; 20 | public static final String NEW_LINE = "\n"; 21 | public static final String GM_T3 = "GMT-3"; 22 | 23 | public static final String ARCHIVO_NO_EXISTE = "Archivo no existe"; 24 | public static final String SIN_PERMISOS_PARA_CREAR_ARCHIVOS = "Sin permisos para crear archivos"; 25 | public static final String ARCHIVO__NO_PUEDE_CREARSE_ = "Archivo No puede crearse. "; 26 | public static final String NO_SE_PUEDE_GRABAR_EN_UN_ARCHIVO_NO_CREAD = "No se puede grabar en un archivo no creado"; 27 | public static final String ARCHIVO_YA_CERRADO = "Archivo ya cerrado"; 28 | public static final String IMPOSIBLE_CERRAR_UN_ARCHIVO_QUE_NO_SE_ABR = "Imposible cerrar un archivo que no se abrio"; 29 | public static final String COMMENTED_LINE="#"; 30 | public static final String NOT_SUPPORTED="Not supported yet."; 31 | public static final String COMMA = ","; 32 | public static final String DOT="."; 33 | 34 | private Constants() throws InstantiationException { 35 | throw new InstantiationException("This class is not created for instantiation"); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/Persona.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * Created by jvargas on 8/21/15. 7 | */ 8 | public class Persona { 9 | 10 | private String nombre; 11 | private int legajo; 12 | private Date fechaNac; 13 | 14 | public Persona(String nombre, int legajo, Date fechaNac) { 15 | this.nombre = nombre; 16 | this.legajo = legajo; 17 | this.fechaNac = fechaNac; 18 | } 19 | 20 | public String getNombre() { 21 | return nombre; 22 | } 23 | 24 | public void setNombre(String nombre) { 25 | this.nombre = nombre; 26 | } 27 | 28 | public int getLegajo() { 29 | return legajo; 30 | } 31 | 32 | public void setLegajo(int legajo) { 33 | this.legajo = legajo; 34 | } 35 | 36 | public Date getFechaNac() { 37 | return fechaNac; 38 | } 39 | 40 | public void setFechaNac(Date fechaNac) { 41 | this.fechaNac = fechaNac; 42 | } 43 | 44 | @Override 45 | public boolean equals(Object o) { 46 | if (this == o) return true; 47 | if (!(o instanceof Persona)) return false; 48 | 49 | Persona persona = (Persona) o; 50 | 51 | if (getLegajo() != persona.getLegajo()) return false; 52 | if (getNombre() != null ? !getNombre().equals(persona.getNombre()) : persona.getNombre() != null) return false; 53 | return !(getFechaNac() != null ? !getFechaNac().equals(persona.getFechaNac()) : persona.getFechaNac() != null); 54 | 55 | } 56 | 57 | @Override 58 | public int hashCode() { 59 | int result = getNombre() != null ? getNombre().hashCode() : 0; 60 | result = 31 * result + getLegajo(); 61 | result = 31 * result + (getFechaNac() != null ? getFechaNac().hashCode() : 0); 62 | return result; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacionii/ejerciciolistas/MiLista.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacionii.ejerciciolistas; 2 | 3 | /** 4 | * Created by jvargas on 8/28/15. 5 | */ 6 | public class MiLista { 7 | 8 | private Nodo first; 9 | private Nodo last; 10 | 11 | public void agregar(Nodo nodo){ 12 | if (nodo!=null){ 13 | nodo.setSiguiente(first); 14 | if (first != null){ 15 | first.setAnterior(nodo); 16 | } 17 | nodo.setAnterior(null); 18 | first = nodo; 19 | if (last == null){ 20 | last = nodo; 21 | } 22 | } 23 | } 24 | 25 | public boolean remover(Nodo nodo){ 26 | if (nodo != null){ 27 | Nodo anterior = nodo.getAnterior(); 28 | Nodo siguiente = nodo.getSiguiente(); 29 | 30 | if (first == nodo){ 31 | first = siguiente; 32 | } else { 33 | anterior.setSiguiente(siguiente); 34 | } 35 | 36 | if (last == nodo){ 37 | last = anterior; 38 | } else { 39 | siguiente.setAnterior(anterior); 40 | } 41 | 42 | return true; 43 | } 44 | return false; 45 | } 46 | 47 | public boolean remover(int pos){ 48 | Nodo currentNodo = first; 49 | int currentPos = 0; 50 | while (currentNodo != null && currentPos != pos){ 51 | currentNodo = currentNodo.getSiguiente(); 52 | currentPos++; 53 | } 54 | if (currentNodo!=null){ 55 | return remover(currentNodo); 56 | } 57 | return false; 58 | } 59 | 60 | public int longitud(){ 61 | 62 | Nodo currentNodo = first; 63 | int currentPos = 0; 64 | while (currentNodo != null){ 65 | currentNodo = currentNodo.getSiguiente(); 66 | currentPos++; 67 | } 68 | return currentPos; 69 | } 70 | 71 | public Nodo obtenerEn(int pos){ 72 | Nodo currentNodo = first; 73 | int currentPos = 0; 74 | while (currentNodo != null && currentPos != pos){ 75 | currentNodo = currentNodo.getSiguiente(); 76 | currentPos++; 77 | } 78 | return currentNodo; 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/programacionii/arboles/MainArboles.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.programacionii.arboles; 2 | 3 | /** 4 | * Created by jvargas on 8/28/15. 5 | */ 6 | public final class MainArboles { 7 | 8 | private MainArboles() throws InstantiationException { 9 | throw new InstantiationException("This class is not created for instantiation"); 10 | } 11 | 12 | public static void main(String[] args){ 13 | NodoArbol nodo4 = new NodoArbol(); 14 | nodo4.setValue(4); 15 | 16 | NodoArbol nodo3 = new NodoArbol(); 17 | nodo3.setValue(3); 18 | nodo3.setHijoIzquierdo(nodo4); 19 | 20 | NodoArbol nodo7 = new NodoArbol(); 21 | nodo7.setValue(7); 22 | 23 | NodoArbol nodo31 = new NodoArbol(); 24 | nodo31.setValue(31); 25 | nodo31.setHijoDerecho(nodo7); 26 | 27 | NodoArbol nodo2 = new NodoArbol(); 28 | nodo2.setValue(2); 29 | nodo2.setHijoIzquierdo(nodo3); 30 | nodo2.setHijoDerecho(nodo31); 31 | 32 | preOrden(nodo2); 33 | enOrden(nodo2); 34 | postOrden(nodo2); 35 | 36 | System.out.println(sumatoria(nodo2)); 37 | } 38 | 39 | private static int sumatoria(NodoArbol nodo) { 40 | if (nodo == null){ 41 | return 0; 42 | } 43 | Integer value = nodo.getValue(); 44 | return value+ 45 | sumatoria(nodo.getHijoIzquierdo()) 46 | +sumatoria(nodo.getHijoDerecho()); 47 | } 48 | 49 | private static void postOrden(NodoArbol nodo) { 50 | if (nodo != null){ 51 | postOrden(nodo.getHijoIzquierdo()); 52 | postOrden(nodo.getHijoDerecho()); 53 | System.out.println(nodo); 54 | 55 | } 56 | } 57 | 58 | private static void enOrden(NodoArbol nodo) { 59 | if (nodo != null){ 60 | enOrden(nodo.getHijoIzquierdo()); 61 | System.out.println(nodo); 62 | enOrden(nodo.getHijoDerecho()); 63 | } 64 | } 65 | 66 | private static void preOrden(NodoArbol nodo) { 67 | if (nodo != null){ 68 | System.out.println(nodo); 69 | preOrden(nodo.getHijoIzquierdo()); 70 | preOrden(nodo.getHijoDerecho()); 71 | } 72 | } 73 | 74 | 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/com/frre/library/Ordenar.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package com.frre.library; 6 | 7 | import java.lang.reflect.Array; 8 | import org.apache.commons.lang3.ArrayUtils; 9 | 10 | /** 11 | * 12 | * @author justomiguel 13 | */ 14 | public final class Ordenar { 15 | 16 | private Ordenar() throws InstantiationException { 17 | throw new InstantiationException("This class is not created for instantiation"); 18 | } 19 | 20 | public static T[] intercambio(T[] vector, boolean direction) { 21 | for (int i = 1; i < vector.length; i++) { 22 | for (int j = 0; j < vector.length - 1; j++) { 23 | boolean mayor = getMayor(vector[j], vector[j + 1]) == 1 == direction; 24 | if (mayor) { 25 | T temp = vector[j]; 26 | vector[j] = vector[j + 1]; 27 | vector[j + 1] = temp; 28 | } 29 | } 30 | } 31 | return vector; 32 | } 33 | 34 | public static T[] insercion(T[] vector, boolean direction) { 35 | for (int i = 1; i < vector.length; i++) { 36 | T temp = vector[i]; 37 | int j; 38 | for (j = i - 1; j >= 0 && (getMayor(vector[j], temp) == 1 == direction); j--) { 39 | vector[j + 1] = vector[j]; 40 | 41 | } 42 | 43 | vector[j + 1] = temp; 44 | } 45 | return vector; 46 | } 47 | 48 | public static T[] seleccion(T[] matrix, boolean direction) { 49 | int i, j, k, p; 50 | T buffer; 51 | int limit = matrix.length - 1; 52 | for (k = 0; k < limit; k++) { 53 | p = k; 54 | for (i = k + 1; i <= limit; i++) { 55 | boolean mayor = (getMayor(matrix[p], matrix[i]) == 1 )== direction; 56 | if (mayor) { 57 | p = i; 58 | } 59 | } 60 | 61 | if (p != k) { 62 | buffer = matrix[p]; 63 | matrix[p] = matrix[k]; 64 | matrix[k] = buffer; 65 | } 66 | } 67 | return matrix; 68 | } 69 | 70 | /* 71 | * a negative integer, zero 72 | * or a positive integer as this 73 | * object is less than, equal to, or greater than the specified object. 74 | */ 75 | private static int getMayor(T elem, T otherElem) { 76 | Comparable elemC = (Comparable) elem; 77 | return elemC.compareTo(otherElem); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | com.frre.programacion 6 | libProg 7 | 1.0-SNAPSHOT 8 | jar 9 | 10 | 11 | libProg 12 | http://maven.apache.org 13 | 14 | 15 | UTF-8 16 | 17 | 18 | 19 | 20 | 21 | org.apache.maven.plugins 22 | maven-compiler-plugin 23 | 2.0.2 24 | 25 | 1.6 26 | 1.6 27 | 28 | 29 | 30 | maven-assembly-plugin 31 | 32 | 33 | jar-with-dependencies 34 | 35 | 36 | 37 | 38 | make-assembly 39 | package 40 | 41 | single 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | junit 52 | junit 53 | 3.8.1 54 | test 55 | 56 | 57 | org.apache.directory.studio 58 | org.apache.commons.io 59 | 2.4 60 | 61 | 62 | org.apache.commons 63 | commons-lang3 64 | 3.1 65 | 66 | 67 | joda-time 68 | joda-time 69 | 2.2 70 | jar 71 | compile 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /src/main/java/com/frre/library/Fecha.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package com.frre.library; 6 | 7 | import java.util.TimeZone; 8 | 9 | import com.frre.library.data.Constants; 10 | import org.joda.time.DateTime; 11 | import org.joda.time.DateTimeZone; 12 | 13 | /** 14 | * 15 | * @author Cleo 16 | */ 17 | public final class Fecha implements Comparable{ 18 | 19 | 20 | 21 | private DateTime myDate; 22 | 23 | public Fecha() { 24 | this.myDate = new DateTime(); 25 | } 26 | 27 | public DateTime getInternalDate() { 28 | return myDate; 29 | } 30 | 31 | public Fecha(String fecha) { 32 | myDate = new DateTime(); 33 | setFecha(fecha); 34 | } 35 | 36 | public String getFecha() { 37 | StringBuilder builder = new StringBuilder(); 38 | builder.append(myDate.getDayOfMonth()) 39 | .append(Constants.DATE_SEPARATOR) 40 | .append(myDate.getMonthOfYear()) 41 | .append(Constants.DATE_SEPARATOR) 42 | .append(myDate.getYear()); 43 | return builder.toString(); 44 | } 45 | 46 | public final void setFecha(String fecha) { 47 | String[] date = fecha.trim().split(Constants.DATE_SEPARATOR); 48 | int year = Integer.parseInt(date[2].trim()); 49 | int month = Integer.parseInt(date[1].trim()); 50 | int day = Integer.parseInt(date[0].trim()); 51 | myDate = new DateTime(year, month, day, 0, 0, DateTimeZone.forTimeZone(TimeZone.getTimeZone(Constants.GM_T3))); 52 | } 53 | 54 | public void menosDias(int days) { 55 | this.myDate = myDate.minusDays(days); 56 | } 57 | 58 | public void menosAnios(int years) { 59 | this.myDate = myDate.minusYears(years); 60 | } 61 | 62 | public void menosMeses(int month) { 63 | this.myDate = myDate.minusMonths(month); 64 | } 65 | 66 | public void masDias(int days) { 67 | this.myDate = myDate.plusDays(days); 68 | } 69 | 70 | public void masAnios(int years) { 71 | this.myDate = myDate.plusYears(years); 72 | } 73 | 74 | public void masMeses(int month) { 75 | this.myDate = myDate.plusMonths(month); 76 | } 77 | 78 | public int getMonth() { 79 | return myDate.getMonthOfYear(); 80 | } 81 | 82 | public int getYear() { 83 | return myDate.getYear(); 84 | } 85 | 86 | public int getDay() { 87 | return myDate.getDayOfMonth(); 88 | } 89 | 90 | @Override 91 | public String toString() { 92 | return this.getFecha(); //To change body of generated methods, choose Tools | Templates. 93 | } 94 | 95 | @Override 96 | public int compareTo(Object o) { 97 | Fecha f = (Fecha) o; 98 | return this.myDate.compareTo(f.getInternalDate()); 99 | } 100 | 101 | 102 | 103 | } 104 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/tsp/labii/exceptions/db/ConcreteDB.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.tsp.labii.exceptions.db; 2 | 3 | import com.frre.library.Generador; 4 | import com.frre.practica.tsp.labii.exceptions.model.Customer; 5 | import com.frre.practica.tsp.labii.exceptions.exceptions.ZeroComprasException; 6 | import com.frre.practica.tsp.labii.exceptions.model.Compra; 7 | 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | /** 12 | * Created by jvargas on 10/2/15. 13 | */ 14 | public class ConcreteDB extends Database { 15 | 16 | private ArrayList compras; 17 | 18 | @Override 19 | public void open() { 20 | fillData(); 21 | } 22 | 23 | private void fillData() { 24 | 25 | ArrayList customers = new ArrayList(); 26 | 27 | compras = new ArrayList(); 28 | 29 | for (int i = 0; i < 100; i++) { 30 | Customer customer = new Customer(); 31 | customer.setIdUsuario(i); 32 | customer.setNombre(Generador.generarNombreAleatorio() + "," + Generador.generarApellidoAleatorio()); 33 | customers.add(customer); 34 | } 35 | 36 | for (int i = 0; i < 1000; i++) { 37 | Compra compra = new Compra(); 38 | compra.setIdProducto(Generador.generarEnteroAleatorio(1, 3456)); 39 | compra.setCant(Generador.generarEnteroAleatorio(0, 5)); 40 | compra.setPrecioUnitario(Generador.generarDecimalAleatorio(2, 45)); 41 | 42 | int usuario = Generador.generarEnteroAleatorio(0,99); 43 | compra.setUsuario(customers.get(usuario)); 44 | compra.setPrecioTotal(compra.getCant() * compra.getPrecioUnitario()); 45 | 46 | compras.add(compra); 47 | } 48 | } 49 | 50 | @Override 51 | public void close() { 52 | this.compras.clear(); 53 | } 54 | 55 | @Override 56 | public List getRecordsForUser(int user) throws ZeroComprasException{ 57 | 58 | ArrayList comprasDelUser = new ArrayList(); 59 | 60 | for (int i = 0; i < compras.size(); i++) { 61 | Compra compra = compras.get(i); 62 | Customer customer = compra.getUsuario(); 63 | if (customer.getIdUsuario() == user){ 64 | if (compra.getCant() == 0){ 65 | throw new ZeroComprasException(compra); 66 | } 67 | comprasDelUser.add(compras.get(i)); 68 | } 69 | } 70 | return comprasDelUser; 71 | } 72 | 73 | @Override 74 | public double getAveragePerUser(int user){ 75 | 76 | ArrayList comprasDelUser = new ArrayList(); 77 | 78 | int cantCompras = 0; 79 | int cantProductos = 0; 80 | 81 | for (int i = 0; i < compras.size(); i++) { 82 | Compra compra = compras.get(i); 83 | Customer customer = compra.getUsuario(); 84 | if (customer.getIdUsuario() == user){ 85 | int cant = compra.getCant(); 86 | cantCompras++; 87 | cantProductos += cant; 88 | } 89 | } 90 | 91 | return cantProductos/cantCompras; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/isi/algoritmos/archivos/mezcla/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.isi.algoritmos.archivos.mezcla; 2 | 3 | import com.frre.practica.isi.algoritmos.archivos.Empleado; 4 | import com.frre.library.Generador; 5 | import com.frre.library.Utils; 6 | import com.frre.library.archivos.GeneradorArchivos; 7 | 8 | import java.io.File; 9 | 10 | import static com.frre.library.archivos.FuncionesDeArchivos.*; 11 | 12 | /** 13 | * Created by jvargas on 8/21/15. 14 | */ 15 | public final class Main { 16 | 17 | 18 | //ambiente 19 | 20 | //registros 21 | private static Empleado registroPersonal; 22 | private static Empleado registroPersonalExterno; 23 | 24 | //archivoPersonal 25 | private static File archivoPersonal; 26 | private static File archivoPersonalExterno; 27 | private static File archivoFinal; 28 | 29 | private Main() throws InstantiationException { 30 | throw new InstantiationException("This class is not created for instantiation"); 31 | } 32 | 33 | //algoritmo 34 | public static void main(String[] args){ 35 | //muestra de funciones con archivos 36 | //aqui creamos un archivoPersonal 37 | registroPersonal = new Empleado(); 38 | registroPersonalExterno = new Empleado(); 39 | 40 | GeneradorArchivos.generarArchivo("personal", registroPersonal, Generador.generarEnteroAleatorio(100,1000)); 41 | GeneradorArchivos.generarArchivo("personalExterno", registroPersonalExterno, Generador.generarEnteroAleatorio(100,1000)); 42 | 43 | //con mi archivoPersonal creado cmoienzo a utilizarlo 44 | archivoPersonal = abrir("personal"); 45 | archivoPersonalExterno = abrir("personalExterno"); 46 | 47 | archivoFinal = abrir("nuevoPersonal", true); 48 | 49 | registroPersonal = leer(archivoPersonal, registroPersonal); 50 | registroPersonalExterno = leer(archivoPersonalExterno, registroPersonalExterno); 51 | 52 | while (!FDA(archivoPersonal) && !FDA(archivoPersonalExterno)){ 53 | if (Utils.esMenor(registroPersonal, registroPersonalExterno)){ 54 | grabar(archivoFinal, registroPersonal); 55 | registroPersonal = leer(archivoPersonal, registroPersonal); 56 | } else if (Utils.esMayor(registroPersonal, registroPersonalExterno)){ 57 | grabar(archivoFinal, registroPersonalExterno); 58 | registroPersonalExterno = leer(archivoPersonalExterno, registroPersonalExterno); 59 | } else { 60 | grabar(archivoFinal, registroPersonalExterno); 61 | grabar(archivoFinal, registroPersonal); 62 | registroPersonalExterno = leer(archivoPersonalExterno, registroPersonalExterno); 63 | registroPersonal = leer(archivoPersonal, registroPersonal); 64 | } 65 | } 66 | 67 | while (!FDA(archivoPersonal)){ 68 | grabar(archivoFinal, registroPersonal); 69 | registroPersonal = leer(archivoPersonal, registroPersonal); 70 | } 71 | 72 | while (!FDA(archivoPersonalExterno)){ 73 | grabar(archivoFinal, registroPersonalExterno); 74 | registroPersonalExterno = leer(archivoPersonalExterno, registroPersonalExterno); 75 | } 76 | 77 | cerrar(archivoPersonalExterno); 78 | cerrar(archivoPersonal); 79 | cerrar(archivoFinal); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 1.8 69 | 70 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/isi/algoritmos/archivos/corte/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.isi.algoritmos.archivos.corte; 2 | 3 | import com.frre.practica.isi.algoritmos.archivos.Empleado; 4 | import com.frre.library.archivos.GeneradorArchivos; 5 | import static com.frre.library.archivos.FuncionesDeArchivos.*; 6 | 7 | import java.io.File; 8 | 9 | /** 10 | * Created by jvargas on 8/20/15. 11 | */ 12 | public final class Main { 13 | 14 | //ambiente 15 | 16 | //acumuladores 17 | private static String resguardoSucursal; 18 | private static String resguardoPcia; 19 | 20 | //registros 21 | private static Empleado registro; 22 | 23 | //acums 24 | private static double acumSucursal; 25 | private static double acumTotal; 26 | private static double acumPcia; 27 | 28 | //archivo 29 | private static File archivo; 30 | 31 | private Main() throws InstantiationException { 32 | throw new InstantiationException("This class is not created for instantiation"); 33 | } 34 | 35 | //algoritmo 36 | public static void main(String[] args){ 37 | //muestra de funciones con archivos 38 | //aqui creamos un archivo 39 | registro = new Empleado(); 40 | 41 | GeneradorArchivos.generarArchivo("empleados", registro, 2000); 42 | //con mi archivo creado cmoienzo a utilizarlo 43 | archivo = abrir("empleados"); 44 | registro = leer(archivo, registro); 45 | 46 | //resguardo de variables y seteo de acumuladores 47 | acumSucursal = 0; 48 | acumPcia = 0; 49 | acumTotal = 0; 50 | resguardoSucursal = registro.getLocalidad(); 51 | resguardoPcia = registro.getProvincia(); 52 | 53 | System.out.println("**************************************************************"); 54 | System.out.println("Provincia "+resguardoPcia); 55 | System.out.println("**************************************************************"); 56 | System.out.println(" Sucursal "+resguardoSucursal); 57 | while (!FDA(archivo)){ 58 | if (!resguardoPcia.equalsIgnoreCase(registro.getProvincia())){ 59 | corteProvincia(); 60 | } else if (!resguardoSucursal.equalsIgnoreCase(registro.getLocalidad())){ 61 | corteSucursal(); 62 | } 63 | acumSucursal += registro.getSueldo(); 64 | registro = leer(archivo, registro); 65 | } 66 | corteProvincia(); 67 | totalGeneral(); 68 | cerrar(archivo); 69 | } 70 | 71 | private static void corteProvincia() { 72 | corteSucursal(); 73 | System.out.println(" El sueldo total de la provincia es " + acumPcia); 74 | acumTotal = acumTotal + acumPcia; 75 | acumPcia = 0; 76 | if (!FDA(archivo)){ 77 | resguardoPcia = registro.getProvincia(); 78 | System.out.println("**************************************************************"); 79 | System.out.println("Provincia "+resguardoPcia); 80 | System.out.println("**************************************************************"); 81 | System.out.println(" Sucursal "+resguardoSucursal); 82 | } 83 | } 84 | 85 | private static void corteSucursal() { 86 | System.out.println(" El sueldo total de la sucursal es "+ acumSucursal); 87 | acumPcia = acumPcia + acumSucursal; 88 | acumSucursal = 0; 89 | if (!FDA(archivo)){ 90 | resguardoSucursal = registro.getLocalidad(); 91 | if (resguardoPcia.equalsIgnoreCase(registro.getProvincia())){ 92 | System.out.println(" Sucursal "+resguardoSucursal); 93 | } 94 | } 95 | } 96 | 97 | private static void totalGeneral() { 98 | System.out.println("El sueldo total del pais es "+ acumTotal); 99 | } 100 | } -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/isi/algoritmos/archivos/indexados/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.isi.algoritmos.archivos.indexados; 2 | 3 | import com.frre.library.archivos.GeneradorArchivos; 4 | import com.frre.practica.isi.algoritmos.archivos.Bono; 5 | import com.frre.practica.isi.algoritmos.archivos.Empleado; 6 | import static com.frre.library.archivos.FuncionesDeArchivos.*; 7 | 8 | import java.io.File; 9 | 10 | /** 11 | * Created by jvargas on 8/20/15. 12 | */ 13 | public final class Main { 14 | 15 | //ambiente 16 | 17 | //acumuladores 18 | private static String resguardoSucursal; 19 | private static String resguardoPcia; 20 | 21 | //registros 22 | private static Empleado registro; 23 | 24 | //acums 25 | private static double acumSucursal; 26 | private static double acumTotal; 27 | private static double acumPcia; 28 | 29 | //archivo 30 | private static File archivo; 31 | 32 | //bonos 33 | private static Bono bonos; 34 | private static File archivoIndexado; 35 | 36 | private Main() throws InstantiationException { 37 | throw new InstantiationException("This class is not created for instantiation"); 38 | } 39 | 40 | //algoritmo 41 | public static void main(String[] args){ 42 | //muestra de funciones con archivos 43 | //aqui creamos un archivo 44 | registro = new Empleado(); 45 | 46 | bonos = new Bono(); 47 | 48 | GeneradorArchivos.generarArchivo("empleados", registro, 2000); 49 | 50 | GeneradorArchivos.generarArchivo("consumos", bonos, 2000); 51 | 52 | //con mi archivo creado cmoienzo a utilizarlo 53 | archivo = abrir("empleados"); 54 | archivoIndexado = abrir("consumos"); 55 | 56 | registro = leer(archivo, registro); 57 | 58 | //resguardo de variables y seteo de acumuladores 59 | acumSucursal = 0; 60 | acumPcia = 0; 61 | acumTotal = 0; 62 | resguardoSucursal = registro.getLocalidad(); 63 | resguardoPcia = registro.getProvincia(); 64 | 65 | System.out.println("**************************************************************"); 66 | System.out.println("Provincia "+resguardoPcia); 67 | System.out.println("**************************************************************"); 68 | System.out.println(" Sucursal "+resguardoSucursal); 69 | while (!FDA(archivo)){ 70 | if (!resguardoPcia.equalsIgnoreCase(registro.getProvincia())){ 71 | corteProvincia(); 72 | } else if (!resguardoSucursal.equalsIgnoreCase(registro.getLocalidad())){ 73 | corteSucursal(); 74 | } 75 | 76 | //cargo mi indexado 77 | bonos = new Bono(); 78 | bonos.setProvincia(registro.getProvincia()); 79 | bonos = leerIndexado(archivoIndexado, bonos); 80 | 81 | double acum = 0; 82 | if (bonos!=null){ 83 | acum = bonos.getBono(); 84 | } 85 | acumSucursal += registro.getSueldo() + acum; 86 | registro = leer(archivo, registro); 87 | } 88 | corteProvincia(); 89 | totalGeneral(); 90 | cerrar(archivo); 91 | } 92 | 93 | private static void corteProvincia() { 94 | corteSucursal(); 95 | System.out.println(" El sueldo total de la provincia es " + acumPcia); 96 | acumTotal = acumTotal + acumPcia; 97 | acumPcia = 0; 98 | if (!FDA(archivo)){ 99 | resguardoPcia = registro.getProvincia(); 100 | System.out.println("**************************************************************"); 101 | System.out.println("Provincia "+resguardoPcia); 102 | System.out.println("**************************************************************"); 103 | System.out.println(" Sucursal "+resguardoSucursal); 104 | } 105 | } 106 | 107 | private static void corteSucursal() { 108 | System.out.println(" El sueldo total de la sucursal es "+ acumSucursal); 109 | acumPcia = acumPcia + acumSucursal; 110 | acumSucursal = 0; 111 | if (!FDA(archivo)){ 112 | resguardoSucursal = registro.getLocalidad(); 113 | if (resguardoPcia.equalsIgnoreCase(registro.getProvincia())){ 114 | System.out.println(" Sucursal "+resguardoSucursal); 115 | } 116 | } 117 | } 118 | 119 | private static void totalGeneral() { 120 | 121 | System.out.println("El sueldo total del pais es "+ acumTotal); 122 | } 123 | } -------------------------------------------------------------------------------- /src/main/java/com/frre/library/Generador.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package com.frre.library; 6 | 7 | import com.frre.library.data.DataSource; 8 | import com.frre.library.data.Constants; 9 | 10 | import java.util.Random; 11 | 12 | /** 13 | * 14 | * @author justomiguel 15 | */ 16 | public final class Generador { 17 | 18 | private static Random rnd = new Random(); 19 | 20 | private Generador() throws InstantiationException { 21 | throw new InstantiationException("This class is not created for instntiation"); 22 | } 23 | 24 | public static String generarApellidoAleatorio(){ 25 | String appelidos = DataSource.apellidos; 26 | String[] split = appelidos.split(Constants.NEW_LINE); 27 | return split[generarEnteroAleatorio(0, split.length - 1)].trim(); 28 | } 29 | 30 | public static String generarStringAleatorio(){ 31 | String appelidos = DataSource.nombres ; 32 | String[] split = appelidos.split(Constants.NEW_LINE); 33 | String retorno = split[generarEnteroAleatorio(0, split.length - 1)].trim(); 34 | return retorno; 35 | } 36 | 37 | public static String generarNombreAleatorio(){ 38 | String appelidos = DataSource.nombres; 39 | String[] split = appelidos.split(Constants.NEW_LINE); 40 | return split[generarEnteroAleatorio(0, split.length - 1)].trim(); 41 | } 42 | 43 | public static String generarPalabraConArticuloAleatoria(){ 44 | String appelidos = DataSource.palabras; 45 | String[] split = appelidos.split(Constants.NEW_LINE); 46 | return split[generarEnteroAleatorio(0, split.length - 1)].trim(); 47 | } 48 | 49 | public static String generarPalabraSinArticuloAleatoria(){ 50 | String appelidos = DataSource.palabras; 51 | String[] split = appelidos.split(Constants.NEW_LINE); 52 | return split[generarEnteroAleatorio(0, split.length - 1)].substring(2).trim(); 53 | } 54 | 55 | public static String generarPaisAleatorio(){ 56 | String appelidos = DataSource.paises; 57 | String[] split = appelidos.split(Constants.NEW_LINE); 58 | String pais = split[generarEnteroAleatorio(0, split.length - 1)]; 59 | int comma = pais.indexOf(","); 60 | return pais.substring(0, comma).trim(); 61 | } 62 | 63 | public static String generarLocalidadAleatorio(){ 64 | String appelidos = DataSource.localidades; 65 | String[] split = appelidos.split(Constants.NEW_LINE); 66 | return split[generarEnteroAleatorio(0, split.length - 1)].trim(); 67 | } 68 | 69 | public static String generarPatenteALeatoria(){ 70 | StringBuilder builder = new StringBuilder(); 71 | for (int i = 0; i < 3; i++) { 72 | int resultado=(int)(Math.random()*26+65);//Sumamos al numero de letras (sin ñ) el valor en ASCII 73 | char letra = (char)resultado; 74 | builder.append(letra); 75 | } 76 | builder.append(Generador.generarEnteroAleatorio(100,999)); 77 | return builder.toString(); 78 | } 79 | 80 | public static String generarPciaAleatorio(){ 81 | String appelidos = DataSource.pcias; 82 | String[] split = appelidos.split(Constants.NEW_LINE); 83 | return split[generarEnteroAleatorio(0, split.length - 1)].trim(); 84 | } 85 | 86 | public static int generarEnteroAleatorio(int desde, int hasta){ 87 | return rnd.nextInt(hasta-desde+1)+desde; 88 | } 89 | 90 | public static Double generarDecimalAleatorio(int desde, int hasta){ 91 | String entera = String.valueOf(rnd.nextInt(hasta-desde+1)+desde); 92 | String decimal = String.valueOf(rnd.nextInt(99 - 0 + 1)+0); 93 | return new Double(entera+"."+decimal); 94 | } 95 | 96 | 97 | public static int generarLegajoAleatorio(){ 98 | return generarEnteroAleatorio(16000, 25000); 99 | } 100 | 101 | public static int generarDNIAleatorio(){ 102 | return generarEnteroAleatorio(30100500, 40200323); 103 | } 104 | 105 | public static Fecha generarFechaAleatorio(int desdeA, int hastaA){ 106 | StringBuilder builder = new StringBuilder(); 107 | builder.append(generarEnteroAleatorio(1, 28)) 108 | .append(Constants.DATE_SEPARATOR) 109 | .append(generarEnteroAleatorio(1, 12)) 110 | .append(Constants.DATE_SEPARATOR) 111 | .append(generarEnteroAleatorio(desdeA, hastaA)); 112 | return new Fecha(builder.toString()); 113 | } 114 | 115 | } 116 | -------------------------------------------------------------------------------- /src/main/java/com/frre/library/archivos/LectorArchivos.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package com.frre.library.archivos; 6 | 7 | import com.frre.library.Clave; 8 | import com.frre.library.data.Constants; 9 | import com.frre.library.Utils; 10 | 11 | import java.io.BufferedReader; 12 | import java.io.File; 13 | import java.io.FileInputStream; 14 | import java.io.InputStreamReader; 15 | import java.lang.reflect.Field; 16 | import java.lang.reflect.Method; 17 | import java.nio.charset.StandardCharsets; 18 | import java.util.ArrayList; 19 | 20 | /** 21 | * 22 | * @author developer 23 | */ 24 | public class LectorArchivos { 25 | 26 | 27 | private final File myFile; 28 | private int currentCounter; 29 | private ArrayList lines; 30 | private ArrayList theContents; 31 | private Object registro; 32 | 33 | public LectorArchivos(File myFile, String name) { 34 | this.myFile = myFile; 35 | currentCounter = 0; 36 | } 37 | 38 | public void getContents(T registro) { 39 | 40 | this.registro = registro; 41 | 42 | theContents = (ArrayList) new ArrayList(); 43 | try { 44 | //use buffering, reading one line at a time 45 | FileInputStream fis = new FileInputStream(myFile); 46 | InputStreamReader inputStreamReader = new InputStreamReader(fis, StandardCharsets.UTF_8); 47 | BufferedReader input = new BufferedReader(inputStreamReader); 48 | lines = new ArrayList(); 49 | try { 50 | String line; //not declared within while loop 51 | 52 | while ((line = input.readLine()) != null) { 53 | if (!line.startsWith(Constants.COMMENTED_LINE) && line.length() >= 1) { 54 | lines.add(line); 55 | } 56 | } 57 | 58 | for (String currentLine : lines) { 59 | String[] fields = currentLine.split(Constants.FIELD_SEPARATOR); 60 | T localReg = (T) registro.getClass().newInstance(); 61 | int currentFieldNumber = 0; 62 | for (Field f : registro.getClass().getDeclaredFields()) { 63 | Method method = localReg.getClass().getDeclaredMethod(Utils.getSetMethod(f.getName()), f.getType()); 64 | method.invoke(localReg, Utils.tranformAccordingType(f.getType(), fields[currentFieldNumber])); 65 | currentFieldNumber++; 66 | } 67 | theContents.add(localReg); 68 | } 69 | 70 | } finally { 71 | input.close(); 72 | fis.close(); 73 | } 74 | } catch (Exception ex) { 75 | Utils.handleException(ex); 76 | } 77 | 78 | } 79 | 80 | public Object getRegistro() { 81 | return registro; 82 | } 83 | 84 | public T getNextRecord(T registro) { 85 | 86 | if (currentCounter == 0) { 87 | getContents(registro); 88 | } 89 | if (currentCounter < theContents.size()) { 90 | T localVar = (T) theContents.get(currentCounter); 91 | currentCounter++; 92 | return localVar; 93 | } 94 | currentCounter++; 95 | return null; 96 | 97 | } 98 | 99 | public boolean FDA() { 100 | int value = (theContents == null) ? 0 : theContents.size(); 101 | return currentCounter > (value); 102 | } 103 | 104 | void dispose() { 105 | throw new UnsupportedOperationException(Constants.NOT_SUPPORTED); //To change body of generated methods, choose Tools | Templates. 106 | } 107 | 108 | public T getNextRecordIndexed(T registro) { 109 | getContents(registro); 110 | try { 111 | for (Object object : theContents){ 112 | for (Field f : object.getClass().getDeclaredFields()) { 113 | Method method = object.getClass().getDeclaredMethod(Utils.getGetMethod(f.getName())); 114 | Object value = method.invoke(object); 115 | 116 | //en el host 117 | Method method2 = registro.getClass().getDeclaredMethod(Utils.getGetMethod(f.getName())); 118 | Object value2 = method.invoke(registro); 119 | if (f.getAnnotation(Clave.class)!=null){ 120 | if (value.equals(value2)){ 121 | return (T) object; 122 | } 123 | } 124 | } 125 | } 126 | } catch (Exception e){ 127 | 128 | } 129 | return null; 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /src/main/java/com/frre/library/archivos/FuncionesDeArchivos.java: -------------------------------------------------------------------------------- 1 | package com.frre.library.archivos; 2 | 3 | import com.frre.library.Utils; 4 | 5 | import java.io.BufferedWriter; 6 | import java.io.File; 7 | import java.io.FileOutputStream; 8 | import java.io.OutputStreamWriter; 9 | import java.io.IOException; 10 | import java.nio.charset.StandardCharsets; 11 | import java.util.HashMap; 12 | import static com.frre.library.data.Constants.*; 13 | 14 | /* 15 | * To change this template, choose Tools | Templates 16 | * and open the template in the editor. 17 | */ 18 | /** 19 | * 20 | * @author developer 21 | */ 22 | public final class FuncionesDeArchivos { 23 | 24 | private static HashMap myArchs; 25 | private static HashMap myWrittenArchs; 26 | 27 | static { 28 | myArchs = new HashMap(); 29 | myWrittenArchs = new HashMap(); 30 | } 31 | 32 | private FuncionesDeArchivos() throws InstantiationException { 33 | throw new InstantiationException("This class is not created for instantiation"); 34 | } 35 | 36 | public static File abrir(String string) { 37 | File arch = new File(string); 38 | if (!arch.exists()) { 39 | System.out.println(ARCHIVO_NO_EXISTE); 40 | } else { 41 | LectorArchivos l = new LectorArchivos(arch, string); 42 | myArchs.put(arch, l); 43 | 44 | } 45 | return arch; 46 | } 47 | 48 | public static File abrir(String string, boolean createIfNotExists) { 49 | if (createIfNotExists) { 50 | File arch = new File(string); 51 | 52 | if (!arch.exists()) { 53 | try { 54 | if (arch.createNewFile()) { 55 | arch.setReadable(true); 56 | arch.setWritable(true); 57 | } else { 58 | throw new IOException(SIN_PERMISOS_PARA_CREAR_ARCHIVOS); 59 | } 60 | } catch (IOException ex) { 61 | System.out.println(ARCHIVO__NO_PUEDE_CREARSE_ + ex.getClass().getName() + ex.getMessage()); 62 | } 63 | } 64 | 65 | if (arch.exists()) { 66 | FileOutputStream fos; 67 | try { 68 | fos = new FileOutputStream(arch.getAbsoluteFile()); 69 | OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fos, StandardCharsets.UTF_8); 70 | BufferedWriter bw = new BufferedWriter(outputStreamWriter); 71 | bw.write(""); 72 | bw.close(); 73 | fos.close(); 74 | EscritorDeArchivos esc = new EscritorDeArchivos(arch); 75 | myWrittenArchs.put(arch, esc); 76 | } catch (IOException ex) { 77 | Utils.handleException(ex); 78 | } 79 | } 80 | 81 | return arch; 82 | } else { 83 | return abrir(string); 84 | } 85 | } 86 | 87 | public static void grabar(File archS, T reg) { 88 | EscritorDeArchivos l = myWrittenArchs.get(archS); 89 | if (l != null) { 90 | l.setRegistro(reg); 91 | l.recordToFile(reg); 92 | } else { 93 | System.out.println(NO_SE_PUEDE_GRABAR_EN_UN_ARCHIVO_NO_CREAD); 94 | } 95 | } 96 | 97 | public static T leer(File archivo, T registro) { 98 | LectorArchivos l = myArchs.get(archivo); 99 | if (l != null) { 100 | registro = (T) l.getNextRecord(registro); 101 | return registro; 102 | } 103 | return null; 104 | } 105 | 106 | public static T leerIndexado(File archivo, T registro) { 107 | LectorArchivos l = myArchs.get(archivo); 108 | if (l != null) { 109 | registro = (T) l.getNextRecordIndexed(registro); 110 | return registro; 111 | } 112 | return null; 113 | } 114 | 115 | public static boolean FDA(File archivo) { 116 | LectorArchivos l = myArchs.get(archivo); 117 | if (l == null) { 118 | System.out.println(ARCHIVO_NO_EXISTE); 119 | } 120 | return l.FDA(); 121 | } 122 | 123 | public static void cerrar(File archivo) { 124 | if (archivo != null) { 125 | LectorArchivos l = myArchs.get(archivo); 126 | if (l != null) { 127 | //l.dispose(); 128 | myArchs.remove(archivo); 129 | } else { 130 | EscritorDeArchivos tle = myWrittenArchs.get(archivo); 131 | if (tle != null) { 132 | tle.writeIntoFileContents(tle.getRegistro()); 133 | myWrittenArchs.remove(archivo); 134 | } else { 135 | System.out.println(ARCHIVO_YA_CERRADO); 136 | } 137 | } 138 | } else { 139 | System.out.println(IMPOSIBLE_CERRAR_UN_ARCHIVO_QUE_NO_SE_ABR); 140 | } 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /src/main/java/com/frre/library/archivos/EscritorDeArchivos.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package com.frre.library.archivos; 6 | 7 | import com.frre.library.Clave; 8 | import com.frre.library.Utils; 9 | import com.frre.library.data.Constants; 10 | 11 | import java.io.BufferedWriter; 12 | import java.io.File; 13 | import java.io.FileOutputStream; 14 | import java.io.OutputStreamWriter; 15 | import java.lang.reflect.Field; 16 | import java.lang.reflect.Method; 17 | import java.nio.charset.StandardCharsets; 18 | import java.util.*; 19 | 20 | /** 21 | * 22 | * @author Cleo 23 | */ 24 | public class EscritorDeArchivos { 25 | 26 | 27 | private final File myFile; 28 | private final ArrayList lines; 29 | private Object registro; 30 | 31 | public Object getRegistro() { 32 | return registro; 33 | } 34 | 35 | public void setRegistro(Object registro) { 36 | this.registro = registro; 37 | } 38 | 39 | public EscritorDeArchivos(File myFile) { 40 | this.myFile = myFile; 41 | lines = new ArrayList(); 42 | } 43 | 44 | public void recordToFile(T reg) { 45 | StringBuilder builder = new StringBuilder(); 46 | for (Field f : reg.getClass().getDeclaredFields()) { 47 | try { 48 | Method method = reg.getClass().getDeclaredMethod(Utils.getGetMethod(f.getName())); 49 | Object results = method.invoke(reg); 50 | if (results.getClass().isAssignableFrom(Date.class)) { 51 | results = formatDate(results); 52 | } 53 | builder.append(results); 54 | builder.append(Constants.FIELD_SEPARATOR); 55 | } catch (Exception ex) { 56 | Utils.handleException(ex); 57 | } 58 | } 59 | String lineToSave = builder.toString().substring(0, builder.length() - 1); 60 | // System.out.println(lineToSave); 61 | lines.add(lineToSave); 62 | } 63 | 64 | private void writeIntoFile(String substring) { 65 | StringBuilder myString = new StringBuilder(); 66 | for (String lineas : lines) { 67 | myString.append(lineas); 68 | myString.append(Constants.NEW_LINE); 69 | } 70 | } 71 | 72 | private Object formatDate(Object results) { 73 | StringBuilder builderInternal = new StringBuilder(); 74 | Calendar cal = Calendar.getInstance(); 75 | cal.setTime((Date) results); 76 | int year = cal.get(Calendar.YEAR); 77 | int month = cal.get(Calendar.MONTH); 78 | int day = cal.get(Calendar.DAY_OF_MONTH); 79 | builderInternal.append(Constants.SPACE); 80 | builderInternal.append(day); 81 | builderInternal.append(Constants.DATE_SEPARATOR); 82 | builderInternal.append(month); 83 | builderInternal.append(Constants.DATE_SEPARATOR); 84 | builderInternal.append(year); 85 | builderInternal.append(Constants.SPACE); 86 | return builderInternal; 87 | } 88 | 89 | protected void writeIntoFileContents(Object registro) { 90 | try { 91 | 92 | 93 | int cantClaves = 0; 94 | 95 | ArrayList theContents = new ArrayList(); 96 | for (String currentLine : lines) { 97 | String[] fields = currentLine.split(Constants.FIELD_SEPARATOR); 98 | Object localReg = (Object) registro.getClass().newInstance(); 99 | int currentFieldNumber = 0; 100 | for (Field f : registro.getClass().getDeclaredFields()) { 101 | Method method = localReg.getClass().getDeclaredMethod(Utils.getSetMethod(f.getName()), f.getType()); 102 | method.invoke(localReg, Utils.tranformAccordingType(f.getType(), fields[currentFieldNumber])); 103 | currentFieldNumber++; 104 | if (f.getAnnotation(Clave.class)!=null){ 105 | cantClaves+=1; 106 | } 107 | } 108 | theContents.add(localReg); 109 | } 110 | 111 | if (cantClaves > 0){ 112 | final int claves = cantClaves; 113 | Collections.sort(theContents, new Comparator() { 114 | @Override 115 | public int compare(Object obj1, Object obj2) { 116 | try { 117 | Field[] campos = obj1.getClass().getDeclaredFields(); 118 | for (int i = 0; i < claves; i++) { 119 | Field f = campos[i]; 120 | Method method = obj1.getClass().getDeclaredMethod(Utils.getGetMethod(f.getName())); 121 | Method method2 = obj2.getClass().getDeclaredMethod(Utils.getGetMethod(f.getName())); 122 | Comparable comparable = (Comparable) method.invoke(obj1); 123 | Comparable comparable2 = (Comparable) method2.invoke(obj2); 124 | int comparation = comparable.compareTo(comparable2); 125 | if (comparation != 0) { 126 | return comparation; 127 | } 128 | } 129 | return 0; 130 | } catch (Exception e) { 131 | 132 | } 133 | return 0; 134 | } 135 | }); 136 | } 137 | 138 | 139 | 140 | 141 | StringBuilder finalBuilder = new StringBuilder(); 142 | for (Object lineas : theContents) { 143 | 144 | StringBuilder builder = new StringBuilder(); 145 | for (Field f : lineas.getClass().getDeclaredFields()) { 146 | try { 147 | Method method = lineas.getClass().getDeclaredMethod(Utils.getGetMethod(f.getName())); 148 | Object results = method.invoke(lineas); 149 | if (results.getClass().isAssignableFrom(Date.class)) { 150 | results = formatDate(results); 151 | } 152 | builder.append(results); 153 | builder.append(Constants.FIELD_SEPARATOR); 154 | } catch (Exception ex) { 155 | Utils.handleException(ex); 156 | } 157 | } 158 | String lineToSave = builder.toString().substring(0, builder.length() - 1); 159 | finalBuilder.append(lineToSave); 160 | finalBuilder.append(Constants.NEW_LINE); 161 | } 162 | 163 | String contents = finalBuilder.toString(); 164 | FileOutputStream fos = new FileOutputStream(myFile.getAbsoluteFile()); 165 | OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fos, StandardCharsets.UTF_8); 166 | BufferedWriter bw = new BufferedWriter(outputStreamWriter); 167 | 168 | bw.write(contents); 169 | bw.close(); 170 | fos.close(); 171 | } catch (Exception ex) { 172 | Utils.handleException(ex); 173 | } 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /src/main/java/com/frre/library/archivos/GeneradorArchivos.java: -------------------------------------------------------------------------------- 1 | package com.frre.library.archivos; 2 | 3 | import com.frre.library.Clave; 4 | import com.frre.library.Generador; 5 | import com.frre.library.Utils; 6 | 7 | import java.io.File; 8 | import java.lang.reflect.Field; 9 | import java.lang.reflect.Method; 10 | import java.util.ArrayList; 11 | import java.util.Collections; 12 | import java.util.Comparator; 13 | import java.util.HashMap; 14 | 15 | /** 16 | * Created by jvargas on 8/20/15. 17 | */ 18 | public final class GeneradorArchivos { 19 | 20 | private GeneradorArchivos() throws InstantiationException { 21 | throw new InstantiationException("This class is not created for instantiation"); 22 | } 23 | 24 | public static void generarArchivo(String nombreArchivo, T registro, int cantRegistros) { 25 | try{ 26 | File archivo = FuncionesDeArchivos.abrir(nombreArchivo, true); 27 | ArrayList registros = new ArrayList(); 28 | 29 | //obtengo primero todos los valores 30 | Field[] campos = registro.getClass().getDeclaredFields(); 31 | HashMap valores = new HashMap(); 32 | for (int j = 0; j < campos.length; j++) { 33 | Field f = campos[j]; 34 | int tope = 2*cantRegistros/100; 35 | int cantValores = Generador.generarEnteroAleatorio(1,tope == 0? cantRegistros : tope); 36 | if (f.getAnnotation(Clave.class)==null){ 37 | cantValores = cantRegistros; 38 | } 39 | OcurrenceLimiter ocurrenceLimiter = new OcurrenceLimiter(cantValores, f.getType()); 40 | 41 | Method method = registro.getClass().getDeclaredMethod(Utils.getSetMethod(f.getName()), f.getType()); 42 | 43 | for (int i = 0; i < cantValores; i++) { 44 | ocurrenceLimiter.add(Utils.getValueAccordingTypeAndMethodName(f.getType(), method.getName())); 45 | } 46 | valores.put(f, ocurrenceLimiter); 47 | } 48 | 49 | int cantClaves = 0; 50 | 51 | for (int i = 0; i < cantRegistros; i++) { 52 | T localReg = (T) registro.getClass().newInstance(); 53 | for (int j = 0; j < campos.length; j++) { 54 | Field f = campos[j]; 55 | Method method = localReg.getClass().getDeclaredMethod(Utils.getSetMethod(f.getName()), f.getType()); 56 | Class tipo = f.getType(); 57 | if (f.getAnnotation(Clave.class)!=null){ 58 | cantClaves+=1; 59 | } 60 | OcurrenceLimiter ocurrenceLimiter = valores.get(f); 61 | int numero = Generador.generarEnteroAleatorio(0, ocurrenceLimiter.getSize() - 1); 62 | method.invoke(localReg, ocurrenceLimiter.get(numero)); 63 | } 64 | registros.add(localReg); 65 | } 66 | 67 | if (cantClaves > 0){ 68 | final int claves = cantClaves; 69 | Collections.sort(registros, new Comparator() { 70 | @Override 71 | public int compare(T obj1, T obj2) { 72 | try { 73 | Field[] campos = obj1.getClass().getDeclaredFields(); 74 | for (int i = 0; i < claves; i++) { 75 | Field f = campos[i]; 76 | Method method = obj1.getClass().getDeclaredMethod(Utils.getGetMethod(f.getName())); 77 | Method method2 = obj2.getClass().getDeclaredMethod(Utils.getGetMethod(f.getName())); 78 | Comparable comparable = (Comparable) method.invoke(obj1); 79 | Comparable comparable2 = (Comparable) method2.invoke(obj2); 80 | int comparation = comparable.compareTo(comparable2); 81 | if (comparation != 0) { 82 | return comparation; 83 | } 84 | } 85 | return 0; 86 | } catch (Exception e) { 87 | 88 | } 89 | return 0; 90 | } 91 | }); 92 | } 93 | for(T theRegister:registros){ 94 | FuncionesDeArchivos.grabar(archivo, theRegister); 95 | } 96 | FuncionesDeArchivos.cerrar(archivo); 97 | } catch (Exception ex) { 98 | Utils.handleException(ex); 99 | } 100 | } 101 | 102 | public static void generarArchivo(String nombreArchivo, T registro, int cantRegistros, final int cantClaves) { 103 | try{ 104 | File archivo = FuncionesDeArchivos.abrir(nombreArchivo, true); 105 | ArrayList registros = new ArrayList(); 106 | 107 | //obtengo primero todos los valores 108 | Field[] campos = registro.getClass().getDeclaredFields(); 109 | HashMap valores = new HashMap(); 110 | for (int j = 0; j < campos.length; j++) { 111 | Field f = campos[j]; 112 | int tope = 2*cantRegistros/100; 113 | int cantValores = Generador.generarEnteroAleatorio(1,tope == 0? cantRegistros : tope); 114 | OcurrenceLimiter ocurrenceLimiter = new OcurrenceLimiter(cantValores, f.getType()); 115 | 116 | Method method = registro.getClass().getDeclaredMethod(Utils.getSetMethod(f.getName()), f.getType()); 117 | 118 | for (int i = 0; i < cantValores; i++) { 119 | ocurrenceLimiter.add(Utils.getValueAccordingTypeAndMethodName(f.getType(), method.getName())); 120 | } 121 | valores.put(f, ocurrenceLimiter); 122 | } 123 | 124 | for (int i = 0; i < cantRegistros; i++) { 125 | T localReg = (T) registro.getClass().newInstance(); 126 | for (int j = 0; j < campos.length; j++) { 127 | Field f = campos[j]; 128 | Method method = localReg.getClass().getDeclaredMethod(Utils.getSetMethod(f.getName()), f.getType()); 129 | Class tipo = f.getType(); 130 | OcurrenceLimiter ocurrenceLimiter = valores.get(f); 131 | int numero = Generador.generarEnteroAleatorio(0, ocurrenceLimiter.getSize()-1); 132 | method.invoke(localReg, ocurrenceLimiter.get(numero)); 133 | } 134 | registros.add(localReg); 135 | } 136 | 137 | if (cantClaves > 0){ 138 | Collections.sort(registros, new Comparator() { 139 | @Override 140 | public int compare(T obj1, T obj2) { 141 | try { 142 | Field[] campos = obj1.getClass().getDeclaredFields(); 143 | for (int i = 0; i < cantClaves; i++) { 144 | Field f = campos[i]; 145 | Method method = obj1.getClass().getDeclaredMethod(Utils.getGetMethod(f.getName())); 146 | Method method2 = obj2.getClass().getDeclaredMethod(Utils.getGetMethod(f.getName())); 147 | Comparable comparable = (Comparable) method.invoke(obj1); 148 | Comparable comparable2 = (Comparable) method2.invoke(obj2); 149 | int comparation = comparable.compareTo(comparable2); 150 | if (comparation != 0) { 151 | return comparation; 152 | } 153 | } 154 | return 0; 155 | } catch (Exception e) { 156 | 157 | } 158 | return 0; 159 | } 160 | }); 161 | } 162 | for(T theRegister:registros){ 163 | FuncionesDeArchivos.grabar(archivo, theRegister); 164 | } 165 | FuncionesDeArchivos.cerrar(archivo); 166 | } catch (Exception ex) { 167 | Utils.handleException(ex); 168 | } 169 | } 170 | 171 | } 172 | -------------------------------------------------------------------------------- /.idea/uiDesigner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /src/main/java/com/frre/library/Utils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | package com.frre.library; 6 | 7 | import java.lang.reflect.Array; 8 | import java.lang.reflect.Field; 9 | import java.lang.reflect.Method; 10 | import java.text.SimpleDateFormat; 11 | import java.util.Arrays; 12 | import java.util.Calendar; 13 | import java.util.Date; 14 | import java.util.GregorianCalendar; 15 | 16 | import com.frre.library.data.Constants; 17 | 18 | /** 19 | * 20 | * @author Cleo 21 | */ 22 | public final class Utils { 23 | 24 | private Utils() throws InstantiationException { 25 | throw new InstantiationException("This class is not created for instantiation"); 26 | } 27 | 28 | public static T tranformAccordingType(Class type, String string) { 29 | 30 | if (type.isAssignableFrom(String.class)) { 31 | return (T) string; 32 | } else if (type.isAssignableFrom(Date.class)) { 33 | String[] date = string.split(Constants.DATE_SEPARATOR); 34 | int year = Integer.parseInt(date[2].trim()); 35 | int month = Integer.parseInt(date[1].trim()); 36 | int day = Integer.parseInt(date[0].trim()); 37 | Date d; 38 | Calendar cal = GregorianCalendar.getInstance(); 39 | cal.set( year, month, day); 40 | d = cal.getTime(); 41 | return (T) d; 42 | } else if (type.isAssignableFrom(Fecha.class)) { 43 | return (T) new Fecha(string.trim()); 44 | } else if (type.isAssignableFrom(double.class) || (type.isAssignableFrom(Double.class))) { 45 | return (T) new Double(string.trim().replaceAll(Constants.COMMA, Constants.DOT)); 46 | } else if (type.isAssignableFrom(float.class) || type.isAssignableFrom(Float.class)) { 47 | return (T) new Float(string.trim().replaceAll(Constants.COMMA, Constants.DOT)); 48 | } else if (type.isAssignableFrom(int.class) || type.isAssignableFrom(Integer.class)) { 49 | //takeout all spaces 50 | return (T) new Integer(string.trim()); 51 | } 52 | return null; 53 | //To change body of generated methods, choose Tools | Templates. 54 | } 55 | 56 | public static T getValueACcordingType(Class type) { 57 | 58 | if (type.isAssignableFrom(String.class)) { 59 | return (T) Generador.generarStringAleatorio(); 60 | } else if (type.isAssignableFrom(Date.class)) { 61 | int year = Generador.generarEnteroAleatorio(1900, 2015); 62 | int month = Generador.generarEnteroAleatorio(1, 12); 63 | int day = Generador.generarEnteroAleatorio(1, 31); 64 | Date d; 65 | Calendar cal = GregorianCalendar.getInstance(); 66 | cal.set( year, month, day); 67 | d = cal.getTime(); 68 | return (T) d; 69 | } else if (type.isAssignableFrom(Fecha.class)) { 70 | int year = Generador.generarEnteroAleatorio(1900, 2015); 71 | int month = Generador.generarEnteroAleatorio(1, 12); 72 | int day = Generador.generarEnteroAleatorio(1, 31); 73 | Date d; 74 | Calendar cal = GregorianCalendar.getInstance(); 75 | cal.set( year, month, day); 76 | d = cal.getTime(); 77 | SimpleDateFormat sm = new SimpleDateFormat("dd/MM/yyyy"); 78 | return (T) new Fecha(sm.format(d)); 79 | } else if (type.isAssignableFrom(double.class) || (type.isAssignableFrom(Double.class))) { 80 | return (T) Generador.generarDecimalAleatorio(0,500); 81 | } else if (type.isAssignableFrom(float.class) || type.isAssignableFrom(Float.class)) { 82 | return (T) new Float(Generador.generarEnteroAleatorio(0, 500)); 83 | } else if (type.isAssignableFrom(int.class) || type.isAssignableFrom(Integer.class)) { 84 | //takeout all spaces 85 | Integer integer = Generador.generarEnteroAleatorio(0, 500); 86 | return (T) integer; 87 | } 88 | return null; 89 | //To change body of generated methods, choose Tools | Templates. 90 | } 91 | 92 | public static T getValueAccordingTypeAndMethodName(Class type, String methodName) { 93 | methodName = methodName.toLowerCase(); 94 | if (type.isAssignableFrom(String.class)) { 95 | if (methodName.contains("nom") && methodName.contains("ap")){ 96 | return (T) String.valueOf(Generador.generarNombreAleatorio()+","+Generador.generarApellidoAleatorio()); 97 | } else if (methodName.contains("apellido")){ 98 | return (T) Generador.generarApellidoAleatorio(); 99 | } else if (methodName.contains("nombre")){ 100 | return (T) Generador.generarNombreAleatorio(); 101 | } else if (methodName.contains("provincia") || methodName.contains("pcia")){ 102 | return (T) Generador.generarPciaAleatorio(); 103 | } else if (methodName.contains("pais") || methodName.contains("country")){ 104 | return (T) Generador.generarPaisAleatorio(); 105 | } else if (methodName.contains("patente") || methodName.contains("pat")){ 106 | return (T) Generador.generarPaisAleatorio(); 107 | } else if (methodName.contains("localidad") || methodName.contains("loc") || methodName.contains("local")){ 108 | return (T) Generador.generarLocalidadAleatorio(); 109 | } else if (methodName.contains("titulo") || methodName.contains("tit") || methodName.contains("materia") || methodName.contains("mat")){ 110 | return (T) Generador.generarPalabraConArticuloAleatoria(); 111 | } 112 | return (T) Generador.generarPalabraSinArticuloAleatoria(); 113 | } else if (type.isAssignableFrom(Date.class)) { 114 | int year = Generador.generarEnteroAleatorio(1900, 2015); 115 | int month = Generador.generarEnteroAleatorio(1, 12); 116 | int day = Generador.generarEnteroAleatorio(1, 31); 117 | Date d; 118 | Calendar cal = GregorianCalendar.getInstance(); 119 | cal.set( year, month, day); 120 | d = cal.getTime(); 121 | return (T) d; 122 | } else if (type.isAssignableFrom(Fecha.class)) { 123 | int year = Generador.generarEnteroAleatorio(1900, 2015); 124 | int month = Generador.generarEnteroAleatorio(1, 12); 125 | int day = Generador.generarEnteroAleatorio(1, 31); 126 | Date d; 127 | Calendar cal = GregorianCalendar.getInstance(); 128 | cal.set( year, month, day); 129 | d = cal.getTime(); 130 | SimpleDateFormat sm = new SimpleDateFormat("dd/MM/yyyy"); 131 | return (T) new Fecha(sm.format(d)); 132 | } else if (type.isAssignableFrom(double.class) || (type.isAssignableFrom(Double.class))) { 133 | return (T) Generador.generarDecimalAleatorio(0,500); 134 | } else if (type.isAssignableFrom(float.class) || type.isAssignableFrom(Float.class)) { 135 | return (T) new Float(Generador.generarEnteroAleatorio(0, 500)); 136 | } else if (type.isAssignableFrom(int.class) || type.isAssignableFrom(Integer.class)) { 137 | //takeout all spaces 138 | Integer integer = Generador.generarEnteroAleatorio(0, 500); 139 | if (methodName.contains("dni")){ 140 | integer = Generador.generarDNIAleatorio(); 141 | } else if (methodName.contains("legajo") || methodName.contains("leg")){ 142 | integer = Generador.generarLegajoAleatorio(); 143 | } 144 | return (T) integer; 145 | } 146 | return null; 147 | //To change body of generated methods, choose Tools | Templates. 148 | } 149 | 150 | public static T[] copyArray(T[] vector){ 151 | T[] another = (T[]) Array.newInstance(vector.getClass().getComponentType(), vector.length); 152 | System.arraycopy(vector, 0, another, 0, vector.length); 153 | return another; 154 | } 155 | 156 | public static String getSetMethod(String fieldName) { 157 | // TODO Auto-generated method stub 158 | String firstWithCapitalLetter = fieldName.toUpperCase().substring(0, 1); 159 | String restOfMethodName = fieldName.substring(1, fieldName.length()); 160 | return Constants.SET + firstWithCapitalLetter + restOfMethodName; 161 | } 162 | 163 | public static String getGetMethod(String fieldName) { 164 | // TODO Auto-generated method stub 165 | String firstWithCapitalLetter = fieldName.toUpperCase().substring(0, 1); 166 | String restOfMethodName = fieldName.substring(1, fieldName.length()); 167 | String methodName = Constants.GET + firstWithCapitalLetter + restOfMethodName; 168 | return methodName; 169 | } 170 | 171 | public static void handleException(Exception ex) { 172 | System.out.println(Constants.EXCEPCION_OCURRIDA_ + ex.getClass().getName()+" "+ex.getMessage()); 173 | } 174 | 175 | public static IBinaryTree buildTree(Class theClass, Object[] inorder, Object[] postorder) { 176 | try { 177 | if (inorder.length == 0) 178 | return null; 179 | if (inorder.length == 1){ 180 | IBinaryTree tree = ((IBinaryTree) theClass.newInstance()); 181 | tree.setValue(inorder[0]); 182 | return tree; 183 | } 184 | // the last item in postorder is root 185 | IBinaryTree root = ((IBinaryTree) theClass.newInstance()); 186 | root.setValue(postorder[postorder.length - 1]); 187 | 188 | int i = inorder.length - 1; 189 | for (; !inorder[i].equals(root.getValue()); i--) 190 | ; 191 | 192 | // inorder.length == postorder.length 193 | if (i < inorder.length - 1) { 194 | root.setRighSon(buildTree(theClass, 195 | Arrays.copyOfRange(inorder, i + 1, inorder.length), 196 | Arrays.copyOfRange(postorder, i, postorder.length - 1))); 197 | } 198 | if (i > 0) { 199 | root.setLeftSon(buildTree(theClass, 200 | Arrays.copyOfRange(inorder, 0, i), 201 | Arrays.copyOfRange(postorder, 0, i))); 202 | } 203 | 204 | return root; 205 | } catch (InstantiationException ex) { 206 | ex.printStackTrace(); 207 | } catch (IllegalAccessException ex) { 208 | ex.printStackTrace(); 209 | } 210 | return null; 211 | } 212 | 213 | public static boolean esMenor(Object obj1, Object obj2) { 214 | return compareTo(obj1, obj2) < 0; 215 | } 216 | 217 | private static int compareTo(Object obj1, Object obj2) { 218 | try { 219 | Object localReg = (Object) obj1.getClass().newInstance(); 220 | int currentFieldNumber = 0; 221 | int claves = 0; 222 | for (Field f : obj1.getClass().getDeclaredFields()) { 223 | if (f.getAnnotation(Clave.class)!=null){ 224 | claves+=1; 225 | } 226 | } 227 | 228 | Field[] campos = obj1.getClass().getDeclaredFields(); 229 | for (int i = 0; i < claves; i++) { 230 | Field f = campos[i]; 231 | Method method = obj1.getClass().getDeclaredMethod(Utils.getGetMethod(f.getName())); 232 | Method method2 = obj2.getClass().getDeclaredMethod(Utils.getGetMethod(f.getName())); 233 | Comparable comparable = (Comparable) method.invoke(obj1); 234 | Comparable comparable2 = (Comparable) method2.invoke(obj2); 235 | int comparation = comparable.compareTo(comparable2); 236 | if (comparation != 0) { 237 | return comparation; 238 | } 239 | } 240 | return 0; 241 | } catch (Exception e) { 242 | 243 | } 244 | return 0; 245 | } 246 | 247 | public static boolean esMayor(Object someString, Object provincia1) { 248 | return compareTo(someString, provincia1) > 0; 249 | } 250 | 251 | public static boolean esIgual(String someString, String provincia1) { 252 | return compareTo(someString, provincia1) == 0; 253 | } 254 | 255 | public static String getType(String type) { 256 | if (type.equalsIgnoreCase("Alfanumerico") || type.equalsIgnoreCase("cadena") || type.equalsIgnoreCase("char")|| type.equalsIgnoreCase("caracter") ){ 257 | return "String"; 258 | } else if (type.equalsIgnoreCase("entero")){ 259 | return "int"; 260 | } else if (type.equalsIgnoreCase("real")){ 261 | return "double"; 262 | } else { 263 | return "boolean"; 264 | } 265 | } 266 | } 267 | -------------------------------------------------------------------------------- /src/main/java/com/frre/practica/isi/algoritmos/genericos/Main.java: -------------------------------------------------------------------------------- 1 | package com.frre.practica.isi.algoritmos.genericos; 2 | 3 | import com.frre.library.Utils; 4 | import org.apache.commons.io.IOUtils; 5 | import org.apache.commons.io.output.StringBuilderWriter; 6 | 7 | import javax.tools.*; 8 | import java.io.*; 9 | import java.lang.reflect.InvocationTargetException; 10 | import java.net.MalformedURLException; 11 | import java.net.URI; 12 | import java.net.URL; 13 | import java.net.URLClassLoader; 14 | import java.util.ArrayList; 15 | import java.util.Arrays; 16 | import java.util.HashMap; 17 | import java.util.Scanner; 18 | 19 | /** 20 | * Created by justo on 04/05/16. 21 | */ 22 | public final class Main { 23 | 24 | public static final String AMBIENTE = "Ambiente"; 25 | public static final String ALGORITMO = "Algoritmo"; 26 | public static final String END_LINE = ";"; 27 | public static final String SPACE = " "; 28 | public static final String NEW_LINE = "\n"; 29 | public static final String FIN_ALGORITMO = "Fin_Algoritmo"; 30 | public static final String ESCRIBIR = "Escribir("; 31 | public static final String LEER = "Leer("; 32 | public static final String SI = "Si("; 33 | public static final String ENTONCES = ")entonces"; 34 | public static final String FIN = "Fin"; 35 | public static final String SINO = "sino"; 36 | private static final String SINO_SI = "sino si"; 37 | public static final String MIENTRAS = "Mientras("; 38 | public static final String HACER = ")hacer"; 39 | public static final String REPETIR = "Repetir"; 40 | public static final String HASTA = "Hasta("; 41 | public static final String PARA = "Para("; 42 | 43 | 44 | public static HashMap theVariables = new HashMap(); 45 | 46 | private Main() throws InstantiationException { 47 | throw new InstantiationException("This class is not created for instantiation"); 48 | } 49 | 50 | public static void main(String[] args) throws IOException { 51 | FileInputStream inputStream = null; 52 | StringWriter writer = null; 53 | try { 54 | inputStream = new FileInputStream("algoritmos/Prueba3.algoritmo"); 55 | writer = new StringWriter(); 56 | PrintWriter out = new PrintWriter(writer); 57 | 58 | String everything = IOUtils.toString(inputStream); 59 | 60 | //public class 61 | addHeader(writer); 62 | 63 | // 64 | tryToExtractVariables(everything, writer); 65 | 66 | //main 67 | tryToExtractAction(everything, writer); 68 | 69 | //final { 70 | addFooter(writer); 71 | } catch (Exception e) { 72 | e.printStackTrace(); 73 | } finally { 74 | inputStream.close(); 75 | try { 76 | writer.close(); 77 | } catch (Exception ex) {/*ignore*/} 78 | } 79 | 80 | compilationAndExec(writer); 81 | 82 | } 83 | 84 | private static void compilationAndExec(StringWriter writer) throws MalformedURLException { 85 | JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); 86 | DiagnosticCollector diagnostics = new DiagnosticCollector(); 87 | 88 | JavaFileObject file = new JavaSourceFromString("Prueba", writer.toString()); 89 | 90 | Iterable compilationUnits = Arrays.asList(file); 91 | JavaCompiler.CompilationTask task = compiler.getTask(null, null, diagnostics, null, null, compilationUnits); 92 | 93 | boolean success = task.call(); 94 | 95 | System.out.println(writer.toString()); 96 | System.out.println("Estado Compilacion: " + (success?"Correcto":"Incorrecto revisar algoritmo")); 97 | 98 | if (success) { 99 | try { 100 | 101 | URLClassLoader classLoader = URLClassLoader.newInstance(new URL[]{new File("").toURI().toURL()}); 102 | Class.forName("Prueba", true, classLoader).getDeclaredMethod("main", new Class[]{String[].class}).invoke(null, new Object[]{null}); 103 | 104 | } catch (ClassNotFoundException e) { 105 | System.err.println("Class not found: " + e); 106 | } catch (NoSuchMethodException e) { 107 | System.err.println("No such method: " + e); 108 | } catch (IllegalAccessException e) { 109 | System.err.println("Illegal access: " + e); 110 | } catch (InvocationTargetException e) { 111 | System.err.println("Invocation target: " + e); 112 | } 113 | } 114 | } 115 | 116 | private static void tryToExtractVariables(String everything, Writer writer) throws IOException { 117 | String ambiente = everything.substring(getPositionOf(AMBIENTE, everything) + AMBIENTE.length(), getPositionOf(ALGORITMO, everything)); 118 | ambiente = ambiente.trim(); 119 | String[] variables = ambiente.split(";"); 120 | 121 | writer.write(" static Scanner sc = new Scanner(System.in); \n"); 122 | 123 | for (int i = 0; i < variables.length; i++) { 124 | String[] variable = variables[i].split(":"); 125 | String name = variable[0].trim(); 126 | String dataType = Utils.getType(variable[1].trim()); 127 | 128 | theVariables.put(name, dataType); 129 | 130 | writer.write(" static " + dataType + SPACE + name + END_LINE + NEW_LINE); 131 | } 132 | } 133 | 134 | private static int getPositionOf(String ambiente, String everything) { 135 | if (everything.indexOf(ambiente) != -1) { 136 | return everything.indexOf(ambiente); 137 | } else { 138 | return everything.indexOf(ambiente.toLowerCase()); 139 | } 140 | } 141 | 142 | private static void addFooter(Writer writer) throws IOException { 143 | writer.write("}"); 144 | } 145 | 146 | private static void addHeader(Writer writer) throws IOException { 147 | writer.write("import java.util.*; \n"); 148 | writer.write("public class Prueba { \n \n"); 149 | writer.write("//ambiente \n \n"); 150 | } 151 | 152 | private static void tryToExtractAction(String everything, Writer writer) throws IOException { 153 | String algoritmo = everything.substring(getPositionOf(ALGORITMO, everything) + ALGORITMO.length(), getPositionOf(FIN_ALGORITMO, everything)); 154 | String[] actions = algoritmo.replaceAll(";", "").split("\n"); 155 | 156 | writer.write("//algoritmo \n"); 157 | writer.write("public static void main(String[] args){ \n"); 158 | 159 | int i = 0; 160 | ArrayList pilaAcciones = new ArrayList(); 161 | while (i < actions.length) { 162 | String line = actions[i].trim(); 163 | line = line.replace(" mod ", " % "); 164 | if (!detectAction(line, writer)) { 165 | specialAction(line, writer, pilaAcciones); 166 | } 167 | i++; 168 | } 169 | 170 | writer.write("}\n"); 171 | 172 | 173 | } 174 | 175 | private static void specialAction(String line, Writer writer, ArrayList pilaAcciones) throws IOException { 176 | if (line.contains(SI) && line.contains(ENTONCES) && !line.contains(SINO)) { 177 | String logic = line.substring(getPositionOf(SI, line) + SI.length(), getPositionOf(ENTONCES, line)); 178 | logic = logic.replaceAll(" = ", " == ").replaceAll(" <> ", " != "); 179 | logic = replaceWithEquals(logic); 180 | writer.write("if (" + logic + "){\n"); 181 | } else if (line.contains(FIN)) { 182 | writer.write("}\n"); 183 | }else if (line.contains(REPETIR)) { 184 | writer.write("do { \n"); 185 | } else if (line.trim().equalsIgnoreCase(SINO)) { 186 | writer.write("} else { \n"); 187 | } else if (line.trim().equalsIgnoreCase(SINO_SI)) { 188 | String logic = line.substring(getPositionOf(SI, line) + SI.length(), getPositionOf(ENTONCES, line)); 189 | logic = logic.replaceAll(" = ", " == ").replaceAll(" <> ", " != "); 190 | logic = replaceWithEquals(logic); 191 | writer.write("} else if (" + logic + "){\n"); 192 | } else if (line.contains(HASTA) && line.contains(")")){ 193 | String logic = line.substring(getPositionOf(HASTA, line) + HASTA.length(), getPositionOf(")", line)); 194 | logic = logic.replaceAll(" = ", " == ").replaceAll(" <> ", " != "); 195 | logic = replaceWithEquals(logic); 196 | writer.write(" } while (" + logic + ");\n"); 197 | } else if (line.contains(PARA) && line.contains(")hacer")){ 198 | String logic = line.substring(getPositionOf(HASTA, line) + HASTA.length(), getPositionOf(")", line)); 199 | String[] actions = logic.split(","); 200 | String letter = actions[0].split("hasta")[0].split("=")[0].trim(); 201 | String init = actions[0].split("hasta")[0].split("=")[1].trim(); 202 | String tope = actions[0].split("hasta")[1].trim(); 203 | String aumento = actions[1].substring(actions[1].indexOf(letter)+letter.length()).trim(); 204 | if (aumento.contains("=")){ 205 | aumento = aumento.replace(":=","="); 206 | } 207 | writer.write("for("+letter+"="+init+";"+letter+" < "+tope+";"+letter+aumento+") { \n"); 208 | } 209 | } 210 | 211 | private static String replaceWithEquals(String logic) { 212 | StringBuilder builder = new StringBuilder(); 213 | if (logic.contains(" and ")) { 214 | String[] actions = logic.split(" and "); 215 | for (int i = 0; i < actions.length; i++) { 216 | String subline = actions[i]; 217 | if (subline.contains(" or ")) { 218 | String[] ires = subline.split(" or "); 219 | for (int j = 0; j < ires.length; j++) { 220 | String[] line = ires[j].split(" == "); 221 | if (line.length > 1 && theVariables.get(line[0]) != null && theVariables.get(line[0]).trim().equalsIgnoreCase("String")) { 222 | builder.append(line[0].trim() + ".equalsIgnoreCase(" + line[1].trim() + ")"); 223 | } else { 224 | builder.append(ires[j]); 225 | } 226 | if (j != ires.length-1){ 227 | builder.append(" || "); 228 | } 229 | } 230 | } else { 231 | String[] line = subline.split(" == "); 232 | if (line.length > 1 && theVariables.get(line[0]) != null && theVariables.get(line[0]).trim().equalsIgnoreCase("String")) { 233 | builder.append(line[0].trim() + ".equalsIgnoreCase(" + line[1].trim() + ")"); 234 | } else { 235 | builder.append(subline); 236 | } 237 | } 238 | if (i != actions.length-1){ 239 | builder.append(" && "); 240 | } 241 | } 242 | } else if (logic.contains(" or ")) { 243 | String[] actions = logic.split(" or "); 244 | for (int i = 0; i < actions.length; i++) { 245 | String subline = actions[i]; 246 | String[] line = subline.split(" == "); 247 | if (line.length > 1 && theVariables.get(line[0]) != null && theVariables.get(line[0]).trim().equalsIgnoreCase("String")) { 248 | logic.replaceAll(subline, line[0].trim() + ".equalsIgnoreCase(" + line[1].trim() + ")"); 249 | } else { 250 | builder.append(subline); 251 | } 252 | if (i != actions.length-1){ 253 | builder.append(" || "); 254 | } 255 | } 256 | } else { 257 | String subline = logic; 258 | String[] line = subline.split(" == "); 259 | if (line.length > 1 && theVariables.get(line[0]) != null && theVariables.get(line[0]).trim().equalsIgnoreCase("String")) { 260 | logic.replaceAll(subline, line[0].trim() + ".equalsIgnoreCase(" + line[1].trim() + ")"); 261 | } else { 262 | builder.append(subline); 263 | } 264 | } 265 | 266 | return builder.toString(); 267 | } 268 | 269 | private static boolean detectAction(String line, Writer writer) throws IOException { 270 | if (line.contains(ESCRIBIR) || line.contains(ESCRIBIR.toLowerCase())) { 271 | String titAMostrar = line.substring(getPositionOf(ESCRIBIR, line) + ESCRIBIR.length(), getPositionOf(")", line)); 272 | if (titAMostrar.contains(",\"")) { 273 | String[] concat = titAMostrar.split(","); 274 | writer.write("System.out.println("); 275 | for (int i = 0; i < concat.length; i++) { 276 | writer.write(concat[i]); 277 | if (i != concat.length - 1) { 278 | writer.write("+"); 279 | } 280 | } 281 | writer.write("); \n"); 282 | } else { 283 | writer.write("System.out.println(" + titAMostrar + "); \n"); 284 | } 285 | return true; 286 | } else if (line.contains(LEER) || line.contains(LEER.toLowerCase())) { 287 | String titALeer = line.substring(getPositionOf(LEER, line) + LEER.length(), getPositionOf(")", line)); 288 | if (titALeer.contains(",")) { 289 | String[] vars = titALeer.split(","); 290 | for (int i = 0; i < vars.length; i++) { 291 | writer.write(vars[i] + " = sc.next" + getTypeForInput(vars[i].trim()) + "();\n"); 292 | } 293 | } else { 294 | writer.write(titALeer + " = sc.next" + getTypeForInput(titALeer) + "();\n"); 295 | } 296 | return true; 297 | } else if (line.contains(":=") && !line.contains(PARA)) { 298 | String[] assigns = line.split(":="); 299 | writer.write(assigns[0].trim() + SPACE + "=" + SPACE + assigns[1].trim() + ";\n"); 300 | return true; 301 | } 302 | return false; 303 | } 304 | 305 | private static String getTypeForInput(String var) { 306 | if (theVariables.get(var).equalsIgnoreCase("String")) { 307 | return ""; 308 | } 309 | String name = theVariables.get(var); 310 | StringBuilder sb = new StringBuilder(); 311 | sb.append(name.substring(0, 1).toUpperCase()); 312 | sb.append(name.substring(1).toLowerCase()); 313 | return sb.toString(); 314 | } 315 | 316 | 317 | } 318 | 319 | class JavaSourceFromString extends SimpleJavaFileObject { 320 | private final String code; 321 | 322 | JavaSourceFromString(String name, String code) { 323 | super(URI.create("string:///" + name.replace('.', '/') + Kind.SOURCE.extension), Kind.SOURCE); 324 | this.code = code; 325 | } 326 | 327 | @Override 328 | public CharSequence getCharContent(boolean ignoreEncodingErrors) { 329 | return code; 330 | } 331 | } 332 | -------------------------------------------------------------------------------- /Musimundo: -------------------------------------------------------------------------------- 1 | 9:9:38874701:Ginés:67:1.4 2 | 15:8:35279495:Milagros:15:1.33 3 | 0:6:32523569:Luis:58:9.16 4 | 12:8:37560213:Rahma:23:3.3 5 | 9:3:35947073:Víctor Manuel:49:8.84 6 | 14:9:38426218:Rosario:58:9.0 7 | 14:7:34662944:Ainhoa:84:3.89 8 | 11:10:37412417:José María:81:10.43 9 | 13:2:32897260:Raquel:21:2.56 10 | 12:5:35286113:Samira:49:9.26 11 | 14:3:33001085:Julio:73:9.91 12 | 3:2:31565842:Sonsoles:88:4.93 13 | 2:1:34649544:Ainara:28:7.38 14 | 2:4:32788475:Héctor:20:2.1 15 | 4:4:38969088:Enrique:34:4.2 16 | 12:3:34556285:Rafaela:53:7.39 17 | 2:10:30971566:Marta:16:9.1 18 | 9:3:34896146:Ascensión:53:8.62 19 | 14:4:37008972:Mimoun:63:5.25 20 | 3:8:34939139:Elena:65:3.17 21 | 9:6:34564762:Patricia:53:3.81 22 | 9:10:34415935:Iratxe:97:7.79 23 | 15:2:38717573:Magdalena:21:2.98 24 | 14:4:36133020:Blanca:76:8.33 25 | 7:3:37002718:Héctor:64:6.27 26 | 15:3:39631461:Carmen:88:2.15 27 | 9:0:39885319:Joan:86:5.59 28 | 1:3:36384454:Francesc:66:4.53 29 | 15:10:33081708:Joseba:49:8.65 30 | 14:4:30832513:Alba:81:1.38 31 | 5:1:36523979:Víctor:41:8.5 32 | 14:9:34269316:María Asunción:74:5.98 33 | 15:9:31216252:Fátima Sohora:93:2.78 34 | 0:1:32281143:Iván:85:7.53 35 | 0:2:33423936:Fuensanta:54:8.33 36 | 8:6:34764827:Malika:28:7.4 37 | 0:4:30765391:Manuela:38:6.39 38 | 0:3:39760208:Asier:33:9.47 39 | 2:1:36325772:Sara:98:4.3 40 | 1:1:35936544:María Carmen:99:7.34 41 | 0:5:36063846:Enrique:66:6.51 42 | 7:7:31280664:Josep:23:7.33 43 | 4:2:37982982:Diego:41:1.33 44 | 10:7:36694181:María Carmen:56:1.9 45 | 0:8:34726315:Roberto:58:9.66 46 | 2:0:32401404:Amparo:70:6.13 47 | 1:2:38093769:Juana:25:7.97 48 | 9:5:36022041:Omar:81:7.93 49 | 3:3:33253219:Isabel María:98:6.53 50 | 4:1:36915129:Verónica:49:10.59 51 | 11:6:31655231:Marina:23:3.7 52 | 13:5:39725014:José:98:8.8 53 | 11:1:36834182:Agustín:49:4.7 54 | 9:2:38067849:Miguel Ángel:24:10.61 55 | 2:9:31609871:María Cruz:32:4.1 56 | 13:7:34399518:Francesc:43:10.31 57 | 9:5:38068547:Ángela:17:1.97 58 | 6:1:34880031:María Victoria:31:6.33 59 | 3:3:31399436:Ainara:21:9.48 60 | 13:9:32262422:María Teresa:21:7.99 61 | 8:9:33657099:Rachid:83:9.19 62 | 2:3:39965961:Ángel:52:1.21 63 | 12:8:39735108:Susana:15:7.1 64 | 0:7:37002171:Ahmed:57:4.9 65 | 14:0:35735425:María Ángeles:27:9.5 66 | 10:2:33880045:Javier:60:6.18 67 | 1:6:37869177:Merce:92:1.37 68 | 2:5:39078459:Josep:86:8.91 69 | 0:7:37983396:Carmen Rosa:46:8.21 70 | 3:1:37934917:Juana María:64:5.26 71 | 4:5:40053368:Sohora:78:4.57 72 | 6:7:32965652:Antonio Jesús:31:3.95 73 | 9:9:30309666:María Jesús:97:7.21 74 | 4:10:37637340:Elvira:88:1.6 75 | 9:4:33163004:Benito:74:6.39 76 | 11:8:34796497:Josefina:99:4.53 77 | 14:9:37554049:María Pilar:36:7.88 78 | 1:9:35299667:Habiba:41:3.78 79 | 14:3:31083836:María Carme:98:7.54 80 | 4:2:37193349:Marc:19:5.44 81 | 0:7:31709478:Amparo:77:1.55 82 | 11:3:39671223:Pau:84:6.55 83 | 3:9:35547831:Erhimo:20:2.65 84 | 9:3:39900324:Noelia:31:7.9 85 | 2:10:34735868:Elvira:32:9.72 86 | 8:7:39428289:Anna:17:6.47 87 | 4:9:33475733:Miquel:69:4.4 88 | 3:6:34097549:Xavier:35:6.16 89 | 12:9:31464039:María Victoria:97:4.24 90 | 9:5:33210834:Purificación:64:4.47 91 | 13:6:33347314:Rafael:70:1.52 92 | 1:5:36645316:Mario:21:7.44 93 | 10:6:38198036:Rubén:80:10.95 94 | 2:7:39081733:Alí:52:7.7 95 | 0:7:40114485:Rosa:81:3.6 96 | 15:3:31121037:Aicha:47:3.33 97 | 3:0:36603678:Asunción:91:8.36 98 | 9:5:36796349:Maialen:94:2.19 99 | 10:6:33374626:Itziar:95:1.27 100 | 1:8:33402756:Jaime:52:2.23 101 | 10:5:30293762:Malika:26:1.9 102 | 15:7:37018285:Trinidad:62:4.6 103 | 2:5:38316375:Pascual:55:9.81 104 | 11:1:37544131:Carmen:80:10.98 105 | 10:8:40096708:Marcos:15:8.54 106 | 6:3:34341932:Leire:27:3.6 107 | 7:3:38346438:Jaume:26:5.79 108 | 10:6:30779623:María Antonia:53:7.6 109 | 3:2:37428439:Lluis:81:1.92 110 | 7:3:33917675:Elvira:54:9.79 111 | 0:6:37204602:Alba:22:1.26 112 | 3:9:35677592:Laila:81:9.18 113 | 10:8:38455616:Ricardo:68:5.27 114 | 4:10:38905931:Celia:67:1.13 115 | 14:6:38314813:Teresa:18:5.82 116 | 0:2:35380778:Manuela:57:10.97 117 | 11:7:37099315:Francisco:71:2.85 118 | 2:8:30246789:Santiago:99:4.27 119 | 14:1:36807870:Cristina:77:8.73 120 | 10:8:35423196:Estibaliz:71:10.98 121 | 11:6:36949679:Irene:75:8.95 122 | 1:6:36922480:Rahma:99:3.58 123 | 2:4:36839608:Ignacio:90:10.62 124 | 14:1:36009909:Aritz:63:8.71 125 | 6:1:30329564:Samira:50:7.47 126 | 2:8:34130370:María Pilar:80:3.56 127 | 5:4:32971798:Adriá:87:7.41 128 | 1:1:30886190:Francisca:32:5.89 129 | 7:7:30929452:María Paz:28:1.23 130 | 0:8:32532780:Salvador:54:4.13 131 | 9:5:35172348:Laila:88:10.2 132 | 9:2:39918424:Ana:97:10.99 133 | 1:3:37400086:Dolors:45:9.66 134 | 2:2:35979438:Guadalupe:59:9.58 135 | 4:1:31177111:Carmen Delia:81:7.77 136 | 2:8:38734658:José Antonio:27:3.86 137 | 7:9:39820582:Vicente:75:9.83 138 | 8:5:35179723:Ahmed:15:8.47 139 | 14:1:32789548:Ángela:30:8.7 140 | 1:1:37729950:Unai:20:1.2 141 | 3:1:39878282:María Paz:90:9.33 142 | 9:5:38829777:María Luisa:19:2.25 143 | 12:5:37942390:Sebastián:67:6.26 144 | 4:5:35133209:Juliana:23:9.87 145 | 15:5:38376016:Rocío:25:6.82 146 | 1:0:35478160:Celsa:90:2.6 147 | 5:2:30220385:Jesús María:78:10.95 148 | 1:1:36486174:Alicia:36:5.74 149 | 1:6:37215746:Isabel:74:8.14 150 | 9:2:31690253:Alberto:68:3.0 151 | 8:5:34281292:María Lourdes:97:2.83 152 | 6:2:34249405:Andrea:84:3.1 153 | 8:2:36724987:Irati:49:10.81 154 | 3:10:33138682:Luis:62:3.46 155 | 14:6:33139380:José Carlos:93:9.52 156 | 1:4:30720053:María África:69:6.67 157 | 5:2:39127050:Olatz:86:3.91 158 | 0:3:34375981:Pedro:90:10.21 159 | 11:8:34774500:Irene:74:6.85 160 | 2:2:34458371:María Antonia:91:4.19 161 | 10:1:32905372:Laura:18:4.56 162 | 1:6:34060083:Eneko:58:8.52 163 | 12:1:35315521:Cristian:94:7.24 164 | 4:10:36924958:Yamina:67:5.84 165 | 7:1:31860704:Xavier:49:1.56 166 | 3:7:35561704:Iñaki:64:9.99 167 | 15:7:37455434:Manuel Jesús:37:2.61 168 | 14:10:35006745:Marta:23:5.26 169 | 0:10:38973243:Nerea:26:10.71 170 | 8:9:34402252:Purificación:90:8.77 171 | 1:4:34210853:Pedro:70:1.3 172 | 14:9:38282491:Eduardo:35:1.2 173 | 14:7:30686163:Andrea:98:2.74 174 | 11:9:31146716:César:91:8.93 175 | 15:10:30398236:Camilo:65:5.2 176 | 1:3:39980294:Sonia:69:5.28 177 | 12:0:36518768:Unai:81:10.88 178 | 4:4:30879298:Pilar:46:6.34 179 | 7:2:36168367:Francisco Manuel:48:2.88 180 | 13:0:36822794:Ana María:60:2.46 181 | 4:0:31045414:Raúl:80:6.36 182 | 4:5:33704627:Felipe:23:7.36 183 | 5:5:37378443:Alex:80:7.4 184 | 4:1:35043309:Anna:60:3.5 185 | 12:8:37796855:Karim:44:3.52 186 | 6:10:35027789:Rosa María:50:7.48 187 | 10:2:31598449:Josefa:57:1.26 188 | 15:5:37936145:Itziar:68:2.26 189 | 12:9:34936765:Isabel:40:1.1 190 | 5:7:34425250:Juan Antonio:90:2.88 191 | 8:0:38784778:Rahma:28:5.38 192 | 2:0:33038938:María Pino:73:7.26 193 | 5:5:35218395:Ángela:39:1.14 194 | 6:8:30618044:Samir:52:10.4 195 | 15:2:39698446:César:42:6.89 196 | 7:6:40127683:Adriá:98:5.39 197 | 0:1:37913948:Mercedes:36:5.84 198 | 12:0:37844949:Francisco Javier:58:6.88 199 | 4:4:36497884:Mustafa:30:9.22 200 | 15:1:33507796:Xavier:86:6.56 201 | 6:4:30168509:Julio:36:10.96 202 | 10:1:37744075:Juan Luis:19:8.9 203 | 12:0:36839820:Gerard:85:4.56 204 | 14:3:35123370:Mercedes:99:4.81 205 | 8:3:38601006:Maider:80:6.57 206 | 8:9:36049318:Montserrat:47:5.93 207 | 13:9:30769705:Pedro:88:4.4 208 | 7:7:35008058:Santiago:49:4.9 209 | 10:7:38039198:Aurora:85:4.68 210 | 9:7:34057342:Blanca:42:7.8 211 | 12:7:32738082:Fuensanta:98:8.79 212 | 6:10:37429819:Aitor:57:9.9 213 | 7:6:38247482:Laura:44:8.66 214 | 9:3:30740004:Felisa:72:4.22 215 | 12:0:35505976:Diego:85:1.95 216 | 3:0:33126103:Erhimo:40:8.48 217 | 10:0:32117743:Benito:48:9.45 218 | 0:10:36839668:Iván:80:8.11 219 | 13:9:33575962:Iria:22:10.95 220 | 13:1:37880918:María Lourdes:95:10.3 221 | 5:5:36437822:Celia:71:5.16 222 | 1:0:35411612:Jordi:78:5.48 223 | 8:1:35623540:Rosario:47:10.16 224 | 1:2:32914815:Oriol:46:8.4 225 | 13:7:38531910:Patricia:55:9.96 226 | 0:1:30180613:María Rosa:74:4.47 227 | 3:4:38392943:Rosa María:29:8.92 228 | 3:4:32197123:José Juan:98:7.11 229 | 14:0:36138632:David:32:8.2 230 | 9:2:34095988:Francisco Javier:78:6.65 231 | 12:2:33886490:Salma:67:10.5 232 | 3:0:32170752:Juan Manuel:19:10.18 233 | 5:8:39960858:Patricia:36:4.81 234 | 11:8:31747428:Gloria:94:6.26 235 | 11:2:32712942:Aina:98:8.96 236 | 14:8:33217366:Ricardo:60:10.25 237 | 2:1:35412630:Salma:37:10.1 238 | 12:10:34436603:Asunción:47:9.4 239 | 15:3:32504456:José:52:3.93 240 | 5:5:33821714:Sergio:52:10.38 241 | 2:3:36921204:Juliana:92:9.68 242 | 7:3:39578783:Ana:74:8.61 243 | 6:2:37464839:Ascensión:80:5.13 244 | 12:3:35146813:Ana Belén:21:6.82 245 | 1:10:32692827:María:28:7.21 246 | 10:7:31652459:Begoña:70:6.78 247 | 12:2:37580926:Diego:65:2.44 248 | 7:0:39531783:Maialen:54:9.29 249 | 12:7:38994079:Dolores:44:7.12 250 | 7:5:39405723:Xabier:42:3.36 251 | 1:7:37482332:Isabel María:32:2.32 252 | 5:4:37014558:Julio:61:9.79 253 | 12:8:30782124:Amaia:37:3.21 254 | 7:8:38484328:Samuel:39:10.64 255 | 1:6:35521759:María Luz:73:5.8 256 | 8:3:35309725:María Asunción:63:9.19 257 | 15:6:32515303:Anna:74:6.28 258 | 15:6:32824537:Naima:59:5.8 259 | 9:6:31387359:María Cruz:65:10.53 260 | 2:9:38109034:María Antonia:60:4.45 261 | 5:1:35316285:Laura:53:4.25 262 | 6:10:37033215:Carlos:32:8.55 263 | 9:3:39912895:María Magdalena:56:2.39 264 | 10:7:39015208:Imanol:73:5.25 265 | 10:1:31954973:Rubén:84:5.9 266 | 8:2:30336772:África:73:2.94 267 | 4:3:39299447:Ángeles:67:2.57 268 | 14:8:37118445:Francisco José:82:3.6 269 | 9:4:37599623:Javier:50:3.0 270 | 6:9:34876345:Martín:50:9.45 271 | 15:7:38920869:Mohamed:26:1.38 272 | 3:2:37917625:Aina:26:3.5 273 | 2:9:32805936:Juana:74:3.86 274 | 13:6:37839729:Álvaro:53:6.64 275 | 11:2:34966522:Abdeselam:31:4.33 276 | 14:6:37276028:María Isabel:65:5.12 277 | 3:9:36264085:María Mar:71:5.2 278 | 2:1:32158678:Amaia:95:8.31 279 | 10:10:32120441:Juan María:53:3.52 280 | 10:0:31609274:José Miguel:20:6.89 281 | 0:0:32211843:Ángel:56:3.65 282 | 4:10:39325454:Alejandro:99:2.62 283 | 12:9:35258227:Julián:50:8.69 284 | 5:5:32253318:Yasmina:55:4.8 285 | 7:9:36203169:Sagrario:49:6.11 286 | 8:9:39806850:Alfonso:86:8.34 287 | 7:2:34840134:José Carlos:56:2.41 288 | 5:7:36450080:Alex:67:10.2 289 | 3:5:36310748:Fátima:93:5.36 290 | 0:7:39651188:María Rocío:77:2.89 291 | 7:10:31057548:Yamina:47:9.5 292 | 15:5:35844452:Sara:22:1.27 293 | 12:2:36052937:Yamina:80:3.21 294 | 15:10:34901267:Pablo:20:8.0 295 | 10:4:36979895:Ana Belén:78:5.4 296 | 3:5:35879896:Juan Antonio:49:5.61 297 | 7:0:35072369:Ana Isabel:25:2.1 298 | 1:1:38016150:Consuelo:44:4.2 299 | 9:2:36114675:Cristina:78:7.44 300 | 4:3:38710505:Amparo:43:8.64 301 | 4:9:36939519:Candelaria:36:3.51 302 | 2:0:35623386:Iván:44:2.58 303 | 3:1:35974653:Gregorio:59:3.42 304 | 15:9:39676715:Pino:85:8.23 305 | 15:5:33604780:Dunia:68:8.96 306 | 2:8:37607872:Celso:15:4.78 307 | 4:5:30887479:Leire:66:3.21 308 | 7:8:32116339:Mimount:50:6.26 309 | 0:10:30968019:Ginés:58:2.36 310 | 10:7:36207406:Asunción:88:1.3 311 | 9:0:35539798:Paula:45:4.97 312 | 15:5:31845692:María Lourdes:15:8.52 313 | 2:6:31376807:Juan María:93:1.32 314 | 2:6:32957065:Pablo:69:4.7 315 | 1:2:30932234:Celia:73:3.5 316 | 7:8:38378617:María Concepción:49:7.92 317 | 13:9:31238025:Magdalena:68:2.95 318 | 6:4:35172037:Alejandro:77:10.1 319 | 6:6:30878677:Camilo:89:7.94 320 | 11:8:37058757:Sandra:45:10.39 321 | 11:10:34779183:Salvador:76:2.46 322 | 10:5:30822930:María Dolors:56:2.59 323 | 4:4:34224784:Cristian:33:3.41 324 | 8:5:34782764:Agustina:99:5.39 325 | 15:0:35665512:Bernardo:95:4.47 326 | 5:0:39602524:Eva María:29:2.93 327 | 11:2:34867791:Unai:84:5.85 328 | 7:0:33412397:Juan Antonio:22:7.17 329 | 13:3:34444020:José Luis:95:8.58 330 | 2:7:35153413:José Luis:20:5.73 331 | 11:7:30524973:Miguel:90:3.77 332 | 12:9:32342936:Mireia:79:3.21 333 | 14:4:32295255:Encarnación:60:2.44 334 | 12:5:36379194:Julián:31:8.58 335 | 0:10:34545434:Mimount:68:7.73 336 | 14:2:31968757:María Prado:94:7.23 337 | 3:3:33247030:María Paz:40:9.48 338 | 5:0:37341560:Nabil:36:10.46 339 | 12:3:32281610:Leire:29:2.26 340 | 9:2:36291120:Tomas:57:4.51 341 | 10:4:39419329:Rosa María:21:7.8 342 | 0:5:33514178:Jonathan:96:6.85 343 | 14:7:38822879:Karima:39:6.9 344 | 13:7:37955367:Samuel:95:10.97 345 | 8:5:35099127:María Rosario:66:6.49 346 | 2:10:35830504:Isabel:84:4.75 347 | 9:4:32956031:Sergi:47:3.97 348 | 6:5:32773301:Antonio Manuel:30:7.22 349 | 12:0:30128481:Gloria:88:10.27 350 | 11:5:34989726:Vicente:89:8.64 351 | 7:0:30216968:María Carmen:47:2.33 352 | 14:5:38053751:Abdelkader:36:5.71 353 | 14:3:34782462:Mariam:86:4.96 354 | 13:5:35972751:Bárbara:28:8.45 355 | 4:8:30239272:Carolina:92:4.83 356 | 13:3:34801168:Francisco Manuel:36:4.36 357 | 3:2:35788709:Ana Isabel:52:7.36 358 | 11:3:32660117:Aurora:97:1.3 359 | 12:8:32892786:Ismael:37:3.46 360 | 9:0:36343315:Jesús María:63:1.78 361 | 13:7:33113505:Sonia:43:6.83 362 | 9:3:31384623:Juan Carlos:95:6.63 363 | 3:1:31234931:Juan José:25:8.51 364 | 11:10:34275076:Catalina:48:1.75 365 | 14:8:30524717:María Cinta:83:6.62 366 | 11:2:33559687:Pino:68:3.92 367 | 1:5:38853531:Luis:95:9.7 368 | 1:8:32612211:Joaquina:90:6.87 369 | 2:9:32031944:Nuria:60:1.11 370 | 7:3:37902421:Arnau:89:1.21 371 | 0:7:37088398:Adriá:58:8.32 372 | 5:1:36112030:María Lourdes:94:4.99 373 | 7:6:36141580:Adam:27:2.72 374 | 13:5:34944476:María Llanos:78:1.41 375 | 6:5:33537890:Naima:23:3.5 376 | 8:2:35775081:Alí:94:8.13 377 | 9:8:40136096:Pedro:71:4.68 378 | 10:10:36065960:Natividad:84:8.38 379 | 1:6:32066348:Laura:66:6.76 380 | 12:3:37963141:Joan:58:4.51 381 | 7:9:37545828:Mariam:62:10.46 382 | 12:10:32071065:Gabriel:38:8.61 383 | 11:3:34577004:Carles:99:9.46 384 | 4:5:33032802:Bernardo:37:9.97 385 | 13:8:31191940:Sandra:58:8.71 386 | 10:6:36109768:José Javier:63:10.71 387 | 10:8:34302464:Soraya:84:9.31 388 | 1:2:39564107:Maite:16:1.75 389 | 8:5:39647741:Ricardo:76:7.71 390 | 6:7:31758395:Leyre:92:1.52 391 | 12:9:34615100:Pablo:27:9.51 392 | 0:9:34471668:Salma:86:7.21 393 | 0:3:35421251:Emilia:56:3.35 394 | 2:4:32480783:Lluis:92:6.1 395 | 4:6:36089199:Cristina:86:9.91 396 | 8:8:37448858:María Magdalena:57:7.97 397 | 3:9:33621069:Miquel:83:2.5 398 | 0:10:36241579:Francisca:50:5.22 399 | 11:0:30187273:Josefina:34:2.28 400 | 1:3:37188447:Eduardo:75:9.82 401 | 5:1:39673216:María Amparo:77:5.25 402 | 0:1:38054868:Jonathan:24:6.42 403 | 13:2:32220624:Eva:91:7.34 404 | 11:5:30952024:Gabriel:56:6.43 405 | 0:7:38713279:Abdelkader:28:6.29 406 | 3:5:37539561:Ane:45:1.19 407 | 11:3:34681675:Silvia:59:3.74 408 | 14:9:33816734:Mireia:80:10.32 409 | 9:6:33608396:Francisco Manuel:49:1.9 410 | 0:6:30134691:Joaquina:43:3.22 411 | 12:1:36128014:Marc:79:1.32 412 | 6:3:31823844:Alí:55:7.42 413 | 6:8:35786111:Teresa:27:4.61 414 | 13:2:35299953:Celso:58:8.63 415 | 12:5:35400732:Pedro:64:1.39 416 | 4:0:36088131:Bartolomé:57:2.21 417 | 15:5:36044588:Alí:65:3.15 418 | 5:7:37391255:Amparo:92:7.1 419 | 6:4:38022051:Itziar:31:1.98 420 | 6:8:40043624:Ana:20:7.26 421 | 9:3:35562203:Bernardo:85:5.72 422 | 9:3:31067818:Francisco José:58:8.73 423 | 0:10:32511610:Luis Angel:72:4.65 424 | 3:2:32621806:Elena:61:6.35 425 | 7:1:32112952:Mónica:70:7.43 426 | 8:1:33767250:Fernando:76:5.91 427 | 2:0:34944413:Juan Francisco:20:5.2 428 | 13:1:34811046:Malika:82:7.4 429 | 5:8:30359826:José Manuel:53:3.55 430 | 2:5:39096402:Francisco Javier:31:10.59 431 | 10:8:39594466:María Nieves:20:6.24 432 | 14:3:32126455:Farida:40:10.46 433 | 6:5:33828281:Alba:31:1.22 434 | 5:0:37417935:Martín:83:3.6 435 | 8:4:34754796:Jesús María:46:3.25 436 | 13:2:38879516:Eva María:64:10.26 437 | 3:3:32204615:Ane:16:6.54 438 | 12:3:33443492:Francisca:60:5.51 439 | 6:9:31440468:Félix:47:3.0 440 | 14:2:34213056:Emilio:75:3.3 441 | 1:7:35859416:María Pilar:69:6.63 442 | 2:8:33024615:Raúl:95:2.56 443 | 9:6:33820833:Joel:46:9.67 444 | 9:2:33381952:José Antonio:46:6.43 445 | 15:9:35627934:Bernardo:49:6.11 446 | 10:8:30885971:Mohamed:79:5.66 447 | 5:2:33975765:Francisco Javier:86:5.1 448 | 9:2:38387590:Ángela:46:4.95 449 | 12:9:33846340:Mónica:99:2.48 450 | 0:8:35821290:Laia:98:4.7 451 | 8:0:39552319:Esperanza:33:3.56 452 | 2:10:39656340:Fadma:15:3.39 453 | 6:8:31951516:Candelaria:23:3.24 454 | 4:0:34458493:María Fuencisla:89:3.39 455 | 2:9:36403702:Raquel:15:1.94 456 | 0:6:38154861:Alí:98:2.91 457 | 7:6:30800491:Nabil:30:3.39 458 | 5:5:34256114:Samir:50:8.96 459 | 4:10:39360507:Sohora:54:6.52 460 | 9:8:36157620:Adrián:93:2.7 461 | 12:7:38623097:María Prado:79:9.73 462 | 12:0:32423833:Pau:65:3.75 463 | 1:10:38972113:Dolors:79:5.36 464 | 7:5:32124535:Jonathan:42:9.65 465 | 10:1:37701934:María Mar:42:6.34 466 | 2:8:37182340:Juana:58:8.77 467 | 6:4:38192926:Aicha:37:8.28 468 | 5:9:38857140:Francisco:30:7.0 469 | 13:6:31823280:Marina:53:6.12 470 | 8:10:38134458:Ana Cristina:76:9.85 471 | 9:4:30624747:Dolors:38:8.32 472 | 4:3:35352030:Sagrario:79:1.14 473 | 6:4:34352705:Beatriz:28:6.4 474 | 9:7:39450511:Sergi:26:1.12 475 | 8:9:35438624:Ascensión:72:7.93 476 | 12:2:36618003:Montserrat:32:5.86 477 | 2:4:39836732:Manuel Jesús:41:4.85 478 | 13:5:39803883:África:76:5.46 479 | 9:7:37365649:Irene:21:10.5 480 | 6:10:30316837:Gonzalo:79:10.51 481 | 8:10:30390983:Itziar:94:10.18 482 | 4:7:40107196:Noelia:73:1.7 483 | 11:3:36450654:Víctor:61:5.52 484 | 11:10:33279116:Teresa:88:8.26 485 | 2:5:30683035:Juan José:80:7.6 486 | 10:10:36975777:Sebastián:82:10.56 487 | 5:10:37702766:María Begoña:83:2.32 488 | 6:4:35715836:María Fuencisla:38:2.91 489 | 11:1:36342600:Erhimo:74:9.43 490 | 6:3:35626637:María Mercedes:63:4.25 491 | 1:2:36532259:Yasmina:94:3.73 492 | 14:4:31024544:Sagrario:85:3.65 493 | 2:7:33437646:Yasmina:53:2.97 494 | 4:5:37397916:Gorka:79:6.18 495 | 9:7:33455106:Isabel María:53:10.46 496 | 0:5:30123978:Iñaki:95:4.72 497 | 3:9:31868349:Juan Carlos:91:2.77 498 | 6:3:30690878:María Paz:38:4.14 499 | 10:3:33500385:Samira:75:5.96 500 | 0:6:34325325:José Antonio:84:7.37 501 | -------------------------------------------------------------------------------- /archivos/clientes: -------------------------------------------------------------------------------- 1 | 16005:Concepción:6/6/1961:448.5 2 | 16008:Iratxe:17/7/1915:281.18 3 | 16077:Unai:16/10/1908:116.96 4 | 16082:Karima:8/9/1975:365.19 5 | 16085:Juan María:11/11/1908:438.6 6 | 16090:Naima:26/7/1983:83.36 7 | 16091:Pere:13/10/1999:319.86 8 | 16093:Pedro:24/11/1976:448.88 9 | 16102:Pedro José:25/9/1954:330.38 10 | 16107:Fadma:22/8/1977:102.45 11 | 16115:José Francisco:9/2/1924:449.95 12 | 16118:María Josefa:5/2/2002:417.58 13 | 16133:José Ignacio:11/1/1920:137.94 14 | 16176:Mimount:8/10/1972:428.1 15 | 16182:Blanca:15/1/1984:317.68 16 | 16186:María Victoria:6/8/1998:362.24 17 | 16193:Mimoun:25/11/1938:148.13 18 | 16199:Gemma:12/3/1934:367.36 19 | 16209:Julio:22/9/1920:368.89 20 | 16220:María:27/12/1922:81.8 21 | 16255:Milagros:16/5/1906:318.35 22 | 16259:María Rocío:16/1/1930:61.15 23 | 16300:Xabier:10/8/1983:262.26 24 | 16302:Aicha:26/7/1936:456.95 25 | 16311:Manuela:17/12/1946:411.27 26 | 16354:María Mercedes:24/11/1948:423.57 27 | 16421:Estibaliz:16/12/1939:293.43 28 | 16424:Pau:18/4/1996:193.15 29 | 16425:Salma:24/4/1998:227.28 30 | 16437:Vicenta:14/5/1947:243.75 31 | 16460:Joaquín:7/11/1925:419.37 32 | 16474:Marina:2/2/1977:219.61 33 | 16518:Eva María:14/1/1975:90.54 34 | 16539:María Llanos:27/8/1965:328.69 35 | 16552:Nadia:8/8/1946:285.0 36 | 16553:Marta:21/3/1927:285.8 37 | 16622:Inés:19/1/1972:133.34 38 | 16659:Laura:18/12/1934:33.9 39 | 16689:Enric:15/11/1966:187.48 40 | 16690:Montserrat:15/11/1938:456.98 41 | 16710:Amaia:9/1/1926:199.99 42 | 16715:Antonia:21/1/1974:184.83 43 | 16715:Encarnación:1/12/1975:345.31 44 | 16746:María José:22/2/1908:114.26 45 | 16755:Olatz:9/6/1986:405.6 46 | 16773:Xavier:12/7/1923:212.39 47 | 16776:Álvaro:13/1/1914:367.79 48 | 16777:Sonia:23/3/1964:383.4 49 | 16778:Juan María:2/10/1912:221.5 50 | 16786:Celia:13/10/1928:199.39 51 | 16821:David:26/4/1986:194.62 52 | 16857:Elisa:8/11/1901:123.4 53 | 16868:Victoria:26/2/1924:268.35 54 | 16885:Laura:16/4/1910:347.65 55 | 16886:Ricardo:19/5/1902:415.74 56 | 16888:Roger:15/4/1950:118.52 57 | 16907:Aitor:10/12/1936:354.96 58 | 16932:Carla:6/6/1930:420.3 59 | 16943:Diego:12/11/1981:214.44 60 | 16958:Ander:23/12/1941:195.99 61 | 16969:Anna:1/9/1935:185.44 62 | 17043:Iván:10/6/1937:116.69 63 | 17047:Joan:17/7/1983:306.41 64 | 17049:Marc:6/10/1955:98.55 65 | 17110:Petra:3/10/1920:319.11 66 | 17111:Aicha:23/6/1941:354.92 67 | 17133:Leyre:16/5/1901:401.13 68 | 17148:Félix:4/4/1984:157.75 69 | 17186:Joseba:7/2/1913:437.45 70 | 17221:César:13/4/1974:428.17 71 | 17229:Milagros:8/2/1951:284.91 72 | 17232:Mohamed:7/12/1913:317.34 73 | 17233:Saida:8/4/1965:260.49 74 | 17238:Salma:16/11/1931:76.47 75 | 17294:José Luis:21/8/1964:271.75 76 | 17333:Lorenzo:21/5/1911:58.57 77 | 17367:Josefina:21/3/1919:225.57 78 | 17389:África:4/5/1948:421.54 79 | 17400:Juana:22/10/1920:290.6 80 | 17422:David:6/7/1963:166.23 81 | 17457:Josu:14/2/1942:362.35 82 | 17461:Samira:21/11/1978:46.63 83 | 17471:Nabil:9/6/1924:267.65 84 | 17482:Mariano:28/9/1949:400.38 85 | 17506:Francisco José:2/3/1943:224.92 86 | 17507:Juan Carlos:15/1/1934:107.43 87 | 17508:Raquel:24/9/1982:274.93 88 | 17510:Cristina:2/9/1920:92.32 89 | 17523:Ricardo:25/2/1921:237.68 90 | 17536:Francesc:28/4/1919:139.55 91 | 17542:Carmen María:12/5/1994:145.51 92 | 17556:Karim:11/5/1984:317.97 93 | 17606:Gorka:18/12/1993:245.72 94 | 17645:María Magdalena:9/3/1952:129.96 95 | 17651:María Fuencisla:3/1/1955:195.18 96 | 17678:Merce:16/4/1974:242.4 97 | 17702:María Elena:22/9/1954:96.3 98 | 17706:Nora:26/9/1917:88.43 99 | 17709:Mario:1/4/1990:102.34 100 | 17711:Fátima:5/12/1952:341.89 101 | 17740:Gerard:11/5/1982:302.88 102 | 17740:Nerea:26/12/1928:81.35 103 | 17741:Jorge:11/7/1937:76.4 104 | 17757:Juan Luis:2/6/1938:235.81 105 | 17806:Iker:17/4/1939:190.58 106 | 17808:Silvia:10/9/1920:344.75 107 | 17824:Josefina:24/7/1914:263.88 108 | 17847:María Victoria:19/1/1932:437.74 109 | 17854:María Magdalena:18/3/1929:299.13 110 | 17864:Laila:5/8/1920:115.99 111 | 17891:Amparo:16/2/1930:239.24 112 | 17897:Candelaria:17/12/1933:279.93 113 | 17902:Ainara:6/3/1990:277.99 114 | 17916:María Teresa:8/11/1958:380.9 115 | 17942:Joan:11/7/1971:82.36 116 | 17948:Francisco José:8/9/1937:83.76 117 | 17961:Rahma:7/3/1961:346.53 118 | 17972:Marc:6/9/1949:101.82 119 | 17976:Xavier:7/3/1939:163.4 120 | 17990:Yusef:26/6/1971:242.93 121 | 18023:Lorenzo:18/8/1974:92.86 122 | 18048:Josefina:12/3/1977:28.67 123 | 18075:Antonio José:5/12/1986:322.66 124 | 18112:Mercedes:5/8/1987:119.46 125 | 18143:Ramón:9/4/1919:298.4 126 | 18145:Araceli:14/10/1968:288.17 127 | 18154:Jaime:9/3/1901:261.34 128 | 18171:Marcos:22/10/1915:126.32 129 | 18176:Eva María:19/5/2002:136.36 130 | 18185:Antonio:8/10/1989:432.83 131 | 18234:Victoria:5/3/1917:193.78 132 | 18235:Ane:27/4/1909:71.56 133 | 18256:Inmaculada:10/11/1966:65.83 134 | 18277:Rodrigo:9/5/1977:181.63 135 | 18295:Irati:8/6/1930:367.81 136 | 18328:Luisa:19/5/1968:169.82 137 | 18329:Anna:13/10/1918:445.11 138 | 18346:Dunia:27/1/1935:30.84 139 | 18358:María Isabel:22/3/1949:97.16 140 | 18364:Celso:17/5/1967:245.67 141 | 18382:Pascual:22/10/1916:406.1 142 | 18387:Miguel Ángel:12/3/1910:229.64 143 | 18393:Eneko:19/1/1943:210.32 144 | 18405:Rodrigo:4/8/1922:334.75 145 | 18415:Elena:27/5/1971:448.42 146 | 18430:Amaia:18/11/1912:253.1 147 | 18437:Daniel:15/1/1924:243.21 148 | 18439:Aicha:20/5/1968:62.85 149 | 18445:Ramona:15/1/1960:144.83 150 | 18449:Francisco José:2/7/1910:134.88 151 | 18476:Nuria:9/10/1988:183.11 152 | 18504:Antonio:10/9/1953:190.82 153 | 18504:Joel:8/12/1937:95.47 154 | 18517:Iván:17/3/1988:440.16 155 | 18526:Yasmina:26/3/1981:372.86 156 | 18532:Araceli:23/9/1901:182.6 157 | 18535:Mariano:24/10/1914:336.9 158 | 18544:Adam:23/9/1927:253.24 159 | 18554:Natalia:10/7/1942:237.48 160 | 18561:Omar:8/3/1989:84.72 161 | 18590:Inés:26/12/1919:209.21 162 | 18608:Idoia:4/4/1962:106.2 163 | 18620:Aicha:6/8/1957:186.6 164 | 18622:Inés:25/10/1900:81.65 165 | 18628:Martín:4/6/1925:359.77 166 | 18643:Mina:5/10/1965:370.75 167 | 18645:Purificación:27/3/2000:209.93 168 | 18664:Alicia:27/7/1929:218.99 169 | 18672:Remedios:22/4/1976:290.58 170 | 18674:Naima:26/8/1974:93.77 171 | 18675:Ander:3/1/1952:259.61 172 | 18750:Marcos:14/5/1979:446.85 173 | 18752:Joaquina:4/11/1946:372.64 174 | 18753:Mohammed:27/6/1917:68.67 175 | 18762:Mario:4/10/1914:58.53 176 | 18806:Joaquim:20/7/1963:206.32 177 | 18808:María Aranzazu:23/4/1978:392.69 178 | 18810:Gonzalo:5/2/1990:408.57 179 | 18814:Alba:9/3/1915:94.84 180 | 18814:Malika:1/6/1974:247.57 181 | 18820:Ana Isabel:20/6/1967:448.69 182 | 18820:María Luz:21/6/1953:394.84 183 | 18828:María Nieves:21/3/1902:185.72 184 | 18832:María Sonsoles:11/12/1964:159.9 185 | 18867:Ángela:5/6/1914:301.91 186 | 18885:Félix:12/6/1970:157.15 187 | 18911:Adam:12/9/1980:378.4 188 | 18929:Fadma:9/1/1955:353.29 189 | 18935:Habiba:19/4/1942:46.5 190 | 18955:Carme:8/8/1915:57.24 191 | 18962:Javier:24/7/1912:133.53 192 | 19002:Irene:11/6/1998:428.75 193 | 19008:Adriá:22/6/1951:256.42 194 | 19024:Marcos:12/1/1962:355.88 195 | 19027:Pilar:7/9/1965:110.9 196 | 19061:Josep:6/4/1979:113.48 197 | 19074:Antoni:28/1/1908:52.47 198 | 19097:José María:2/5/1961:323.6 199 | 19128:Josu:21/7/1996:380.12 200 | 19136:José María:6/12/1946:160.97 201 | 19141:Hassan:8/3/1943:37.0 202 | 19146:Sonsoles:16/2/1983:343.55 203 | 19157:Felisa:20/12/1921:368.56 204 | 19160:Trinidad:2/2/1960:145.47 205 | 19174:Camilo:16/1/1965:133.61 206 | 19189:Pau:7/9/1901:150.1 207 | 19205:Antoni:2/2/1976:339.13 208 | 19282:Roger:24/11/1910:205.6 209 | 19332:Naima:19/9/1938:242.36 210 | 19341:Manuel:9/7/1902:262.89 211 | 19364:Dolores:22/6/1932:368.46 212 | 19368:María Rocío:6/5/1905:381.33 213 | 19405:David:12/1/1908:449.97 214 | 19411:Francisco Manuel:2/4/1965:360.4 215 | 19432:Irati:1/5/1921:234.74 216 | 19437:Esther:3/12/1988:41.79 217 | 19494:Gregorio:11/10/1957:365.98 218 | 19501:Antonio Manuel:2/10/1956:74.45 219 | 19519:Alberto:19/9/1924:259.0 220 | 19522:Araceli:23/5/1929:224.0 221 | 19541:Iñigo:17/4/1925:125.93 222 | 19581:Vicenta:11/8/1966:259.31 223 | 19628:Álvaro:12/9/1913:387.33 224 | 19631:María Llanos:8/4/1908:456.73 225 | 19674:Isabel María:22/6/1987:388.97 226 | 19721:Jesús María:6/2/1924:271.42 227 | 19775:María Dolors:6/1/1972:455.2 228 | 19786:Sufian:1/1/1928:282.22 229 | 19877:Saida:15/6/1975:42.32 230 | 19911:María Llanos:14/8/1987:301.59 231 | 19940:Alicia:3/2/1933:268.54 232 | 19948:Juan Manuel:10/1/1931:340.94 233 | 19981:Verónica:9/2/1941:373.27 234 | 20016:Camilo:16/3/1916:172.61 235 | 20093:José Ignacio:9/11/1928:211.76 236 | 20097:Jesús María:17/10/1929:78.43 237 | 20116:Agustina:13/10/1910:53.39 238 | 20116:Sufian:7/5/1965:173.78 239 | 20125:Mariam:18/3/1967:407.25 240 | 20136:Bernardo:24/10/1940:225.78 241 | 20143:Sergio:19/11/1952:264.92 242 | 20166:Alberto:23/5/1932:114.4 243 | 20205:Manuel Jesús:27/10/1991:221.59 244 | 20217:María Ángeles:24/7/1992:379.74 245 | 20231:Óscar:8/6/1931:153.17 246 | 20233:María Teresa:9/7/1922:440.95 247 | 20241:Ana María:9/10/1993:368.72 248 | 20303:Domingo:25/1/1990:440.84 249 | 20309:Aritz:18/10/1955:422.26 250 | 20309:Benito:20/12/1906:118.56 251 | 20324:Manuel:17/4/1957:93.58 252 | 20327:Ane:7/2/1974:314.48 253 | 20351:Inés:20/9/1985:410.37 254 | 20379:Aina:14/12/1940:314.74 255 | 20386:María Concepción:4/4/1942:429.39 256 | 20395:Ander:8/11/1962:94.53 257 | 20397:Maider:27/9/1980:429.54 258 | 20399:Julia:4/8/1990:138.96 259 | 20419:Antonia:18/3/1929:358.69 260 | 20424:Samuel:25/8/1913:438.29 261 | 20488:Mónica:24/12/1928:439.66 262 | 20506:Sonsoles:5/2/1903:109.17 263 | 20574:Gorka:25/7/1935:425.89 264 | 20576:María Amparo:23/10/1967:192.57 265 | 20601:Noelia:15/11/1999:453.72 266 | 20613:Elisa:11/12/1974:348.84 267 | 20615:Juliana:6/5/1936:294.48 268 | 20645:Pedro:21/3/1932:263.29 269 | 20650:Julen:8/4/1951:250.71 270 | 20658:Ascensión:15/7/1991:180.95 271 | 20666:Ascensión:5/10/1934:280.95 272 | 20690:Catalina:18/12/1918:315.76 273 | 20697:Mina:27/5/1903:329.1 274 | 20708:Enric:19/6/1935:36.44 275 | 20726:César:9/3/1959:196.41 276 | 20734:Rahma:24/12/1922:408.69 277 | 20769:Nerea:7/7/1939:99.2 278 | 20801:Pau:13/2/1981:246.22 279 | 20804:Paula:2/1/1924:123.29 280 | 20805:Sara:1/6/1928:319.3 281 | 20814:María Cruz:1/4/1957:123.52 282 | 20822:Óscar:23/9/1970:107.94 283 | 20846:María Antonia:17/6/1935:62.2 284 | 20854:Alberto:10/10/1956:112.28 285 | 20918:Arnau:17/6/1921:369.5 286 | 20937:Celia:8/5/1999:219.24 287 | 20949:Sagrario:28/2/1947:432.78 288 | 20979:Irene:16/6/1991:102.0 289 | 20990:Gorka:23/3/1965:229.65 290 | 21001:María Rosa:22/7/1932:139.49 291 | 21003:Gloria:16/12/1917:220.47 292 | 21051:Gonzalo:11/11/1921:113.62 293 | 21056:Adam:26/2/1918:346.12 294 | 21060:Elvira:6/3/1939:243.42 295 | 21062:Aina:23/3/2000:129.34 296 | 21093:Sonsoles:20/11/1974:445.21 297 | 21108:Sandra:5/4/1936:168.75 298 | 21116:Farida:12/12/1919:400.5 299 | 21150:Aurora:20/12/1924:419.36 300 | 21152:María Antonia:11/11/1955:65.15 301 | 21170:Abdeselam:17/2/1934:235.76 302 | 21184:Abdelkader:1/1/1954:67.43 303 | 21214:Natividad:25/12/1942:166.45 304 | 21217:Samira:24/7/1950:413.86 305 | 21239:Natalia:5/2/1971:223.56 306 | 21300:Guillermo:12/10/1940:160.73 307 | 21317:Nuria:22/7/1989:226.33 308 | 21326:Víctor Manuel:15/7/1954:417.37 309 | 21336:Oriol:11/12/1967:436.2 310 | 21379:Miguel Ángel:13/4/1953:114.51 311 | 21444:Josefa:6/12/1943:304.67 312 | 21471:Adam:5/4/1935:95.14 313 | 21480:Alba:13/10/1940:243.38 314 | 21487:María Magdalena:21/6/1963:414.78 315 | 21510:Blanca:28/12/1991:51.7 316 | 21533:Miguel:13/8/1982:287.4 317 | 21541:Rosa María:2/1/1941:173.9 318 | 21560:Elena:23/4/1960:151.14 319 | 21565:Salma:3/1/1903:332.29 320 | 21579:Eneko:5/1/1929:124.12 321 | 21580:Rodrigo:1/12/1941:195.88 322 | 21600:José Ángel:14/4/1930:333.86 323 | 21641:María Teresa:26/11/1996:359.18 324 | 21649:Josep María:15/12/1933:415.45 325 | 21657:Noelia:22/7/1911:127.54 326 | 21658:Juana:21/5/1930:452.95 327 | 21666:Antonio Jesús:18/2/1902:189.61 328 | 21674:Miquel:9/10/1942:135.48 329 | 21701:Noelia:15/1/1912:390.64 330 | 21707:Margarita:5/1/1997:221.32 331 | 21711:Mario:13/9/1953:69.13 332 | 21730:Manuel Jesús:1/11/1989:197.66 333 | 21744:Ana Belén:13/6/1964:294.88 334 | 21754:Víctor Manuel:2/11/1984:268.87 335 | 21856:Francisco Javier:20/11/1996:305.78 336 | 21862:Itziar:15/9/1953:443.71 337 | 21873:Trinidad:18/1/1970:107.95 338 | 21874:Susana:6/3/1971:185.76 339 | 21875:Elvira:11/1/1991:360.27 340 | 21892:Rosario:5/3/1918:104.65 341 | 21923:María José:19/2/1975:92.58 342 | 21924:Adam:26/8/1940:90.54 343 | 21962:Mario:18/9/1937:327.43 344 | 21963:Antonio José:16/6/1903:277.99 345 | 21969:Martín:24/6/1950:308.91 346 | 21984:Aicha:21/11/1969:438.9 347 | 21992:Antonia:8/4/1945:330.32 348 | 21992:María Sonsoles:3/12/2002:215.53 349 | 22027:Mina:24/9/1992:192.5 350 | 22039:María Amparo:8/5/1900:152.82 351 | 22059:María Mercedes:1/9/1970:367.52 352 | 22088:Rachida:8/7/1943:172.92 353 | 22098:María José:14/11/1945:147.4 354 | 22115:Manuel:20/12/1930:79.17 355 | 22202:Martín:11/1/1936:262.45 356 | 22204:Habiba:6/7/1940:91.79 357 | 22204:Samira:16/11/1922:444.45 358 | 22235:Isabel María:20/11/1906:89.95 359 | 22258:Miguel:8/7/1927:126.93 360 | 22267:Nabil:3/2/1905:99.69 361 | 22274:Inmaculada:21/10/1910:455.29 362 | 22282:Josep María:6/5/1926:355.66 363 | 22287:Javier:8/8/1915:26.5 364 | 22304:Antonia:7/12/1959:329.96 365 | 22314:María Dolores:21/8/1976:192.45 366 | 22336:María Lourdes:25/2/1923:334.86 367 | 22343:Juan Luis:13/10/1973:298.4 368 | 22343:Omar:15/1/1983:132.57 369 | 22351:Maite:12/12/1904:167.2 370 | 22362:Mario:20/5/1914:44.79 371 | 22385:Ramona:15/1/1936:135.4 372 | 22388:Esperanza:15/6/1985:36.65 373 | 22406:José Juan:13/7/1953:87.65 374 | 22406:Raquel:1/9/1931:352.28 375 | 22414:María Ángeles:24/1/1936:279.21 376 | 22417:Amaia:18/10/1997:385.28 377 | 22427:Dunia:10/10/1962:85.28 378 | 22454:Elvira:22/1/1997:234.4 379 | 22472:Manuela:28/2/1935:348.58 380 | 22482:Maialen:16/8/1932:368.75 381 | 22511:Fadma:10/8/1930:85.8 382 | 22512:Jordi:27/5/2000:202.12 383 | 22523:Vicenta:21/2/1915:418.2 384 | 22524:Ángela:12/1/1963:324.6 385 | 22537:Olatz:26/1/1937:117.27 386 | 22549:Juan Antonio:14/10/1924:132.42 387 | 22559:Said:16/4/2000:194.54 388 | 22571:Ander:10/7/1913:97.15 389 | 22649:Raúl:20/4/1970:280.8 390 | 22664:Amparo:4/2/1930:32.91 391 | 22674:Laura:10/4/1978:213.38 392 | 22686:Esther:9/3/1946:431.91 393 | 22689:Ana María:4/1/1973:78.89 394 | 22706:Andrés:11/11/1922:74.64 395 | 22719:Sohora:15/4/1957:40.24 396 | 22739:Ana:18/6/1968:316.56 397 | 22752:Álvaro:26/7/1945:86.72 398 | 22768:Ascensión:4/10/1917:131.37 399 | 22851:Elena:19/4/1965:70.78 400 | 22887:Ascensión:8/3/1983:62.3 401 | 22932:María Amparo:26/3/1903:343.36 402 | 22981:Joan:26/4/1918:300.33 403 | 23018:Juan Antonio:11/12/1974:320.75 404 | 23050:Ana:12/9/1939:263.1 405 | 23091:Ana María:19/11/1946:154.81 406 | 23100:Malika:26/8/1959:326.39 407 | 23103:José Juan:1/6/1924:358.17 408 | 23113:Jaume:27/12/1907:253.62 409 | 23172:Jaime:20/2/1914:409.28 410 | 23192:Albert:23/1/1983:392.18 411 | 23192:Luisa:15/4/1982:449.6 412 | 23223:Mercedes:8/4/1917:446.18 413 | 23257:Mustafa:7/11/1997:79.4 414 | 23268:Laila:20/12/2002:87.42 415 | 23280:María Llanos:14/2/1920:105.51 416 | 23285:Hassan:21/6/1921:108.41 417 | 23289:Hassan:2/2/1955:421.98 418 | 23292:Aina:7/9/1952:287.4 419 | 23300:Ana Cristina:1/7/1959:193.68 420 | 23301:Héctor:8/6/1900:107.59 421 | 23348:Ascensión:22/6/1930:344.5 422 | 23349:Carmelo:24/2/1991:158.14 423 | 23351:María Isabel:5/7/1994:368.53 424 | 23397:Sergi:15/12/1991:440.52 425 | 23416:Celso:13/1/1986:158.98 426 | 23429:Amaia:15/12/1907:108.45 427 | 23439:Agustín:4/12/1970:360.54 428 | 23457:Esther:7/12/1927:283.44 429 | 23465:Carles:9/4/1924:39.42 430 | 23488:José Ángel:27/7/1981:42.97 431 | 23499:Marina:16/8/1901:439.4 432 | 23542:Cristian:16/4/1905:226.97 433 | 23586:Merce:23/9/1919:360.12 434 | 23601:Sufian:8/5/1901:272.76 435 | 23613:Joaquín:6/8/1900:274.8 436 | 23615:Sara:2/10/1953:112.88 437 | 23619:Mario:11/9/1967:80.93 438 | 23638:Víctor:23/7/1954:291.9 439 | 23686:Felipe:12/12/1926:292.51 440 | 23712:Nadia:7/5/1977:173.58 441 | 23730:Laura:17/3/1948:326.89 442 | 23735:Juan María:14/12/1964:196.24 443 | 23752:Joaquim:19/8/1916:355.64 444 | 23759:Rosario:27/7/1952:383.18 445 | 23779:Abdelkader:5/2/1919:247.8 446 | 23786:Joaquina:8/11/1917:86.49 447 | 23834:Alfonso:18/1/1991:184.32 448 | 23914:Carmen Rosa:21/9/1979:414.2 449 | 23925:Santiago:9/12/1941:116.34 450 | 23930:Asunción:9/3/1974:83.58 451 | 23950:Raquel:20/1/1979:235.19 452 | 23959:Carmen María:2/8/1904:338.73 453 | 24001:Eduard:25/2/1986:140.56 454 | 24005:Sara:3/9/2000:326.55 455 | 24022:Iker:13/6/1925:352.38 456 | 24031:Dolors:7/7/1911:196.94 457 | 24031:Francesc:2/4/1955:329.26 458 | 24032:María Concepción:13/10/1975:419.89 459 | 24033:Asier:8/5/1925:309.58 460 | 24033:Natividad:7/9/1945:310.31 461 | 24044:María Jesús:7/2/1936:319.77 462 | 24049:Elvira:21/2/1928:427.89 463 | 24122:Ahmed:18/9/1945:341.9 464 | 24125:María Begoña:17/8/1955:187.99 465 | 24145:Juana María:16/7/1994:282.32 466 | 24178:María Magdalena:24/7/1900:363.62 467 | 24237:Fernando:23/12/1912:262.21 468 | 24305:Fátima Sohora:24/8/1985:121.79 469 | 24326:Catalina:4/2/1932:232.75 470 | 24331:Enric:25/12/1929:289.83 471 | 24362:María Candelaria:28/6/1989:390.59 472 | 24381:Beatriz:16/2/1906:254.83 473 | 24406:Soraya:5/12/1961:375.23 474 | 24448:Nuria:21/1/1991:193.59 475 | 24480:Joan:24/10/1960:111.1 476 | 24511:Juan José:13/6/1988:346.49 477 | 24528:Natalia:18/1/1921:256.3 478 | 24543:Rachid:26/8/1905:274.91 479 | 24584:Martín:3/8/1933:257.25 480 | 24586:Malika:10/11/1911:260.6 481 | 24621:María Fuencisla:25/12/1986:417.22 482 | 24648:Alí:5/10/1981:456.6 483 | 24686:Gregorio:20/3/1993:330.79 484 | 24700:Adriá:24/4/1962:303.23 485 | 24726:Petra:16/11/1973:131.84 486 | 24752:Juan Carlos:7/12/1932:179.62 487 | 24753:Ana María:22/3/1976:264.34 488 | 24786:Pilar:5/8/1922:185.52 489 | 24842:Manuel Jesús:27/6/1918:303.66 490 | 24856:Emilio:21/9/1942:282.79 491 | 24873:Joseba:26/7/1900:117.27 492 | 24874:Ángela:26/8/1931:320.11 493 | 24886:Xabier:20/7/1910:382.27 494 | 24889:Emilia:2/3/1946:443.1 495 | 24938:Alba:12/6/1912:276.27 496 | 24948:Nuria:14/12/1971:449.16 497 | 24979:Ramona:6/8/1951:134.44 498 | 24983:Juliana:10/12/1951:123.9 499 | 24985:Antonio:4/4/1970:373.6 500 | 24994:Ana Cristina:4/2/1954:299.2 501 | -------------------------------------------------------------------------------- /archivos/usuarios: -------------------------------------------------------------------------------- 1 | 1 DE MAYO:31315515:Santiago:30 2 | 1 DE MAYO:31724178:Francisco Javier:35 3 | 1 DE MAYO:32841722:Fátima:33 4 | 1 DE MAYO:36963056:Pascual:51 5 | 1 DE MAYO:37554880:Esther:92 6 | 1 DE MAYO:38370168:Domingo:24 7 | 1 DE MAYO:39265980:Emilia:38 8 | 12 DE OCTUBRE:30239601:Aritz:74 9 | 12 DE OCTUBRE:36225891:Carmen:27 10 | 12 DE OCTUBRE:39336774:Sonsoles:17 11 | 12 DE OCTUBRE:39682866:Pau:75 12 | ALGARROBAL ARRIBA:32758882:Ane:47 13 | ALGARROBAL PUISOYE:32168820:Sergi:87 14 | ALGARROBAL PUISOYE:34073202:Juana María:76 15 | ALGARROBAL PUISOYE:34891755:Erhimo:60 16 | ALGARROBAL VIEJO:34204083:María José:32 17 | ALGARROBAL VIEJO:36921498:Farah:75 18 | ALGARROBALES:32745233:Samir:62 19 | ALGARROBALES:38130961:María Begoña:75 20 | ALGARROBITO:30706863:Rachid:17 21 | ALGARROBITO:31721819:Trinidad:47 22 | ALGARROBITO:34064541:Fadma:59 23 | ALGARROBITO:35008482:Ainara:26 24 | ALGARROBITO:35979016:Emilio:63 25 | ALGARROBITO:39767818:José:78 26 | ALGARROBITO 1RO:30303227:Mónica:44 27 | ALGARROBITO 1RO:31534033:Margarita:53 28 | ALGARROBITO 1RO:35934107:Mikel:23 29 | ALGARROBITO 1RO:40118334:Noelia:23 30 | ALGARROBITOS:34092778:María Cruz:86 31 | ALGARROBITOS:40094809:Jaime:39 32 | ALGARROBO:33529042:María Rosario:44 33 | ALGARROBO:38184943:Bárbara:94 34 | ALGARROBO DE SORTUE:33219893:Martí:51 35 | ALGARROBO DE SORTUE:33381655:Miguel Ángel:27 36 | ALGARROBO DE SORTUE:35539984:Juliana:52 37 | ALGARROBO DE SORTUE:37821883:María Lourdes:91 38 | ALGARROBO DE SORTUE:38285691:Marc:42 39 | ALGARROBO DEL AGUILA:30844862:María Mercedes:82 40 | ALGARROBO DEL AGUILA:32174703:María Rosario:99 41 | ALGARROBO DEL AGUILA:32396562:Lluis:19 42 | ALGARROBO DEL CURA:30331140:Miren:21 43 | ALGARROBO DEL CURA:35993610:Andrea:86 44 | ALGARROBO DEL CURA:36316042:Oriol:92 45 | ALGARROBO DEL CURA:37614609:Soraya:62 46 | ALGARROBO DEL CURA:38285841:Álvaro:94 47 | ALGARROBO DEL CURA:39750190:Antonia:93 48 | ALGARROBO GRANDE:31514226:Cristóbal:55 49 | ALGARROBO GRANDE:34254805:María Asunción:82 50 | ALGARROBO GRANDE:37698536:Marta:29 51 | ALGARROBO GRANDE:39022975:Luisa:53 52 | ALGARROBO PARAJE:32272919:Carmen Delia:73 53 | ALGARROBO VERDE:33815686:Purificación:65 54 | ALGARROBO VERDE:35263550:Yolanda:51 55 | ALGARROBO VERDE:38288729:Emilio:26 56 | ALGARROBO VERDE:40012275:María Asunción:78 57 | ALGARROBOS GRANDES:30718169:Iker:94 58 | ALGARROBOS GRANDES:32900698:Jonathan:90 59 | ALGARROBOS GRANDES:35021539:Carles:64 60 | ALGARROBOS GRANDES:35614281:Karima:23 61 | ALGARROBOS GRANDES:39456185:María Isabel:30 62 | ALGARROBOS GRANDES:40168031:Ana María:35 63 | ALHUAMPA:33691590:Martín:58 64 | ALHUAMPA:33840585:Mario:18 65 | ALHUAMPA:35273469:Juliana:98 66 | ALHUAMPA:35844248:Julia:31 67 | ALIANZA:30777875:Juan Antonio:44 68 | ALIANZA:33819044:Catalina:17 69 | ALIANZA:38472700:Esther:77 70 | ALICIA:34037233:Elena:82 71 | ALICIA:35512629:Pedro:72 72 | ALICIA:36060995:Said:76 73 | ALICIA:38556415:Carmelo:49 74 | ALICURA:32636033:Alberto:86 75 | ALICURA:32862532:Naima:56 76 | ALICURA:33141711:Jorge:17 77 | ALICURA:34299356:Trinidad:68 78 | ALICURA:34975158:Diego:97 79 | ALIJILAN:32251255:Josefa:68 80 | ALIJILAN:33929197:Martín:54 81 | ALIJILAN:35897386:Asier:25 82 | ALIJILAN:39795109:Montserrat:47 83 | ALISOS:31413591:Guillermo:33 84 | ALISOS:31824463:Jaime:41 85 | ALISOS:35575531:Javier:92 86 | ALISOS:36846879:Carmen:59 87 | ALISOS:38641216:Karim:45 88 | ALISOS:39427970:Julián:26 89 | ALISOS DE ABAJO:32255429:Rosa:81 90 | ALISOS DE ABAJO:35256871:Ana María:35 91 | ALISOS DE ABAJO:39784733:Farida:95 92 | ALISOS DE ARRIBA:30145346:Luis:96 93 | ALISOS DE ARRIBA:32871045:Lluis:70 94 | ALISOS DE ARRIBA:33325515:Guillermo:81 95 | ALISOS DE ARRIBA:33789600:Francisco Manuel:81 96 | ALISOS DE ARRIBA:36032998:Eneko:23 97 | ALISOS DE ARRIBA:39031117:Ángeles:26 98 | ALIZAL:31333139:Isabel María:95 99 | ALIZAL:31576343:Farah:79 100 | ALIZAL:31933384:Juan José:97 101 | ALIZAL:34458487:Asier:75 102 | ALIZAL:38117051:Aritz:19 103 | ALIZAL:39393488:Juan Antonio:22 104 | ALLEN:32643378:Bilal:45 105 | ALLEN:38265227:José Francisco:58 106 | ALLEN:40009508:Mikel:56 107 | ALLENDE:37222521:María Pilar:41 108 | ALLENDE:37342192:Joaquín:69 109 | ALMA GRANDE:30111172:Merce:78 110 | ALMA GRANDE:31240678:Gorka:90 111 | ALMA GRANDE:34916995:África:53 112 | ALMA GRANDE:36387315:Abdeselam:77 113 | ALMA GRANDE:39684973:Noelia:56 114 | ALMACEN CASTRO:32770635:Antonio:53 115 | ALMACEN CASTRO:35877548:Josu:64 116 | ALMACEN CASTRO:39683238:Eva María:83 117 | ALMACEN CASTRO:39865686:Bartolomé:91 118 | ALMACEN CRISTIAN SCHUBERT:30455672:Emilia:46 119 | ALMACEN CRISTIAN SCHUBERT:31134032:Salvador:50 120 | ALMACEN CRISTIAN SCHUBERT:31218911:María Rosa:58 121 | ALMACEN EL CRUCE:30135588:Fernando:61 122 | ALMACEN EL CRUCE:32135918:Lorenzo:67 123 | ALMACEN EL CRUCE:32216163:Juan Antonio:44 124 | ALMACEN EL CRUCE:34229464:Asier:71 125 | ALMACEN EL CRUCE:34342914:Carmen María:21 126 | ALMACEN EL CRUCE:35762232:Montserrat:51 127 | ALMACEN EL CRUCE:37994382:Jonathan:19 128 | ALMACEN EL CRUCE:38344475:Juana María:73 129 | ALMACEN EL CRUCE:38523017:Estibaliz:25 130 | ALMACEN EL CRUCE:39632743:Ahmed:77 131 | ALMACEN EL CRUCE:39830857:Irati:87 132 | ALMACEN EL DESCANSO:34351859:Ana:37 133 | ALMACEN EL DESCANSO:36605008:Felipe:62 134 | ALMACEN EL DESCANSO:39707884:José Manuel:87 135 | ALTO CARRIZAL:30141297:María Mercedes:59 136 | ALTO CARRIZAL:31501829:María Carmen:26 137 | ALTO CASTRO:32554621:María Fuencisla:49 138 | ALTO CASTRO:34705746:Juan María:58 139 | ALTO CASTRO:39408193:Sonia:96 140 | ALTO CAZADERA:35590163:Habiba:61 141 | ALTO CAZADERA:35751658:Inés:16 142 | ALTO CAZADERA:37138553:Pau:95 143 | ALTO CAZADERA:39781086:Pascual:55 144 | ALTO COMEDERO:31994540:Adriá:46 145 | ALTO COMEDERO:36001612:Josep María:29 146 | ALTO COMEDERO:37840468:Juan:96 147 | ALTO CON ZAMPA:33235229:Mariam:97 148 | ALTO DE ANFAMA:31485876:Gorka:43 149 | ALTO DE ANFAMA:32202709:Carles:62 150 | ALTO DE ANFAMA:33032631:Ana Isabel:76 151 | ALTO DE ANFAMA:35563624:Bernardo:45 152 | ALTO DE ANFAMA:39497955:Dina:55 153 | ALTO DE ANFAMA:39938828:Sebastián:77 154 | ALTO DE CASA:35962238:Iratxe:46 155 | ALTO DE CASA:36308411:María Ángeles:50 156 | ALTO DE CASA:36778287:Dunia:38 157 | ALTO DE CASA:38234316:Raquel:23 158 | ALTO DE CASA:39654597:Rosa María:17 159 | ALTO DE CASTILLO:37367868:Víctor:94 160 | ALTO DE CASTILLO:38939586:Margalida:16 161 | ALTO DE FIERRO:34238057:Raúl:37 162 | ALTO DE FIERRO:36321935:Maialen:84 163 | ALTO DE FLORES:30673776:María Magdalena:49 164 | ALTO DE FLORES:31607554:María Sonsoles:59 165 | ALTO DE FLORES:32900355:María José:95 166 | ALTO DE FLORES:33785886:Nadia:87 167 | ALTO DE FLORES:34264313:Miguel:36 168 | ALTO DE FLORES:35487532:Lucia:19 169 | ALTO DE FLORES:36836818:José Juan:33 170 | ALTO DE FLORES:36870313:Imanol:67 171 | ALTO DE FLORES:37630226:Felisa:69 172 | ALTO DE FLORES:38636264:Dolors:67 173 | ALTO DE FLORES:39287850:Sandra:78 174 | ALTO DE LA ANGOSTURA:31146778:Fátima:99 175 | ALTO DE LA ANGOSTURA:35633667:Alba:44 176 | ALTO DE LA ANGOSTURA:39526941:Iván:57 177 | ALTO DE LA JUNTA:37848529:Sara:92 178 | ALTO DE LA JUNTA:37958410:Sergio:85 179 | ALTO DE LA LE?A:31174536:Ana Isabel:36 180 | ALTO DE LA LE?A:34935271:Sonia:30 181 | ALTO DE LA LE?A:38476156:María Luisa:59 182 | ALTO DE LA SIERRA:31365388:María Ángeles:28 183 | ALTO DE LA SIERRA:31604608:María África:79 184 | ALTO DE LA SIERRA:34476463:Diego:66 185 | ALTO DE LA SIERRA:37624394:José Vicente:63 186 | ALTO DE LA SIERRA:39797255:Celsa:38 187 | ALTO DE LAS ARA?AS:30555663:Maider:71 188 | ALTO DE LAS ARA?AS:31498301:Gregorio:15 189 | ALTO DE LAS ARA?AS:33153576:Sagrario:73 190 | ALTO DE LAS ARA?AS:33704267:Josefa:79 191 | ALTO DE LAS ARA?AS:38127345:Nuria:80 192 | ALTO DE LAS MULAS:30356756:Cristina:90 193 | ALTO DE LAS PLUMAS:33308481:Fernando:67 194 | ALTO DE LAS PLUMAS:35920626:Fadma:42 195 | ALTO DE LEIVA:33654966:Julia:25 196 | ALTO DE LEIVA:36188269:Samir:92 197 | ALTO DE LEIVA:37485497:Idoia:97 198 | ALTO DE LOS MANANTIALES:30566092:Nuria:86 199 | ALTO DE LOS MANANTIALES:30857518:Carles:32 200 | ALTO DE LOS MANANTIALES:33606258:Francisco José:52 201 | ALTO DE LOS MANANTIALES:35479700:Héctor:89 202 | ALTO DE LOS MANANTIALES:36223600:Alba:25 203 | ALTO DE LOS MANANTIALES:38097535:Montserrat:39 204 | ALTO DE LOS PERROS:31942663:Itziar:23 205 | ALTO DE LOS PERROS:36598559:Bilal:47 206 | ALTO DE LOS PERROS:37371026:Iván:75 207 | ALTO DE LOS PERROS:38010646:Concepción:83 208 | ALTO DE LOS QUEBRACHOS:30842692:Joan:68 209 | ALTO DE LOS QUEBRACHOS:32173770:Jesús:75 210 | ALTO DE LOS QUEBRACHOS:32803276:Eduardo:36 211 | ALTO DE LOS QUEBRACHOS:36317087:Rosario:74 212 | ALTO DE LOS QUEBRACHOS:36754227:Emilio:65 213 | ALTO DE LOS QUEBRACHOS:38709255:Roberto:85 214 | ALTO DE LOS REALES:30685342:Mariem:94 215 | ALTO DE LOS REALES:32838432:Yolanda:74 216 | ALTO DE LOS REALES:33724865:Joseba:82 217 | ALTO DE LOS REALES:34399720:Enrique:99 218 | ALTO DE LOS REALES:38333300:Isabel María:59 219 | ALTO DE LOS SAPOS:34549968:Concepción:44 220 | ALTO DE LOS SAPOS:34737041:Abdeselam:70 221 | ALTO DE LOS SAPOS:37509330:Raúl:87 222 | ALTO DE LOS SAPOS:37942612:Cristina:71 223 | ALTO DE LOS SAPOS:40044459:Alfredo:75 224 | ALTO DE LOZANO:32881725:Mimoun:77 225 | ALTO DE LOZANO:32909733:Carmen Rosa:28 226 | ALTO DE LOZANO:33279285:Nora:92 227 | ALTO DE LOZANO:34140117:Aurora:21 228 | ALTO DE LOZANO:36569515:Esperanza:62 229 | ALTO DE LOZANO:38766651:Sergio:63 230 | ALTO DE MEDINA:30306403:Luis Angel:57 231 | ALTO DE MEDINA:30343570:Enric:81 232 | ALTO DE MEDINA:33617595:Abdelkader:52 233 | ALTO DE MEDINA:36875527:Dolores:44 234 | ALTO DE MEDINA:38255601:Blanca:93 235 | ALTO DE MEDINA:38664456:María Rosario:60 236 | ALTO DE MEDINA:38781475:Emilio:46 237 | ALTO DE MOJON:32750622:Agustín:29 238 | ALTO DE MOJON:33019044:Salma:52 239 | ALTO DE MOJON:36199466:María Luisa:54 240 | ALTO DE MOJON:37547377:Paula:99 241 | ALTO DE MOJON:38818545:Consuelo:88 242 | ALTO DE SIERRA:33895699:Karim:33 243 | ALTO DE SIERRA:36669816:María Amparo:61 244 | ALTO DEL ANGOSTO:33847339:Rubén:64 245 | ALTO DEL ANGOSTO:34529725:Magdalena:47 246 | ALTO DEL ANGOSTO:36678573:Pedro José:55 247 | ALTO DEL DURAZNO:30213892:José Antonio:68 248 | ALTO DEL DURAZNO:30936245:Manuel:28 249 | ALTO DEL DURAZNO:32676277:Enric:61 250 | ALTO DEL DURAZNO:34213957:Saida:54 251 | ALTO DEL HUASCHO:33354329:Erhimo:96 252 | ALTO DEL HUASCHO:34043270:Isabel:54 253 | ALTO DEL HUASCHO:36358712:Celsa:83 254 | ALTO DEL HUASCHO:39392312:Juan:22 255 | ALTO DEL LAMPAZO:33598943:Ascensión:94 256 | ALTO DEL LAMPAZO:36411686:Santiago:36 257 | ALTO DEL LAMPAZO:39251962:Iñaki:99 258 | ALTO DEL LAMPAZO:40007014:Fuensanta:79 259 | ALTO DEL LEON:35768679:Fernando:24 260 | ALTO DEL LEON:38781643:Nadia:81 261 | ALTO DEL LEON:39550302:Cristóbal:39 262 | ALTO DEL MISTOL:32661432:Bilal:80 263 | ALTO DEL MISTOL:32779263:Alfonso:63 264 | ALTO DEL MISTOL:33550594:Ramón:38 265 | ALTO DEL MISTOL:37323260:Sufian:60 266 | ALTO DEL MISTOL:39433101:Ignacio:19 267 | ALTOS DE CHIPION:33461935:Farida:41 268 | ALTOS DE CHIPION:36824181:Adrián:23 269 | ALTOS DE CHIPION:38748843:Gonzalo:21 270 | ALTOS HORNOS GUEMES:33162764:Carmen María:68 271 | ALTOS HORNOS GUEMES:35512704:José Francisco:99 272 | ALTOS HORNOS GUEMES:39559926:Víctor Manuel:67 273 | ALUMBRERA:36491640:Farah:46 274 | ALUMBRERA:37057179:Jesús María:64 275 | ALUMINE:34470630:Ángeles:51 276 | ALUMINE:37434598:Anna:81 277 | ALUMINE:37869202:Eduardo:44 278 | ALURRALDE:33691085:Leire:48 279 | ALURRALDE:34610812:Bartolomé:70 280 | ALVAREZ:33305604:José Francisco:72 281 | ALVAREZ:35992452:Víctor Manuel:48 282 | ALVAREZ:39746640:Vicente:35 283 | ALVAREZ CONDARCO:30832413:Encarnación:66 284 | ALVAREZ DE TOLEDO:35122674:Enric:56 285 | ALVAREZ JONTE:32764041:Irati:84 286 | ALVAREZ JONTE:33357085:Blanca:54 287 | ALVARO BARROS:34430312:María Cruz:93 288 | ALVEAR:30939516:José Carlos:86 289 | ALVEAR:32585162:Rafaela:27 290 | ALVEAR:33872042:Laura:49 291 | ALVEAR:37081596:Natalia:17 292 | ALZA NUEVA:33805658:Víctor:86 293 | ALZA NUEVA:35056414:Pablo:74 294 | ALZA NUEVA:37587111:Laila:67 295 | ALZA NUEVA:37646258:Irati:95 296 | ALZA NUEVA:38620258:Mónica:85 297 | ALZAGA:32409462:Antonio:94 298 | ALZAGA:35623380:Mario:62 299 | ALZAGA:36516299:Aurora:41 300 | ALZAGA:37704576:Rafael:86 301 | ALZAGA:39567355:Consuelo:92 302 | AMADORES:33758236:Francisco Manuel:64 303 | AMADORES:34014532:Carmen Delia:78 304 | BARRIO VILLA ADELA:30527904:José Carlos:88 305 | BARRIO VILLA ADELA:31044483:Mireia:88 306 | BARRIO VILLA ADELA:35978472:Verónica:49 307 | BARRIO VILLA ADELA:36557520:Agustina:17 308 | BARRIO VILLA ADELA:39246935:José Javier:86 309 | BARRIO VILLA COHESA:30904415:Ricardo:45 310 | BARRIO VILLA COHESA:31748568:Rafaela:24 311 | BARRIO VILLA COHESA:33488316:Maite:31 312 | BARRIO VILLA COHESA:34230587:Itziar:29 313 | BARRIO VILLA COHESA:34775725:María:36 314 | BARRIO VILLA COHESA:37953838:Pablo:94 315 | BARRIO VILLA COHESA:38836498:Merce:32 316 | BARRIO VILLA COHESA:39006805:Consuelo:18 317 | BARRIO VILLA CORDOBA:31671003:María África:83 318 | BARRIO VILLA CORDOBA:34275180:Víctor:36 319 | BARRIO VILLA CORDOBA:36799960:Karim:35 320 | BARRIO VILLA CORDOBA:37773929:Farida:64 321 | BARRIO VILLA CORDOBA:39745769:Rodrigo:96 322 | BARRIO VILLA FERNANDEZ:34298284:Nadia:38 323 | BARRIO VILLA FERNANDEZ:34545058:Susana:18 324 | BARRIO VILLA FERNANDEZ:36606874:Ismael:56 325 | BARRIO VILLA MU?IZ:32029974:Tomas:56 326 | BARRIO VILLA MU?IZ:36429868:Estibaliz:25 327 | BARRIO VILLA MU?IZ:37216284:Igor:98 328 | BARRIO VILLA ORTEGA:31122054:Fátima Sohora:59 329 | BARRIO VILLA ORTEGA:32845401:Enric:95 330 | BARRIO VILLA ORTEGA:32894841:Aicha:57 331 | BARRIO VILLA ORTEGA:33560527:Catalina:15 332 | BARRIO VILLA ORTEGA:40175774:Jesús:94 333 | BARRIO VILLA SALADILLO:32627040:Montserrat:98 334 | BARRIO VILLA SALADILLO:33206461:Miguel:47 335 | BARRIO VILLA SALADILLO:37493233:Jonathan:36 336 | BARRIO VILLA SALADILLO:40091208:Alfonso:46 337 | BARRIO VILLA UNION:31144587:Andrés:84 338 | BARRIO VILLA UNION:32487076:Bartolomé:25 339 | BARRIO VILLA UNION:34377722:Alberto:16 340 | BARRIO VILLA UNION:35434570:Merce:92 341 | BARRIO VILLA UNION:37724706:José Ramón:85 342 | CAMPO GENERO:32970892:Miquel:55 343 | CAMPO GENERO:34858548:Araceli:25 344 | CAMPO GENERO:37069991:Ander:63 345 | CAMPO GENERO:39737900:Félix:94 346 | CAMPO GIMBATTI:31793952:Maialen:84 347 | CAMPO GIMBATTI:32270890:María Rosario:29 348 | CAMPO GIMBATTI:34933924:Eduard:82 349 | CAMPO GIMBATTI:35242957:Candelaria:17 350 | CAMPO GIMBATTI:36174253:Antoni:71 351 | CAMPO GIMBATTI:37145756:Adam:30 352 | CAMPO GIMBATTI:39837008:Mariam:65 353 | CAMPO GIMENEZ:33740084:María Isabel:23 354 | CAMPO GIMENEZ:34965583:José Javier:45 355 | CAMPO GIMENEZ:36889831:María Begoña:19 356 | CAMPO GIMENEZ:38876927:María Concepción:33 357 | CAMPO GOLA:30149920:Manuela:50 358 | CAMPO GOLA:32981171:María Carme:88 359 | CAMPO GOLA:33615468:Marc:69 360 | CAMPO GOLA:33787857:Rafaela:46 361 | CAMPO GOLA:36632950:Mariem:53 362 | CAMPO GORETA:31088533:Esther:37 363 | CAMPO GORETA:36107289:Patricia:63 364 | CAMPO GORETA:36602151:Juan María:21 365 | CAMPO GORETA:37202021:Felipe:83 366 | CAMPO GORETA:39472737:María Sonsoles:53 367 | CAMPO GRANDE:30142081:Asunción:65 368 | CAMPO GRANDE:32001095:Nuria:55 369 | CAMPO GRANDE:32892965:María Pino:84 370 | CAMPO GRANDE:38925282:Antonio:54 371 | CAMPO GRANDE:39541071:José Francisco:51 372 | CAMPO HARDY:31922093:María Rosario:80 373 | CAMPO HARDY:32118582:Xabier:70 374 | CAMPO HARDY:32938811:Iria:72 375 | CAMPO HARDY:39085594:María Carme:34 376 | CAMPO HERRERA:32622557:María Concepción:67 377 | CAMPO HERRERA:33446075:Gregorio:35 378 | CAMPO HERRERA:33505784:Antonio:30 379 | CAMPO HERRERA:38348824:Margarita:88 380 | CAMPO HORQUESCO:31131230:Trinidad:28 381 | CAMPO HORQUESCO:32199509:Esperanza:57 382 | CAMPO HORQUESCO:33328869:Dolors:49 383 | CAMPO HORQUESCO:39349982:Aritz:31 384 | CAMPO HORQUESCO:39386710:Carmen Delia:45 385 | CHORRILLO:30326148:Juan José:97 386 | CHORRILLO:31419163:Silvia:97 387 | CHORRILLO:32928382:Silvia:63 388 | CHORRILLO:33023966:María Elena:24 389 | CHORRILLO:33586792:Maite:67 390 | EL CANQUEL:31134502:Dina:95 391 | EL CANQUEL:32001217:Iñaki:81 392 | EL CANQUEL:32513234:Antoni:86 393 | EL CANQUEL:34268580:Juan María:61 394 | EL CANQUEL:35771655:Mikel:19 395 | EL CANQUEL:37056950:Natalia:89 396 | EL CANTADERO:33153251:José Ramón:27 397 | EL CANTADERO:36717259:Jorge:79 398 | EL CANTADERO:39099919:Félix:99 399 | EL CANTOR:32799393:Esther:20 400 | EL CANTOR:36397587:Margarita:67 401 | EL CAPACHO:35025852:Mina:92 402 | EL CAPACHO:37463569:Daniel:50 403 | EL CAPACHO:37507491:María Amparo:59 404 | EL CAPACHO:37520114:José Ángel:44 405 | EL CAPACHO:38826208:Rocío:72 406 | EL CARACOL:31740669:María:77 407 | EL CARACOL:34576634:Carlos:95 408 | EL CARACOL:36667517:Guadalupe:42 409 | EL CARACOL:38709682:Diego:42 410 | EL CARACOL:39094190:Encarnación:78 411 | EL CARAMELO:30967611:María Nieves:43 412 | EL CARAMELO:31245280:Sonia:22 413 | EL CARAMELO:33827843:María África:90 414 | EL CARAMELO:35995444:Isabel María:78 415 | EL CARAMELO:36728871:María Antonia:40 416 | EL CARAMELO:37084269:Alberto:33 417 | EL CARAMELO:38427912:Natalia:95 418 | EL CARANCHITO:33132150:María Cruz:64 419 | EL CARANCHITO:33384131:Juana María:86 420 | EL CARANCHITO:37252320:Joaquín:92 421 | EL CARANCHO:30792806:Pablo:69 422 | EL CARANCHO:39636963:Lucia:86 423 | EL CARBALINO:30806735:Ignacio:80 424 | EL CARBALINO:31938866:María Amparo:76 425 | EL CARBALINO:32719963:Amparo:96 426 | EL CARBALINO:32744341:Martí:43 427 | EL CARBALINO:34540470:Rodrigo:74 428 | EL CARBALINO:39972785:Fátima Sohora:56 429 | EL REMANCE:38605958:Unai:83 430 | EL REMANCE:38870058:María Sonsoles:56 431 | PASO ALGARROBO:34940708:Iván:54 432 | PASO ALSINA:31788144:Nuria:58 433 | PASO ALSINA:33470257:Mariem:80 434 | PASO ALSINA:34759696:Guillermo:21 435 | PASO ALSINA:36606062:Victoria:42 436 | PASO ALSINA:36618591:Ana Isabel:56 437 | PASO ALSINA:38439387:Enric:85 438 | PASO ANCHO:35304548:Dunia:55 439 | PASO ANCHO:36057286:Lorenzo:78 440 | PASO ANCHO:38140308:Miquel:40 441 | PASO ANCHO:38885344:Juan José:86 442 | PASO BANDERA:32349155:María Elena:57 443 | PASO BANDERA:32724312:María Josefa:74 444 | PASO BANDERA:36725326:María Llanos:17 445 | PASO BANDERA:37151535:Antonio Manuel:25 446 | PASO BANDERA:37862565:José Ramón:77 447 | PASO BANDERA:37994334:Ángela:69 448 | PASO BARDA:30962295:Merce:59 449 | PASO BARDA:31151335:Esther:21 450 | PASO BARDA:32409640:Arnau:93 451 | PASO BERMUDEZ:39576226:Miguel Ángel:47 452 | PASO BERMUDEZ:39793506:Elisa:86 453 | PASO CABRAL:31417184:Pino:59 454 | PASO CABRAL:33261643:Francisco Manuel:23 455 | PASO CABRAL:34634927:María Candelaria:96 456 | PASO CABRAL:37256853:Lucia:93 457 | PASO CABRAL:38303436:Ana María:20 458 | PASO CABRAL:39706206:Pino:58 459 | PASO CASTELLANOS:33807094:María Concepción:38 460 | PASO CASTELLANOS:37030664:Rocío:81 461 | PASO CASTELLANOS:38042572:Josefina:57 462 | PASO CATA TUN:37449585:Joel:61 463 | PASO CATA TUN:38709179:Francisco Javier:90 464 | PASO CATA TUN:39163146:Ander:95 465 | PASO CATA TUN:39894143:María África:22 466 | RIACHO HE HE:30451792:José Juan:44 467 | RIACHO HE HE:30636615:Candelaria:64 468 | RIACHO HE HE:32895112:Juan Carlos:64 469 | RIACHO HE HE:38596293:Jaume:17 470 | RIACHO HE HE:40160631:Abdeselam:61 471 | RIACHO LINDO:31693826:María Rosario:68 472 | RIACHO LINDO:31957983:César:30 473 | RIACHO LINDO:35962161:Bárbara:57 474 | RIACHO LINDO:36005870:Gregorio:73 475 | RIACHO LINDO:37225853:Julia:74 476 | RIACHO LINDO:37689226:Daniel:94 477 | RIACHO LINDO:38692912:Eduardo:87 478 | RIACHO LINDO:39718289:Aritz:18 479 | RIACHO NEGRO:32757401:Josefa:40 480 | RIACHO NEGRO:36063914:María Carmen:18 481 | RIACHO NEGRO:36068469:María Pino:80 482 | RIACHO NEGRO:36685283:Aritz:51 483 | RIACHO NEGRO:36786963:Igor:52 484 | RIACHO RAMIREZ:30257783:Ismael:87 485 | RIACHO RAMIREZ:30967215:Teresa:18 486 | RIACHO RAMIREZ:32196160:Jonathan:34 487 | RIACHO RAMIREZ:35416656:José Vicente:61 488 | RIACHO RAMIREZ:35938712:Ángela:41 489 | RIACHO RAMIREZ:38673772:Mohamed:49 490 | RIACHO RAMIREZ:39736928:Pau:27 491 | RIACHUELITO:30403789:Carmen María:48 492 | RIACHUELITO:32191096:María Magdalena:97 493 | RIACHUELITO:32576482:Elvira:97 494 | RIACHUELITO:32680366:Mina:77 495 | RIACHUELITO:33812715:Miguel Ángel:64 496 | RIACHUELO:32603682:Mikel:24 497 | RIACHUELO:33530118:María Ángeles:32 498 | RIACHUELO:36365601:Raúl:35 499 | RIACHUELO:39115249:Cristina:31 500 | YRAIZOS:36253614:Francisco Javier:38 501 | --------------------------------------------------------------------------------