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 str = strnpowm(base,exponent) | |
% Computes base^exponent (both integers) and returns the result as a string | |
% Handles huge numbers, e.g. 2^1000 | |
str = char(1); | |
for i = 1:exponent | |
l = length(str); | |
product = repmat('0',1,l); | |
carry = 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
--- # Disable all rules. Rules at http://eslint.org/docs/rules/ | |
ecmaFeatures: | |
arrowFunctions: false # enable arrow functions | |
binaryLiterals: false # enable binary literals | |
blockBindings: false # enable let and const (aka block bindings) | |
classes: false # enable classes | |
defaultParams: false # enable default function parameters | |
destructuring: false # enable destructuring | |
forOf: false # enable for-of loops |
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
// ==UserScript== | |
// @name Coursera playback rate hotkeys | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Add button listeners to + and - keys for changing the video playback rate on Coursera | |
// @author You | |
// @match https://www.coursera.org/learn/* | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Wikipedia re-layout | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Add a reasonable max width to Wikipedia page content, with a handlebar on the right for adjustments. | |
// @author You | |
// @match https://en.wikipedia.org/* | |
// @icon https://www.google.com/s2/favicons?domain=wikipedia.org | |
// @grant none | |
// ==/UserScript== |
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
const turf = require("@turf/turf") | |
const points = { | |
"Bertilsvägen 7, containern": [17.583636, 59.855249], | |
"Granskogen": [17.570114, 59.864838], | |
"Skäggesta, korsningen": [17.552488, 59.872742], | |
"Hågahögen": [17.586869, 59.837368] | |
} | |
// A small value for the finite difference derivative approximation. |