Skip to content

Instantly share code, notes, and snippets.

View HashRaygoza's full-sized avatar

David Raygoza Gómez HashRaygoza

View GitHub Profile
@HashRaygoza
HashRaygoza / App.java
Created February 9, 2020 00:58
Ejemplo del uso de reflexion en Java
package hash.blog.reflexion;
import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class App {
public static void main(String[] args) {
@HashRaygoza
HashRaygoza / Comunicado.java
Created February 9, 2020 00:58
Clase Comunicado
package hash.blog.reflexion;
public class Comunicado {
private String encabezado;
private String departamento;
private String mensaje;
/**
* @return the encabezado
*/
@HashRaygoza
HashRaygoza / Reflexion.java
Created February 9, 2020 00:56
Acceso a getter y setters
package hash.blog.reflexion;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
public class Reflexion {
public void callSetter(Object objeto, String nombreCampo, Object valor) throws IntrospectionException,
@HashRaygoza
HashRaygoza / ResultadoAnalisis.java
Created February 9, 2020 00:49
Clase ResultadoAnalisis
package hash.blog.reflexion;
public class ResultadoAnalisis {
private String cantidad;
private String resultado;
private String instrumento;
/**
* @return the cantidad
*/
@HashRaygoza
HashRaygoza / Prueba.java
Created January 24, 2020 17:55
Mostrar los datos de certificaro en pantalla
package mx.com.pydee.mavenfirma;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
@HashRaygoza
HashRaygoza / firmador.xml
Created January 24, 2020 17:54
Firma digital con maven
<plugin>
<artifactId>maven-jarsigner-plugin</artifactId>
<version>1.4</version>
<exearcutions>
<execution>
<id>sign</id>
<goals>
<goal>sign</goal>
</goals>
</execution>
@HashRaygoza
HashRaygoza / accion2.xml
Created January 24, 2020 17:52
Otra accion de maven-exec-plugin
<execution>
<id>add-dataCert</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<workingDirectory>${project.basedir}</workingDirectory>
<executable>jar</executable>
<arguments>
@HashRaygoza
HashRaygoza / accion.xml
Created January 24, 2020 17:49
Accion de maven-exec-plugin
<execution>
<id>dataCert</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<workingDirectory>${project.basedir}</workingDirectory>
<executable>cmd.exe</executable>
<arguments>
@HashRaygoza
HashRaygoza / exec.xml
Created January 24, 2020 17:47
Ejemplo exec-maven-plugin
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3.2</version>
<executions>
<execution>
<id>dataCert</id>
<phase>compile</phase>
<goals>
<goal>exec</goal>
@HashRaygoza
HashRaygoza / enlace.html
Created December 29, 2019 19:29
Ejemplo de como enlazar un feed RSS a su pagina WEB
<head>
<title>Ejemplo Feed RSS</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Enlazamos el Feed RSS a la pagina -->
<link rel="alternate" type="application/rss+xml" title="RSS-example" href="rss.xml" />
</head>