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
puts 'Please enter a list of words, separated by commas, that you would like to sort alphabetically.' | |
unsorted = gets.chomp.downcase.split(',') | |
sorted = [] | |
def sorter unsorted, sorted | |
if unsorted.length == 0 | |
return sorted | |
else | |
smalls = unsorted.pop #Biggie, Biggie, Biggie, can't you see? Sometimes your words just hypnotize me... |
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
#still trying to figure out why my shuffled array returns one too few words | |
puts 'Please enter a list of comma separated words that you would like to shuffle.' | |
unshuffled = gets.chomp.downcase.split(',') | |
shuffled = [] | |
indeces = [] | |
def shuffler unshuffled, shuffled, indeces | |
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
<div class="beta"> | |
<nav id="nav" class="site-nav" role="navigation"> | |
<ul class="depth_1"> | |
<li class="first" id="nav_41633"><a href="/about-rop/">About ROP</a></li> | |
<li id="nav_41635"><a href="/editorial-advisory-board/">Editorial Advisory Board</a></li> | |
<li id="nav_41636"><a href="/editors-and-staff/">Editors and Staff</a></li> | |
<li id="nav_41637"><a href="/submit-a-manuscript/">Submit a Manuscript</a></li> | |
<li id="nav_41638"><a href="/book-reviews/">Book Reviews</a></li> | |
<li id="nav_41639"><a href="/subscriptions/">Subscriptions</a></li> | |
<li id="nav_41640"><a href="/back-issues-and-archives/">Back Issues and Archives</a></li> |
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
puts 'Where do you store your screenshots? Please paste the entire directory path.' | |
store = gets.chomp | |
Dir.chdir store | |
pic_names = Dir["#{store}/Screen Shot*.{png}"] | |
puts 'What would you like to call this batch?' |
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
/*********************** | |
***********@media queries | |
************************/ | |
@media screen and max-width(60em) { | |
.container {width:80%;} /*etc…*/ |
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 length_finder(input_array) | |
input_array.each {|element| element.length} | |
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
def length_finder(input_array) | |
input_array.map {|element| element.length} | |
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
puts "This is the deaf grandma extended problem. Type something for your Grandma." | |
words = gets.chomp | |
bye_count = 1 | |
words_prev = words | |
while bye_count <= 3 | |
if bye_count == 3 #I HAD THIS SET AS 3 FOR THE LONGEST TIME, UNTIL I REMEMBERED THE ITERATIONS ARE ZERO-INDEXED, DUR | |
puts "Bye sweetie!" |
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
Gallery = new function(){...} //function expression via variable assignment |
OlderNewer