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
/** | |
* Auto-generated code below aims at helping you parse | |
* the standard input according to the problem statement. | |
**/ | |
var inputs = readline().split(' '); | |
var N = parseInt(inputs[0]); // the total number of nodes in the level, including the gateways | |
var L = parseInt(inputs[1]); // the number of links | |
var E = parseInt(inputs[2]); // the number of exit gateways |
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
// Do NOT do this | |
let data | |
function getData() { | |
this.service.getDate().then((data) => { | |
this.data = data | |
}) | |
} | |
// Do this | |
let data |
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
// Do NOT do this 🤢 | |
public foo: IFoo = new Foo() | |
public bar: Foo | |
function setBar(foo: Foo): void { | |
this.bar = foo | |
} | |
// Do This | |
foo = new Foo() |
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
// Do NOT do this | |
function double (arr) { | |
let results = [] | |
for (let i = 0; i < arr.length; i++){ | |
results.push(arr[i] * 2) | |
} | |
return results | |
} | |
// Do This |
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
//========// | |
// App.js // | |
//========// | |
import React from 'react' | |
import Layout from './app/Layout' | |
class App extends React.Component { | |
render() { | |
return ( | |
<Layout /> |
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
import styled from 'styled-components' | |
export const Loader = styled.div` | |
color: #ffffff; | |
font-size: 50px; | |
text-indent: -9999em; | |
overflow: hidden; | |
width: 1em; | |
height: 1em; | |
border-radius: 50%; |
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
import React from 'react' | |
import { NavLink } from 'react-router-dom' | |
class Header extends React.Component { | |
state = { | |
isActive: false, | |
} | |
toggleNav = () => { |