- Virtual DOM
- Data Binding
- Components
- Event Handling
A quick comparison/ benchmark between Hogan, Dust, doT and underscore
Developed by Twitter (same team as Bootstrap), use exactly the same syntax as Mustache, but more performant and more stuff available server side.
My name is {{ name }}
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
/* | |
Não sabemos o que tem dentro de "e" pode ser uma adição, | |
remoção ou ambos. O snippet abaixo funciona em todos os casos. | |
*/ | |
Estado.atualizaEstado = function(e){ | |
//Try to add a state; | |
try{ | |
if(typeof(e.added.id) !== undefined){ | |
Estado.selected.push(e.added.id); |
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
/* Sempre chamar o javascript de um arquivo externo (Blocos na página nunca mais) | |
- partial view para os assigns do backend | |
recuperar os valores via javascript. | |
- incluir no bundle SEMPRE!!! | |
- Não deixar lixo no código (código comentado e funções não utilizadas) | |
*/ | |
// Criar funções utilizando use strict. (apenas no escopo da função) | |
// Documentar o código [http://usejsdoc.org/] |
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
Questões javascript: | |
1 - Dado o array: | |
var Frutas = ["abacaxi", "maçã", "banana", "uva"]; | |
como retorno o valor de maçã? | |
--------------------------------------------------------------------------------------------------------------------------------- |
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
.add(); | |
/* Add elements to the set of matched elements. */ | |
map(); / each(); / filter(); | |
is(); / not(); / has(); | |
jQuery.inArray(); | |
/* Search for a specified value within an array and return its index (or -1 if not found). */ |
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
Show hidden characters
{ | |
//Mostrar os espaços em branco | |
"draw_white_space": "all", | |
// Tamanho da fonte default | |
"font_size": 11, | |
//Limitador de caracteres | |
"rulers": [80], |
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
/* global $:true, jQuery:true */ | |
/* jshint strict:true, indent:4, maxlen:80, multistr:true, devel:true, browser:true */ |
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
/* This is a basic comment */ | |
/* ========================================================================== | |
This is a Section Comment | |
========================================================================== */ | |
/* ========================================================================== | |
This is a Sub-Section Comment |
Leia a ER átomo por átomo, da esquerda para a direita.
fala[r!]?Um f seguido de um a, seguido de um l, seguido de um a, seguido de: ou r, ou !, ambos opcionais.
resultado = fala[r!]? falar, fala!, fala
curinga .* Teremos qualquer caractere, em qualquer quantidade. uma carta para se usar em qualquer situação.
NewerOlder