From a91733ef9040d4f7acb3ad6c0de3409cbed465c6 Mon Sep 17 00:00:00 2001 From: Joaquin Elias Baranda Ayala Date: Wed, 27 Oct 2021 08:29:09 -0300 Subject: [PATCH] Initial commit --- .vscode/settings.json | 6 ++++++ Dia 2/herencia_box.java | 14 +++++++------- Dia 2/switch_lenguaje_programacion.java | 4 ++-- Dia 4/calulator.html | 6 ++---- Dia 5/Twitterproject.java | 301 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 6/TriggerEjercicio.sql | 19 +++++++++++++++++++ Dia 6/domejercicio2.html | 4 ++-- Dia 6/domejercicio3.html | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------- Dia 6/ejercicio_poker/Baraja.java | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 6/ejercicio_poker/Carta.java | 24 ++++++++++++++++++++++++ Dia 6/ejercicio_poker/Ejercicio_Poker.java | 13 +++++++++++++ Dia 6/ejercicio_poker/Poker proba.txt | 33 +++++++++++++++++++++++++++++++++ Dia 7/textWebApp-1/.gitignore | 33 +++++++++++++++++++++++++++++++++ Dia 7/textWebApp-1/.mvn/wrapper/MavenWrapperDownloader.java | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 7/textWebApp-1/.mvn/wrapper/maven-wrapper.jar | Bin 0 -> 50710 bytes Dia 7/textWebApp-1/.mvn/wrapper/maven-wrapper.properties | 2 ++ Dia 7/textWebApp-1/mvnw | 310 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 7/textWebApp-1/mvnw.cmd | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 7/textWebApp-1/pom.xml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ Dia 7/textWebApp-1/src/main/java/com/example/demo/TextWebApp1Application.java | 13 +++++++++++++ Dia 7/textWebApp-1/src/main/java/com/example/demo/empleado.java | 41 +++++++++++++++++++++++++++++++++++++++++ Dia 7/textWebApp-1/src/main/java/com/example/demo/pila.java | 11 +++++++++++ Dia 7/textWebApp-1/src/main/java/com/example/demo/push.java | 7 +++++++ Dia 7/textWebApp-1/src/main/java/com/example/demo/testcontroller.java | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 7/textWebApp-1/src/main/resources/application.properties | 6 ++++++ Dia 7/textWebApp-1/src/main/webapp/emp.jsp | 27 +++++++++++++++++++++++++++ Dia 7/textWebApp-1/src/main/webapp/pages/emp.jsp | 29 +++++++++++++++++++++++++++++ Dia 7/textWebApp-1/src/main/webapp/pages/file.jsp | 11 +++++++++++ Dia 7/textWebApp-1/src/test/java/com/example/demo/TextWebApp1ApplicationTests.java | 13 +++++++++++++ Dia 8/testBaseDatos/.gitignore | 33 +++++++++++++++++++++++++++++++++ Dia 8/testBaseDatos/.mvn/wrapper/MavenWrapperDownloader.java | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 8/testBaseDatos/.mvn/wrapper/maven-wrapper.jar | Bin 0 -> 50710 bytes Dia 8/testBaseDatos/.mvn/wrapper/maven-wrapper.properties | 2 ++ Dia 8/testBaseDatos/mvnw | 310 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 8/testBaseDatos/mvnw.cmd | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 8/testBaseDatos/pom.xml | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 8/testBaseDatos/src/main/app/pages/films.jsp | 24 ++++++++++++++++++++++++ Dia 8/testBaseDatos/src/main/java/com/BDtest/TestBaseDatosApplication.java | 19 +++++++++++++++++++ Dia 8/testBaseDatos/src/main/java/com/BDtest/controller/FilmController.java | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 8/testBaseDatos/src/main/java/com/BDtest/controller/FilmInsert.java | 26 ++++++++++++++++++++++++++ Dia 8/testBaseDatos/src/main/java/com/BDtest/model/Film.java | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 8/testBaseDatos/src/main/java/com/BDtest/repository/FilmRepository.java | 9 +++++++++ Dia 8/testBaseDatos/src/main/resources/application.properties | 11 +++++++++++ Dia 8/testBaseDatos/src/main/webapp/pages/films.jsp | 24 ++++++++++++++++++++++++ Dia 8/testBaseDatos/src/main/webapp/pages/insertFilms.jsp | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ Dia 8/testBaseDatos/src/test/java/com/BDtest/TestBaseDatosApplicationTests.java | 13 +++++++++++++ 46 files changed, 2512 insertions(+), 38 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 Dia 5/Twitterproject.java create mode 100644 Dia 6/TriggerEjercicio.sql create mode 100644 Dia 6/ejercicio_poker/Baraja.java create mode 100644 Dia 6/ejercicio_poker/Carta.java create mode 100644 Dia 6/ejercicio_poker/Ejercicio_Poker.java create mode 100644 Dia 6/ejercicio_poker/Poker proba.txt create mode 100644 Dia 7/textWebApp-1/.gitignore create mode 100644 Dia 7/textWebApp-1/.mvn/wrapper/MavenWrapperDownloader.java create mode 100644 Dia 7/textWebApp-1/.mvn/wrapper/maven-wrapper.jar create mode 100644 Dia 7/textWebApp-1/.mvn/wrapper/maven-wrapper.properties create mode 100644 Dia 7/textWebApp-1/mvnw create mode 100644 Dia 7/textWebApp-1/mvnw.cmd create mode 100644 Dia 7/textWebApp-1/pom.xml create mode 100644 Dia 7/textWebApp-1/src/main/java/com/example/demo/TextWebApp1Application.java create mode 100644 Dia 7/textWebApp-1/src/main/java/com/example/demo/empleado.java create mode 100644 Dia 7/textWebApp-1/src/main/java/com/example/demo/pila.java create mode 100644 Dia 7/textWebApp-1/src/main/java/com/example/demo/push.java create mode 100644 Dia 7/textWebApp-1/src/main/java/com/example/demo/testcontroller.java create mode 100644 Dia 7/textWebApp-1/src/main/resources/application.properties create mode 100644 Dia 7/textWebApp-1/src/main/webapp/emp.jsp create mode 100644 Dia 7/textWebApp-1/src/main/webapp/pages/emp.jsp create mode 100644 Dia 7/textWebApp-1/src/main/webapp/pages/file.jsp create mode 100644 Dia 7/textWebApp-1/src/test/java/com/example/demo/TextWebApp1ApplicationTests.java create mode 100644 Dia 8/testBaseDatos/.gitignore create mode 100644 Dia 8/testBaseDatos/.mvn/wrapper/MavenWrapperDownloader.java create mode 100644 Dia 8/testBaseDatos/.mvn/wrapper/maven-wrapper.jar create mode 100644 Dia 8/testBaseDatos/.mvn/wrapper/maven-wrapper.properties create mode 100644 Dia 8/testBaseDatos/mvnw create mode 100644 Dia 8/testBaseDatos/mvnw.cmd create mode 100644 Dia 8/testBaseDatos/pom.xml create mode 100644 Dia 8/testBaseDatos/src/main/app/pages/films.jsp create mode 100644 Dia 8/testBaseDatos/src/main/java/com/BDtest/TestBaseDatosApplication.java create mode 100644 Dia 8/testBaseDatos/src/main/java/com/BDtest/controller/FilmController.java create mode 100644 Dia 8/testBaseDatos/src/main/java/com/BDtest/controller/FilmInsert.java create mode 100644 Dia 8/testBaseDatos/src/main/java/com/BDtest/model/Film.java create mode 100644 Dia 8/testBaseDatos/src/main/java/com/BDtest/repository/FilmRepository.java create mode 100644 Dia 8/testBaseDatos/src/main/resources/application.properties create mode 100644 Dia 8/testBaseDatos/src/main/webapp/pages/films.jsp create mode 100644 Dia 8/testBaseDatos/src/main/webapp/pages/insertFilms.jsp create mode 100644 Dia 8/testBaseDatos/src/test/java/com/BDtest/TestBaseDatosApplicationTests.java diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..14bb27e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "java.project.sourcePaths": [ + "Dia 2", + "Dia 5" + ] +} \ No newline at end of file diff --git a/Dia 2/herencia_box.java b/Dia 2/herencia_box.java index fb6dccc..2f3d4ee 100644 --- a/Dia 2/herencia_box.java +++ b/Dia 2/herencia_box.java @@ -1,27 +1,27 @@ -import java.time.chrono.ThaiBuddhistChronology; +//import java.time.chrono.ThaiBuddhistChronology; -import javax.swing.Box; +//import javax.swing.Box; -class box { +class box1 { float ancho; float alto ; float profundidad; float volumen; - public box (float ancho,float alto,float profundidad){ + public box1 (float ancho,float alto,float profundidad){ this.ancho=ancho; this.alto=alto; this.profundidad=profundidad; } - public box (){ + public box1 (){ } - public box (float ancho){ + public box1 (float ancho){ this.ancho=ancho; this.alto=ancho; this.profundidad=ancho; @@ -36,7 +36,7 @@ class box { -class BoxPeso extends box { +class BoxPeso extends box1 { float peso; diff --git a/Dia 2/switch_lenguaje_programacion.java b/Dia 2/switch_lenguaje_programacion.java index 33faad6..554d699 100644 --- a/Dia 2/switch_lenguaje_programacion.java +++ b/Dia 2/switch_lenguaje_programacion.java @@ -1,6 +1,6 @@ -import java.util.Scanner; -public class switch_lenguaje_programacion5 { + +public class switch_lenguaje_programacion { public static void main(String[] args) { String nro; System.out.println("Ingrese un nuemro del 1 al 6"); diff --git a/Dia 4/calulator.html b/Dia 4/calulator.html index 6510119..2df47a2 100644 --- a/Dia 4/calulator.html +++ b/Dia 4/calulator.html @@ -136,9 +136,7 @@ background: grey; } - #tabla{ - margin left: 20px; - } + @@ -148,7 +146,7 @@ -

