This file contains hidden or 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.LinkedList; | |
import java.util.ListIterator; | |
public class Main { | |
public static void main(String[] args) { | |
LinkedList<Estudiante> lista = new LinkedList<Estudiante>(); |
This file contains hidden or 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.intents; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; | |
import android.support.v4.app.ActivityCompat; | |
import android.support.v7.app.AppCompatActivity; | |
import android.util.Log; |
This file contains hidden or 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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/activity_segunda" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="horizontal" | |
tools:context="tech.alvarez.ejemploviews.SegundaActivity"> | |
<TextView |
This file contains hidden or 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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/activity_segunda" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
tools:context="tech.alvarez.ejemploviews.SegundaActivity"> | |
<TextView |
This file contains hidden or 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"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:id="@+id/activity_segunda" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="tech.alvarez.ejemploviews.SegundaActivity"> | |
<TextView | |
android:layout_width="100dp" |
This file contains hidden or 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 hidden or 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"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
android:paddingBottom="@dimen/activity_vertical_margin" | |
android:paddingLeft="@dimen/activity_horizontal_margin" | |
android:paddingRight="@dimen/activity_horizontal_margin" | |
android:paddingTop="@dimen/activity_vertical_margin" |
This file contains hidden or 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
for(key in data) { | |
if(data.hasOwnProperty(key)) { | |
var value = data[key]; | |
console.log(value); | |
} | |
} |
This file contains hidden or 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
// SUGERENCIA DE SOLUCIÓN | |
Queue<Vehiculo> colaVehiculos = new LinkedList<Vehiculo>(); | |
Queue<Soat> colaPrioridadSoats = new PriorityQueue<Soat>(); // Clase Soat debe ser comparable | |
Queue<Soat> tempColaPrioridadSoats = new PriorityQueue<Soat>(); | |
// adicionar datos a las colas (no a la temporal) | |
while (!colaPrioridadSoats.isEmpty()) { | |
Soat s = colaPrioridadSoats.remove(); |
This file contains hidden or 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 static void mostrarColaPrioridad(Queue<Persona> colaPrioridad) { | |
System.out.println("mostrar"); | |
Queue<Persona> temp = new PriorityQueue<Persona>(); | |
while (!colaPrioridad.isEmpty()) { | |
Persona p = colaPrioridad.remove(); | |
System.out.println("Nombre: " + p.getNombre()); | |
temp.add(p); | |
} | |
while (!temp.isEmpty()) { | |
Persona p = temp.remove(); |