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
<script type="text/javascript"> | |
[...document.getElementsByClassName("mejs__controls"),...document.getElementsByClassName("mejs__layers")].forEach((x)=>{ if(!x.parentElement.parentElement.parentElement.parentElement.classList.contains("mejs__mediaelement")) x.style.display="none" }); | |
c={}; [...document.getElementsByTagName("svg")].forEach((x) => c[x.classList[0]] = c[x.classList[0]] || x.querySelector(":not(use")); | |
[...document.getElementsByTagName("svg")].forEach((x) => { if (!x.querySelector(":not(use)")) { y = c[x.classList[0]]; y.childNodes.forEach(z=>x.appendChild(z.cloneNode(true))); }}) | |
</script> |
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
// Creating a JSON file, containing IANA Time Zone Names from timezones.json package. | |
// See this stackoverflow question: https://stackoverflow.com/a/69966796/ | |
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
// Short version: | |
// const namesSet = new Set(); | |
// require("timezones.json").forEach((tzDefinition) => tzDefinition.utc.forEach((tzName) => namesSet.add(tzName))); | |
// console.log(JSON.stringify([...namesSet].sort())); | |
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
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
// Based on the following solution | |
// https://github.com/vuejs/vue-router/issues/2881#issuecomment-520554378 | |
// Read my detailed notes at: https://stackoverflow.com/a/65326844 | |
import Router, { RawLocation, Route } from "vue-router"; | |
// Personal utils. Can be replaced with `Function` and `(e: Error) => any;` respectively. | |
export type AnyFunction<RETURN_T = any> = (...args: any[]) => RETURN_T; | |
export type ErrorHandlerFunction<RETURN_T = any> = (e: Error) => RETURN_T; |
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
#include <stdio.h> | |
#include <string.h> | |
int main() | |
{ | |
int a[] = {1, 2, 3}; | |
int n = sizeof(a) / sizeof (a[0]); | |
int i, j; | |
for (i=0; i<(1<<n); i++) { | |
for (j=0; j<n; j++) |