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 convertfilename($filename) { | |
$filename = str_replace([ "?", "[", "]", "/", "\\", "=", "<", ">", | |
":", ";", ",", "'", '"', "&", "$", "#", | |
"*", "(", ")", "|", "~" ], "", $filename); | |
$filename = preg_replace("/[\s-]+/", "-", $filename); | |
$filename = trim($filename, ".-_"); | |
return ucwords($filename); | |
} |
How do you sort a list of words on the 4th character of the word? What"s the shortest solution?
[ "strawberry", "helicopter", "wales", "acorn" ]
should be:
- Bullying in Open Source Software Is a Massive Security Vulnerability
- Why a near-miss cyberattack put US officials and the tech industry on edge
- Backdoor found in widely used Linux utility targets encrypted SSH connections
- What can you actually do to reduce the threat of hacks like xz?
- NYT: Did One Guy Just Stop a Huge Cyberattack?
- [Binarly released a free online s
In this challenge you get an HTML document that renders a lot of colourful hearts.
And you get a JSON object with the information about all the brown colours that were used:
[
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
/* | |
<section> | |
<ul> | |
<li>HTML</li> | |
<li>CSS</li> | |
<li>JavaScript</li> | |
</ul> | |
<form> | |
<label for="tech">Add a technology</label> | |
<input type="text" name="tech" id="tech"> |
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 csvToJSON = (csv) => { | |
const getcsvdata = (csv) => { | |
const csvRegex = /,(?=(?:(?:[^"]*"){2})*[^"]*$)/; | |
const trimQuotes = /^"|"$/g; | |
csv = csv.split(csvRegex).map( | |
h => h.trim().replace(trimQuotes, '') | |
); | |
return csv; | |
} | |
let lines = csv.split('\n'); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder