419 Archived Topics

Remove Filter
Member Avatar for lewashby

I am trying to get into the IT field and I'M unable to go to school. Everything I learn is from books I get vie Amazon.com or Books-A-Million. I don't really know anyone in the programming or IT field to whom I can get guidance and direction. Does anyone have …

Member Avatar for Ancient Dragon
0
137
Member Avatar for lewashby

[CODE]def save_transaction(price, credit_card, description): file = open("transactions.txt", "a") # the "a" means you are always going to append to this file file.write("%s%07d%s\n" % (credit_card, price, description)) file.close() items = ["DONUT", "LATTE", "FILTER", "MUFFIN"] prices = [1.50, 2.0, 1.80, 1.20] running = True while running: option = 1 for choice in …

Member Avatar for lewashby
0
109
Member Avatar for lewashby

[CODE]import sqlite3 def find_details(id2find): db = sqlite3.connect("surfersDB.sdb") # grap surfer data from database db.row_factory = sqlite3.Row cursor = db.cursor() cursor.execute("select * from surfers") rows = cursor.fetchall()[/CODE] In the code snippet above from "Head First Programming", the syntax for the database code is poorly explained. Is row_factory a call, method, or …

Member Avatar for lewashby
0
138
Member Avatar for lewashby

[CODE]def find_details(id2find): surfers_f = open("surfing_data.csv") for eash_line in surfers_f: s = {} (s["id"], s["country"], s["average"], s["board"], s["age"]) = eash_line.split(";") if id2find == int(s["id"]): surfers_f.close() return(s) return({}) lookup_id = int(input("Enter the id of the surfer: ")) surfer = find_details(lookup_id) if surfer: print("ID: " + surfer["id"]) print("Name: " + surfer["name"]) print("Country: " …

Member Avatar for TrustyTony
1
250
Member Avatar for lewashby

Could anyone point me to a good C++ compiler for Ubuntu, other than Mono. Note that I was using Visual C++ 6. thanks.

Member Avatar for hyperbyte
0
133
Member Avatar for lewashby

In the following program I have a few questions. [B]results.txt[/B] Johnny 8.65 Juan 9.12 Joseph 8.45 Stacey 7.81 Aideen 8.05 Zack 7.21 Aaron 8.31 [CODE]scores = {} result_f = open("results.txt") for line in result_f: (name, score) = line.split() scores[score] = name result_f.close() print("The toop scores were:") for each_score in sorted(scores.keys(), …

Member Avatar for vegaseat
0
98
Member Avatar for lewashby

[CODE]line = "101;johnny 'wave-boy' Jones;USA;8.32;Fish;21" s = {} (s['id'], s['name'], s['country'], s['average'], s['board'], s['age']) = line.split(";") # above, why is "s" and the end of the key list surrounded by parenthesis? print("ID: " + s['id']) print("Name: " + s['name']) print("Country " + s['country']) print("Average " + s['average']) print("Board type: " …

Member Avatar for snippsat
0
159
Member Avatar for lewashby

I prefer gnome to KDE but I don't know what this is but I thought I might give it a try. If anyone knows what this is and where to get it, please let me know, thanks. [url]http://www.tomshardware.com/gallery/ubuntu-linux,0201--6247----jpg-.html[/url]

Member Avatar for neilnicky017
0
205
Member Avatar for lewashby

I'M using Ubuntu and I'M running python 3. I'M trying to find a pygame download for Ubuntu and python 3. I went to pygame.org and followed the Ubuntu link. I eventually found one link for pygame 1.9, which I'M told works for pythan 3. There were two files, amd64 & …

Member Avatar for griswolf
0
350
Member Avatar for lewashby

I use Ubuntu Linux and I'M running python 3. How do I know what version of pygame to get for python 3? And could someone point me to it? Thanks.

Member Avatar for griswolf
0
122
Member Avatar for lewashby

I'M rather new to Linux and I've just started with Ubuntu. I'M trying to understand the file system. I see that rather than a traditional drive letter like C: , Linux uses a single /. But I guess my real question is, where are programs stored? In Windows they're stored …

Member Avatar for Akira Takano
0
3K
Member Avatar for lewashby

Since I first moved to Ubuntu, one of my biggest complaints is Totem not having any audio, does anyone have any suggestions? Thanks.

Member Avatar for mooreted
0
118
Member Avatar for lewashby

I recently uninstalled python 2.6 from my Ubuntu, unbeknown to me at the time, the gnome desktop is reliant on python 2.6. Ubuntu then crashed and now will only load up in Kubuntu KDE. Kubuntu will not let me switch back to Ubuntu gnome, it's not an option. So from …

Member Avatar for JasonHippy
0
132
Member Avatar for lewashby

I'M reading the book "Beginning C# Game Programming by Ron Penton". The book is instucting me to create a small framework for a game, the problem is, the book was written for VS 2002 and I'M using VCs 2008 express. I'M instructed to add references to the project, two of …

Member Avatar for Gospp
0
318
Member Avatar for lewashby

I've had KDE for a while but I didn't like it as much to I stuck with gnome. Today I updated my gnome and a while later I decided to un-install python 2.6 and replace it with 3.0. I noticed that un-install was going really slow. Then my computer suddenly …

Member Avatar for JasonHippy
0
145
Member Avatar for lewashby

In the code below I can't understand the line [COLOR="Red"]List<Surface> sfcStars = new List<Surface>();[/COLOR] What's going on here, and what are "<>" those doing in the code, I've never seen the before. I got this code from [url]http://www.tuxradar.com/beginnerscode[/url] [CODE]using System; using SdlDotNet.Graphics; using System.Collections.Generic; using System.Drawing; namespace TroutWars { class …

Member Avatar for apegram
0
122
Member Avatar for lewashby

[COLOR="red"]Dog[] dogs = new Dog[7]; dogs[5] = new Dog(); dogs[0] = new Dog();[/COLOR] According to the book I'M reading the second two lines here create instances but the first only creates an array. I'M still learning how to program but it looks to me like the fist line is also …

Member Avatar for apegram
0
141
Member Avatar for lewashby

First off, I did google this before hand but most of the answers I got were about assigning attributes, but that's the the trouble I'M having. I'M trying to understand the "this" keyword beging used as a parameter/argument. Here some sample code There is a class by the name Elephant. …

Member Avatar for Szpilona
0
116
Member Avatar for lewashby

In the code below, I'M having trouble with one line of code [COLOR="Red"]MenuMaker menu = new MenuMaker() { Randomizer = new Random() };[/COLOR] The program is a simple windows Form with two main files, Form1.cs & MenuMaker.cs, the second one is a class. What I'M trying to understand is why …

Member Avatar for apegram
0
185
Member Avatar for lewashby

I'M reading this tutorial at [url]http://www.tuxradar.com/beginnerscode[/url] at all I have done thus far is enough for an empty game window built with two small .cs files. Here are the error messages. [COLOR="Red"]Line=15, Column=72, Type=Error, Priority=Normal, Description=An object reference is required to access non-static member TroutWars.MainClass.Quit(object, SdlDotNet.Core.QuitEventArgs)'(CS0120)][/COLOR] & [COLOR="Red"]Description=`System.EventArgs' does not …

Member Avatar for lewashby
0
113
Member Avatar for lewashby

Running Mono on Ubuntu 9.10 Main.cs [CODE]using System; using SdlDotNet; using SdlDotNet.Core; using SdlDotNet.Graphics; using System.Drawing; namespace TroutWars { class MainClass { public static void Main(string[] args) { Video.SetVideoMode(1024, 768); Events.Quit += new EventHandler < QuitEventArgs > (Quit); EventArgs.Run(); } void Quit(object sender, QuitEventArgs e) { Events.QuitApplication(); } } }[/CODE] …

Member Avatar for lewashby
0
1K
Member Avatar for lewashby

I'M reading "Head First C#" In this book I was told that when you want to create a float that you need to add an "F" to the end. float myFloat = 14.6F; But the very first thing you type is "float", isn't that enough?

Member Avatar for ddanbe
1
108
Member Avatar for lewashby

I recently learned about a good media player for Ubuntu called Songbird. I downloaded the .tar.gz file from [url]http://www.getsongbird.com/[/url], and unloaded it to my desktop. I read from one of the post on the site that I needed to move it to my home folder and just click on the …

Member Avatar for JasonHippy
0
134
Member Avatar for lewashby

I have a little programming experience and I'M just getting into Linux. I was wondering, how big of a deal would it be to convert some of your old classics like Half-Life and Tomb Raider from Windows to Linux? Sorry to ask such a stupid question on such a technical …

Member Avatar for khakilang
0
93
Member Avatar for lewashby

I'M currently running Vista but am trying to move at least 90% of my computer usage to Linux so I've download Ubuntu. So I burned the ISO to a CD and now I need to know how to install it but give it a separate bigger partition than my Windows. …

Member Avatar for petraarkanian
0
111
Member Avatar for lewashby

[url]http://ironpython.codeplex.com/releases/view/12482[/url] I'M running Ubuntu 9.10. On the website above, what which download should I use? I don't see a debian so I'M assuming I need to get the bin. If that's the case, I have no idea how to install a bin. Thanks for any and all replies. Wait, it's …

Member Avatar for JasonHippy
0
109
Member Avatar for lewashby

I'M new to Linux & Ubuntu. I know I could just install Open Office through the Ubuntu Software Center or the Package Manager but I wanted to do it manually. So I download the debian package from [url]www.openoffice.org[/url] and unzipped it. Now I have a folder on my desktop lapeled …

Member Avatar for necrolin
0
305
Member Avatar for lewashby

I'M reading the book that's in the title. Let me show you what's going on. I'M given the following code, an example of Inheritance. [CODE]using System; namespace CritClone { class CritViewer { static void Main(string[] args) { CritViewer cv = new CritViewer(); }// end main public CritViewer() { Clone myClone …

Member Avatar for apegram
0
146
Member Avatar for lewashby

I want to run my programs in a traditional Dos based screen as opposed to the new text page that it's running in now. Does anyone know how I can do that? Thanks.

Member Avatar for jonsca
0
543
Member Avatar for lewashby

I'M just getting started with Linux and I'M using Ubuntu. Straight from the CD Ubuntu came loaded with Open Office - Word, Spreadsheet, & Presentation. But how do I get the whole Open Office package? And what happens with the ones already on my system? Do I need to remove …

Member Avatar for JasonHippy
0
131
Member Avatar for lewashby

I'M trying to learn to program through Mono. I'M using a book on C#. Although it isn't specifically for Mono, I haven't gotten far into the book and it's a really small example so I don't expect that it has any platform specific code. Please see what's wrong with this …

Member Avatar for ddanbe
0
113
Member Avatar for lewashby

[URL="http://www.mono-project.com/Main_Page"]http://www.mono-project.com/Main_Page[/URL] On that site, what is the difference between to two blocks to the left? They read. Mono [INDENT]An open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET[/INDENT] MonoDevelop [INDENT]An open Source C# and .NET development environment for Linux, Windows, and Mac OS X[/INDENT] …

Member Avatar for vivek4020
0
131
Member Avatar for lewashby

I'M trying to learn to program through C#. The book I'M reading is trying to explain namespaces but I'M failing to understand it. As I understand it, a class is a blueprint for an object and, and a class is just a special block of code. So what exactly is …

Member Avatar for kvprajapati
0
118
Member Avatar for lewashby

I'M trying to switch from Windows to Ubuntu Linux. I'M trying to learn how to program and since I am also trying to move to Linux, thought that mono would be a good place for me to start. But I noticed when I installed mono ([url]http://www.mono-project.org[/url]), it said I needed …

Member Avatar for lewashby
0
69
Member Avatar for lewashby

I'M trying to make the switch from Windows to Linux, or at least make it a 9 to 1 ratio. I mean, I can't completely do away with windows for several reasons. I'M also interested in programming. Now, Linux is suppose to be a much better OS and that seems …

Member Avatar for sknake
0
152
Member Avatar for lewashby

I posted a thread labeled pygame, global name "glob" but am unable to resolve the issue so I was just going to ask a few question about the code. Well first of all, I ran it on Windows Vista, python 2.6 and pygame, but I'M not sure what version of …

Member Avatar for vegaseat
0
148
Member Avatar for lewashby

I'M reading "Beginning Game Develpment with Python and Pygame". In the following code, I'M gettin this error in sysfont.py [COLOR="Red"]NameError: global name 'glob' is not defined[/COLOR] [CODE]import pygame from pygame.locals import * from sys import exit pygame.init() SCREEN_SIZE = (800, 600) screen = pygame.display.set_mode(SCREEN_SIZE, 0, 32) font = pygame.font.SysFont("arial", 16) …

Member Avatar for Firewolf
0
842
Member Avatar for lewashby

First of all I'M using Ubuntu and I'M new to it, trying to make the switch. I'M reading a book on Ubuntu but it's a little out of date to the one I'M running. Anyway, the book instructs me to go to > System > Administration > Synaptic Package Manager, …

Member Avatar for Firewolf
0
260
Member Avatar for lewashby

In the following program, what is the "values" function? [CODE]for tank in tanks.values(): if tank.alive: print tank.name, "is the winnter!" break[/CODE] I looked it up using Wing IDE and this is what I found. [CODE]def values(self, arg): """ D.values() -> list of D's values """ return [][/CODE] Thanks for any …

Member Avatar for sneekula
0
74
Member Avatar for lewashby

In the following program, why do I need to use the name "player" rather than a regular counter like "i"? I ran the program this way and it prints out the last element in players for how ever many player elements are in players. I want to know what's going …

Member Avatar for jcao219
0
112
Member Avatar for lewashby

In the program below, I have two questions. First, the first object, card1 passes the strings A & c to it's master class. What I want to know is, what do these two strings have to do with the A & c in RANKS & SUITS? If the class had …

Member Avatar for woooee
0
100
Member Avatar for lewashby

I noticed when I first got my new Toshiba Satellite that there was some strange behavior with it's keyboard. When typing in a text document, the cursor would just jump to a random position in the text document, and no it wasn't be accidentally touching the touch pad. Then one …

Member Avatar for Seten
0
185
Member Avatar for lewashby

I'M 24 years old, a single parent in TN. I've been very interested in programming since I as probably 15, and I've been trying to learn since then. I started out with C++, didn't get far. I would start, give up, and start again. About a year ago I started …

Member Avatar for Narue
0
95
Member Avatar for lewashby

In the following program, I have three different comments each after a line of code. Please read those comments to answer my questions. [CODE] # Property Critter # Demonstrates get and set methods and properties class Critter(object): """A virtual pet""" def __init__(self, name): print "A new critter has been born!" …

Member Avatar for lrh9
0
263
Member Avatar for lewashby

In the following program, the second line in main print [COLOR="Red"]"Printing a Card object:"[/COLOR], is not showing up when I run the program. Could someone please tell me what's going on? Thanks. [CODE]# Playing Cards # Demonstrates combining objects class Card(object): """ A playing card. """ RANKS = ["A", "2", …

Member Avatar for snippsat
0
123
Member Avatar for lewashby

I have a pretty new Toshiba Satellite laptop. When I first go the thing I noticed that in the middle of me typing something on a text based document that the cursor would jump to some random position in the text document. This of course caused what I was typing …

Member Avatar for jbennet
0
121
Member Avatar for lewashby

In the following program, why is [COLOR="red"]"Ac"[/COLOR] the first thing that the program outputs? In main, [COLOR="red"]print "Printing a Card Object"[/COLOR] is the first think I see that should print anything. Is it the [COLOR="red"]__str__[/COLOR] method using the rank & suit attributes from the [COLOR="red"]__init__[/COLOR] constructor? [CODE]# Playing Cards # …

Member Avatar for snippsat
0
398
Member Avatar for lewashby

Does anyone know where I can find some sort of UML (unified modeling language) tool for python? I think it might help me understand OOP a little better, but I don't really know, I just read about UML and that's all I know. Thanks.

Member Avatar for ShadyTyrant
0
90
Member Avatar for lewashby

I've been trying to learn how to program for several years now. I've struggled with everything from C++, C#, to Python, but never got passed simple DOS text based screen programs that were very short. I'M now 24 and I work in a factory. I would love to find a …

Member Avatar for GTR3521
0
84
Member Avatar for lewashby

In the following program, how does the value of [COLOR="Red"]crit_name[/COLOR], end up in the [COLOR="Red"]self.name = name[/COLOR] value? Is it because it's passed to that class and name is the only value in the [COLOR="Red"]__init__[/COLOR] parameter that has no default value? Thanks. [CODE]# Critter Caretaker # A virtual pet to …

Member Avatar for masterofpuppets
0
125

The End.