132,725 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for lewashby

[CODE]from Tkinter import * import pygame.mixer sounds = pygame.mixer sounds.init() correct_s = sounds.Sound("Correct.wav") wrong_s = sounds.Sound("Wrong.wav") number_correct = 0 number_wrong = 0 def play_correct_sound(): global number_correct number_correct = number_correct + 1 correct_s.play() def play_wrong_sound(): global number_wrong number_wrong = number_wrong + 1 wrong_s.play() app = Tk() # creat a tkinter application …

Software Development python tkinter
Member Avatar for SgtMe
0
354
Member Avatar for madzam

I'm took an fundamental of C++ . Here is my code, could you please help me to point out the error . Thanks [CODE]#include <iostream> #include <cstdlib> #include <iomanip> #include <string> using std::cout; using std::cin; using std::endl; using std::string; using std::fixed; using std::setprecision; int main() { int unit_of_desks = 0; …

Software Development c++
Member Avatar for nbaztec
0
115
Member Avatar for capson

Hello, I am trying to sum lists if a condition is met, not working, not sure why, I end up with PN=[0,0,0,0,0,0,0,0] which is it's initial condition and should be PN=[1,1,1,1,0,1,1,1] as PN0 and PN1 satisfy the condition PNi.count(1)<2, so PN+PN0+PN1 = [1,1,1,1,0,1,1,1]. Thanks. [CODE]>>> PN0=[0,0,1,1,0,1,0,1] PN1=[1,1,0,0,0,0,1,0] PN2=[0,0,0,0,1,0,0,0] PN=[0,0,0,0,0,0,0,0] NULL==[0,0,0,0,0,0,0,0] …

Software Development python
Member Avatar for capson
0
118
Member Avatar for emcyroyale

Hello everyone I post last night with this same code, and I got a lot of advice. But there are 3 more errors that persist after I changed the code a bit. Anyone know whats wrong? Here are the errors: 1>------ Build started: Project: circle, Configuration: Debug Win32 ------ 1>Compiling... …

Software Development c++ visual-studio
Member Avatar for jonsca
0
171
Member Avatar for yottameter

I've run into linking problems before, so I thought I had them figured out. This one I'm using every tool I have, but I can't seem to identify what the issue is. Did a build from the yaml site yesterday, I keep getting this linking error at runtime. I set …

Software Development c++
Member Avatar for Jason Butler
0
203
Member Avatar for dhruv_arora

What's the differences between exit(0), exit(1) and exit(-1)?

Software Development c++
Member Avatar for dhruv_arora
0
117
Member Avatar for sahasrara

Hi ladies and gentelmen Merge sort program has 3 function . 1-func that sorts first array ascending 2-func that sorts other array descending 3-func that merges these arrays together I wrote it by Borland 5.02 . Good Luck!

Software Development c++
Member Avatar for sandros
0
167
Member Avatar for TommyRay

Hi, I am using VS2008 and for the project I am creating, I have a "settings" text file I am using to save user defined settings like color theme, homepage, etcetera. It works fine, however, I am unsure as to how to handle the eventual distributed apps' destination folder/file. Creating …

Software Development file-system vb.net
Member Avatar for TommyRay
0
152
Member Avatar for asad_80

Hi, I am building a game in which i have used array for applying 52 button, which works fine.But when i try to use Action Listener with the array of button and try use setEnable(false)or true it does not work.I am also sending my. [CODE] import javax.swing.*; import java.awt.BorderLayout; import …

Software Development java java-swing
Member Avatar for NormR1
0
146
Member Avatar for Trebron

Hi Guys I hope someone can help I have a form that loads a gridview at runtime based on users logon names which is pretty easy the data I load lives in an excel document, I want to be able to read the data from the datagrid view I loaded …

Software Development vb.net
Member Avatar for Oxiegen
0
193
Member Avatar for becon

Dear all I would like to read every file in a directory, if each file contains a line 'KAC 50' I will write to an output file. My code below write all the out output into only 1 file. How can I have many output files corresponding to the input …

Software Development file-system perl
Member Avatar for becon
0
717
Member Avatar for darksmokepunch

I'm creating a text-based rpg and I'm having some trouble... What I would like to do is implement a room type that would store description and among other things, have a navigation system (I.E. GO NORTH). Since I'm using c++, I've gone ahead and created a rooms class.. but that's …

Software Development c++
Member Avatar for darksmokepunch
0
127
Member Avatar for judithSampathwa

