This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import javax.swing.JButton; | |
import javax.swing.JFrame; | |
import javax.swing.JLabel; | |
import javax.swing.JOptionPane; | |
import javax.swing.JTextField; | |
/** | |
* Clase Ventana |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tech.alvarez.today; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.View; | |
import android.widget.ProgressBar; | |
import android.widget.Toast; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.danielalvarez.formulario; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.support.design.widget.Snackbar; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.View; | |
public class MainActivity extends AppCompatActivity { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tech.alvarez; | |
public class Constantes { | |
public static final int SIN_ESPECIALIDAD = 0; | |
public static final int ESPECIALIDAD_ODONTOLOGIA = 1; | |
public static final int ESPECIALIDAD_NEUROLOGIA = 2; | |
public static final int ESPECIALIDAD_PEDIATRIA = 3; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tech.alvarez; | |
import java.util.ArrayList; | |
public class EjemploArrayList { | |
public static void main(String[] args) { | |
ArrayList<Estudiante> l = new ArrayList<Estudiante>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="tech.alvarez.today"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<application | |
android:name=".TodayApp" | |
android:allowBackup="true" | |
android:icon="@mipmap/ic_launcher" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tech.alvarez; | |
import java.util.Stack; | |
public class Main { | |
public static void main(String[] args) { | |
Stack<Libro> pila = new Stack<Libro>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
/** | |
* Clase para ejecutar el algoritmo para generar una matriz caracol cuadrada | |
* @author Daniel Alvarez | |
*/ | |
public class Main { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String getJsonFromUrl(String urlString) { | |
StringBuilder result = new StringBuilder(); | |
HttpURLConnection urlConnection = null; | |
try { | |
URL url = new URL(urlString); | |
urlConnection = (HttpURLConnection) url.openConnection(); | |
InputStream in = new BufferedInputStream(urlConnection.getInputStream()); | |
BufferedReader reader = new BufferedReader(new InputStreamReader(in)); | |
String line; | |
while ((line = reader.readLine()) != null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>(); |
NewerOlder