Skip to content

Instantly share code, notes, and snippets.

View pabloleonalcaide's full-sized avatar
Probably taking a cup of coffee

Pablo Leon pabloleonalcaide

Probably taking a cup of coffee
View GitHub Profile
public class LongUnsigned {
public static void main(String[]args){
//Este método acepta como parámetro una cadena de caracteres, lo que permite el uso de un valor mayor
long number = Long.parseUnsignedLong("17916881237904312345");
//Para poder visualizar esta variable tenemos que hacer uso del método toUNsignedString()
String numberStr = Long.toUnsignedString(number);
System.out.println(numberStr);
System.out.println(number);
@pabloleonalcaide
pabloleonalcaide / telegram send gif as custom payload
Created May 11, 2018 19:12
Json code to send animated gif as custom payload for Telegram
{
"telegram": {
"text": "[.](https://media.giphy.com/media/2IFXZDePUQAAU/giphy.gif).",
"parse_mode": "Markdown"
}
}
@pabloleonalcaide
pabloleonalcaide / checkImageExist.js
Created May 17, 2018 08:08
Check if a image file exists with Javascript
/**
* Checking if an image exist in your image folder
*/
let loadImage = function(variable){
var image = new Image();
var url_image = './ImageFolder/' + variable + '.jpg';
image.src = url_image;
if (image.width == 0) {
return `<img src='./ImageFolder/defaultImage.jpg'>`;
} else {