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
window.onscroll = function(ev) { | |
if ((document.defaultView.innerHeight + document.defaultView.scrollY) == document.body.scrollHeight) { | |
$('.item.number.active').next('.item').find('a').get(0).click() | |
} | |
}; |
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
require 'pp' | |
$group_management = [] | |
class CalculateValue | |
attr_reader :totalValueOfFriendship | |
def initialize(friendshipsLookupTable) | |
@friendshipsLookupTable = friendshipsLookupTable | |
@additionalLinks = 0 |
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
function update_total(data) { | |
data.total = data.value * data.quantity | |
} | |
var registryProxy | |
// Go through each of our data properties | |
registry_observer = function(data) { | |
track_keys = ['value', 'quantity'] | |
track_keys.forEach(function(key) { |
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
// The Vue build version to load with the `import` command | |
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. | |
import 'normalize.css/normalize.css' | |
import Vue from 'vue' | |
import App from './App' | |
import './assets/basic_styles.css' | |
import lang from 'element-ui/lib/locale/lang/en' | |
import locale from 'element-ui/lib/locale' | |
import { Checkbox, Collapse, CollapseItem, Button, Input, Form, FormItem, Slider, Select, Option } from 'element-ui' | |
import router from './router' |
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
class ApplicationController; end | |
module Planning; end | |
class PlanningContoller < ApplicationController | |
def index | |
Planning::Index.new(planning_params).run do |parameters| | |
create_planning(parameters) | |
render :index, status: 200 | |
end | |
end |
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
def calculate_scheduled_for_the_month | |
sum = 0.0 | |
return sum if @planning.empty? | |
where_for_planning = clause_where_for_planning | |
i = 0 | |
@planning.where(where_for_planning).each do |p| | |
p.preenchimentos.each_with_index do |obj, index| | |
obj.dth_inicio = Time.now - index.days | |
obj.dth_fim = Time.now + index.days |
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
class Days | |
attr_reader :day, :fck_tests | |
def initialize(day, fck_tests = []) | |
@day = day | |
@fck_tests = fck_tests | |
end | |
end | |
class DaysBuilder |
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
include ::Injections | |
register_injections ConstructionSiteStatus: %I[repo manager_creator] | |
module Injections | |
module ConstructionSiteStatus | |
def provide_construction_site_status_repo | |
@construction_site_status_repo ||= Repositories::Obras:: \ | |
ConstructionSiteStatus::DelegateRepository.new |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
int idades[0]; | |
void definir_tamanho_vetor(int tamanho){ | |
idades[tamanho]; | |
} |
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
e = [60, 60, 60, 60, 60, 45, 45, 45, 45, 45, 45, 30, 30, 30, 30, 30, 30, 30, 5] | |
def bt(data, limit, m=[]): | |
data_sum = sum(m) | |
print(m) | |
# solution found | |
if data_sum == limit: | |
return (data, m) | |
# we passed the limit, so no need to check further | |
elif data_sum > limit: |