Skip to content

Instantly share code, notes, and snippets.

View marlonlom's full-sized avatar
😎

Marlon López marlonlom

😎
View GitHub Profile
import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;
public class BalotoDummyDemo {
public static void main(String[] args) {
Random rand = new Random();
int max = 45;
int min = 1;
ArrayList<Integer> listNums = new ArrayList<Integer>(6);
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2014 Chris Banes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
package com.github.manuelpeinado.toolbartest;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.View;
@marlonlom
marlonlom / CustomDateDiffExample.java
Last active August 29, 2015 14:18
Custom utility for date difference functionality, using a date string against current date. this method must be used following the pattern "EEE, dd MMM yyyy HH:mm:ss Z". but you can change this setting pattern values on utility class. Provided utility and demo. This utility was made using joda-time-2.7.jar
package co.malm.demos.datediff;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Locale;
import co.malm.demos.datediff.util.DateDiffUtil;
public class CustomDateDiffExample {
@marlonlom
marlonlom / EmptyRecyclerView.java
Last active September 7, 2015 20:41 — forked from mobiRic/EmptyRecyclerView.java
RecyclerView doesn't have an emptyView support, we gotta fix that
/*
* Copyright (C) 2015 Glowworm Software
* Copyright (C) 2014 Nizamutdinov Adel
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
package co.malm.demos.security.sha1;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* Utility class that uses {@link MessageDigest} for obtaining a hashed text
* using algorithms such as MD5 and SHA-1
*
@marlonlom
marlonlom / simple-pagination.js
Created April 7, 2016 22:07 — forked from kottenator/simple-pagination.js
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@marlonlom
marlonlom / error-uploading-mvn.txt
Created June 21, 2016 23:57
build failed when uploading archives
Could not transfer artifact com.github.marlonlom:staticmaps-builder:aar:1.0.0 from/to remote (https://oss.sonatype.org/service/local/staging/deploy/maven2/): Access denied to: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/marlonlom/staticmaps-builder/1.0.0/staticmaps-builder-1.0.0.aar, ReasonPhrase: Forbidden.
Could not transfer artifact com.github.marlonlom:staticmaps-builder:pom:1.0.0 from/to remote (https://oss.sonatype.org/service/local/staging/deploy/maven2/): Access denied to: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/marlonlom/staticmaps-builder/1.0.0/staticmaps-builder-1.0.0.pom, ReasonPhrase: Forbidden.
Could not transfer artifact com.github.marlonlom:staticmaps-builder:jar.asc:javadoc:1.0.0 from/to remote (https://oss.sonatype.org/service/local/staging/deploy/maven2/): Access denied to: https://oss.sonatype.org/service/local/staging/deploy/maven2/com/github/marlonlom/staticmaps-builder/1.0.0/staticmaps-builder-1.0.0-javadoc.jar.asc, ReasonPhras