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 co.marlonlom.demos.latlng.converters; | |
/** | |
* Utility class for converting a coordinate into its DMS (degrees, minutes, | |
* seconds) representation | |
* | |
* @author marlonlom | |
*/ | |
public final class LatLngConverter { | |
/** |
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
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |
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
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 |
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
/* | |
* Copyright (c) 2017, marlonlom | |
* | |
* 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, |
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 MiddleNumber | |
{ | |
public static void main(String[] args) | |
{ | |
MiddleNumber myObject = new MiddleNumber(); | |
int[] numberz = {1,2,4,60,8,20}; | |
int[] resultz= myObject.makeMiddle(numberz); | |
System.out.print("myObject.makeMiddle: "+resultz[0]); | |
} |
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
/* | |
* Copyright (c) 2017, marlonlom | |
* | |
* 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, |
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
console.log(uuid()); |
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 string_to_slug (str) { | |
str = str.replace(/^\s+|\s+$/g, ''); // trim | |
str = str.toLowerCase(); | |
// remove accents, swap ñ for n, etc | |
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;"; | |
var to = "aaaaeeeeiiiioooouuuunc------"; | |
for (var i=0, l=from.length ; i<l ; i++) { | |
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); | |
} |
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
/** | |
* Google staticmaps Router implementation. | |
*/ | |
const express = require('express'), | |
request = require('request'), | |
router = express.Router(), | |
StaticMaps = { | |
baseHost: "https://maps.googleapis.com/maps/api" | |
}; |
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
/** | |
* Created by Rany Albeg Wein on 07/11/2015. | |
* Since we currently don't have a LongItemClick listener for the {@link RecyclerView} | |
* this is an implementation that uses a {@link GestureDetector} to notify us for long click events on one of | |
* {@link RecyclerView}'s child views. It also handles single-tap-up ( a click ) and a double-click on a child view. | |
*/ | |
public class RecyclerViewItemTouchListener extends RecyclerView.SimpleOnItemTouchListener { | |
/** | |
* A listener that will be invoked on item click events. |