This file contains hidden or 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
User | |
#interest_histogram | |
should generate a Hash counting the hits per reference | |
should generate a tag cloud containing the N most popular | |
should return the tag cloud sorted by tag name | |
HomeController | |
should display the most recent users | |
#search | |
should perform a search by name |
This file contains hidden or 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
CommentsController | |
should display a notice if the user is not logged in | |
should display a notice if no comments are on a page | |
should be possible to comment on another user's page | |
when a user is on its own page | |
should be able to delete a comment | |
should not be able to comment on his own page |
This file contains hidden or 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
CommentsController | |
should display a notice if the user is not logged in | |
should display a notice if no comments are on a page | |
should be possible to comment on another user's page | |
when a user is on its own page | |
should be able to delete a comment | |
should not be able to comment on his own page |
This file contains hidden or 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
# Creiamo la classe Dog | |
class Dog | |
end | |
fido = Dog.new | |
# => <Dog:0x007fb92a8073a8> | |
fido.methods | |
# => [:nil?, :===, :=~, :!~, :eql?, :hash, :<=>, :class, :singleton_class, :clone, :dup, :initialize_dup, :initialize_clone, :taint, :tainted?, :untaint, :untrust, :untrusted?, :trust, :freeze, :frozen?, :to_s, :inspect, :methods, :singleton_methods, :protected_methods, :private_methods, :public_methods, :instance_variables, :instance_variable_get, :instance_variable_set, :instance_variable_defined?, :instance_of?, :kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, :respond_to_missing?, :extend, :display, :method, :public_method, :define_singleton_method, :__id__, :object_id, :to_enum, :enum_for, :==, :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__] | |
# Un array contentente tutti i metodi chiamabili su fido (anche quelli ereditati da Object) | |
# Ogni elemento dell'array è un symbol |
This file contains hidden or 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
{ | |
"_id": ObjectId('4e8c2687e5636c00007f2837'), // ID binario che forza l'unicità tra diverse macchine, cerca maggiori info sul web | |
"subject": "Luogo pizzata 18/10/2011", | |
"description": "Dobbiamo organizzare bla bla bla...", | |
"end-date": ISODate('2011-10-18T00:00:00.000Z'), | |
"options": [{ | |
"description": "Pizzeria da Nasti, BG", | |
"vote_counter": 2, | |
"votes": [{ | |
"user": ObjectId('4e8c2687e5636c000067ab34'), // Reference dell'utente |
This file contains hidden or 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
- DecisionPresenter.new(@decision, self, @admin_mode).render do | |
- content_for :title, subject | |
- admin_mode do | |
%i= 'The url for your friends: ' | |
= link_to decision_url(@decision), @decision | |
%p | |
%b= created_at_by | |
%h2= subject |
This file contains hidden or 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
flowplayer("player", | |
{ | |
allowfullscreen: false, | |
src: "../flowplayer-3.2.7.swf", | |
wmode: 'opaque' | |
}, | |
{ | |
clip: { | |
onBeforeSeek: function (clip, target) { | |
console.log("BABABA"); |
This file contains hidden or 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
{ | |
"_id": ObjectId("4ee86c6fbcf83f2aad000001"), | |
"title": "Ma quande lingues", | |
"credits": 19, | |
"price": 28.99, | |
"description": "Li Europan lingues es membres del sam familie. Lor separat existentie es un myth. Por scientie, musica, sport etc, li tot Europa usa li sam vocabularium. Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules. Omnicos directe al desirabilita; de un nov lingua franca: on refusa continuar payar custosi traductores. It solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles.Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam li existent Europan.", | |
"promote": true, | |
"category": 1, | |
"publish_date": ISODate("2011-12-14T09:26:00Z"), | |
"user_id": ObjectId("4ee72c30bcf83f23e1000002"), |
This file contains hidden or 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
-webkit-box-shadow: rgba(255, 255, 255, 0.199219) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.046875) 0px 1px 2px 0px; | |
-webkit-transition-delay: 0s; | |
-webkit-transition-duration: 0.10000000149011612s; | |
-webkit-transition-property: all; | |
-webkit-transition-timing-function: linear; | |
background-color: #006F5D; | |
background-image: -webkit-linear-gradient(top, rgb(3, 150, 125), rgb(3, 150, 125) 25%, rgb(0, 111, 93)); | |
background-repeat: repeat-x; | |
border-bottom-color: rgba(0, 0, 0, 0.246094); | |
border-bottom-left-radius: 4px; |
This file contains hidden or 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
-module(bencode). | |
-export([ encode/1 ]). | |
encode(Integer) when is_integer(Integer) -> | |
"i" ++ integer_to_list(Integer) ++ "e"; | |
encode(Binary) when is_binary(Binary) -> | |
String = binary_to_list(Binary), | |
Length = length(String), | |
integer_to_list(Length) ++ ":" ++ String; |