pull/1/head
Oliver Kennedy 2018-07-24 19:00:47 -04:00
parent 3ca780a916
commit c9ba5aef97
8 changed files with 7 additions and 5 deletions

View File

@ -284,7 +284,8 @@ task "email-lab" do
raise "No UBIT for #{name}" unless data.has_key? "ubit"
"#{name} <#{data["ubit"]}@buffalo.edu>"
end
(system("open", "-a", "Mail", "mailto://#{members.join(", ")}"))
puts members.join("\n")
# (system("open", "-a", "Mail", "mailto://#{members.join(", ")}"))
end
task :test do

View File

@ -876,7 +876,7 @@ class CV < Latex::Builder
[cat, r]
}.
where { |cat, r| priority.include? cat }.
reduce { |cat, records| records.sort_by { |r| [(r["year"] or 100000), r["name"]] }}
my_reduce { |cat, records| records.sort_by { |r| [(r["year"] or 100000), r["name"]] }}
render_student_list = proc { |cat, students|
current = students.where { |s| s["year"].nil? }.size

View File

@ -118,7 +118,7 @@ class Array
Math.sqrt((avg ** 2 - (map{|i| i.to_f ** 2}.avg)).abs)
end
def reduce(&reducer)
def my_reduce(&reducer)
ret = Hash.new;
each do |k,v|
ret[k] = Array.new unless ret.has_key? k;

View File

@ -8,7 +8,7 @@ title: Funding Sources
<% $db["cv/okennedy/grants"].
where { |grant| ["accepted", "completed"].include? grant["status"] }.
map { |grant| [grant["start"].split(/\//)[-1].to_i, grant] }.
reduce.
my_reduce.
sort_by { |x| -x[0] }.
each do |year, grants| %>
<h2><%=year%></h2>

Binary file not shown.

Binary file not shown.

View File

@ -4,7 +4,7 @@ title: Publications
<div style="height: 20px">&nbsp;</div>
<div class="paper_list">
<% $db["publications"].map { |pub| [pub["year"].to_i, pub] }.reduce.each do |year, pubs| %>
<% $db["publications"].map { |pub| [pub["year"].to_i, pub] }.my_reduce.each do |year, pubs| %>
<div class="panel">
<div class="panel-heading">
<center><h2><%= year %></h2></center>

View File

@ -14,6 +14,7 @@ ideas:
- Mirek Riedwald (Northeastern)
- Laurelai Battle (UMD)
- Joann Ordille (???)
- Aaron Elmore (Chicago)
---
<p>Subscribe to <a href="https://listserv.buffalo.edu/cgi-bin/wa?A0=cse-database-list">cse-database-list</a> for more details about the UBDB seminar.</p>