Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

answer

What Is This Astronaut Installing In the ISS? [Nasa]
Monday, 18 July 2011 22:20
My first thought was: "Washing machine". Fortunately, NASA Goddard has the correct answer: More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/bHkbuzIFGic/what-is-this-astronaut-installing-in-the-iss

 
A Quiz Engine in Ruby
Sunday, 15 May 2011 10:06
// A Quiz Engine in Ruby


# A Quiz Engine in Ruby
# By Jake Burton < This e-mail address is being protected from spambots. You need JavaScript enabled to view it >
# The author disclaims copyright to this source code. And Also wishes you all the best.


# Variables to customize
quizname = "QUIZNAME (STRING)"
score = 0

# Setting Up
class Questions
attr_accessor :question, :answer
def initialize(params)
@question = params[:question]
@answer = params[:answer]
end
end

# A question number Array so we can get random questions from the hash. - There is probably a better way of doing this.
nums = (1..10).to_a
# Create Questions and Answers
qs = {
1 => Questions.new( :question => "QUESTION1", :answer => "ANSWER1" ),
2 => Questions.new( :question => "QUESTION2", :answer => "ANSWER2" ),
3 => Questions.new( :question => "QUESTION3", :answer => "ANSWER3" ),
4 => Questions.new( :question => "QUESTION4", :answer => "ANSWER4" ),
5 => Questions.new( :question => "QUESTION5", :answer => "ANSWER5" ),
6 => Questions.new( :question => "QUESTION6", :answer => "ANSWER6" ),
7 => Questions.new( :question => "QUESTION7", :answer => "ANSWER7" ),
8 => Questions.new( :question => "QUESTION8", :answer => "ANSWER8" ),
9 => Questions.new( :question => "QUESTION9", :answer => "ANSWER9" ),
10 => Questions.new( :question => "QUESTION10", :answer => "ANSWER10" )
}


# Engine Logic
playstate = true
while playstate == true do


puts "Quiz: " + quizname
puts "Commands; new = new question"
puts "Current Score:"
puts score

instruction = gets
next_question = case instruction.chomp

when "new"
torf = false
n = nums[rand(nums.length)]
puts "Question:"
puts qs[n].question
torf = gets.downcase.chomp.eql? qs[n].answer.downcase.to_str
if torf == true
puts ""
puts "CORRECT"
puts ""
score += 1
else
puts ""
puts "INCORRECT"
puts ""
end




when "exit"
puts "Thankyou for Playing"
exit
# Change this to set playstate to false to leave the loop and continue.

end
end




Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/GHxUD6cSb_s/13219

 
What was your favorite handheld game as a child? [Question]
Friday, 15 April 2011 17:13
What was your favorite handheld game as a child? Answer on Facebook More »


Read more: http://feeds.gawker.com/~r/gizmodo/full/~3/lnciLqEoAN8/what-was-your-favorite-handheld-game-as-a-child

 
how to add an openmrs conceptanswer
Wednesday, 16 March 2011 04:20
private void addConceptAnswers(Concept concept, String[] answerNames, User creator) {
Set currentAnswerIds = new HashSet();
for (ConceptAnswer answer : concept.getAnswers()) {
currentAnswerIds.add(answer.getAnswerConcept().getConceptId());
}
boolean changed = false;
for (String answerName : answerNames) {
Concept answer = Context.getConceptService().getConcept(answerName);
if (!currentAnswerIds.contains(answer.getConceptId())) {
changed = true;
ConceptAnswer conceptAnswer = new ConceptAnswer(answer);
conceptAnswer.setCreator(creator);
concept.addAnswer(conceptAnswer);
}
}
if (changed) {
Context.getConceptService().saveConcept(concept);
}
}

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/lx2RJvUhCFc/13033

 
Ask Method for Rake Tasks
Wednesday, 26 January 2011 06:00
// description of your code here


def ask(question)
print question + " "
answer = STDIN.gets.chomp
if answer == "" or answer.nil?
return nil
else
return answer
end
end

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/PibbHrYlfO8/12897

 


Taxonomy by Zaragoza Online