This file contains hidden or 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
def n_dimensional_euclidean_distance(a, b): | |
""" | |
Returns the euclidean distance for n>=2 dimensions | |
:param a: tuple with integers | |
:param b: tuple with integers | |
:return: the euclidean distance as an integer | |
""" | |
dimension = len(a) # notice, this will definitely throw a IndexError if len(a) != len(b) | |
return sqrt(reduce(lambda i,j: i + ((a[j] - b[j]) ** 2), range(dimension), 0)) |
This file contains hidden or 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
{ | |
"aliases": [{ | |
"alias": "fohlen", | |
"node": "8af7eff0-cc64-11e7-bb20-85407e92063e.inexortestnetwork.tk." | |
}] | |
} |
This file contains hidden or 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
webpackJsonp([0],[function(e,t){e.exports=function(e,t,n,r,o){var i,s=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(i=e,s=e.default);var l="function"==typeof s?s.options:s;t&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns),r&&(l._scopeId=r);var u;if(o?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},l._ssrRegister=u):n&&(u=n),u){var d=l.functional,p=d?l.render:l.beforeCreate;d?l.render=function(e,t){return u.call(t),p(e,t)}:l.beforeCreate=p?[].concat(p,u):[u]}return{esModule:i,exports:s,options:l}}},function(e,t){function n(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var i=r(o);return[n].concat(o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"})).concat([i]).join("\n")}return[n].join("\n")}function r(e){return"/*# sourceMappingU |
This file contains hidden or 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
const fib = (n) => { | |
// Returns the n-th element of the fibonacci sequence | |
if (n == 1) { | |
return 1; | |
} else if (n == 2) { | |
return 1; | |
} else if (n > 2) { | |
return (fib(n - 1) + fib(n - 2)) | |
} | |
} |
This file contains hidden or 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
<template> | |
<div class="modal fade" v-bind:id="id" tabindex="-1" role="dialog" aria-labelledby="Vorschau"> | |
<div class="modal-dialog" role="document"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-label="Schließen"><span aria-hidden="true">×</span></button> | |
<slot name="subject"><h4 class="modal-title" id="Vorschau">Titel</h4></slot> | |
</div> | |
<div class="modal-body content"> | |
<slot name="body">Inhalt der Nachricht</slot> |
This file contains hidden or 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
def factorial(n): | |
if n == 1: | |
return 1 | |
elif n > 1: | |
return n * factorial(n - 1) |
This file contains hidden or 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
export default { | |
'dictDefaultMessage': 'Legen Sie Dateien hier ab um Sie hochzuladen', | |
'dictFallbackMessage': 'Ihr Browser unterstützt Drag&Drop Dateiuploads nicht', | |
'dictFallbackText': 'Benutzen Sie das Formular um Ihre Dateien hochzuladen', | |
'dictFileTooBig': 'Die Datei ist zu groß. Die maximale Dateigröße beträgt {{maxFileSize}}MB', | |
'dictInvalidFileType': 'Eine Datei dieses Typs kann nicht hochgeladen werden', | |
'dictResponseError': 'Der Server hat ihre Anfrage mit Status {{statusCode}} abgelehnt', | |
'dictCancelUpload': 'Hochladen abbrechen', | |
'dictCancelUploadConfirmation': null, | |
'dictRemoveFile': 'Datei entfernen', |
This file contains hidden or 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
/** | |
* Returns the greatest common divisor of a and b | |
* @param {number} a | |
* @param {number} b | |
* @returns {number} | |
*/ | |
function gcd(a, b) { | |
if (b == 0) { | |
return a; | |
} else { |
This file contains hidden or 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 sequence2D(n) { | |
if (n > 1) { | |
return this.sequence2D(n - 1) + (n + 1); | |
} else if (n == 1) { | |
return 3; | |
} else { | |
throw new RangeError("A sequence operates on real numbers."); | |
} | |
} |
This file contains hidden or 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
# A server block that will by default redirect all traffic HTTPS | |
server { | |
listen 80 default_server; | |
return 301 https://$host$request_uri; | |
} | |
## | |
# Global SSL configuration |