Skip to content

Instantly share code, notes, and snippets.

View jrbalsas's full-sized avatar

José Ramón Balsas jrbalsas

  • University of Jaén
  • Jaén - Spain
View GitHub Profile
@jrbalsas
jrbalsas / fragmentos.cpp
Last active October 4, 2016 07:31
EEDD PR2
//Constructor parametrizado PR1
Vector<Fichero> v(10);
//....
Vector<Fichero> w(v,4,2);
class Commit {
std::string codigo;
//....
class Commit {
//...
ListaDEnlazada<Fichero*> ficherosModificados;
VDinamico<Ficheros> getFicheros() ;
};
VDinamico<Ficheros> Commit::getFicheros () {
@jrbalsas
jrbalsas / nombre.jsp
Last active March 1, 2017 17:16
DAW. Práctica 4. Ejemplos de uso de JSP
<%--
Ejemplo de formulario con validación simple en JSP utilizando scriptlets
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
@jrbalsas
jrbalsas / SpringDispatcher-servlet.xml
Last active March 27, 2017 07:23
DAW Muro SpringMVC
<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc
@jrbalsas
jrbalsas / Racional.cpp
Last active February 20, 2018 12:03
Ejemplo de clase Racional
/*
* File: Racional.cpp
* Author: jrbalsas
*
* Created on 6 de febrero de 2018, 11:24
*/
#include "Racional.h"
#include <iostream>
//Racional::Racional()
@jrbalsas
jrbalsas / app.js
Last active May 4, 2018 12:02
Práctica angular
angular.module('Club',[ 'ClientesControllerModule' /*otros módulos de la APP*/ ] );
@jrbalsas
jrbalsas / ClientesRESTService.java
Last active March 23, 2019 15:14
Cambios para introducir JAX-RS en app SpringMVC
@Path("/clientes")
@Produces(MediaType.APPLICATION_JSON)
//@RequestScoped //No necesario con Spring
public class ClientesRESTService {
@Context
private UriInfo context;
@Autowired //Utilizamos anotaciones de inyección Spring
@Qualifier("clienteDAOList")
@jrbalsas
jrbalsas / 01_MuroWebApplicationInitializer.java
Last active March 26, 2019 08:49
DAW P8 fragmentos de código
public class MuroWebApplicationInitializer
implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext container) {
// Create the 'root' Spring application context
AnnotationConfigWebApplicationContext rootContext
= new AnnotationConfigWebApplicationContext();
rootContext.register(SpringMvcConfig.class);
// Manage the lifecycle of the Spring root application context
@jrbalsas
jrbalsas / create_realm.bat
Last active April 12, 2019 16:14
JDBC realm creation with asadmin util
REM Windows version: escape : with \: and linefeed with ^
c:\payara5\glassfish\bin\asadmin create-auth-realm ^
--classname com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm ^
--property jaas-context=jdbcRealm^
:datasource-jndi=java\:global/jdbc/auth^
:user-table=USUARIOS^
:user-name-column=USUARIO^
:password-column=CLAVE^
:group-table=ROLES^

Keybase proof

I hereby claim:

  • I am jrbalsas on github.
  • I am jrbalsas (https://keybase.io/jrbalsas) on keybase.
  • I have a public key ASDoiUvqg0r4LnC-BB843eqdzk6EW_hU0l2amLR3nPW-Nwo

To claim this, I am signing this object: