This file contains hidden or 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
// Given an array of strings representing the names of monarchs | |
// and their ordinal numbers, write a function that returns the | |
// list of names sorted first by name and then by their ordinal | |
// value (in Roman numerals), in ascending order. | |
function sortMonarchs(names) { | |
const romanToInt = (roman) => { | |
const romanMap = { | |
I: 1, |
This file contains hidden or 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
// place in root of project as .vscode/settings.json | |
{ | |
"workbench.colorCustomizations": { | |
"titleBar.activeForeground": "#fff", | |
"titleBar.inactiveForeground": "#000000CC", | |
"titleBar.activeBackground": "#F40009", | |
"titleBar.inactiveBackground": "#F40009CC" | |
}, |
This file contains hidden or 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 | |
/* GET OUR WEATHER DATA */ | |
// Get our JSON | |
$strJsonFileContents = file_get_contents("YOUR API LINK GOES HERE"); | |
$weather = json_decode($strJsonFileContents, true); | |
// Convert temperature and dew point | |
$temp = round($weather[currently][temperature]) . '°'; |
This file contains hidden or 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
document.addEventListener("readystatechange", function () { | |
switch (document.readyState) { | |
case "complete": | |
{ | |
// put your code here that will run after the page loads completely. | |
// if there is "flashing" and complaints are raised you can choose an earlier readyState | |
// always use "complete" if loading external resources | |
} | |
} | |
}); |