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
def isLeap(year) | |
if year % 4 == 0 | |
return true if year % 400 == 0 | |
return false if year % 100 == 0 | |
return true | |
end | |
false | |
end |
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
amount_of_days += 1 if year % 4 == 0 && (year % 100 != 0 || year % 400 == 0) |
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
function({settings}) {} | |
// эквиваленты | |
function(state) { | |
const settings = state.settings; | |
} |
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, { Component } from 'react'; | |
import styled from 'styled-components'; | |
import { Tabs, Tab } from '@material-ui/core'; | |
const StyledTabs = styled(props => { | |
return <Tabs {...props} classes={{indicator: 'indicator'}}></Tabs> | |
})` | |
&& { | |
border-bottom: 1px solid yellow; | |
} |
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
// component | |
const Component = () => { | |
return <div>props.value<div> | |
} | |
// container | |
class Container extends Component { | |
state = {value} | |
componentDidMount() { |
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
const factorial = require("./factorial"); | |
const c = (n, m) => { | |
return factorial(n) / (factorial(m) * factorial((n -m))); | |
} | |
// ________ | |
const factorial = num => { | |
if (num < 0) | |
return -1; |