This file contains 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
[percy:config] Found config file: .percy.json (0ms) | |
[percy:config] Using config: | |
{ | |
version: 2, | |
snapshot: { | |
widths: [ | |
375, | |
1280, | |
1920 |
This file contains 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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
}); |
This file contains 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
// Least Common Multiple | |
function LCM(n, m, range) { | |
var list1 = []; | |
var list2 = []; | |
var match; | |
for(var i = 1; i <= range; i++) { | |
list1.push(n*i) |
This file contains 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
/* | |
Greatest Common Factor | |
GCF function takes two numbers and generates the greatest common factor. | |
*/ | |
function GCF(num1, num2) { | |
var arr1 = findFactors(num1); | |
var arr2 = findFactors(num2); |
This file contains 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
/* SimpleXhrFactory signleton, step2 */ | |
var SimpleXhrFactory = (function(){ | |
//The three branches. | |
var standard = { | |
createXhrObject: function(){ | |
return new XMLHttpRequest(); | |
} | |
}; | |
var activeXNew = { | |
createXhrObject: function(){ |
This file contains 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
requirejs = require('./node_modules/requirejs/bin/r.js') | |
baseConfig = | |
baseUrl: "./war/scripts/app" | |
locale: "en-us" | |
optimize: "uglify" | |
preserveLicenseComments: false | |
name: "almond" | |
findNestedDependencies: true | |
wrap: true | |
paths: |
This file contains 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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
jade: { | |
compile: { | |
options: { | |
client: false, | |
pretty: true | |
}, | |
files: [ { | |
expand: true, |
This file contains 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
/** | |
* GoogleMapsAPI Loader Module | |
* | |
* Returns a promise that resolves with the google.maps object when all of the google maps api loading process is complete | |
* | |
* Example Usage: | |
* | |
* define([ 'app/lib/google-maps-loader' ], function(GoogleMapsLoader){ | |
* GoogleMapsLoader.done(function(GoogleMaps){ | |
* // your google maps code here! |
This file contains 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
it 'should reject the promise when there are no passed options ', (done)-> | |
user = new ObjectRef '/users/123/' | |
result = user.get() | |
expect(result.isRejected()).toBeTruthy() | |
result.then null, (err) -> | |
console.log err | |
expect(err).toThrow new ReallyError 'Can\'t be called without passing arguments' | |
done() |
This file contains 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
// In controller | |
@map_markers = [] | |
@estates.each do |key,value| | |
marker = {location: key.location, estates: value.collect(&:id),property: key.name} | |
@map_markers << marker | |
end | |
// In the view | |
<%= hidden_field_tag :coordiates,"",id: "coordinates", data: { markers: @map_markers, boundaries: @location } %> |
NewerOlder