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 CaesarCipherDecode($string, $casas = 9) { | |
$abc = range('a', 'z'); | |
$decifrado = ''; | |
foreach (str_split(strtolower($string)) as $letter) { | |
if (ctype_alpha($letter)) { | |
foreach ($abc as $key => $alpha) { | |
if ($letter === $alpha) { | |
if (($key - $casas) < 0) { | |
$decifrado .= $abc[(($key - $casas) + count($abc))]; |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Shippr</title> | |
<style> | |
* { | |
box-sizing: border-box; |
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 items = [] | |
fetch('https://example.com/feed.xml') | |
.then(res => res.text()) | |
.then(str => new window.DOMParser().parseFromString(str, "text/xml")) | |
.then(data => { | |
data.querySelectorAll("item").forEach((item, idx) => { | |
const obj = {} | |
Array.from(item.children).map(v => obj[v.tagName] = v.textContent) | |
items[idx] = obj | |
}) |