Skip to content

Instantly share code, notes, and snippets.

View SpencerCooley's full-sized avatar

Spencer Cooley SpencerCooley

View GitHub Profile
//this is in the pages controller.
def output_page
json_object = search_for_yelp_id
render :json => json_object
end
function enableClick(){
map.on('click', function(e) {
var marker = new L.Marker(e.latlng, {draggable:true});
map.addLayer(marker);
});//closes the click function
if(map.hasEventListeners('click') == true){
git branch
* master
region_instance
git branch --track region_instance origin/region_instance
Branch region_instance set up to track remote branch region_instance from origin.
git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/latlng_finder
remotes/origin/master
remotes/origin/polygon_draw
remotes/origin/region_instance
$("input:radio").removeAttr("checked");
describe("calculate Bill With Energy Cost Increase", function(){
it("with an average monthly bill $300 and energy cost increase rate of 5% your monthly bill for year 2 should be $315/mo", function(){
expect(calculateBillWithEnergyCostIncrease(300,0.05)).toEqual(315);
});
});
describe("bill iterator. This is the function that calculates for 5 and ten years.", function(){
it("with an average monthly bill $300 and energy cost increase rate of 5%/yr your monthly bill for year 3 should be $330.75/mo", function(){
expect(billIncludeRate(0.05,300,3)).toEqual(330.75);
//calculates the new bill based on a number and a percent savings that you feed it.
function newBill(bill, percentSavings){
var result = -1*(bill*percentSavings)+bill;
return result;
}
function finalCalculationWithCheckedProducts(array, originalBill){
var stopCase = array.length -1;
var i=0;
<!-- Siding Calculator -->
<!-- Begin -->
function getSidingROI(form) {
sqft=eval(form.sqft.value)
bill=eval(form.bill.value)