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
// | |
'use strict'; | |
import { create_element } from "https://rawgit.com/Nektro/modules.js/439458f/src/create_element.js"; | |
export function createUIWindow(model) { | |
const view = model.map(x => createComponent(x)); | |
for (const ele of view) { |
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> | |
<title>edge iframe memory test</title> | |
<style> | |
body { | |
margin: 0; | |
overflow-x: hidden; | |
} | |
iframe { |
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 getLuckNumbersTo(n, d=false) { | |
const start = Date.now(); | |
let lucky = new Array(n).fill(0).map((v,i) => i+1); | |
if (d) console.log(lucky); | |
for (let i = 2; i < lucky.length;) { | |
for (let j = i; j <= lucky.length; j+=i) { | |
lucky.splice(j-1, 1, 0); | |
} | |
lucky = lucky.filter(v => v !== 0); | |
if (d) console.log(i, lucky); |
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
.square:after { | |
content: ""; | |
display: block; | |
padding-bottom: 100%; | |
} |
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
/* Safari and Edge polyfill for createImageBitmap | |
* https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap | |
*/ | |
if (!('createImageBitmap' in window)) { | |
window.createImageBitmap = async function(blob) { | |
return new Promise((resolve,reject) => { | |
let img = document.createElement('img'); | |
img.addEventListener('load', function() { | |
resolve(this); | |
}); |
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
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> | |
<script defer src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> | |
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> | |
<script defer src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> | |
<template id="template-bs4-accordion-item"> | |
<div class="card"> | |
<div class="card-header" role="tab" id="headingOne"> | |
<h5 class="mb-0"> | |
<a data-toggle="collapse" |
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 bin2(n, k) | |
{ | |
const B = new Array(n+1).fill(0).map((x) => { | |
return new Array(k+1).fill(0); | |
}); | |
for (let i = 0; i <= n; i++) { | |
for (let j = 0; j <= Math.min(i,k); j++) { | |
if (j === 0 || j === i) { | |
B[i][j] = 1; |
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
#!/usr/bin/env bash | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php composer-setup.php | |
php -r "unlink('composer-setup.php');" |
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 javax.swing.JOptionPane; | |
import javax.swing.UIManager; | |
import javax.swing.UnsupportedLookAndFeelException; | |
public class CoolioVirus | |
{ | |
public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException | |
{ | |
String title = "Virus Alert !"; | |
String message = "Hi, I am an Albanian virus but because of poor technology in my\n" + |
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> | |
const importDoc = document.currentScript.ownerDocument; | |
</script> |