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 static java.lang.Integer.parseInt; | |
import static java.lang.System.exit; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.OutputStreamWriter; | |
import java.io.PrintWriter; | |
import java.util.StringTokenizer; |
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
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
sq: | |
devise: | |
confirmations: | |
confirmed: "Llogaria juaj është konfirmuar me sukses." | |
send_instructions: "Pas pak minutash do të pranoni një email me udhëzime në lidhje me mënyrën e konfirmimit të email adresës tuaj." | |
send_paranoid_instructions: "Nëse email adresa juaj ekziston në bazën tonë të të dhënave, pas pak minutash do të pranoni një email me udhëzime rreth mënyrës së konfirmimit të saj." | |
failure: | |
already_authenticated: "Ju tashmë jeni i kyçur" | |
inactive: "Llogaria juaj ende nuk është aktivizuar." |
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
start_time = Time.new(2013,1) | |
end_time = Time.new(2014,1) | |
TimeDifference.between(start_time, end_time).in_years | |
=> 1.0 | |
TimeDifference.between(start_time, end_time).in_months | |
=> 12.0 | |
TimeDifference.between(start_time, end_time).in_weeks |
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
start_time = Time.new(2013,1) | |
end_time = Time.new(2014,1) | |
TimeDifference.between(start_time, end_time).humanize | |
=> "12 Months and 5 Days" |
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
numbers = [2, 4, 6, 8, 1] | |
for number in numbers: | |
if number % 2 == 1: | |
print(number) | |
break | |
else: | |
print("No odd numbers") |
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
first_set = {1, 2, 3, 4} | |
second_set = {3, 4, 5} |