User Profile

Collapse

Profile Sidebar

Collapse
TMS
TMS
Last Activity: Mar 23 '08, 05:31 PM
Joined: Sep 12 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • TMS
    replied to JK Flip Flop Fun
    in C
    granted... that was an example. I wanted to see if that was correct. So, I tried initializing all the members, like what I showed previously, and it still doesn't work.

    Here is the sad part... I thought that the constructor I used to set the values was the copy constructor. I think I have it all backwards but I keep getting in an endless loop of wrong... :(
    See more | Go to post

    Leave a comment:


  • TMS
    replied to JK Flip Flop Fun
    in C
    ok, but when I initialize (for example)

    Code:
     
    JKFlipFlop::JKFlipFlop()
    {
    ipJ = 0; 
    }
    it does the same thing (garbage out). So, I'm missing something between that and the copy constructor I use just after this, right? What am I missing ?
    See more | Go to post

    Leave a comment:


  • TMS
    started a topic JK Flip Flop Fun
    in C

    JK Flip Flop Fun

    I'm writing a couple of classes one for a D Flip Flop and one for a JK Flip Flop in C++. The D Flip Flop seems to be working fine, but I'm having issues with the JK Flip Flop.

    I'm getting garbage for the variables when passing from one function to the next. Here is my code for the JK Flip Flop header, class and test:
    Code:
    #ifndef JKflipFlop_h
    #define JKflipFlop_h
    #include <iostream>
    class JKFlipFlop
    ...
    See more | Go to post

  • want the truth? NO, I'm not enjoying it. Its the same project I've been working on. This will be yet another rewrite to get it to work. Earlier this month I was working on the 'pacman' like game, well, I'm still working on it. Can't seem to get it right, and I'm about to give up.


    tms
    See more | Go to post

    Leave a comment:


  • yes yes... I see. That would solve it. Thank you.


    tms
    See more | Go to post

    Leave a comment:


  • TMS
    started a topic Tkinter -> canvas: location of .gif from arrow event

    Tkinter -> canvas: location of .gif from arrow event

    Is there any way of determining the location of a gif grom an arrow event? For example I have a canvas that has a gif that moves and I want the arrow to move the gif. But how does the arrow know where the gif is? There is event.x that tells where the curser is, but how can one determine the location based on a keyboard arrow event?

    tms
    See more | Go to post

  • TMS
    replied to Tkinter event using arrow keys
    hmmm... that is interesting. Create a 'flag' that says an event has occured, and stop the gif at the next vertex (if that is what it is called). Then update the base path and continue on its way. Hmmmm. Very interesting.

    I'll give it a try and report back.

    Thanks!

    tms
    See more | Go to post

    Leave a comment:


  • TMS
    started a topic Tkinter event using arrow keys

    Tkinter event using arrow keys

    Hey all:

    I'm working on this 'pac man' like game I've been writing in Tkinter. The temporary gif I'm using (I can't attach it, sorry) goes around the maze based on a dictionary that has each path location as the key, and alternate, or connecting locations as the definition to the key. Now I need to 'interrupt' the path and give it a new path based on a keyboard event, like an arrow up, left, down or right. At the next key point if there...
    See more | Go to post

  • OK, better yet... I have a gif moving now, but I want to make the image delete after it moves a little bit. I suppose I should have a loop doing what I'm doing by hand, but .... I'm just trying to get the thing to work.

    Code:
    # load and display image using Tkinter
    from Tkinter import *
    root = Tk()
    root.title("Click me!")
    def next_image(event):
    	global toggle_flag
    	global x, y, photo2, photo3
    ...
    See more | Go to post

    Leave a comment:


  • Tkinter -> canvas -> make an obect move from one spot to next

    Schools over!!! Now its time to play.

    I would like to learn how to make objects move from one location to the next on a canvas widget. For example:

    Code:
    from Tkinter import *
    class square:
    	def __init__(self, canvas, xy, color, change):
    		self.canvas = canvas
    		self.id = self.canvas.create_rectangle(-10-abs(change),
    											 -10, 11+abs(change), 11, fill = color)
    		self.canvas.move(self.id,
    ...
    See more | Go to post

  • TMS
    started a topic mod_python: can't load modules/mod_python.so

    mod_python: can't load modules/mod_python.so

    I installed mod_python 3.3.1 for Apache 2.0.58 and Windows XP. Per instructions I added this line to the httpd.conf file:

    LoadModule mod_python modules/mod_python.so

    And I get this error:

    Syntax error on line 174 of C:/Program Files/Apache Group/Apache2/conf/httpd.con
    f:
    Can't locate API module structure `mod_python' in file C:/Program Files/Apache G
    roup/Apache2/modules/mod_python.so:...
    See more | Go to post

  • TMS
    started a topic Mod_python installation in Apache2 and Windows XP

    Mod_python installation in Apache2 and Windows XP

    Anyone try to install this module on Windows? I'm getting an error saying that it can't load the modules/mod_python.so.

    I've also asked on the mod_python message board and so far haven't gotten a response. I'm a little anxious because I am working on a project that is due soon. Anyone's insight would be appreciated.

    tms
    See more | Go to post

  • You are so right! I found everything I need right there.

    Thank you!
    See more | Go to post

    Leave a comment:


  • TMS
    started a topic python cgi script to retrieve images from a file on C:

    python cgi script to retrieve images from a file on C:

    Suppose I want to write a Python CGI script that goes to a 'specific' file on my hard drive and retrieves images?

    How do I list the directory I want to grab from? ie: Lets say I have images in my Python directory, I want the script to grab files from:

    C: \Python25\examp les

    I only want it to search this directory, no other directories.

    Thank you for your help.

    tms
    See more | Go to post

  • TMS
    replied to Using Tkinter in a web site
    So, in client side development, how would that work exactly?


    tms
    See more | Go to post

    Leave a comment:


  • TMS
    started a topic Using Tkinter in a web site

    Using Tkinter in a web site

    Has anyone used Tkinter in a web site? If so, please give a location and any information you have.

    ty in advance

    tms
    See more | Go to post

  • TMS
    replied to First CGI Script isn't right
    ahhhhhhhhh....

    'redface'

    Thanks :)

    tms
    See more | Go to post

    Leave a comment:


  • TMS
    started a topic First CGI Script isn't right

    First CGI Script isn't right

    I'm using the book Programming Python and I just tried the first CGI script. This is the script:

    Code:
    print "Content-Type: text/html\n"
    print "<TITLE>CGI 101</TITLE>"
    print "<H1>A First CGI script</H1>"
    print "<P>Hello, CGI world!</P>
    And this is what it looks like when I open my browser (er... IE), and look at it:
    print...
    See more | Go to post

  • TMS
    replied to ValueError: invalid literal for float():
    YEAH!!! thank you. Now I can get down to the complexities of linear regression, which is more busy work than anything. Thank you!

    This is what it looks like right now, there are no error messages:

    Code:
    #! /usr/bin/env python
    import sys
    import os
    from numpy import * 
    numLst = [] #an empty list
    if len(sys.argv) == 2:
    	infile = open(sys.argv[1], 'r')
    	for x in infile:
    		numLst.append([float(i)
    ...
    See more | Go to post

    Leave a comment:


  • TMS
    replied to ValueError: invalid literal for float():
    you aren't being stupid.
    My assignment requires that only one file is provided on the command line.

    Do you have a better way of doing it?

    In tests what I've done works fine. If I provide more than one file I get an error, which is what I want.

    Perhaps I'm missing something here. The first arg is 0, second is 1, etc. If the first arg is the program name, the second is the file name I want...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...