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
static Dictionary<string, Color> cachedColors = new Dictionary<string, Color>(); | |
public static Color GetColor(string hex) { | |
if (cachedColors.ContainsKey(hex)) return cachedColors[hex]; | |
Color color; | |
ColorUtility.TryParseHtmlString(hex, out color); | |
cachedColors[hex] = color; | |
return color; | |
} |
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 filters = { | |
tamanho: 'G', | |
cor: 'red' | |
}; | |
const validkeys = ['tamanho','cor']; | |
const wheres = []; | |
const params = []; |
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 filters = { | |
tamanho: 'G', | |
cor: 'red' | |
}; | |
const validkeys = ['tamanho','cor']; | |
const wheres = []; | |
const params = []; | |
const cases = []; |
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
if ( game.user === game.computer ) { | |
game.winner = 'tie'; | |
} else { | |
var wins = {'rock':'scissor','scissor':'paper','paper':'rock'}; | |
game.winner = (wins[game.user] === game.computer) ? 'user' : 'computer'; | |
} |
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
//Função para capturar endereço do usuário | |
capturaEnderecoUsuario: function(callback) { | |
var me = this; | |
//Variável para armazenar latitude e longitude do usuário | |
var geolocalizacao = ''; | |
//Requisição ajax para pegar endereço do usuário e passar para o serviço Geocoder do Google Maps para pegar geolocalização do usuário | |
Ext.Ajax.request({ |