Merge remote-tracking branch 'origin/master' into indexpage
This commit is contained in:
commit
4170632700
14 changed files with 36 additions and 68 deletions
4
Rules
4
Rules
|
@ -38,6 +38,10 @@ preprocess do
|
|||
end
|
||||
|
||||
academic_years_items[academic_years.max][:navigable] = true
|
||||
|
||||
all_events.each do |event|
|
||||
event[:time] = Date.parse(event[:time])
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
|
|
|
@ -25,8 +25,8 @@ $ "#cammie-ctrls"
|
|||
$ '.ctrl'
|
||||
.click ->
|
||||
$context = $ this
|
||||
$.ajax "//kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi",
|
||||
$.ajax "https://kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi",
|
||||
data:
|
||||
command: $context.data 'command'
|
||||
posX: $context.data 'x'
|
||||
posY: $context.data 'y'
|
||||
posY: $context.data 'y'
|
||||
|
|
|
@ -8,7 +8,22 @@ title: Events
|
|||
<h1>Upcoming events</h1>
|
||||
</div>
|
||||
|
||||
<% all_events.each do |event| %>
|
||||
<% upcoming_events.each do |event| %>
|
||||
<!-- <hr class="divider"> -->
|
||||
<% if (sub_events(event)).empty? %>
|
||||
<%= render '/partials/_event_preview.*', event: event %>
|
||||
<% else %>
|
||||
<% sub_events(event).each do |sub_event| %>
|
||||
<%= render '/partials/_event_preview.*', event: sub_event, main_event: event %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div class="content">
|
||||
<h1>Past events</h1>
|
||||
</div>
|
||||
|
||||
<% past_events.each do |event| %>
|
||||
<!-- <hr class="divider"> -->
|
||||
<% if (sub_events(event)).empty? %>
|
||||
<%= render '/partials/_event_preview.*', event: event %>
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: Bottle Bats Introductie
|
||||
time: 12-3-16
|
||||
location: Grace Hopper
|
||||
description: Dit is een description!
|
||||
---
|
|
@ -1,3 +0,0 @@
|
|||
---
|
||||
title: Bottle Bats
|
||||
---
|
|
@ -1,6 +0,0 @@
|
|||
---
|
||||
title: test
|
||||
time: 12-3-16
|
||||
location: Grace Hopper
|
||||
description: Dit is een description!
|
||||
---
|
|
@ -3,7 +3,7 @@ title: Geeks, Attack! V
|
|||
banner: https://scontent.xx.fbcdn.net/v/t1.0-9/13903431_1277596932251344_3927837466166230371_n.jpg?oh=bdda0d18a635c49893a097fba6aa99b9&oe=587C7886
|
||||
description: Zeus' vijfde LAN-Party
|
||||
created_at: 13-09-2016
|
||||
time: 4-11-2016
|
||||
time: 04-11-2016
|
||||
location: Therminal, Hoveniersberg 24 9000 Gent
|
||||
locationlink: Therminal,Ghent Belgium
|
||||
description: Zeus' vijfde LAN-Party
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
<div class="tile is-parent is-4">
|
||||
<div class="tile is-child box highlighted">
|
||||
<img src="https://thecatapi.com/api/images/get?format=src&type=gif&size=small">
|
||||
<img src="//thecatapi.com/api/images/get?format=src&type=gif&size=small">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tile is-vertical is-2">
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
title: moar review
|
||||
description: blub
|
||||
banner: https://i.ytimg.com/vi/tntOCGkgt98/maxresdefault.jpg
|
||||
created_at: 24-10-2016
|
||||
---
|
||||
blub
|
|
@ -1,37 +0,0 @@
|
|||
---
|
||||
banner: https://thumbs.dreamstime.com/z/letter-c-cat-4240140.jpg
|
||||
title: C review
|
||||
description: We hebben even wat dingen in C geschreven, en dit zijn onze meningen
|
||||
created_at: 23-10-2016
|
||||
---
|
||||
|
||||
> *Ben ik nu echt de enige die C echt niet leuk vindt?*
|
||||
>
|
||||
> <small>— Ilion Iasoon Beyst</small>
|
||||
|
||||
C is een toffe taal enal
|
||||
|
||||
~~~
|
||||
Individual *genetic_algo(Area *area, StationCol *stations, double lo, double hi) {
|
||||
// Initialize global variables
|
||||
init_coverage_polygon(area);
|
||||
MAX_POWER = power_to_energy_usage(43);
|
||||
|
||||
Population* p = generate_initial_population(POPULATION_SIZE, stations);
|
||||
recalculate_fitness(area, stations, p, lo, hi);
|
||||
|
||||
Individual* best = genetic_algo_exec(p, area, stations, POPULATION_SIZE, lo, hi, clock());
|
||||
for (size_t i = 0; i < best->size; i++) {
|
||||
printf("%d\n", best->distribution[i]);
|
||||
}
|
||||
printf("%f\n", calculate_energy_usage(stations, best));
|
||||
printf("%f\n", calculate_station_coverage(area, stations, best, NULL));
|
||||
|
||||
for (size_t i = 0; i < p->size; i++) {
|
||||
individual__free(p->elems[i]);
|
||||
}
|
||||
population__free(p);
|
||||
|
||||
return best;
|
||||
}
|
||||
~~~
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
navigable: true
|
||||
navigable: false
|
||||
title: Projecten
|
||||
---
|
||||
<div class="content">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
navigable: true
|
||||
navigable: false
|
||||
title: Search
|
||||
---
|
||||
<form action="?" method="get">
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
require 'uri'
|
||||
module EventsHelper
|
||||
def all_events
|
||||
@items.find_all('/events/*/*') + grouped_events
|
||||
@items.find_all('/events/*/*').sort_by { |x| x[:time] }
|
||||
end
|
||||
|
||||
def upcoming_events
|
||||
all_events.reject { |x| x[:time] < Date.today }
|
||||
end
|
||||
|
||||
def past_events
|
||||
all_events.reject { |x| x[:time] >= Date.today }
|
||||
end
|
||||
|
||||
def grouped_events
|
||||
|
|
|
@ -11,7 +11,7 @@ module IcalHelper
|
|||
|
||||
def event_for(item)
|
||||
event = Icalendar::Event.new
|
||||
event.dtstart = Date.parse(item[:time])
|
||||
event.dtstart = item[:time]
|
||||
event.summary = 'A great event!'
|
||||
|
||||
event
|
||||
|
|
Loading…
Reference in a new issue