Calculadora

+

Calculadora1




diff --git a/Dia 5/Twitterproject.java b/Dia 5/Twitterproject.java new file mode 100644 index 0000000..58b08d9 --- /dev/null +++ b/Dia 5/Twitterproject.java @@ -0,0 +1,301 @@ +import java.nio.file.attribute.UserPrincipalLookupService; +import java.security.Identity; + + +public class Twitterproject { + public static void main(String[] args) { + Twitterproject tp = new Twitterproject(); + + Usuario user = new Usuario(); + + boolean exit = false; + + String opcion1; + + // Reacciones reac = new Reacciones(); + + + Tweet t1 = new Tweet (); + + while (!exit){ + System.out.println("1. Iniciar Sesion"); + System.out.println("2. Salir de Twitter"); + + opcion1 = System.console().readLine(); + // opcion=s.nextInt(); + + switch(opcion1){ + case "1": + System.out.println("Ingrese Usuario"); + user.setNombreUsuario(System.console().readLine()); + System.out.println("Ingrese password"); + user.setContrasena(System.console().readLine()); + System.out.println("Has iniciado sesion !!!"); + + tp.crearTweet(); + // tp.cargarTweet(); + + // System.out.println(t1.verComentario(u, t);); + + break; + case "2": + exit =true; + break ; + default: + System.out.println("Debe introducir "); + } + } + + + + + + } + + public void crearTweet() { + + // Twitterproject tp = new Twitterproject(); + + boolean salir = false; + + String opcion; + + + while (!salir){ + System.out.println("1. Desea tweetear"); + System.out.println("2. Atras"); + + opcion = System.console().readLine(); + // opcion=s.nextInt(); + + switch(opcion){ + case "1": + cargarTweet(); + break; + case "2": + salir=true; + break ; + default: + System.out.println("Debe introducir 1 o 2"); + } + + } + } + + public void cargarTweet() { + Tweet t1 = new Tweet (); + + System.out.println("¿Que esta pasando?"); + t1.setTweetId(1); + t1.setTweetTexto(System.console().readLine()); + System.out.println("ID nro "+t1.getTweetID()+" Mensaje del Tweet: "+t1.getTweetTexto()); + System.out.println("----------"); + + } + +} + +class Tweet { + private int tweetId; + private String tweetTexto; + private int nroLikes; + Usuario u; + + public int getTweetID() { + return tweetId; + } + + public void setTweetId(int tweetId) { + this.tweetId = tweetId; + } + + public String getTweetTexto() { + return tweetTexto; + } + + public void setTweetTexto(String tweetTexto) { + this.tweetTexto = tweetTexto; + } + + public int getNroLikes() { + return nroLikes; + } + + public void setNroLikes(int nroLikes) { + this.nroLikes = nroLikes; + } + + public void verComentario(Usuario u, Tweet t){ + + + System.out.println("Usuario "+u.getNombreUsuario()+" Tweet "+ t.getTweetTexto()); + } + +} + +class TweetImage extends Tweet{ + private String tweetImageUrl; + + public String getTweetImageUrl(){ + return tweetImageUrl; + } + + public void setTweetImageUrl(String tweetImageUrl){ + this.tweetImageUrl=tweetImageUrl; + } +} +/* +class TweetLink extends Tweet{ + private tweetUrl; +}*/ + +class ComentarioImage extends Tweet { + + private String imageUrl; + + public String getImageUrl(){ + return imageUrl; + } + + public void setImageUrl (String imageUrl){ + this.imageUrl=imageUrl; + } +} +/* +class ComentarioUrl extends Tweet { + + private String imageUrl; + + public String getImageUrl(){ + return imageUrl; + } + + public void setImageUrl (String imageUrl){ + this.imageUrl=imageUrl; + } +} + +*/ + + + +class Usuario { + private String nombreUsuario; + private String Contrasena; + private String Correo; + private String fechaNacimiento; + private String fechaIngreso; + private String urlPhoto; + private String Descripcion; + private boolean isVerificado; + + public String getNombreUsuario() { + return nombreUsuario; + } + + public void setNombreUsuario(String nombreUsuario) { + this.nombreUsuario = nombreUsuario; + } + + public String getContrasena() { + return Contrasena; + } + + public void setContrasena(String Contrasena) { + this.Contrasena = Contrasena; + } + + public String getCorreo() { + return Correo; + } + + public void setCorreo(String Correo) { + this.Correo = Correo; + } + + public String getFechaNacimiento() { + return fechaNacimiento; + } + + public void setFechaNacimiento(String fechaNacimiento) { + this.fechaNacimiento = fechaNacimiento; + } + + public String getFechaIngreso() { + return fechaIngreso; + } + + public void setFechaIngreso(String fechaIngreso) { + this.fechaIngreso = fechaIngreso; + } + + public String getUrlPhoto() { + return urlPhoto; + } + + public void setUrlPhoto(String urlPhoto) { + this.urlPhoto = urlPhoto; + } + + public String getDescripcion() { + return Descripcion; + } + + public void setDescripcion(String Descripcion) { + this.Descripcion = Descripcion; + } + + public boolean isIsVerificado() { + return isVerificado; + } + + public void setIsVerificado(boolean isVerificado) { + this.isVerificado = isVerificado; + } + +} + +class Reacciones { + Usuario u ; + Tweet e ; + + public void setLike (Usuario u ,Tweet e ){ + this.u=u; + this.e=e; + } + + public void reTweet (Usuario u ,Tweet e ){ + this.u=u; + this.e=e; + } + +} + +class Seguimiento { + Usuario u; + + public void dejarDeSeguir () { + + } + + public void seguir () { + + } + + public void verSeguidores () { + + } + + public void verSeguidos () { + + } +} + +class Dashboard { + Usuario u; + Tweet t ; + + public void verLosUltimosTweetsDeLosSeguidos(Usuario u, Tweet t){ + + } +} diff --git a/Dia 6/TriggerEjercicio.sql b/Dia 6/TriggerEjercicio.sql new file mode 100644 index 0000000..bc1801f --- /dev/null +++ b/Dia 6/TriggerEjercicio.sql @@ -0,0 +1,19 @@ + +create function tr_OldInventory() returns Trigger +as +$$ +begin +insert into registro_inventory(inventory_id , film_id , store_id , fecha) +values (old.inventory_id, old.film_id , old.store_id , old.last_update); +return new; +end +$$ +language plpgsql; + +create trigger inventory_update after update on inventory +for each row execute procedure tr_OldInventory(); + +update inventory set film_id=2 where inventory_id=2 +/*Comprobacion del UPDATE*/ +select * from inventory where inventory_id=2 +select * from registro_inventory diff --git a/Dia 6/domejercicio2.html b/Dia 6/domejercicio2.html index ec67fb3..5995a04 100644 --- a/Dia 6/domejercicio2.html +++ b/Dia 6/domejercicio2.html @@ -38,8 +38,8 @@ document.getElementById('postaladdress').addEventListener('change', () => { alert(campo1.value); - } - ); + } + ); diff --git a/Dia 6/domejercicio3.html b/Dia 6/domejercicio3.html index 3c1c8f7..559c2e7 100644 --- a/Dia 6/domejercicio3.html +++ b/Dia 6/domejercicio3.html @@ -3,39 +3,72 @@ + + -
- Personal details -

- -

-

Please enter your name above

-

- -

-

Please enter your street address

-
- +
+ Personal details +

+ +

+

Please enter your name above

+

+ +

+

Please enter your street address

+
+ +