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
def open_flash_chart(height, width, data_url, div_name = nil) | |
options = {} | |
options[:height] = height | |
options[:width] = width | |
options[:swf_file_name] = "flash/open-flash-chart.swf" | |
options[:div_name] = div_name unless div_name.nil? | |
open_flash_chart_object_from_hash(data_url, options) | |
end |
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
#This solves the maze using regular expressions, because I am too | |
#lazy to worry about arrays, darn it. It is inefficient as heck and designed | |
#purely to demonstrate perversion of sound CS principals. | |
# | |
# Code by Patrick McKenzie, 2010. I release this work unto the public domain. | |
class Maze | |
def initialize(maze_string) | |
@width = maze_string.split("\n")[0].length #width of maze in characters | |
@guts = maze_string.gsub("\n", "") #maze as a flat string -- no newlines |
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
hoge = "これは例である。" | |
puts hoge[1] |
NewerOlder