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
Feature: Katie takes a quiz | |
A quiz has a certain number of questions, and is of a certain type, like | |
times, add, divide, etc. The default number of questions is 10, and the | |
default type is "times". When Katie takes a quiz, each problem is | |
presented one at a time. As Katie answers, she is given immediate | |
feedback if the answer is correct or not. Incorrect answers are marked | |
in a file for further analysis and practice. At the end of the quiz, | |
Katie receives a score and "prize". The prize is a token that Katie can | |
collect. |
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
module Read_r | |
class Entry | |
attr_accessor :name, :recorder, :favbook, :fiction, :minreadmon, :minreadtues, :minreadweds, :minreadthurs, :minreadoth | |
def initialize(options = {}) | |
self.name = options[:name] | |
self.recorder = options[:recorder] | |
self.favbook = options[:favbook] | |
options.keys.each do |minread| # from this block on I think is messy | |
# I want to check if an option is one of the minread* accesssors above | |
# It seems to me that I'm doing this whole method wrong, duplicating a lot |
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
#!/usr/local/bin/ruby | |
def make_gem_list | |
File.open("gemlist.txt", "w") do |file| | |
file.write `gem list`.gsub(/\s[(].*[)]/, "") | |
end | |
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
#!/usr/local/bin/ruby | |
#gettin' lazy wid dem ruby scripts. | |
Dir.chdir("/your/source/ruby/dir/") | |
["rm ./configure","svn up","autoconf","./configure --enable-shared", | |
"make", "make install", "make clean", "gem update"].each do |one| | |
puts `sudo #{one}` | |
puts one == "make install" ? `ruby -v` : "Next!" |
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
#Here's the spec: | |
module Antlers | |
describe Menu do | |
context "display a Menu from a text file" do | |
before (:each) do | |
@messenger = mock("messenger").as_null_object | |
@menu = Menu.new("Main Menu") | |
end #before |
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
For each of the strings (a)--(e), say which of the patterns (i)--(xii) it matches. Where there is a match, what would be the values of $MATCH, $1, $2, etc.? | |
the quick brown fox jumped over the lazy dog | |
The Sea! The Sea! | |
(.+)\s*\1 | |
9780471975632 | |
C:\DOS\PATH\NAME | |
/[a-z]/ | |
/(\W+)/ |
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
CM --- NEC2 Input File created by xnec2c-1.2 --- | |
CM Decoupled Stub antenna, by KG4GVL | |
CM For 10m, 20m, 40m | |
CM Adapted from "More Wire Antenna Classics, Vol 2" | |
CM "Multiband Antennas Using Decoupling Stubs" | |
CM William J Lattin, W4JRW QST Dec. 1960 | |
CE --- End Comments --- | |
GW 1 60 -2.43840E+00 0.00000E+00 1.00584E+01 2.43840E+00 0.00000E+00 1.00584E+01 1.50000E-02 | |
GW 2 30 2.43840E+00 0.00000E+00 1.00584E+01 4.54660E+00 0.00000E+00 1.00584E+01 1.50000E-03 | |
GW 3 1 4.54660E+00 0.00000E+00 1.00584E+01 4.54660E+00 0.00000E+00 1.00330E+01 1.50000E-03 |
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
CM --- NEC2 Input File created by xnec2c 3.0 --- | |
CM File by KG4GVL | |
CM Skeleton Sleeve, 30m/15m based on 40/20m design in | |
CM Small Antennas for Small Spaces, Appendix A | |
CM I have no idea if this is the correct way to model this antenna! | |
CE --- End Comments --- | |
GW 1 30 -6.05765E+00 0.00000E+00 7.33330E+00 6.05765E+00 0.00000E+00 7.33330E+00 1.50000E-02 | |
GW 2 1 6.05765E+00 0.00000E+00 7.33330E+00 6.05765E+00 0.00000E+00 7.35870E+00 1.50000E-03 | |
GW 3 15 6.05765E+00 0.00000E+00 7.35870E+00 3.38527E+00 0.00000E+00 7.35870E+00 1.50000E-03 | |
GW 4 15 3.13533E+00 0.00000E+00 7.35870E+00 -3.13533E+00 0.00000E+00 7.35870E+00 1.50000E-03 |
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
CM --- NEC2 Input File created by xnec2c 3.0 --- | |
CM File by KG4GVL | |
CM Skeleton Sleeve, 30m/15m based on 40/20m design in | |
CM Small Antennas for Small Spaces, Appendix A | |
CM I'm pretty sure this is the correct way to model this antenna! | |
CM Modified 08 Nov 2015 | |
CE --- End Comments --- | |
GW 1 29 -6.15925E+00 0.00000E+00 7.33330E+00 6.15925E+00 0.00000E+00 7.33330E+00 1.50000E-02 | |
GW 2 1 6.15925E+00 0.00000E+00 7.33330E+00 6.15925E+00 0.00000E+00 7.35870E+00 1.50000E-03 | |
GW 3 15 6.15925E+00 0.00000E+00 7.35870E+00 3.23287E+00 0.00000E+00 7.35870E+00 1.50000E-03 |