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
=begin | |
BoardLine | |
--------- | |
Describe one line in the result board. | |
=end | |
class BoardLine | |
include Enumerable | |
attr_accessor :values |
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
Instance 1 - 20 departments | ||||||||||||||||||||||||||||||||||||||||||||||
Department | Area | f_ij | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | ||||||||||||||||||||||||
1 | 76 | 1 | 95 | 93 | 2 | 10 | 79 | |||||||||||||||||||||||||||||||||||||||
2 | 20 | 2 | 69 | 16 | ||||||||||||||||||||||||||||||||||||||||||
3 | 68 | 3 | 70 | 12 | 2 | |||||||||||||||||||||||||||||||||||||||||
4 | 50 | 4 | 71 | 6 | ||||||||||||||||||||||||||||||||||||||||||
5 | 50 | 5 | 16 | 91 | 30 | 78 | 4 | |||||||||||||||||||||||||||||||||||||||
6 | 55 | 6 | 60 | 66 | 86 | 75 | 49 | 64 |
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
Sending: Hi @Travelanswerman, Join our new #advertising platform now and convert your followers into steady #income, and also get 5$ immediately! admonetize.me #social | |
Automated resposed detected, sleeping for 60 seconds | |
Sending: Hi @Travelanswerman, Join our new #advertising platform now and convert your followers into steady #income, and also get 5$ immediately! admonetize.me #earn | |
Automated resposed detected, sleeping for 60 seconds | |
Sending: Hi @Travelanswerman, Join our new #advertising platform now and convert your followers into steady #income, and also get 5$ immediately! admonetize.me #advertising | |
Automated resposed detected, sleeping for 60 seconds | |
Sending: Hi @Travelanswerman, we have noticed you might be a good fit to test our new Twitter advertising platform @ http://admonetize.me #marketing | |
Automated resposed detected, sleeping for 60 seconds | |
Sending: Hi @Travelanswerman, Join our new #advertising platform now and convert your followers into steady #income, and also get 5$ immediately! admonetize |
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 ParkingLot | |
def initialize | |
end | |
def on_entry | |
end | |
def on_exit | |
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
class ParkingLot | |
end | |
class Car | |
end | |
class Ticket | |
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 Title | |
attr_reader :string | |
def initialize(string) | |
@string = string | |
end | |
def fix | |
# A neat Ruby trick for making an array of strings | |
# Equivalent to: ['a', 'and', 'the', 'of'] |
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 proclaim | |
new_array = [] # Creating a new array to collect the words | |
string.split.each do |word| # Iterate over each word | |
new_array << "#{word}!" # add same words we are iterating over, just with an exclamation mark. | |
end | |
new_array.join(' ') # return new words array as a string | |
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
module TestFactories | |
def post_without_user(options={}) | |
post_options = {title: 'Post title', body: 'Post bodies must be pretty long.'}.merge(options) | |
post = Post.new(post_options) | |
post.save | |
post | |
end | |
def authenticated_user | |
email = "email#{rand}@fake.com" |
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
2.0.0-p576 :009 > class Zibi | |
2.0.0-p576 :010?> include HTTParty | |
2.0.0-p576 :011?> debug_output $stdout | |
2.0.0-p576 :012?> end | |
=> #<IO:<STDOUT>> | |
2.0.0-p576 :013 > Zibi.head("http://walla.co.il") | |
opening connection to walla.co.il:80... | |
opened | |
<- "HEAD / HTTP/1.1\r\nConnection: close\r\nHost: walla.co.il\r\n\r\n" | |
-> "HTTP/1.0 302 Found\r\n" |
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
module EladPaginator | |
def self.included(base) | |
base.class_eval do | |
include InstanceMethods | |
extend ClassMethods | |
end | |
end |