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
var abc = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; | |
var morsecode =[ | |
'.-', '-...', '-.-.', '-..', '.', '..-.', '--.', '....', | |
'..', '.---', '-.-', '.-..', '--', '-.', '---', '.--.', | |
'--.-', '.-.', '...', '-', '..-', '...-', '.--', '-..-', | |
'-.--', '--..' | |
]; | |
var morseArray = new Array(); | |
var length = abc.length; | |
for(var i = 0;i < length;i++){ |
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
this.getElementsByTagNameNS("*", "expirationTime") |
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 simpleAnalyze(a,b){ | |
if(a === "" && b !== "") | |
return -1; | |
if(a !== "" && b === "") | |
return 1; | |
if(a == b) | |
return 0; | |
return ""; | |
} |
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> | |
<head> | |
<meta charset="utf-8"> | |
<script src="proj4.js"></script> | |
</head> | |
<body> | |
<script> | |
//https://github.com/proj4js | |
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
1st and 2nd: pkg-config --libs libconfig++ | |
3rd and 4th: pkg-config --libs zlib | |
copy from here: | |
export LIBCONFIGXX_CFLAGS=-lconfig++ | |
export LIBCONFIGXX_LIBS=-lconfig++ | |
export ZLIB_CFLAGS=-lz | |
export ZLIB_LIBS=-lz |
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 | |
//CALLHUUTO AND ID! | |
if(isset($_GET['callHuuto']) && isset($_GET['id'])) { | |
$doc = new DOMDocument(); | |
//error_log('http://api.huuto.net/somt/0.9/items/'.$_GET['id']); | |
$doc->load('http://api.huuto.net/somt/0.9/items/'.$_GET['id']); | |
echo $doc->saveXML(); | |
die(); |
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 betterRgbToHsl(r, g, b) { | |
r /= 255, g /= 255, b /= 255; | |
var max = Math.max(r, g, b), min = Math.min(r, g, b); | |
var h, s, l = (max + min) / 2; | |
if (max == min) { | |
h = s = 0; // achromatic | |
} else { |
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
var hrefs = | |
Array.from(document.querySelectorAll("a")) | |
.map(link=>link.href) | |
.sort() | |
.filter((el,i,arr)=>!arr.slice(i+1).includes(el)) | |
.filter(href=>href.match(/ads\/\d/)) | |
.filter((_,i,arr)=>i ? (console.log(arr.length),true):true) | |
.filter(href=>(console.log(href),true)).slice(0); | |
window.array = []; | |
hrefs.forEach((href,i)=> |
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
[ | |
{ | |
"name": "Alko Akaa Toijala", | |
"address": "Valtatie 1, 37800 TOIJALA", | |
"lat": "61.16822725", | |
"lon": "23.8673481114683" | |
}, | |
{ | |
"name": "Alko Alajärvi", | |
"address": "Yrittäjäntie 5, 62900 ALAJÄRVI", |
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 seatIds = | |
getInput() | |
.replace(/[BR]/g,"1") | |
.replace(/[FL]/g,"0") | |
.split("\n") | |
.map(line=>line.trim()) | |
.map(line=>({row:parseInt(line.slice(0,7),2),column:parseInt(line.slice(7),2)})) | |
.map(obj=>({...obj,seatId:obj.row*8+obj.column})) | |
.map(e=>e.seatId) | |
//A: |
OlderNewer