Search found 47 matches

by luke77
Fri Feb 06, 2009 2:46 am UTC
Forum: General
Topic: Got an ipod...now what?
Replies: 15
Views: 1421

Got an ipod...now what?

Hi guys, I finally gave in and ordered an IPOD (a nano), and downloaded iTunes on my desktop. I'm in a living situation where I only have acess to a computer for about an hour a day and very limited TV access, so I figure I can watch some of my favorite shows through iTunes and pick up some new podc...
by luke77
Sun Jan 25, 2009 7:20 pm UTC
Forum: General
Topic: Working offline
Replies: 14
Views: 1562

Re: Working offline

Thanks guys. More suggestions appreciated, of course. Also, follow-up question: is there any way to download content from streaming sites like hulu.com so that I can watch it on my non-internet-connected laptop? Someone told me about Videobox for $15 from http://www.tastyapps.com/, which apparently ...
by luke77
Sat Jan 24, 2009 8:04 pm UTC
Forum: General
Topic: Working offline
Replies: 14
Views: 1562

Working offline

Hi guys, For the next few months, I'm staying in a kind of crappy situation wihout TV, internet for the most part, and very little social contact for about 12 hours a day. I will have access to the internet so that I can download stuff to load onto my laptop for later if need be, but that's it. So I...
by luke77
Mon Jan 12, 2009 6:43 pm UTC
Forum: The Help Desk
Topic: Transferring files
Replies: 5
Views: 667

Re: Transferring files

Thanks!
by luke77
Mon Jan 12, 2009 5:26 pm UTC
Forum: The Help Desk
Topic: Transferring files
Replies: 5
Views: 667

Re: Transferring files

Thanks. I figured out how to do this, I think. A quick followup: I've been teaching myself programming by working through the Project Euler problems. Is there a way that I can download the entire site for offline work? I know how to download, say, the front page, but each problem is on its own indiv...
by luke77
Mon Jan 12, 2009 8:24 am UTC
Forum: The Help Desk
Topic: Transferring files
Replies: 5
Views: 667

Transferring files

Hi guys, I'm unexpectedly going to be going out of town for about 3 months, leaving later today. I normally use a my desktop at home and will be given a laptop to use while I'm gone, but don't have any of my files on the laptop. I unfortunately do not have any CDs or a flash drive available here at ...
by luke77
Sun Dec 28, 2008 12:22 am UTC
Forum: Coding
Topic: Python anagram solver
Replies: 34
Views: 7596

Re: Python anagram solver