hi there, my project is a desktop application, i am trying to transfer(upload) a file(can be excel,doc,txt pdf) to another sql server in another computer in the same network how can i do this in C#.net desktop application, i am not using web service or asp.net how can i do …

Software Development asp.net pdf sql web-server
Member Avatar for judithSampathwa
0
126
Member Avatar for Feisu

Hello.everyone. I met a problem today and search for a long time without any luck:( I want to limit length in textbox. not total maxlength but maxlength perline. for example. if I choose to limit 7 char per line. when words exceeded 7 in a line textbox will start a …

Software Development perl vb.net
Member Avatar for apdbrl1
0
947
Member Avatar for gangster88

atlast I have managed to get some working code but the first problem is that I have is taht.. when I call draw(2,4) I have a column of 2 circles and 4 rows and I would actually like it to be a clomun of 2 and row of 4. Secodly …

Software Development python
Member Avatar for gangster88
0
183
Member Avatar for michellemullen

I've got a C assignment to make a "Rolodex" project. I wrote out the whole assignment just so you would understand the scope. I'm just getting going on this. Last week's lecture was about Dynamic Self Referential Lists in C, so I get the concept of what I'm supposed to …

Software Development c data-structure linked-list
Member Avatar for ravi.d
0
327
Member Avatar for RPA

Does Anybody know how to use C++ to get information from a database? I have this assignment due but , I do no know to incorporate a database into my program. My program is to allow a user to choose from NFL football teams,when the user picks the team , …

Software Development c++ display
Member Avatar for rcorcs
0
260
Member Avatar for darelet

Hi all, I've been trying to work on solving this myself but failed short of new ideas. I am experiencing memory heap errors ever since I tried to transfer some functions (for calculating statistics i.e. getMode/getMean/getVariance) into a new class in the spirit of OOP. Compiler error is... --> This …

Software Development c++ oop
Member Avatar for mitrmkar
0
383
Member Avatar for virusisfound

Hi, I have develop a program in C# windows Application & now The problem is My Login form is designed on form4 I want to run form4 first after that i want to run the other forms but when i run the program form1 is run automatically. acually in coding …

Software Development
Member Avatar for nick.crane
0
109
Member Avatar for capson

Hello, can someone please tell me why this simple if ststement dose not run [CODE]>>> VList=[0,0,1,0,1,1,0,0] >>> if VList.count(1) < 5: print('Yes') else: print('No')[/CODE] The VList.count(1)works so not sure what is wrong, but I think that's were the code is crashing. Thanks

Software Development python
Member Avatar for capson
0
96
Member Avatar for memstick

I'm growing increasingly confused by the '^' symbol. I have been able to track it down on various sites but there is no real "definition" of it and its usage anywhere. I am creating a .NET project these days and I bumped into the symbol for the first time in …

Software Development asp.net c++
Member Avatar for memstick
0
89
Member Avatar for Simes

Guessing Game with functions, classes, methods, etc [CODE=python]#Code should always be in a method or class #Always start variable names with lowercase, classes could be capital #input.upper() allows the user to use lower or upper case for each option import random from operator import itemgetter def isint(x): try: int(x) return …

Software Development python
Member Avatar for TrustyTony
0
281
Member Avatar for carrythe1

Hi, I know the code for this post is quite long, but I thought it would be best to be comprehensive about what i'm trying to do as i'm not exactly an expert in this area of programming. I'm stuck trying to work out how to get windows hook procedures …

Software Development c c++ microsoft
Member Avatar for carrythe1
0
2K
Member Avatar for djenoe

this is my final code,, would you pls help me get this right java Menu driven code choices only in letters A, B , C [code] import java.util.*; public class Letters { public static void Menu() { System.out.println("Menu"); System.out.println("A. Summary report for a sales employee "); System.out.println("B. Print a pattern"); …

Software Development java
Member Avatar for javaAddict
0
137
Member Avatar for bubacke

hi, i want to have a vector of strings. i know i could declare it by [code] #include <iostream> #include <string> using namespace std; vector<string> vec; vec.push_back("this"); vec.push_back("is"); vec.push_back("my"); vec.push_back("array"); [/code] but thats very tedious. isnt there a more elegant way? if i had the vector as an argument to …

Software Development c++
Member Avatar for bubacke
0
193
Member Avatar for amishosh

Hi! I copied and pasted a grapics.h example from the help>index in borland C. When I try to run it the compiler gives me 9 error messages, all going something llike this: Linker error: Undefined symbol _closegraph in module "my file name" here's the example: [code] #include <graphics.h> #include <stdlib.h> …

Software Development c
Member Avatar for leduduong
0
430
Member Avatar for Valaraukar

Ok, so I'm really after knowledge rather than a quick easy solution here. I am part of a team that is currently working on the development of a 'kind of' physics engine but I have hit a small wall since adapting the functionality of a class which was previously working …

Software Development c++
Member Avatar for Valaraukar
0
202
Member Avatar for david cashin

Hi everyone, I am fairly new to programming, but I was wondering if there was a way to run the java program i make when it is not in the bluej compiler (i am using bluej). I would like so that i can double click an icon and my applet …

Software Development java
Member Avatar for NP-complete
0
2K
Member Avatar for bbman

Hey, I have an item class: [CODE] #pragma once using namespace System; using namespace System::Drawing; ref class Item { public: Item(void); int Type() { return _type; } void Type(int value) { _type = value; } String ^ Text() { return _text; } void Text(String ^ value) { _text = value; …

Software Development c++
Member Avatar for jonsca
0
130
Member Avatar for dhruv_arora

I created this function for my program : [CODE]int calcTotal() { petShop p; fstream f1; f1.open("Pet_Shop.dat",ios::app|ios::binary); int loc; loc=p.tellp(); float records; records=loc/sizeof(p); cout<<"Total number of records = "<<records; cout<<"Going back to main menu"; menu(); }[/CODE] I am getting this error : [CODE]error C2039: 'tellp' : is not a member of …

Software Development c++ ios
Member Avatar for dhruv_arora
0
100
Member Avatar for memstick

Hello! I am probably just going mad but. This code: [CODE]using namespace System.Windows.Forms;[/CODE] Generates the following error 1>GUItest.cpp(6): error C2143: syntax error : missing ';' before '.' 1>GUItest.cpp(6): error C2059: syntax error : '.' ..And I haven't the foggies why. Seems I cannot use .'s when declaring a namespace..

Software Development c++
Member Avatar for memstick
0
122
Member Avatar for genie0582

I tried to debug Macro variable but i cannot. I use Dev c++ [CODE]#include<stdio.h> #define TIME 5 int main() { int i=TIME; printf("%d",i); }[/CODE] when I run it, of course it gives correct result. but when I debug, it reports "TIME = not found in current context"

Software Development c
Member Avatar for Adak
0
106
Member Avatar for Sarevok19

Hi. I am trying to write server side windows forms application that supports multiple clients. What I want is following: 1) I need an infinite while loop to accept new connections. In order to do that I start new thread which executes while loop. I can't execute while loop without …

Member Avatar for nick.crane
0
513
Member Avatar for gokul.raja

Hi, I have a problem in repainting in a JPanel. Situation: I have a ButPanel which extends JPanel. In this panel I draw some sequences with some text along with it, by overriding paint() method. Eventually the screen size exceeds as input increases I use a CompareFrame which extends JFrame. …

Software Development java java-swing
Member Avatar for gokul.raja
0
110
Member Avatar for jugnu

Hello I have 2 classes [B]clsParty[/B] and [B]clsAccount[/B] clsParty has a function named [B]GetParty()[/B] clsAccount has a function named [B]GetAccount()[/B] I have a 3rd class named [B]clsDoTran[/B] What i want to do is i want to use [B]GetParty()[/B] and [B]GetAccount()[/B] functions from both clsParty and clsAccount But there is a …

Software Development vb.net
Member Avatar for kvprajapati
0
75
Member Avatar for Sherlok

Attempting to create a login form. Original plan was to search database, and display output (e.g label) if the user exists. No password required. I have limited coding ability with databases, and was attempting to search in an excel file. How do you find a record in a database? Index …

Software Development vb.net
Member Avatar for hirenpatel53
0
114
Member Avatar for hondros

Okay, so I'm sitting here bashing my head against the desk. I've been googling this for what seems the past hour. I cannot find any relative good links for making Python work with WAMP server. Yes, I understand how CGI scripts work. Unfortunately, I have no idea how to configure …

Software Development apache python
Member Avatar for satishvis
0
576
Member Avatar for mahesham

Whenever I run my python code, the window do not have any icon.. How to change it some icon or the icon I want to assign? I can assign a good icon for the exe generated thru py2exe. I want to assign icon for the window opened after double clicking …

Software Development python
Member Avatar for mahesham
0
196
Member Avatar for wendellrob

Can anyone tell me why I get the following error message when I execute this code: `Exception in thread "main" java.lang.NoSuchMethodError: main` public class Pay { private double hoursWorked = 40; private double rateofPayPerHour = 10; private double withholdingRate = .15; private double grossPay; private double netPay; public void main(String[] …

Software Development java
Member Avatar for mitch9654
0
222
Member Avatar for kiwisteffu

Hello everyone! I've been lurking the forum for quite a while and decided to come to get some help as well. :) Right now I'm learning stacks and the like. I have to work on a program to write code to create a program that will use stacks. I'm not …

Software Development java
Member Avatar for vee_liang
0
110
Member Avatar for respondto

how can i make the ide word wrap when i am writing lines of code, the code goes so far in width that I have to use the arrow button on my keyboard to see the end of line dev c++ 4.9.9.2 windows xp

Software Development c++ ide
Member Avatar for NathanOliver
0
2K
Member Avatar for emcyroyale

Well I'm having quite a bit of errors with my code and have tried figuring out how to fix it, but I can't seem to figure out what is wrong. Here are the errors 1>------ Build started: Project: circle, Configuration: Debug Win32 ------ 1>Compiling... 1>circle.cpp 1>c:usersemcydocumentsvisual studio 2008projectscirclecirclecircle.cpp(38) : error …

Software Development c++
Member Avatar for NathanOliver
0
201
Member Avatar for arithehun

I have a question: Is there any tutorial or way I could create a batch file that scans the folder that it's in, and then prompts you with an option of whether to delete any (C++, for example) files that don't begin with a command line, e.i. doesn't start with …

Software Development file-system shell-scripting
Member Avatar for arithehun
0
102
Member Avatar for mybluehair

I need to create a new txt file using ofstream, but I need to use a string to name the file. For example: [CODE] string string1 = "testfile.txt"; ofstream myfile; myfile.open (string1);[/CODE] but when I try, it says I can do this because string is not a valid variable type …

Software Development c++
Member Avatar for Danny_501
0
135
Member Avatar for 1x4n

hi all i want to create an xml file from an array i've been googling but can't find the right one the closest one that i get is in [URL="http://www.higherpass.com/java/Tutorials/Building-Xml-With-Java-And-Dom/"]http://www.higherpass.com/java/Tutorials/Building-Xml-With-Java-And-Dom/[/URL] but it doesn't create an xml file like i wanted to i want to print and create it like c:\xml …

Software Development java xml
Member Avatar for 1x4n
0
182
Member Avatar for deez2183

Design and run a program that takes a numerical score and outputs a letter grade. Specific numerical scores and letter grades are listed below: 90-100 = Grade A 80-89 = Grade B 70-79 = Grade C 60-69 = Grade D 0-59 = Grade F In this program, create two void …

Software Development c++
Member Avatar for deez2183
0
469
Member Avatar for kiranpvsr

hello there Can anyone please tell how to create 2-D graphs in Java ? (X-axis and Y-axis stuff)

Software Development java
Member Avatar for Taywin
0
73
Member Avatar for aj79

I am working in Microsoft Visual C++ 2008. Here is my sum of digits code: [CODE]#include <iostream> using namespace std; int main() { int num; int sum=0; cout << "Number, please? "; cin >> num; while (num>0) { sum=sum+num%10; num=(num-num%10)/10; } cout << "Sum of digits: " << sum << …

Software Development c++
Member Avatar for aj79
0
215
Member Avatar for Zinderin

I know you guys MUST be tired of scope questions ... but I need some help getting through this fog ... The following code works ([I]notice where I instanced 'cp'[/I]) .... [CODE] public partial class frmMain : Form { ConnectParams cp = new ConnectParams(); public frmMain() { // Fires up …

Software Development c#
Member Avatar for Zinderin
0
155
Member Avatar for RussianKös

Hello. I'm very new at C++ world, so, I need some help. I'm building an Browser Called iNet, and, it gave me 4 errors: c:\users\sepultura\documents\visual studio 2008\projects\inet 0.1\inet 0.1\iNet.h(193) : error C2039: 'timer1_Tick' : is not a member of 'iNet01::iNet' c:\users\sepultura\documents\visual studio 2008\projects\inet 0.1\inet 0.1\iNet.h(22) : see declaration of 'iNet01::iNet' …

Software Development c++ visual-studio
Member Avatar for jonsca
0
230

The End.