I hereby claim:
- I am ryanoneill on github.
- I am ryanoneill (https://keybase.io/ryanoneill) on keybase.
- I have a public key whose fingerprint is B8A6 FC7B AAA1 1D67 8B3D 334F E0FE C719 A035 40E1
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/python | |
import sys | |
def minimum_coins_change(denominations, value): | |
# Find the minimum number of coins necessary to | |
# provide the exact change. If exact change is | |
# not possible, return None | |
result = None |
#!/usr/bin/python | |
# Converts a word to a hash key | |
# by taking the word, converting it | |
# to lowercase, sorting the letters | |
# and combining the word back as a | |
# string | |
def word_to_key(word): | |
return ''.join(sorted(word.lower())) |
// http://projecteuler.net/problem=5 | |
// 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. | |
// What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? | |
object Problem05 { | |
def main(args: Array[String]) { | |
val numbersToTen = (1 to 10).toList | |
println("Lowest Common Multiple of 1 to 10: " + lcmList(numbersToTen)) |
// http://projecteuler.net/problem=4 | |
// A palindromic number reads the same both ways. The largest palindrome made | |
// from the product of two 2-digit numbers is 9009 = 91 99. | |
// Find the largest palindrome made from the product of two 3-digit numbers. | |
object Problem04 { | |
def main(args: Array[String]) { |
// http://projecteuler.net/problem=3 | |
//The prime factors of 13195 are 5, 7, 13 and 29. | |
//What is the largest prime factor of the number 600851475143 ? | |
object Problem03 { | |
def main(args: Array[String]) { | |
//val number = 13195 | |
val number = 600851475143L |
// http://projecteuler.net/problem=2 | |
// Each new term in the Fibonacci sequence is generated by adding the previous two terms. | |
// By starting with 1 and 2, the first 10 terms will be: | |
// 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... | |
// By considering the terms in the Fibonacci sequence whose values do not exceed four million, | |
// find the sum of the even-valued terms. |
// http://projecteuler.net/problem=1 | |
// If we list all the natural numbers below 10 that are multiples of 3 or 5, | |
// we get 3, 5, 6 and 9. The sum of these multiples is 23. | |
// Find the sum of all the multiples of 3 or 5 below 1000. | |
object Problem01 { | |
def main(args: Array[String]) { | |
val output = "Sum of [3,5] multiples below %d: " |
import com.typesafe.startscript.StartScriptPlugin | |
name := "Lift Hello World" | |
seq(StartScriptPlugin.startScriptForClassesSettings: _*) | |
libraryDependencies ++= { | |
Seq( | |
"org.eclipse.jetty" % "jetty-server" % "7.5.4.v20111024" % "compile->default", | |
"org.eclipse.jetty" % "jetty-servlet" % "7.5.4.v20111024" % "compile->default", |
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<!DOCTYPE web-app | |
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" | |
"http://java.sun.com/dtd/web-app_2_3.dtd"> | |
<web-app> | |
<filter> | |
<filter-name>LiftFilter</filter-name> | |
<display-name>Lift Filter</display-name> |