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
public class Gunman | |
{ | |
private int number; | |
public Gunman(int number) { | |
this.number = number; | |
} | |
public int getNumber() { | |
return number; |
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
#!/usr/bin/ruby | |
1.upto(100) do |i| | |
div3 = (i%3).zero? | |
div5 = (i%5).zero? | |
print "Fizz" if div3 | |
print "Buzz" if div5 | |
print i unless div3 or div5 | |
puts "" | |
end |
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
#!/usr/bin/ruby | |
## | |
# This script will calculate the total time for all videos on a user's channel | |
# It pulls from the channel's RSS feeds automatically, but is not particularly | |
# robust as it semi-scrapes out the time from the content area. | |
# | |
# (c) CBojar 2012, This is licensed under the MIT license. | |
## | |
require 'optparse' |