Mistři v programování na #hovnokod

#Napiste pseudokod, ktery invertuje radky, napr. "abc" -> "cba"

"abc".split("").reverse.join("").to_pseudocode

Anonymous,

Vskutku. Uh...

# converts some times to integers (errr, floats in strings, uh)
[:Application_Delay, :Handling_Time].each do |f|
  value = row[f]
  next if not value
  matches = value.match(/^(\d\d?):(\d\d?):(\d\d?)$/)

  if not matches
    row[f] = nil
    STDOUT.write('X')
    next
  else
    value = matches[1].to_i * 60 * 60 + matches[2].to_i * 60 + matches[3].to_i
    value = value.to_f.to_s
    value.gsub! '.', ','
    row[f] = value
  end
end

Anonymous,

jak snadno nevykreslit zbytečné divy

<div class="row my-class" style="<% if !can? :apply, event %>background-color: white; padding: 0;<% end %>">
  <div class="large-4 columns">
      <% if can? :apply, event %>
...
     <% end %>
  </div>
</div>

Pavel Slabý,


Anonymous,

@list = List.find(params[:id])
uploaded_io = params[:file]
emails = @list.recievers.to_a|uploaded_io.read.split(", ")
emails = emails.map{|elem| elem+", "}
emails.last.gsub!(", ", "")
emails = emails.to_s    
@list.update_attribute(:recievers, emails)

Anonymous,