Option 1 is the easier version but either will work
- Got to railsinstaller.org
- Navigate to the ThoughtShare directory in cmd
- Run
bundle install
Option 1 is the easier version but either will work
bundle install
I hereby claim:
To claim this, I am signing this object:
curl -o yaz-4.2.67.tar.gz http://ftp.indexdata.dk/pub/yaz/yaz-4.2.67.tar.gz | |
tar zxvf yaz-4.2.67.tar.gz | |
cd yaz-4.2.67 | |
./configure | |
make install |
#Connects to the library of congress database. | |
#Given a ISBN, it fetches the LCC. | |
require 'zoom' | |
require 'marc' | |
require 'stringio' | |
ZOOM::Connection.open('z3950.loc.gov', 7090) do |conn| | |
conn.database_name = 'VOYAGER' | |
conn.preferred_record_syntax = 'USMARC' |
while true | |
print '>> ' | |
STDOUT.flush | |
isbn = gets.chomp | |
`lpr barcodes/#{isbn}.png` | |
end |
LOG1 = Math.log(GOLDEN_RATIO, 10) | |
LOG2 = Math.log(Math.sqrt(5), 10) | |
def problem104 | |
n = 2 | |
fn1 =1 | |
fn2 = 1 | |
while true | |
n += 1 | |
fn = (fn1 + fn2) % 10**9 |
def split string, length | |
split = Array.new | |
if string.length > length #if the string needs to be split | |
string_words = string.split(" ") | |
line = "" | |
string_words.each do |x| | |
if x.length > length #if the word needs to be split | |
#add the start of the word onto the first line (even if it has already started) | |
while line.length < length | |
line += x[0] |
def same_side p1, p2, p3, p4 | |
cp1 = cross_product p4-p3, p1-p3 | |
cp2 = cross_product p4-p3, p2-p3 | |
dot_product(cp1, cp2) >=0 | |
end | |
# is the point p in the triangle | |
def point_in_triangle p=Vector[0,0,0], a, b, c | |
same_side(p, a, b, c) && same_side(p, b, a, c) && same_side(p, c, a, b) | |
end |
def solve | |
coins = [1, 2, 5, 10, 20, 50, 100, 200] | |
goal = 200 | |
ways = Array.new | |
ways << 1 | |
200.times do | |
ways << 0 | |
end | |
coins.each do |coin| | |
coin.upto(goal) do |x| |
def phi p1, p2 | |
(p1-1)*(p2-1) | |
end | |
def find | |
min = [0,2] | |
lst = prime_sieve 5000 | |
lst.keep_if{|x| x > 2000} | |
lst.reverse_each do |p1| | |
lst.reverse_each do |p2| |