PCPOTATO
Navigation

Home
About
Contact
Resume

Resources

Projects

None yet

Categories

General
Programming

Archives

May 2008
April 2008
Battle Song May 4th, 2008

PIECE OF CRAP YOUTUBE MAKING SLIDESHOWS OUT OF MY WORK

http://destroys.us/media/ has a full version entitled Eddie Battle Song.mov.

Posted in General | No Comments »

Dark Dungeons April 21st, 2008

Dark Dungeons

LAWL

Posted in General | No Comments »

TGIF April 18th, 2008

Despite the fact that I accidentally slept in, missing Japanese yet again and failing to turn in my homework, I’m glad it is today! Why, you ask? Because I have a horrible week to look forward to next week, and today I’m going to see The Forgotten Kingdom and Street Kings!

Speaking of moving pictures, Wired has shown me a list of upcoming shows that look quite promising. And we don’t have to worry about Fox canceling them as Nathan Fillion is nowhere to be found.

In other news, I am so proud of myself now that I managed to post something on the programming section of Reddit that has managed to make it to the front page! Yes, I am pitiful. It was a link to these linked list exercises in C.

Posted in General | 1 Comment »

Project Euler #6 April 18th, 2008

Finding the difference between the sum of the squares and the square of the sum was pretty easy, but my solution probably has too much white space for some people.

1
2
3
4
5
6
7
8
9
10
11
12
13
#sum of the squares
some = 0
for i in range(101):
	some = some + i*i
 
#square of the sums
squar = 0
tempsum = 0
for i in range(101):
	tempsum = tempsum + i
squar = tempsum * tempsum
 
print abs(some - squar)

On another note, I noticed my site looks like crap in Internet Explorer, but grandmas on their 386’s aren’t visiting this site anyway.

Posted in Programming | No Comments »

Piracy is Good! April 16th, 2008

Though it’s already three years old, this guy has pretty good foresight on the future of content delivery.

Posted in General | No Comments »

Supaa Mahrio April 15th, 2008

Apparently the Japanese don’t think us baka gaijins can handle the real Mario levels. Well this guy plays them for us.

Posted in General | No Comments »

Project Euler #5 April 14th, 2008

What is the smallest number that is evenly divisible by all of the numbers from 1 to 20?

1
2
3
4
5
6
7
i = 20
while((i%20 != 0) or (i%19 != 0) or (i%18 != 0) or 
(i%17 != 0) or (i%16 != 0) or (i%15 != 0) or (i%14 != 0)
 or (i%13 != 0) or (i%12 != 0) or (i%11 != 0)):
	i = i + 20
	print i
print i

I am going to hell.

Posted in Programming | No Comments »

Project Euler #4 April 14th, 2008

If I had only seen the one liner at Slick or Slack (a pretty slick place) before writing this monstrosity:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pal = 0
i = 999
while i > 0:
	j = 999
	while j > 0:
		ftemp = str(i * j)
		rtemp = ""
		for letter in ftemp:
			rtemp = letter + rtemp
		if ftemp == rtemp:
			if pal < i*j:
				pal = i*j
				break
		j = j - 1
	i = i - 1		
 
print pal

Yes I did skip #3 since I have yet to figure out how to factor huge numbers without it taking some huge distributed computing system due to my inefficient code.

Posted in Programming | No Comments »

Project Euler #2 April 13th, 2008

The sum of all of the even-valued terms in the sequence which do not exceed four million.

1
2
3
4
5
6
7
8
9
10
11
12
13
sum = 0
first = 1
second = 1
current = 2
while(current < 4000000):
	if (current %2 == 0):
		sum = sum + current
	first = second
	second = current
	current = current + first
	print current,
 
print sum

Efficiency and I do not get along.

Posted in Programming | No Comments »

Project Euler #1 April 13th, 2008

The sum of all of the multiples of 3 or 5 below 1000.

1
2
3
4
5
6
7
sum = 0
i = 0
while(i < 1000):
	if(i%5 == 0 or i%3 == 0):
		sum = sum + i
	i = i + 1
print sum

Definitely not the best way to do it, but who am I kidding.

Posted in Programming | No Comments »

Domains


Links


Presence


Meta

Log in