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
export function Dashboard() { | |
const [isOpen, setIsOpen] = useState(false); | |
return ( | |
<div className="h-screen flex overflow-hidden bg-gray-100"> | |
{/* <!-- Off-canvas menu for mobile, show/hide based on off-canvas menu state. --> */} | |
{isOpen && ( | |
<div className="md:hidden"> | |
<div className="fixed inset-0 flex z-40"> | |
{/* | |
Off-canvas menu overlay, show/hide based on off-canvas menu state. |
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
{ | |
"cmn":"Mandarin Chinese", | |
"spa":"Spanish", | |
"eng":"English", | |
"rus":"Russian", | |
"arb":"Standard Arabic", | |
"ben":"Bengali", | |
"hin":"Hindi", | |
"por":"Portuguese", | |
"ind":"Indonesian", |
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 decisionFormula (activities, n) { | |
var objMap = {}; | |
activities.forEach(item => { | |
objMap[item] = 0; | |
}) | |
for (var i = 0; i < 100; i++) { | |
objMap[activities[Math.floor(Math.random() * activities.length)]]++; | |
} | |
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> | |
<title>MapD</title> | |
<meta charset="UTF-8"> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | |
<link href='https://fonts.googleapis.com/css?family=Roboto:400,700,300' rel='stylesheet' type='text/css'> | |
<style> | |
.title { | |
font-weight: bold; |
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
/** | |
* italic | |
* | |
* Tests whether the browser supports faux-italic text in canvas when | |
* the font itself does not have an italic version (or else the italic | |
* version has not been loaded into memory). | |
* | |
* I do this by using the native font Impact, which does not have a bold | |
* or italic version, drawing it to a canvas, and checking whether | |
* anything about the canvas bit-data is different. |
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 React = require('react/addons'); | |
var ReactIgnore = { | |
displayName: 'ReactIgnore', | |
shouldComponentUpdate (){ | |
return false; | |
}, | |
render (){ | |
return React.Children.only(this.props.children); | |
} |
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
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,700' rel='stylesheet' type='text/css'> | |
<div id='stars'></div> | |
<div id='stars2'></div> | |
<div id='stars3'></div> | |
<div id='title'> | |
<span> | |
PURE CSS | |
</span> | |
<br> | |
<span> |
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 partyTime = function(domElement) { | |
if(domElement.tagName === "DIV"){ | |
domElement.style.background = "#" + Math.random().toString(16).slice(2, 8); | |
} | |
var domChildren = domElement.children; | |
for(var x = 0; x < domChildren.length; x++){ | |
partyTime(domChildren[x]); | |
} |