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
| Helper = { | |
| config: { | |
| locale: "pt-BR" | |
| }, | |
| init: function(){ | |
| }, |
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
| pt-BR: | |
| simple_form: | |
| "yes": 'Sim' | |
| "no": 'Não' | |
| required: | |
| text: 'obrigatório' | |
| mark: '*' | |
| # You can uncomment the line below if you need to overwrite the whole required html. | |
| # When using html, text and mark won't be used. | |
| # html: '<abbr title="required">*</abbr>' |
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 replaceAll(find, replace, str) { | |
| return str.replace(new RegExp(find, 'g'), replace); | |
| } |
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
| var HashHack = { | |
| PREFIX: '#hhMessage=', | |
| postMessage: function(el, sMessage) { | |
| if ('string' === typeof el) { | |
| el = document.getElementById(el); | |
| } | |
| var sUrl = el.src.replace(/#.*/, ''); | |
| el.src = sUrl + HashHack.PREFIX + encodeURIComponent(sMessage); |
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
| var HashHack = { | |
| PREFIX: '#hhMessage=', | |
| aCallbacks: [], | |
| sLastHash: '', | |
| handleInterval: function() { | |
| var sHash = window.location.hash, | |
| sDecodedHash, sMessage, i; | |
| if (sHash !== HashHack.sLastHash) { |
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
| var myModule = angular.module('myModule', []); | |
| myModule.directive('foo', function(RecursionHelper){ | |
| return { | |
| restrict: "EAC", | |
| replace: true, | |
| template: '<strong>ok<div bar></div></strong>', | |
| compile: function(element) { | |
| // Use the compile function from the RecursionHelper, | |
| // And return the linking function(s) which it returns |
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
| // Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
| function NORMDIST(x, mean, sd, cumulative) { | |
| // Check parameters | |
| if (isNaN(x) || isNaN(mean) || isNaN(sd)) return '#VALUE!'; | |
| if (sd <= 0) return '#NUM!'; | |
| // Return normal distribution computed by jStat [http://jstat.org] | |
| return (cumulative) ? jStat.normal.cdf(x, mean, sd) : jStat.normal.pdf(x, mean, sd); | |
| } |
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
| source 'https://rubygems.org' | |
| # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
| gem 'rails', '4.2.1' | |
| # Use sqlite3 as the database for Active Record | |
| gem 'sqlite3' | |
| # Use SCSS for stylesheets | |
| gem 'sass-rails', '~> 5.0' | |
| # Use Uglifier as compressor for JavaScript assets |
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
| // Changes XML to JSON | |
| function xmlToJson(xml) { | |
| // Create the return object | |
| var obj = {}; | |
| if (xml.nodeType == 1) { // element | |
| // do attributes | |
| if (xml.attributes.length > 0) { | |
| obj["@attributes"] = {}; |
OlderNewer