no javascript - only html and css
A Pen by Danilo Vitoriano on CodePen.
| var messages = [ | |
| "message1", | |
| "message2" | |
| ]; | |
| var message_time_ms = 1000; | |
| var index = 0; | |
| document.title = messages[index]; | |
| window.setInterval(function(){ | |
| document.title = messages[index++ % messages.length]; |
no javascript - only html and css
A Pen by Danilo Vitoriano on CodePen.
| // ES6 w/ Promises | |
| // Note: From a React starter template - see https://t.co/wkStq8y3I5 | |
| function fetchData(routes, params) { | |
| let data = {}; | |
| return Promise.all(routes | |
| .filter(route => route.handler.fetchData) | |
| .map(route => { | |
| return route.handler.fetchData(params).then(resp => { | |
| data[route.name] = resp; |
| /* | |
| // const scope cannot be update | |
| */ | |
| const key = 'abc123'; | |
| /* | |
| // const object properties and values can change | |
| */ | |
| const person = { | |
| name: 'Wes', |
| user root; | |
| worker_processes 1; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include mime.types; |
| var req = { | |
| method: 'POST', | |
| url: 'https://myendpoint.com:3000/api/oauth/authorize?client_id=web-client&response_type=token&redirect_uri=https://myawesomesite.com:3000/token/', | |
| data: { | |
| login: $scope.user, | |
| password: $scope.password, | |
| type: 'LOGIN_CPF_PASSWORD', | |
| service: 'SERVICE' | |
| }, | |
| headers: { |
| <?php | |
| // A função abaixo demonstra o uso de uma expressão regular que identifica, de forma simples, telefones válidos no Brasil. | |
| // Nenhum DDD iniciado por 0 é aceito, e nenhum número de telefone pode iniciar com 0 ou 1. | |
| // Exemplos válidos: +55 (11) 98888-8888 / 9999-9999 / 21 98888-8888 / 5511988888888 | |
| function phoneValidate($phone) | |
| { | |
| $regex = '/^(?:(?:\+|00)?(55)\s?)?(?:\(?([1-9][0-9])\)?\s?)?(?:((?:9\d|[2-9])\d{3})\-?(\d{4}))$/'; | |
| if (preg_match($regex, $phone) == false) { |
| Whereas HTML defines a webpage's structure and content and CSS sets the formatting and appearance, JavaScript adds interactivity to a webpage and creates rich web applications. | |
| The DOM is an API that allows access to and modification of the current document. It allows manipulation of document Node and Element. HTML, XML and SVG have extended it to manipulate their specific elements. |
O docker serve para prepararmos ambientes de execução (ubuntu,mysql,wordpress) de forma rápida e prática, a grande vantagem disso é que em uma máquina física podemos simular diversos ambientes isolados que ficam isolados no que chamamos de containers, que compartilham o mesmo sistema operacional.
docker run ubuntu /bin/echo “hello docker”
docker pull mysql (puxa a imagem)
docker images
docker ps -a
docker run — name database -e MYSQL_ROOT_PASSWORD=teste123 -d mysql
Static property:
class C1 extends React.Component {
static defaultProps = {
prop: 'hello',
};
}