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
ProxyRequests Off | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
ProxyPass /geoserver http://localhost:8080/geoserver | |
ProxyPreserveHost On | |
ProxyStatus On |
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() { | |
var geoCodeURL = "http://nominatim.openstreetmap.org/search"; | |
var map = new OpenLayers.Map({ div: "map" }); | |
var osm = new OpenLayers.Layer.OSM(); | |
map.addLayers([osm]); | |
map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
map.setCenter( | |
new OpenLayers.LonLat( 9.2134, 55.3028).transform( | |
new OpenLayers.Projection("EPSG:4326"), | |
map.getProjectionObject() |
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
import com.google.gson.JsonElement; | |
import com.google.gson.JsonObject; | |
import java.sql.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
public abstract class DAO { | |
public int create(JsonObject json) | |
throws SQLException, ClassNotFoundException { |
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
<html> | |
<head> | |
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" /> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js"></script> | |
<style> | |
#llmap { |
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
from numpy import genfromtxt | |
from time import time | |
from datetime import datetime | |
from sqlalchemy import Column, Integer, Float, Date, String, VARCHAR | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import create_engine | |
from sqlalchemy.orm import sessionmaker | |
import csv | |
import pandas |
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 map = new L.Map('map', { }); | |
var skaermkort = L.tileLayer.wms("http://kortforsyningen.kms.dk/service?SERVICENAME=topo_skaermkort", { | |
LAYERS : 'dtk_skaermkort_daempet', | |
attribution: "Geodatastyrelsen", | |
ticket : kfTicket | |
}).addTo(map); | |
var postdistrikt = L.tileLayer.wms("http://kortforsyningen.kms.dk/service?SERVICENAME=dagi", { | |
service : 'WMS', | |
layers : 'postdistrikt', |
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 search ="http://dawa.aws.dk/adresser"; | |
$( "#address" ).autocomplete({ | |
source: function( request, response ) { | |
$.ajax({ | |
url : search, | |
dataType: "jsonp", | |
data: { | |
q: $('#address').val() + "*", | |
format: "geojson" | |
}, |
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
/*jshint esversion: 6 */ | |
require('dotenv').config(); | |
var axios = require('axios'); | |
const getToken = () => { | |
const sessionEndpoint = 'https://api.etilbudsavis.dk/v2/sessions'; | |
return new Promise(function (fullfill, reject) { | |
axios.post(sessionEndpoint, { | |
api_key: process.env.API_KEY, | |
token_ttl: 256, |
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
Homework: | |
--------- | |
In classs you learned about IIFE's, encapsulation and object oriented programming. | |
You also worked on a example calling library_a.render() and library_b.render(). | |
IIFE's are good for grouping related code in a namespace. Let's say that you have some math related functions . Then | |
you could do: | |
var Math = (function () { | |
return { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Exploring JavaScript (Hack Your future Copenhagen)</title> | |
<script src="node_modules/jquery/dist/jquery.js" charset="utf-8"></script> | |
<script src="node_modules/bootstrap/dist/js/bootstrap.js" charset="utf-8"></script> | |
<script src="node_modules/bootstrap-select/dist/js/bootstrap-select.js" charset="utf-8"></script> | |
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.css" /> | |
<link rel="stylesheet" href="node_modules/bootstrap-select/dist/css/bootstrap-select.css" /> |
NewerOlder