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
/** to use in https://iniciativas.chileconvencion.cl/m/iniciativa_popular/# **/ | |
let propuestas = []; | |
$("#iniciativas>.card").each((i,e) => { | |
let propuesta = { | |
textId: $(e).children("h2").text().trim(), | |
title: $(e).children("h1").text().trim(), | |
text: $(e).children("p").text().trim(), | |
votes: $(e).data("apoyos") | |
}; | |
propuestas.push(propuesta); |
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
version: '2.1' | |
services: | |
kong-database: | |
image: postgres:9.5 | |
environment: | |
- POSTGRES_USER=kong | |
- POSTGRES_DB=kong | |
healthcheck: |
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
version: '3.2' | |
services: | |
proxy: | |
image: containous/traefik:latest | |
command: --web --docker --docker.swarmmode --docker.watch --logLevel=DEBUG | |
ports: | |
- 80:80 | |
- 8080:8080 |
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
version: '2.1' | |
services: | |
web: | |
image: nginx:alpine | |
depends_on: | |
db: | |
condition: service_healthy | |
db: | |
image: redis:alpine | |
healthcheck: |
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 cl.puas.web.servlet; | |
import sun.misc.BASE64Decoder; | |
import javax.imageio.ImageIO; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import java.awt.image.BufferedImage; |
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
private static final Double EARTH_RADIUS = 6371D; // KM | |
public static Double getDiametro(Double latFirst, Double lonFirst, Double latMiddle, Double lonMiddle) { | |
Double dLat = Math.toRadians(latMiddle - latFirst); | |
Double dLon = Math.toRadians(lonMiddle - lonFirst); | |
Double lat1 = Math.toRadians(latFirst); | |
Double lat2 = Math.toRadians(latMiddle); |