Skip to content

Instantly share code, notes, and snippets.

View alvareztech's full-sized avatar
:octocat:
Coding...

Daniel Alvarez alvareztech

:octocat:
Coding...
View GitHub Profile
@alvareztech
alvareztech / Constantes.java
Created September 14, 2016 03:04
Intro Practica Recuperatoria (Colas)
package tech.alvarez;
public class Constantes {
public static final int SOAT_TIPO_PUBLICO = 1;
public static final int SOAT_TIPO_PRIVADO = 2;
}
@alvareztech
alvareztech / Main.java
Created September 10, 2016 06:51
Zodiaco FX
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.geometry.Insets;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
@alvareztech
alvareztech / activity_main.xml
Created September 10, 2016 04:30
Sesión 0, elemental
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
android:scaleType="centerCrop" />
@alvareztech
alvareztech / Main.java
Created September 7, 2016 14:37
Estructura de datos>Colas>Ejercicio 1
package tech.alvarez;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Queue;
public class Main {
public static void main(String[] args) {
@alvareztech
alvareztech / Main.java
Created September 5, 2016 00:23
Ejemplo colas de prioridad en Java. PriorityQueue.
package tech.alvarez;
import java.util.PriorityQueue;
import java.util.Queue;
public class Main {
public static void main(String[] args) {
Queue<Persona> cola = new PriorityQueue<Persona>();
@alvareztech
alvareztech / Main.java
Created September 5, 2016 00:18
Ejemplo Colas en Java. Queue.
package tech.alvarez;
import java.util.LinkedList;
import java.util.Queue;
public class Main {
public static void main(String[] args) {
Queue<Persona> cola = new LinkedList<Persona>();
@alvareztech
alvareztech / Main.java
Created August 31, 2016 03:15
Estructura de datos>Pilas>Práctica 2>Solución 1
package tech.alvarez;
import java.util.Stack;
public class Main {
public static void main(String[] args) {
Stack<Ticket> ven1Vip = new Stack<Ticket>();
Stack<Ticket> ven1Gral = new Stack<Ticket>();
Stack<Ticket> ven2Vip = new Stack<Ticket>();
@alvareztech
alvareztech / .json
Created August 26, 2016 12:28
Ejemplo Envio
Content-Type:application/json
Authorization:key=KEY
{
"to": "f94XHR9cA-Y:APA91bFJ-foRTaZz0q4jUqUcrNNoAV5sbflgJPlyS5XOrx9QtWWlPdzQfhAhLMgL5_kAVxBUcbfboyErEZ4vMVPKVpzsHfp0yAOJGHlyRMURbOLJrj1da1PC8kuHtdi8lMvnpVE6eVS2",
"notification": {
"title": "Noticia desde el servidor",
"body": "Descripción de la noticia desde el servidor"
},
"data": {
@alvareztech
alvareztech / Libro.java
Last active August 24, 2016 16:14
Ejercicio 1: Pilas
package tech.alvarez;
public class Libro {
private String titulo;
private String autor;
public Libro() {
this.titulo = "";
this.autor = "";
@alvareztech
alvareztech / Main.java
Created August 22, 2016 21:36
Ejemplo básico de Pilas en Java
package tech.alvarez;
import java.util.Stack;
public class Main {
public static void main(String[] args) {
Stack<Libro> pila = new Stack<Libro>();