- (Void) realizarActividad(Actividad actividad)
Nota: El tipo de dato Actividad, contiene una referencia al usuario si la actividad a realizar requiere de uno. Por esta razón no es necesario un segundo parámetro que indique el usuario.
| vector<int> insertion_sort(vector<int> numbers) { | |
| int i,j,key; | |
| for(int j=0; j<numbers.size(); j++) { | |
| int key = numbers[j]; | |
| i = j-1; | |
| while(i>=0 && numbers[i]>key) { | |
| numbers[i+1]=numbers[i]; | |
| i--; | |
| } |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| class User < ActiveRecord::Base | |
| has_and_belongs_to_many :products_of_interest, :class_name => "Product" | |
| has_and_belongs_to_many :brands_of_interest, :class_name => "Brand" | |
| end | |
| class Deal < ActiveRecord::Base | |
| belongs_to :brand | |
| belongs_to :product | |
| end |
| class User < ActiveRecord::Base | |
| has_and_belongs_to_many :products_of_interest, :class_name => "Product" | |
| has_and_belongs_to_many :brands_of_interest, :class_name => "Brand" | |
| end | |
| class Deal < ActiveRecord::Base | |
| belongs_to :brand | |
| belongs_to :product | |
| end |
| # PostgreSQL. Versions 7.4 and 8.x are supported. | |
| # | |
| # Install the ruby-postgres driver: | |
| # gem install ruby-postgres | |
| # On Mac OS X: | |
| # gem install ruby-postgres -- --include=/usr/local/pgsql | |
| # On Windows: | |
| # gem install ruby-postgres | |
| # Choose the win32 build. | |
| # Install PostgreSQL and put its /bin directory on your path. |
| <div id=colombia> | |
| <div id=anqtioquia> | |
| <div id=chigo> | |
| <div id=plaza> | |
| <div id=mesa1></div> | |
| <div id=mesa2></div> | |
| </div> | |
| <div id=otro> | |
| <div id=mesa4></div> | |
| <div id=mesa5></div> |