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
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <title>Welcome to Wist</title> | |
| <style media="all" type="text/css"> | |
| html, body { | |
| height: 100%; | |
| } |
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
| def create | |
| @question = Question.find(params[:question_id]) | |
| @answer = @question.answers.create(params[:answer].permit(:option, :user_id, :question_id)) | |
| @nextquestion = Question.where.not(user_id: current_user.id).last | |
| @index = 0 | |
| while @nextquestion.answers.where(:user_id => current_user.id).count != 0 && @index < Question.all.count do |
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
| class Answer < ActiveRecord::Base | |
| belongs_to :user | |
| belongs_to :question | |
| end | |
| class Question < ActiveRecord::Base |
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
| /* ---------- iOS devices ---------- */ | |
| .ipad-only, .iphone-only, .retina-only, .non-retina-only, .retina-iphone-only, .non-retina-iphone-only { display: none; } | |
| /* ---------- iPad Only ---------- */ | |
| @media only screen and (device-width: 768px) { | |
| .ipad-only { display: block; } | |
| } | |
| /* ---------- iPhone/iPod Only ---------- */ | |
| @media only screen and (device-width: 320px) { |
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
| filename = 'birthdays.txt' | |
| file_string = File.read filename | |
| birthdays = {} | |
| person = () | |
| file_string.each_line do |line| | |
| line = line.chomp | |
| arr = line.split(', ') |
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
| dict_array = [] | |
| dict_hash = [] | |
| dict_array[0] = 'candle' | |
| dict_array[1] = 'glasses' | |
| dict_array[2] = 'truck' | |
| dict_array[3] = 'Alicia' | |
| dict_hash['shia-a'] = 'candle' | |
| dict_hash['shaya'] = 'glasses' |
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
| M = 'land' | |
| o = 'water' | |
| world = [[o,o,o,o,o,o,o,o,o,o,o], | |
| [o,o,o,o,M,M,o,o,o,o,o], | |
| [o,o,o,o,o,o,o,o,M,M,o], | |
| [o,o,o,M,o,o,o,o,o,M,o], | |
| [o,o,o,M,o,M,M,o,o,o,o], | |
| [o,o,o,o,M,M,M,M,o,o,o], | |
| [o,M,M,M,M,M,M,M,M,M,o], |
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
| def translate_to_roman num | |
| roman = '' | |
| roman = roman + 'M' * (num / 1000) | |
| if (num % 1000) >= 900 | |
| roman = roman + 'CM' | |
| else | |
| roman = roman + 'D' * (num % 1000 / 500) |
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
| KABUL, Afghanistan — The Afghan president and the Pakistani prime minister dismissed the WikiLeaks revelations about their respective countries as alternately false, unreliable and the work of “junior officers” in a joint news conference here on Saturday. | |
| State’s Secrets | |
| Articles in this series examine American diplomatic relations as a window on relations with the rest of the world in an age of war and terrorism. | |
| Documents: Selected Dispatches | |
| However, a senior Afghan minister later took a more aggrieved tone, suggesting that the leaked cables had irreparably damaged relations between the American ambassador, Karl W. Eikenberry, and members of the Afghan government. The minister, Omar Zakhilwal, also said that remarks attributed to him by Mr. Eikenberry in one of the cables, disparaging President Hamid Karzai, were false. | |
| Until Saturday, the Afghan government had said little about the contents of the cables, thousands of confidential State Department memos that were made public in the past week by the We |