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 | |
#word file used: /usr/share/dict/words | |
WORD_LENGTH = 7 | |
$stems_list = {} | |
cut_off = ARGV.shift | |
$unique_word_list = [] | |
def word_exists?(sorted_word) |
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 | |
require "rexml/document" | |
include REXML | |
xml_string = "<gedcom>" | |
unclosed_tags = ["</gedcom>"] | |
previous_level = -1 |
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 RangeBuilder | |
def initialize(min_value, max_value) | |
@min_value = min_value | |
@max_value = max_value | |
end | |
def self.generate_forward_ranges(min_range_value) | |
temp_max_range = "" | |
left_range_char_list = min_range_value.to_s.reverse.chars |
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 | |
class RomanNumerals | |
ROMAN_VALUES = { | |
'M' => 1000, | |
'CM' => 900, | |
'D' => 500, | |
'CD' => 400, | |
'C' => 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
#!/usr/bin/ruby | |
class LCDNumber | |
def initialize(size, input_number) | |
@input_number = input_number | |
@size = size | |
@display_code = [ | |
['horizontal_line_yes', 'vertical_line_both', 'horizontal_line_no', 'vertical_line_both', 'horizontal_line_yes' ], | |
['horizontal_line_no', 'vertical_line_right', 'horizontal_line_no', 'vertical_line_right', 'horizontal_line_no' ], |
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 | |
class LCDNumber | |
def initialize(size, input_number) | |
@input_number = input_number | |
@size = size | |
@symbol_style = { | |
horizontal_line_yes: " " + "-" * @size + " ", | |
vertical_line_both: ["|" + " " * @size + "|"] * @size, |