many stuffs
This commit is contained in:
parent
2613659774
commit
7b8ba0b95c
14 changed files with 37 additions and 69 deletions
4
Rules
4
Rules
|
@ -38,6 +38,10 @@ preprocess do
|
||||||
end
|
end
|
||||||
|
|
||||||
academic_years_items[academic_years.max][:navigable] = true
|
academic_years_items[academic_years.max][:navigable] = true
|
||||||
|
|
||||||
|
all_events.each do |event|
|
||||||
|
event[:time] = Date.parse(event[:time])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -25,7 +25,7 @@ $ "#cammie-ctrls"
|
||||||
$ '.ctrl'
|
$ '.ctrl'
|
||||||
.click ->
|
.click ->
|
||||||
$context = $ this
|
$context = $ this
|
||||||
$.ajax "//kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi",
|
$.ajax "https://kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi",
|
||||||
data:
|
data:
|
||||||
command: $context.data 'command'
|
command: $context.data 'command'
|
||||||
posX: $context.data 'x'
|
posX: $context.data 'x'
|
||||||
|
|
|
@ -8,7 +8,22 @@ title: Events
|
||||||
<h1>Upcoming events</h1>
|
<h1>Upcoming events</h1>
|
||||||
</div>
|
</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"> -->
|
<!-- <hr class="divider"> -->
|
||||||
<% if (sub_events(event)).empty? %>
|
<% if (sub_events(event)).empty? %>
|
||||||
<%= render '/partials/_event_preview.*', event: event %>
|
<%= 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
|
banner: https://scontent.xx.fbcdn.net/v/t1.0-9/13903431_1277596932251344_3927837466166230371_n.jpg?oh=bdda0d18a635c49893a097fba6aa99b9&oe=587C7886
|
||||||
description: Zeus' vijfde LAN-Party
|
description: Zeus' vijfde LAN-Party
|
||||||
created_at: 13-09-2016
|
created_at: 13-09-2016
|
||||||
time: 4-11-2016
|
time: 04-11-2016
|
||||||
location: Therminal, Hoveniersberg 24 9000 Gent
|
location: Therminal, Hoveniersberg 24 9000 Gent
|
||||||
locationlink: Therminal,Ghent Belgium
|
locationlink: Therminal,Ghent Belgium
|
||||||
description: Zeus' vijfde LAN-Party
|
description: Zeus' vijfde LAN-Party
|
||||||
|
|
|
@ -53,12 +53,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="tile">
|
<div class="tile">
|
||||||
<div class="tile is-4 is-parent">
|
<div class="tile is-4 is-parent">
|
||||||
<div class="tile is-child box">
|
<a class="tile is-child box" href="<%= relative_path_to(sorted_articles.first) %>">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h1><%= sorted_articles.first[:title] %></h1>
|
<h1><%= sorted_articles.first[:title] %></h1>
|
||||||
<%= sorted_articles.first[:description] %>
|
<%= sorted_articles.first[:description] %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="tile is-vertical">
|
<div class="tile is-vertical">
|
||||||
<div class="tile is-parent">
|
<div class="tile is-parent">
|
||||||
|
|
|
@ -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
|
title: Projecten
|
||||||
---
|
---
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
navigable: true
|
navigable: false
|
||||||
title: Search
|
title: Search
|
||||||
---
|
---
|
||||||
<form action="?" method="get">
|
<form action="?" method="get">
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
require 'uri'
|
require 'uri'
|
||||||
module EventsHelper
|
module EventsHelper
|
||||||
def all_events
|
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
|
end
|
||||||
|
|
||||||
def grouped_events
|
def grouped_events
|
||||||
|
|
|
@ -11,7 +11,7 @@ module IcalHelper
|
||||||
|
|
||||||
def event_for(item)
|
def event_for(item)
|
||||||
event = Icalendar::Event.new
|
event = Icalendar::Event.new
|
||||||
event.dtstart = Date.parse(item[:time])
|
event.dtstart = item[:time]
|
||||||
event.summary = 'A great event!'
|
event.summary = 'A great event!'
|
||||||
|
|
||||||
event
|
event
|
||||||
|
|
Loading…
Reference in a new issue