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
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
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 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
%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
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
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace Aleatorio | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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] = biseccion(funcion, A, B, Tolerancia, Iteracionesmaximas) | |
raizaproximada = A; // Esto es para que en la primera iteracion no de error. | |
iteraciones = 0; | |
while 1 | |
raizaproximadaanterior = raizaproximada; | |
raizaproximada = (A+B)/2; | |
errorabsoluto = abs((raizaproximada-raizaproximadaanterior)/raizaproximada)*100; | |
r = funcion(raizaproximada); | |
a = funcion(A); // Evaluo A en la funcion, y lo guardo en a. | |
b = funcion(B); // Evaluo B en la funcion y lo guardo en 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
* Dado un vector de numeros signados del que se conoce direccion inicial (dirIni) | |
* y la cantidad de elementos (cant) obtener la suma de los positivos (sumap) | |
* la cantidad de impares (cimpar), y la posición del primer cero (ppc) | |
ORG $0000 | |
dirIni RMB 2 | |
cant RMB 1 * cantidad de elementos del vector | |
sumap RMB 2 * suma de los positivos | |
cimpar RMB 1 * cantidad de impares | |
ppc RMB 1 * posicion dentro del vector (subindice) del primer cero | |
* si en lugar de la posicion (subindice) estuviera pidiendo direccion |