Skip to content

Instantly share code, notes, and snippets.

View legarnica's full-sized avatar
💭
I may be slow to respond.

Luis Herrera legarnica

💭
I may be slow to respond.
  • Santiago de chile
View GitHub Profile
package talleres;
import java.util.ArrayList;
interface IFood {
String getName();
int getCalories();
double getPrice();
}
abstract class AbstractFood implements IFood {
CREATE TABLE aseguradora (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
nombre VARCHAR(45)
);
CREATE TABLE enum_estado_cuenta (
id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
nombre VARCHAR(45)
);
@legarnica
legarnica / Principal.java
Last active August 31, 2020 01:38
abstract-factory-ex001
package cl.lherrera;
public class Principal {
public static void main(String[] args) {
Cuadrado cuadrado = new Cuadrado(2.0);
Rectangulo rectangulo = new Rectangulo(2.0, 3.0);
System.out.println("El area de un " + cuadrado + " es: " + cuadrado.area());
System.out.println("El area de un " + rectangulo + " es: " + rectangulo.area());
}
-- DROP TABLE "JOB_HISTORY";
-- DROP TABLE "EMPLOYEES";
-- DROP TABLE "DEPARTMENTS";
-- DROP TABLE "JOBS";
-- DROP TABLE "LOCATIONS";
-- DROP TABLE "COUNTRIES";
-- DROP TABLE "REGIONS";
CREATE TABLE "REGIONS"
@legarnica
legarnica / finalHRdatos.sql
Created August 10, 2020 00:27
Datos de la base HR
alter table "JOB_HISTORY" disable constraint "JHIST_DEPT_FK";
alter table "JOB_HISTORY" disable constraint "JHIST_EMP_FK";
alter table "JOB_HISTORY" disable constraint "JHIST_JOB_FK";
alter table "EMPLOYEES" disable constraint "EMP_DEPT_FK";
alter table "EMPLOYEES" disable constraint "EMP_JOB_FK";
alter table "EMPLOYEES" disable constraint "EMP_MANAGER_FK";
alter table "EMPLOYEES" disable constraint "EMP_MANAGER_FK";
alter table "EMPLOYEES" disable constraint "EMP_MANAGER_FK";
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<display-name>Certification</display-name>
<servlet>
driverClassName=org.sqlite.JDBC
url=jdbc:sqlite:certificacion.db
username=user
password=1234
/*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
*
*/
package cl.lherrera.configuracion;
package cl.lherrera.configuracion;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment;
@legarnica
legarnica / schema.sql
Created August 9, 2020 21:14
esquema para el proyecto final JFS
-- descomentar línea de abajo, después de la primera ejecución.
-- DROP table arriendo_quincho; DROP table departamento; DROP table estado; DROP table hibernate_sequence;
-- arriendo_quincho definition
CREATE TABLE arriendo_quincho (
id integer not null,
fecha date_time,
departamento_id integer,
estado_id integer,