Skip to content

Instantly share code, notes, and snippets.

View acadavid's full-sized avatar

Alejandro Cadavid acadavid

View GitHub Profile
@acadavid
acadavid / InsertionSort.cpp
Created September 16, 2011 15:46
Código Insertion sort
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--;
}

Provee

Actividades

- (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.

@acadavid
acadavid / about.md
Created August 9, 2011 13:40 — forked from jasonrudolph/about.md
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>