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
import java.util.*; | |
public class Main{ | |
//List para almacenar los numeros de cada uno de los casos, tendría la misma finalidad del arreglo | |
//La diferencia de esta es que no necesitamos especificarle el tamaño total | |
//Ademas podemos manejar genericos (<>) que significa que nuestra lista considerara que todos son enteros | |
// por lo tanto cuando las utilicemos podra usar las funciones especificas a Integer | |
private static List<Integer> cant =new ArrayList<Integer>(); | |
public static void main(String []args){ |
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
<?php | |
//algo similar a la pagina guardar.php | |
$usuario = 'root'; | |
$pass = ''; // en el caso de xampp no hay contraseña pero es la de mysql | |
try{ | |
//primero abriremos la conexion | |
$con = new PDO('mysql:host=localhost;dbname=dbprogweb',$usuario, $pass); | |
//note que cambiamos prepare por query porque es consulta | |
$resultado = $con->query("SELECT * FROM alumnos"); | |
//recorremos los resultados |
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 class CalculadoraSimple { | |
private int res; | |
public void suma(int a, int b){ | |
res = a+b; | |
} | |
public void resta (int a, int b){ | |
res = a-b; |
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
<? | |
session_start(); | |
$json_android = json_decode(file_get_contents("php://input"); | |
$email = $json_android->correo; | |
$pass = $json_android->password; | |
if($email=='prueba' && $pass=='prueba') { | |
$_SESSION['status'] = "ok"; | |
$_SESSION['nombre'] = "Usuario logeado"; | |
$_SESSION['correo'] = "uno@com"; |
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
Show hidden characters
{ | |
"cmd": ["/Library/Frameworks/Python.framework/Versions/3.6/bin/python3", "$file"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
"selector": "source.python", | |
"working_dir":"${file_path}" | |
} |
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"?> | |
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:padding="0dp" | |
tools:context="android.adhoctalent.com.aplicacion19.MainActivity"> | |
<android.support.design.widget.TextInputLayout |
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
<?php | |
$to = "jcobian@itstequila.edu.mx"; | |
$subject = "Hi!"; | |
$body = "Hi,\n\nHow are you?"; | |
$headers = "From: coby10@gmail.com" . "\r\n"; | |
if (mail($to, $subject, $body, $headers)) { | |
echo ("Message successfully sent!"); | |
} else { | |
echo ("Message delivery failed..."); | |
} |
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 com.tecmm.principal; | |
import com.tecmm.logica.Operaciones; | |
import javax.swing.JOptionPane; | |
public class Principal { | |
public static void main(String[] args) { | |
System.out.println |
OlderNewer