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
<?php | |
function convBase($numberInput, $fromBaseInput, $toBaseInput) | |
{ | |
if ($fromBaseInput==$toBaseInput) return $numberInput; | |
$fromBase = str_split($fromBaseInput,1); | |
$toBase = str_split($toBaseInput,1); | |
$number = str_split($numberInput,1); | |
$fromLen=strlen($fromBaseInput); | |
$toLen=strlen($toBaseInput); | |
$numberLen=strlen($numberInput); |
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 java.awt.Color; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import javax.imageio.ImageIO; | |
public class Lifeinator | |
{ | |
public static void main(String[] args) |
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> |
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
#!/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
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
.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
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
<!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
// | |
'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) { |
OlderNewer