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
/** | |
* CountDown | |
*/ | |
const msDateCountDown = 1525303846754; //Aqui vc pega o milesegundo atual usando new Date().getTime() | |
let dateCountDown = new Date(msDateCountDown); | |
dateCountDown.setMinutes(dateCountDown.getMinutes() + 8); | |
dateCountDown = dateCountDown.getTime(); | |
let intervalDate; | |
const formatSeconds = (seconds) => { |
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
/** | |
Problem: | |
You have a javascript array that likely has some duplicate values and you would like a count of those values. | |
Solution: | |
Try this schnippet out. | |
*/ | |
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 regExp = /\[audiouol][0-9]{4,}\[\/audiouol\]/g; | |
let string = '<p><img src="http://imagem.band.com.br/novahome/17b44db0-8a3f-40c1-8d7d-9931c8a213ff.jpg" />[audiouol]234234[/audiouol]</p> [audiouol]9999999999999999999[/audiouol]<p><img src="http://adm.band.com.br/bd_images/files/real/50/f_16350.jpg" /></p>[audiouol]234234[/audiouol]<p>Lorem impsum teste aqui</p>'; | |
/* | |
* output: ["[audiouol]234234[/audiouol]", "[audiouol]9999999999999999999[/audiouol]", "[audiouol]234234[/audiouol]"] | |
*/ | |
const resultRegExp = string.match(regExp) | |
resultRegExp.map(item => { |
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 regExp = /\[audiouol][0-9]{4,}\[\/audiouol\]/g; | |
let string = '<p><img src="http://imagem.band.com.br/novahome/17b44db0-8a3f-40c1-8d7d-9931c8a213ff.jpg" />[audiouol]234234[/audiouol]</p> [audiouol]9999999999999999999[/audiouol]<p><img src="http://adm.band.com.br/bd_images/files/real/50/f_16350.jpg" /></p>[audiouol]234234[/audiouol]<p>Lorem impsum teste aqui</p>'; | |
/* | |
* output: ["[audiouol]234234[/audiouol]", "[audiouol]9999999999999999999[/audiouol]", "[audiouol]234234[/audiouol]"] | |
*/ | |
const resultRegExp = string.match(regExp) | |
resultRegExp.map(item => { |
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
.l-card { | |
width: 290px; | |
} | |
.card { | |
overflow: hidden; | |
border-radius: 5px; | |
border: 1px solid #d4d4d5; | |
} |
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
.l-card { | |
width: 290px; | |
} | |
.card { | |
overflow: hidden; | |
border-radius: 5px; | |
border: 1px solid #d4d4d5; | |
} |
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
.card { | |
width: 290px; | |
overflow: hidden; | |
border-radius: 5px; | |
border: 1px solid #d4d4d5; | |
} | |
.card__img { | |
display: block; | |
} |
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
.card { | |
width: 290px; | |
overflow: hidden; | |
border-radius: 5px; | |
border: 1px solid #d4d4d5; | |
} | |
.card img { | |
display: block; | |
} |
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 {Link} from 'react-router-dom' | |
import api from './Api' | |
class Cakes extends Component { | |
constructor(props){ | |
super(props) | |
} |