How to get Latitude and Longitude in Birdseye View
Posted on Monday, November 16th, 2009
So apparently there is a licensing issue involved in trying to get the latitude and longitude of the center of a Birdseye view when using Microsoft’s Bing maps. If your map is currently in [...]
continue readingAutoloading Your Django Models
Posted on Wednesday, January 9th, 2008
One of the great things about Python is the interactive shell. This allows you to try things out interactively before actually writing any permanent code.
I have been noticing how annoying it was to actually play [...]
Exercise 1.19
Posted on Friday, September 28th, 2007
So I never really expected this course to be so much about math – but I am beginning to see the importance of math more and more. It makes me wish that I had [...]
continue readingExercise 1.18
Posted on Tuesday, September 25th, 2007
Here are the rules for the Russian peasant method:
Write each number at the head of a column.
Double the number in the first column, and halve the number in the second column.
If the number in the [...]
Exercise 1.17
Posted on Saturday, September 22nd, 2007
(define (halve x) (/ x 2))
(define (double x) (+ x x))
(define (even? x)
(= (remainder x 2) 0))
(define (* a b)
(write b)
(cond ((= b 0) 0)
[...]
Exercise 1.16
Posted on Thursday, September 13th, 2007
(define (square x) (* x x))
(define (even? n)
(= (remainder n 2) 0))
(define (exp b n)
(exp-iter b n 1))
(define (exp-iter b n a)
(cond ((= n 1) a)
[...]
Exercise 1.15
Posted on Thursday, September 13th, 2007
a. The procedure p is applied 5 times.
(sine 12.15))
(p (sine 4.05)))
(p (p (sine 1.35))))
(p (p (p (sine .45)))))
(p (p (p (p (sine .15))))))
(p (p (p (p (p (sine .05)))))))
b. So I’m really unclear about [...]
Exercise 1.14
Posted on Wednesday, September 12th, 2007
The number of steps or space required is directly proportional to n since there is always the case of n pennies. So Θ(n). The time would be exponentially related to n since you have [...]
continue readingExercise 1.13
Posted on Wednesday, September 12th, 2007
Ok, so I’m not taking this class to learn about math proofs so instead I wrote a program to test out the equations:
(define (fib n)
(cond ((= n 0) 0)
[...]
Exercise 1.12
Posted on Tuesday, September 11th, 2007
(define (p y x)
(cond ((= y x) 1)
((= y 1) 1)
((= x 1) 1)
[...]