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
Guia para generar imagen de Docker a partir del contenedor y subirla a DockerIO | |
1) docker commit containerid | |
2) docker tag imageid nombreaelegir | |
3) docker login --u | |
4) Si hay error con timeout despues de introducir password sudo apt install gnupg2 pass y reintentar | |
5) docker build -t usuariodocker/nombreimagen:latest . | |
6) docker push usuariodocker/nombreimagen:latest |
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 class FormatoAmigable | |
{ | |
/** Limites https://cs.fit.edu/~ryan/java/language/java-data.html | |
* Calculadora https://www.dcode.fr/big-numbers-division | |
* MAX_INT = 2147483647 | |
* MAX_LONG = 9223372036854775807 | |
* Segundos en un ano = 31536000 | |
* Cantidad max anos (int) 68 | |
* Cantidad max anos (long) 292471208677 | |
*/ |
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
%Enunciado https://docs.google.com/document/d/1LyNxWoKkv-WjcqT05i1O-u_4J5ybIgAfw5rIs-wVgkM/edit# | |
hombre(pedro) . | |
hombre(manuel) . | |
hombre(arturo) . | |
mujer(maría). | |
padre(pedro, manuel). | |
padre(pedro, arturo). | |
padre(pedro, maría) . |
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 org.junit.Assert; | |
import org.junit.jupiter.api.Test; | |
public class Pruebas | |
{ | |
//Links de ayuda sobre el porque del redondeo de esa manera. | |
//https://stackoverflow.com/questions/7139382/java-rounding-up-to-an-int-using-math-ceil | |
//https://stackoverflow.com/questions/10444350/c-sharp-loss-of-precision-when-dividing-doubles | |
/* Se parte del supuesto que el montaje y desmontaje de un caballo se puede realizar en el medio | |
de la nada, no necesariamente se monta y desmonta en las estaciones unicamente, esto quiere decir |
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 Ejercicio; | |
import org.junit.Assert; | |
import org.junit.jupiter.api.Test; | |
public class Ejercicio | |
{ | |
public static void main(String[] args) | |
{ | |
int[] v = {-2, 0, -1}; | |
boolean resultado = secuenciaCiclica(v); |
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.math.BigInteger; | |
public class Ejercicio { | |
public static void main(String[] args) | |
{ | |
int k = 78557; | |
int n = 1000000; | |
boolean resultado = esSierpinski(k); | |
System.out.print(resultado); |
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
<?php | |
public function validarComprobante($comprobante) | |
{ | |
/*No se incluyen los pasos previos de obtencion del WSAA*/ | |
$serviceUrl = "https://wswhomo.afip.gov.ar/WSCDC/service.asmx?WSDL"; // Homologación. | |
$_serviceUrl = "https://servicios1.afip.gov.ar/WSCDC/service.asmx?WSDL"; // Producción. | |
$client = new \Soapclient($serviceUrl); | |
//Lote de prueba. | |
$parametros = new \stdClass(); |
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
///Intercambio utilizando algebra de bool. | |
void intercambio_algebra_bool(int* a, int* b) | |
{ | |
*a ^= *b; | |
*b ^= *a; | |
*a ^= *b; | |
} | |
///Intercambio utilizando operadores += -= | |
void intercambio_aritmetica_mejorada(int* a, int* b) |
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
/* | |
Version de PHP 5.6 | |
Para que funcione esto se deben seguir estos pasos: | |
1) http://php.net/manual/es/ref.pdo-sqlsrv.php Descarga de SQLSRV 3.0 -> To download PHP driver for SQL -> Windows PHP driver ->SQLSRV32.EXE | |
2) Descomprimir los archivos en xampp\php\ext | |
3) En XAMPP -> Apache -> Config -> PHP.ini -> | |
extension=php_sqlsrv_56_ts.dll | |
extension=php_sqlsrv_56_nts.dll | |
extension=php_pdo_sqlsrv_56_ts.dll | |
extension=php_pdo_sqlsrv_56_nts.dll |
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
function [raizaproximada, iteraciones] = newton(funcion, aproximacioninicial, Tolerancia, Iteracionesmaximas) | |
aprox= aproximacioninicial; | |
while 1 | |
raizaproximada = aprox - funcion(aprox)/numderivative(funcion, aprox); | |
errorabsoluto = abs((raizaproximada-aprox)/raizaproximada)*100; | |
aprox = raizaproximada; | |
iteraciones = iteraciones + 1; | |
if(errorabsoluto < Tolerancia | iteraciones == Iteracionesmaximas ) then | |
break | |
end |
NewerOlder