|
|
|
February 9th, 2010
02:34 pm - Felony Snowball Charges http://www.thesmokinggun.com/archive/years/2010/0209101snow1.html
Felony snowball throwing charges have been leveled against two Virginia college students for allegedly pelting a city plow and an undercover police car during Saturday's blizzard.
Five years for throwing snowballs at a cop car. That's more time than some people receive for murder in this country.
|
February 8th, 2010
11:34 pm - The random button Sometimes random doesn't look so bad...
( Read more... )
|
February 7th, 2010
10:06 pm - hahah @ the Colts PWNed!
I guess throwing those two games so Peyton could "rest up" worked out well for you.
|
February 6th, 2010
04:58 pm - Brian Greene's _The Fabric of the Cosmos_ I finished reading this book, after a year or three of trying to slog through it. I didn't enjoy it much, not nearly as much as I liked his previous book _The Elegant Universe_. It felt like the textual equivalent of chewing gristle. I don't know if it's because I am so close to the subject now, or what, but there you have it.
|
February 5th, 2010
02:20 am - Longbow Nictus dings 50 While solo framming in the AE. My reflexes suck and this was right after the ding animation. \m/ Warshade powah
( Read more... )
|
February 4th, 2010
02:01 pm - Natalie Imbruglia - Want All that you want I hope you get all that you want I hope you get all that you want
So I suppose you got what you want Take a good look at what you give up Because I’m telling you A heart can’t be unbroken oh, oh, oh, oh
And can you remember how I kiss you Recall the sweet taste in your mouth Cos baby the memory is all you get now And I’m moving, movin, moving on
All that you want I hope you get all that you want I hope you get all that you want Cause I do I hope you get all that you want I hope you get all that you want Cause I do
Does every morning make you happy And tell me do you laugh yourself to sleep I hope you find it easy to forget me oh, oh, oh, oh
I hope you don’t feel anything when you see me I wonder if you’re out there having fun I hope you get all that you really wanted Cause I’m moving, movin, moving on
Don’t you see the light has changed And nothing looks the same Just shadows on the ground And if you listen carefully you’ll hear
All that you want I hope you get all that you want I hope you get all that you want Cause I do I hope you get all that you want I hope you get all that you want Cause I do
|
11:07 am - This sucks I couldn't sleep a wink. I guess the plus side is that I'm not yet sleepy.
|
February 3rd, 2010
02:58 pm - Project Euler, Problem 9 http://projecteuler.net/index.php?section=problems&id=9
There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc.
I approached this two ways. The first way was a purely bruteforce method. Run through a lot of a's and b's, calculate c, and if a+b+c=1000, print out everything. This results in a lot of non-integer c's getting created and then the user has to sort through the results to find the right c. It was easy to code, and is behind the cut.
( Read more... )
I remembered though, somewhere in my memory, that there was a formulate to generate Pythagorean triples. A quick trip to wikipedia and I had Euclid's formula for doing the job. So I rewrote my code to use that, and voila! It spit out the right answer.
( Read more... )
|
February 2nd, 2010
08:41 pm - Ug Man, I must be coming down with something, I've slept most of the day and I'm kinda tired.
|
February 1st, 2010
09:45 pm - Nick Cave and the Bad Seeds - Moonland When I came up from out of the meat-locker the city was gone the sky was full of lights the snow provides a silent cover in moonland, under the stars under the snow, I followed this car and I followed that car, through the sand through the snow, I turn on the radio I listen to the deejay, and it must feel nice it must feel nice to know, that somebody needs you and everything moves slow, under the stars under the ash, through the sand and the night drifts in, the snow provides a silent cover and I'm not your favourite lover, I turn on the radio and it must feel nice o very very nice to know, that somebody needs you and the chilly winds blow, under the snow under the stars, the whispering deejay on the radio, the whispering deejay on the radio, I'm not your favourite lover I'm not your favourite lover, and it must feel nice to leave no trace (no trace at all) but somebody needs you, and that somebody is me under the stars, under the snow your eyes were closed you were playing with the buttons on your coat in the back of that car in moonland, under the stars in moonland, and I followed that car
|
05:05 pm - Project Euler, Problem 8 http://projecteuler.net/index.php?section=problems&id=8
Find the greatest product of five consecutive digits in the 1000-digit number.
73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 85861560789112949495459501737958331952853208805511 12540698747158523863050715693290963295227443043557 66896648950445244523161731856403098711121722383113 62229893423380308135336276614282806444486645238749 30358907296290491560440772390713810515859307960866 70172427121883998797908792274921901699720888093776 65727333001053367881220235421809751254540594752243 52584907711670556013604839586446706324415722155397 53697817977846174064955149290862569321978468622482 83972241375657056057490261407972968652414535100474 82166370484403199890008895243450658541227588666881 16427171479924442928230863465674813919123162824586 17866458359124566529476545682848912883142607690042 24219022671055626321111109370544217506941658960408 07198403850962455444362981230987879927244284909188 84580156166097919133875499200524063689912560717606 05886116467109405077541002256983155200055935729725 71636269561882670428252483600823257530420752963450
I solved this in a somewhat non-elegant manner. I took the 1000-digit number, and broke it up so that only one digit was on any given line, then saved that to a file named "number". This is because I didn't want to go look up how to get FORTRAN to read one digit at a time out of a string or something. Then I read that number in, run through the whole thing multiplying and checking against the previous biggest number. Pretty simple aside from the finger cramps of hitting the left arrow key and enter 999 times.
( Read more... )
|
04:24 pm - Project Euler, Problem 7 http://projecteuler.net/index.php?section=problems&id=7
What is the 10001st Prime number?
To do this problem, I took the prime factorization routine from Problem 3 and added a line in it that counted the number of prime factors for a given number. If that counter was only 1, then the number in question is itself a prime number. So the factorization routine became a prime test routine. Add in a little wrapping to loop up to the 10001st prime number, and we're set.
( Read more... )
I think the execution time was fairly long, but I freely admit my code is less of an optimal method and more of a "Well, it works..." one.
[efeger@zanzibar problem_007]$ time ./a.out > answer
real 0m23.407s 104659 user 0m20.421s 104677 sys 0m0.068s 104681
A better program should be able to do the calculation in about a second or less on my computer.
|
January 31st, 2010
January 30th, 2010
January 29th, 2010
07:58 pm - Tropico 3 Man, I wanted to check Tropico 3 out like since the day it first came out. I didn't want to pay 40 bucks. But then today Steam put it on sale for 14 bucks today. I couldn't pass it up. They also have both Freedom Force games, and all 5 X-COM games on sale for 2 bucks a bundle.
I'll report back later if I like Tropico 3 or if I hate it.
|
January 28th, 2010
04:20 pm - Project Euler, Problem 6 http://projecteuler.net/index.php?section=problems&id=6
Find the difference between the sum of the squares of the first one hundred natural numbers and the square of the sum.
This is easy. I could compute it by hand if I wanted, but this is exactly the sort of problem which FORTRAN is made for. See the code I ran behind the cut:
( Read more... )
One note is that Project Euler didn't like the minus sign in front of the number, so throw it away. Alternately just reverse the order of the subtraction in the write statement. Piece of cake.
|
|
|