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 AdvisesController < ApplicationController | |
def show | |
@advise = Advise.find(params[:id]) | |
respond_to do |format| | |
format.html # show.html.erb | |
format.xml { render :xml => @advise } | |
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 public_continuum(size = 40) | |
puts '***************************************************************' | |
if current_user.profile.friends != nil | |
friends = current_user.profile.friends.collect{|a| a.user_id} | |
Activity.find(:all, :conditions => {:action => ['membership', 'group'], :user_id => friends}, :limit=> size, | |
:order => " created_at DESC").collect{|a| | |
content_tag :span, :class => "clearfix" + cycle(nil, " pair") do | |
profile = content_tag :div, :class => "image" do | |
link_to icon_for_profile(a.user.profile, 'tiny'), profile_path(a.user.profile) |
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
import java.util.Random; | |
public class Randoms { | |
final static Random rand = new Random(); | |
final static int TOTAL = 1000; | |
public static void main(String[] args) { |
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
<ol> | |
<li><a href="http://sunnyday.mit.edu/16.355/parnas-criteria.html">On the criteria to be used in decomposing systems into modules</a> – David Parnas</li> | |
<li><a href="http://research.sun.com/techrep/1994/abstract-29.html">A Note On Distributed Computing</a> – Jim Waldo, Geoff Wyant, Ann Wollrath, Sam Kendall</li> | |
<li><a href="http://portal.acm.org/citation.cfm?id=365257">The Next 700 Programming Languages</a> – P. J. Landin</li> | |
<li><a href="http://portal.acm.org/citation.cfm?id=359579">Can Programming Be Liberated from the von Neumann Style?</a> – John Backus</li> | |
<li><a href="http://cm.bell-labs.com/who/ken/trust.html">Reflections on Trusting Trust</a> – Ken Thompson</li> | |
<li><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.50.6083">Lisp: Good News, Bad News, How to Win Big</a> – Richard Gabriel</li> | |
<li><a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.29.363">An experimental evaluation of the assumption of independence in multiversion programming</a> – John |