Sorry about the delay. Here's the problem I'm having implementing your guys' suggestions. Here's what you wrote previously: I'd take the initial dictionary and anagramize it. First you need to digest the dictionary. There's basically two ways to do this: the naive string hash function (return sum(ma...
by luke77
Fri Dec 26, 2008 4:29 pm UTC
Forum: Coding
Topic: Python anagram solver
Replies: 34
Views: 7596

Re: Python anagram solver

Bump. Can anyone solve the original problem? Thanks.
by luke77
Tue Dec 23, 2008 12:11 am UTC
Forum: Coding
Topic: Project Euler
Replies: 411
Views: 159817

Re: Project Euler

That's right, I was accidentally adding an extra 2 in there. So my list is correct, but I don't see where my code is in error. Does anyone see the problem in this function? When thesum exceeds 100000 and it exits the inner loop, when will it enter the inner loop again? When it exceeds 1000000 and e...
by luke77
Mon Dec 22, 2008 11:39 pm UTC
Forum: Coding
Topic: Project Euler
Replies: 411
Views: 159817

Re: Project Euler

That's right, I was accidentally adding an extra 2 in there. So my list is correct, but I don't see where my code is in error. Does anyone see the problem in this function? def findContig(primes): first=0 last=0 lenfinal=0 answer=0 thesum=0 primesclone=primes[1:] sequencelength=len(primes) while fir...
by luke77
Mon Dec 22, 2008 7:52 pm UTC
Forum: Computer Science
Topic: Teaching CS
Replies: 7
Views: 1623

Re: Teaching CS

Thanks for the response. I understand the normal tenure track for PhD professors, and I recognize that it is a long and hard road. The other type of college level instructor you refer to is typically termed an "adjunct", and at least in my field and the social sciences, adjuncts are usuall...
by luke77
Mon Dec 22, 2008 7:30 pm UTC
Forum: Coding
Topic: Python anagram solver
Replies: 34
Views: 7596

Re: Python anagram solver

Input a phrase, find all word sets from a dictionary that form anagrams of the phrase (sorry, that's sixteen).
by luke77
Mon Dec 22, 2008 6:36 pm UTC
Forum: Coding
Topic: Python anagram solver
Replies: 34
Views: 7596

Re: Python anagram solver

Thanks for the response. I've pasted the complete code at the end of this post; it's not entirely finished but the blank spots don't affect what I'm trying to do. I think it's pretty self explanatory; I try to error on the side of writing too much code when I don't entirely understand a concept yet ...
by luke77
Mon Dec 22, 2008 4:17 pm UTC
Forum: Computer Science
Topic: Teaching CS
Replies: 7
Views: 1623

Teaching CS

Hi everyone, I graduated from college about a year ago, and I didn't begin programming until about six months ago. I'm working in finance right now but I've always thought about getting a PhD and teaching at the college level. My major is Chemistry and to teach in college you need a PhD which is a v...
by luke77
Mon Dec 22, 2008 7:15 am UTC
Forum: Coding
Topic: Project Euler
Replies: 411
Views: 159817

Re: Project Euler

Hmm...I'm getting the same result as you for the first sixty primes. There must be something wrong with my function. I'll try rewriting tomorrow.

EDIT: Is the length of the entire list of primes to 1000000 78500?
by luke77
Mon Dec 22, 2008 6:56 am UTC
Forum: Coding
Topic: Python anagram solver
Replies: 34
Views: 7596

Python anagram solver

Hi everyone, I'm having trouble with an anagram generating program that I am writing in Python. My output is not what is should be and I think the reason has something to do with my helper function creating a reference to a dictionary each time it is called rather than a new dictionary. Here is my m...
by luke77
Sun Dec 21, 2008 8:41 pm UTC
Forum: Coding
Topic: Project Euler
Replies: 411
Views: 159817

Re: Project Euler

Any hints on number 50? I keep getting 886591, using the following code: def findContig(primes): first=0 last=0 lenfinal=0 answer=0 thesum=0 primesclone=primes[:] sequencelength=len(primes) while first<=sequencelength: last=first+1 while thesum<=1000000: shortenedseq=primes[first:las...
by luke77
Sat Dec 20, 2008 1:38 am UTC
Forum: Coding
Topic: Project Euler
Replies: 411
Views: 159817

Re: Project Euler

Ahhh...thanks. Time to retake ninth grade math...
by luke77
Fri Dec 19, 2008 8:01 pm UTC
Forum: Coding
Topic: Project Euler
Replies: 411
Views: 159817

Re: Project Euler

I think that's basically what I did, or tried to, although not as concisely. Here's my code in Python: def makeFact(bound): #Return list of factorials, 0 through bound facts=list() facts.append(0) for i in range(1,bound+1): facts.append(fact(i)) return...
by luke77
Fri Dec 19, 2008 5:56 pm UTC
Forum: Coding
Topic: Project Euler
Replies: 411
Views: 159817

Re: Project Euler

Has anyone done 34? I've written what seems to be a solid algorithm to solve it, but the only number I'm coming up with is the one they give, 145. At least in tests up to 5000000. Is there a special way to solve this?
by luke77
Wed Dec 10, 2008 2:17 pm UTC
Forum: Coding
Topic: Project Euler 15
Replies: 9
Views: 4017

Re: Project Euler 15

The first time I solved it, I did exactly what Xanthir suggests, count the number of ways to reach (0,0). I made a program to do it first, then found the mathematical explanation later (because I could feel it in the back of my mind the whole time. It was really annoying). Anyway, for your program,...
by luke77
Wed Dec 10, 2008 2:17 am UTC
Forum: Coding
Topic: Towers of Hanoi using OOD
Replies: 5
Views: 1158

Re: Towers of Hanoi using OOD

Give each ring a size field. Don't give them a position field. Next create one "stack" per... well, per stack. Your chosen language may or may not support stacks, they're pretty easy to implement. to move a ring, pop it off into your "hand" variable. compare it with where you wa...
by luke77
Tue Dec 09, 2008 11:15 pm UTC
Forum: Coding
Topic: Project Euler 15
Replies: 9
Views: 4017

Project Euler 15

Hi guys, I'm going through the Project Euler problems and am having trouble with number 15. Link is: http://projecteuler.net/index.php?section=problems&id=15 . I'm not really sure how best to approach it. I can represent the square using R's and D's, so that for a square with side length N, N= R...
by luke77
Tue Dec 09, 2008 10:32 pm UTC
Forum: Coding
Topic: Towers of Hanoi using OOD
Replies: 5
Views: 1158

Towers of Hanoi using OOD

Hi guys, I'm pretty new to programming and have been using Python for the most part. I've been trying to "get" the whole object oriented design thing; basically trying to approach problems by defining objects with specific attributes, rather than just coming up with an algorithm that will ...
by luke77
Mon Dec 08, 2008 3:32 am UTC
Forum: Coding
Topic: Applications of sorting mechanisms
Replies: 3
Views: 1168

Applications of sorting mechanisms

Hi guys, I'm a fairly new programmer, and I've been reading about the different sorting algorithms: merge sort, bubble sort, depth first, breadth first, etc. It's interesting to read about and implement the theory, but none of the stuff I'm reading really speaks about of gives examples of actual app...
by luke77
Thu Dec 04, 2008 11:28 pm UTC
Forum: Coding
Topic: Building a tree with multiple branches
Replies: 9
Views: 1017

Re: Building a tree with multiple branches

Ah, it works now that I refresh the page. I think I got the mangled version.
by luke77
Thu Dec 04, 2008 11:05 pm UTC
Forum: Coding
Topic: Building a tree with multiple branches
Replies: 9
Views: 1017

Re: Building a tree with multiple branches

Thanks, but do you call this with a string, list, or something else? I'm trying to call it (the second function) using a string and then using a list, and I get an error: "Slice indices must be integers or None or have an __index__ method". When I try using an integer it say that my recurs...
by luke77
Thu Dec 04, 2008 9:39 pm UTC
Forum: Coding
Topic: Building a tree with multiple branches
Replies: 9
Views: 1017

Re: Building a tree with multiple branches

Thanks guys. I think sparkyb's solution is probably the simplest that will fit my needs. OK, I have an entirely different question for the same application. I am trying to write an algorithm to generate all prmutations of a string or number, and I'm realizing that I suck at recursion. The algorithm ...
by luke77
Thu Dec 04, 2008 4:47 pm UTC
Forum: Coding
Topic: Building a tree with multiple branches
Replies: 9
Views: 1017

Building a tree with multiple branches

Hi guys, I'm building a tree in Python with the following basic structure: class Tree: def __init__(self, cargo, left=None, right=None): self.cargo = cargo self.left = left self.right = right def __str__(self): return str(self.cargo) Then I can build a tree like this: tree = Tree(1, Tree(2), Tree(3)...
by luke77
Thu Dec 04, 2008 3:30 am UTC
Forum: Books
Topic: Nonfiction...
Replies: 7
Views: 1423

Nonfiction...

Hi guys, This is somewhat of an odd request. I grew up loving history. My parents dragged us to every historical site in the Eastern US, and by the time I was 10 or so I began to enjoy it. I used to love reading both historical fiction and nonfiction, and history was my favorite subject in school. A...
by luke77
Sun Nov 30, 2008 6:12 pm UTC
Forum: Coding
Topic: Second language suggestion
Replies: 16
Views: 1855

Re: Second language suggestion

I guess I'll bump this up once more, as I have an addition to my original question: As suggested, I'm now learning Scheme after spending several months getting an intro to programming with Python. Scheme definitely takes a different approach to programming, and it's very interesting to see how probl...
by luke77
Mon Nov 24, 2008 2:52 pm UTC
Forum: Coding
Topic: Second language suggestion
Replies: 16
Views: 1855

Re: Second language suggestion

Hi guys, Thought I'd follow up here instead of starting a new thread... I took your guys' advice and started learning sceme this weekend. BTW, I looked over several online resources and just wanted to recommend a site for learning scheme, if you're a newbie like me. I started out reading through a t...
by luke77
Fri Nov 21, 2008 2:54 am UTC
Forum: Coding
Topic: Tkinter (once more...)
Replies: 3
Views: 1004

Re: Tkinter (once more...)

The problem is not that the self.message.config(text=...) within gameOver() is not working; the problem is that the message is immediately being overwritten by the "Make your move" messages later in the doClickSquare() method. Presumably you want to return immediately, or otherwise short-...
by luke77
Thu Nov 20, 2008 9:40 pm UTC
Forum: Coding
Topic: Second language suggestion
Replies: 16
Views: 1855

Re: Second language suggestion

Thanks guys. Maybe I'll try learning a functional language. Can anyone recommend a good beginners tutorial for any of the widely used functional languages, specifically geared towards those without much programming experienced? I've looked at several and learning a functional language is even more i...
by luke77
Thu Nov 20, 2008 8:17 pm UTC
Forum: Coding
Topic: Tkinter (once more...)
Replies: 3
Views: 1004

Tkinter (once more...)

Hi guys, I've posted below an (very) incomplete simple game that I'm writing using TKinter. It's a bit messy at this point, but I cannot figure out what is going on with one specific function. Specifically, it is the gameOver function, which is called when self.winner is True. I've been working at t...
by luke77
Tue Nov 18, 2008 12:59 am UTC
Forum: Coding
Topic: Second language suggestion
Replies: 16
Views: 1855

Second language suggestion

Hi guys, I'm a relative novice at programming, and picked up Python on my own starting about 3 months ago. I've learned the basics of Python and am at a point where I'm comfortable dealing with objects, functions, classes, modules...probably the equivalent of someone who has completed a first semest...
by luke77
Wed Oct 22, 2008 3:25 am UTC
Forum: Coding
Topic: Approaching Euler 28?
Replies: 6
Views: 1696

Re: Approaching Euler 28?

Ahh..thanks, that was too easy.
by luke77
Tue Oct 21, 2008 10:09 pm UTC
Forum: Coding
Topic: Approaching Euler 28?
Replies: 6
Views: 1696

Approaching Euler 28?

I'm stumped by this one...anyone know how to attempt it? I don't know where to start:

http://projecteuler.net/index.php?secti ... lems&id=28
by luke77
Tue Oct 21, 2008 6:39 pm UTC
Forum: Coding
Topic: Python stock portfolio tracker
Replies: 1
Views: 1623

Python stock portfolio tracker

Hi guys, I'm new to programming and am trying to get better by writing "useful" things. Here is a very simple stock portfolio tracker that I started yesterday. It is not very complex and I feel like I'm not really improving my skills since it uses mostly beginner concepts, but I'd welcome ...
by luke77
Mon Oct 13, 2008 2:16 am UTC
Forum: Coding
Topic: How to approach difficult problems?
Replies: 25
Views: 3293

Re: How to approach difficult problems?

That's what I was thinking, and when I made that adjustment things look better, but still not correct. Below are the first hundred permutations using the modified algorithm. We run into trouble when there is no value after i that is greater than the value at i; for instance, [0, 1, 2, 9, 8, 7, 6, 5,...

Go to advanced search