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 | |
require __DIR__ . '/ticket/autoload.php'; //Nota: si renombraste la carpeta a algo diferente de "ticket" cambia el nombre en esta línea | |
use Mike42\Escpos\Printer; | |
use Mike42\Escpos\EscposImage; | |
use Mike42\Escpos\PrintConnectors\WindowsPrintConnector; | |
/* | |
Este ejemplo imprime un hola mundo en una impresora de tickets |
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
angular | |
.module("CodigosQR", ["ja.qr"]) | |
.controller("ControladorPrincipal", ["$scope", function($scope) { | |
$scope.texto = "Hola mundo, desde parzibyte.me/blog" | |
}]); |
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
// Definir la función | |
fun sumar(numero1: Int, numero2: Int): Int { | |
return numero1 + numero2 | |
} | |
// Invocarla | |
val resultado = sumar(20, 1) | |
println("La suma es: $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
Center( | |
child: Text("Soy un texto"), | |
) |
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
let cadena = "cGFyemlieXRlLm1lL2Jsb2c="; | |
let decodificado = atob(cadena); | |
console.log(decodificado); |
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
/* | |
Cliente HTTP en Go con net/http | |
Ejemplo de petición HTTP Get en Golang | |
@author parzibyte | |
*/ | |
package main | |
import ( | |
"io/ioutil" | |
"log" |
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
SELECT TIMESTAMPDIFF(YEAR, '1997-06-21', '2018-05-07') AS años_transcurridos; |
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
document.querySelector("#btnImprimirDiv").addEventListener("click", function() { | |
var div = document.querySelector("#imprimible"); | |
imprimirElemento(div); | |
}); | |
document.querySelector("#btnImprimirParrafo").addEventListener("click", function() { | |
var parrafo = document.querySelector("#parrafo"); | |
imprimirElemento(parrafo); | |
}); |
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
var numeroALetras = (function() { | |
// Código basado en el comentario de @sapienman | |
// Código basado en https://gist.github.com/alfchee/e563340276f89b22042a | |
function Unidades(num) { | |
switch (num) { | |
case 1: | |
return 'UN'; | |
case 2: | |
return 'DOS'; |
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
#include <iostream> | |
#include <math.h> | |
using namespace std; | |
int main() | |
{ | |
double numero = 5; | |
double elevado = pow(numero, 3); | |
cout << "El numero " << numero << " elevado al cubo es " << elevado; | |
return 0; |
NewerOlder