132,726 Archived Topics
Remove Filter ![]() | |
I am working on the following Java application Write a program that allows the user to enter the last names of five candidates in a local election and the votes received by each candidate. The program should then output each candidate’s name, the votes received by that candidate, and the … Software Development java | |
I have two methods that when prompted by the user will print out n amount of String on m rows, for ex: * 3 3 would print out: *** *** *** here is the code I have: [ICODE]public static void writeLine(String c, int n) { if(n==0) System.out.println(); else System.out.print(c); writeLine(c, … Software Development java | |
I'm trying to create a contributor class with one enumerated type. I took the member functions from the header and put them in a cpp, but I get an error for the enumerated type when I try to compile. Is it because I haven't written a code body for that … Software Development c++ | |
I have 2 problems -- 1. When I try having IDLE list the modules of python it gives me this error: [code]Traceback (most recent call last): File "<pyshell#7>", line 1, in <module> help() File "D:\Programs\Python\lib\site.py", line 346, in __call__ return pydoc.help(*args, **kwds) File "D:\Programs\Python\lib\pydoc.py", line 1648, in __call__ self.interact() File … | |
Hi, I'm wondering, whether is there any other methods to save the shape into a file? Meaning that I've already drag few shape and I wanted to save all the shapes, their position, their colour. What I'm thinking now is, getting all the shape's coordinate, colours, size and save it … Software Development file-system | |
Is there a way that after you store something, such a Rectangle, to an object variable, say, Object x, that you can then look at object x, and determine it is indeed a rectangle, allowing you to use Graphic methods such as draw on said object? Software Development java | |
I have a class called Thing that defines vector<string> stuff. I have no problem declaring anything I want inside "class Thing" itself or functions from it, like "void Thing::bob" works fine. My problem is when I inherit this class. For some reason I get my program terminated. pseudocode: [CODE]Class Thing … Software Development c++ | |
So for my assignment, I'm supposed to fill ten strings from a file using an array of pointers. Now I know I'm doing this wrong since my compiler is telling me that there are errors on the levels of indirection. Pointers are so confusing... >_> [code] char* pStrings[10]; char** pWalker; … Software Development c | |
Hello, I am having problem with strings within structs and was wondering if someone could help. I have a struct, i.e. [code] #include <stdio.h> #include <strings.h> struct feeling { char *emotion; char *emotion_options[20]; int num; }; [/code] which i then pass to a function via reference, i.e. [code] int main() … Software Development c | |
Hey guys i have an application where i assign values to the type of sale it would be -- here's my code -- [code] procedure TPaymentForm.OkButtonClick(Sender: TObject); begin //ID 1 - Cash Sale IF (CashRadioButton.Checked) Then BEGIN //Opening Data Source and Stuff, Setting The Columns and Stuff Data.Statement_Entries_Table.Append; Data.Statement_Entries_Table.FieldByName('customer_id').AsInteger; Data.Statement_Entries_Table.FieldByName('date_time').AsDateTime … Software Development pascal | |
I started Python, imported Tkinter assigned Tk() to root, imported snack and initialized it. i then made a sound object, read a sound from the hard drive and then played it. i couldn't hear any sound though. any idea what the problem may be? Software Development hard-drive python tkinter | |
Hi, I have a program: [code] def AdjacencyMatrix(dim, pairs): matrix1 = (zeros((dim,dim))) for (first,second) in pairs: matrix1[first,second]=1 matrix1[second,first]=1 print '\nAdjacency Matrix\n' print matrix1 [/code] But I get an error: TypeError: 'int' object is not iterable Can anyone help? Thank you! Software Development python | |
Hi. The objective os to open a file and print 55 lines of content at a time. Since I am still learning 'C', my code (thus far) may appear slightly neophytic ;) [CODE=C] #include <stdio.h> #include <stdlib.h> #define SIZE 1000 void pause( void ); int main( void ) { FILE* … Software Development c objective-c | |
Is there any inbuilt function in C language by which one can directly access image contents? | |
I am very new with XML, no experience. I am trying to import an XML file into Excel. The XML file will import into Excel fine, but when I go to export the Excel file back out to an XMl file I get error messages. The error messages are: "List … Software Development xml | |
Hey, I decided I should probably read a book to learn about C++ considering there are so many and etc :P. My parents said they would buy it for me, but I just wanna make sure it is gunna actually be a book that will teach me alot and hopefully … | |
[code=cplusplus] #include <iostream> using namespace std; const int capacity = 20; string tax_payers[capacity] = {"jane", "tom", "jerry", "joe", "annie", "mary", "kate", "steve", "sarah", "paul", "petra", "peter","elaine", "noreen", "sean", "niamh", "donal", "john", "marie", "colin"}; double income[capacity] = {21000.0, 16500.0, 120000.0, 16000.0, 38000.0, 62500.0, 14500.0, 28500.0, 13500.0, 27500.0, 15000.0, 44000.0, 18000.0, 21000.0, … Software Development c++ | |
I am using Visual C++ 2005 (native C++) For the following code, the different of main function 1 and main function 2 is main function 1 using }catch(MyException &e){ but main function 2 using }catch(MyException e){ Which is more correct? if both are correct, which is better? [CODE]//========This is MyException.h===== … Software Development c++ | |
So I got such exercise: You have array of 1000 elements they all are random numbers from 1 to 1000 and there is only one duplicate number. You can access each array member only once, can you find duplicate value? And you can't create another array. You can create some … Software Development c++ | |
Hi I am using Dev Cpp for dos programming. I want to know how we can add classic style user interface to programs. The interface like in which we control the menus etc. through arrow keys not mouse. The interface like when we press F2 button at the start of … Software Development c++ user-interface | |
Question is : Write a function [code=c++] int f(char* str, long pattern) [/code] to find out how many pattern does the str contain? str is a char array consist of '1' and '0'; for example: str = "11010101110101011110100011001" ,pattern = 110; My solution is change pattern and str to std::string, … Software Development c++ | |
I have written a program in which there is a board and the balls should travel from one place to another.i need to provide a delay when i draw the ball in new position and erase it from previous position.I used delay() funtion on turbo c++.but on gcc compiler on … Software Development c++ | |
I'm working on a problem in the File Processing chapter of my C book, and I've run into a few problems. I'm sure they are probably minor but I've been playing for a while and can't figure out why they are happening. First: When printing a text file containing the … Software Development c file-system | |
Hi Everybody I am stuck can somebody help me please. I am testing a very small portable barcode scanner. After scanning I need to upload the scanned data. I am in VB6 I am using the mscomm1 control I tell the scanner to send the data. I have a [B]OnCom[/B] … Software Development flash visual-basic | |
hi friend i have a problem in coding a program it states that you have to take input of suppose ten players and their team with their batting average there may be all tn different team or any but less than ten and i have to sort them by their … Software Development c | |
m an comp engineering student doin my second yr and i m in serious need of any ideas/views regarding a miniproject i hve promised to do to the headmaster :-/ ........so wat so ever thoughts/practical proj....or (any project website links ) ideas u ppl hve can u jst share it … Software Development c++ engineering | |
I've been interested in working with mouse input in Visual Studio using C++. I'm curious what steps need to be taken to do this. I'm assuming some sort of Windows header file needs to be included, but I have never seen any code for such things. Basically I want to … Software Development c++ visual-studio | |
Hi guys!I'm in great need and embarassment.I'm new to the C++ program and to be frank I'm having a hard time understanding it. Now our topic is about linked list and my professor gave us this machine problems: 1. Write a program that implements a linked list using an array.Your … Software Development c++ linked-list | |
Hello guys :) I hope all are alright ;) I'm using HashTable to make a program that reads a string from a file.. when I run it, it gives me the message of error (Don't Send) << I guess all of you know this message.. this is my code [CODE] … Software Development c++ | |
I want to increase the number of characters the user enters as the text (refer line 1410 of cpp file). I want it to be infinite, if possible. Tks. Software Development c++ | |
Hello friends, I need procedure for continous accessing oracle database using visual basic. Follwing i am giving coding use by me but some time it give disconnection error Please help for continous connectivity. [code] dim db as new ADODB.connection dim rs as new ADODB.recordset db.open "Provider=MSDAORA.1;User id=ourpro;Password=ourpro1;Persist Security info=False" [/code] … Software Development oracle visual-basic | |
Hello everyone, I am having a problem with a function I am working on. It has to do the following: [quote]Outputs the null-terminated string pointed to by s starting at row row and column column, in a field of length characters. As with dtioCursor(), the row value 0 refers to … | |
Hi, I am unable to set the size of the DirPickerCtrl. The 'Browse' button is getting placed behind the textbox. Please help me out with this if anybody has worked on it. Regards, Dinil Software Development python | |
In relation to my previous post. I was able to delete the rows in the datagridview (thanks to ema005), but now I am having problems with the updating of it in the database. It's deleting in my datagridview alright. But not in my database. My codes are already going on … Software Development dataset open-source | |
I get an error when trying to make this program. [code=python] from pointLine import * def calcSlope(x1,y1, x2,y2): slope = (x2-x1)/(y2-y1) return slope def calcPointOnLine(y, m, x, b): if y == (m*x)+ b: return True else: return False print "Point is on a Line? Program" line1 = [(1,7), (7,19)] x1 … Software Development python | |
Hi there, My son has been recently hospitalized after getting into an accident. Now I am trying to help him with some of his projects. Right now I am stuck on this recursion problem. We need to figure out how to form a diamond shape out of `*'s` using a … Software Development c++ | |
I have installed visual c++ 2008 few days ago. I want to create a file open it, display contents, modify them and search them but i dont know specific codes. I have used turbo c++ earlier. Please specify the codes if possible. Thanx............;) Software Development c++ | |
Now that I have working program starter, are there any simple methods of filling in the info to it? I just have the base of it set up and I am not sure how to set up the self-typer. If there are any tutorials made for handling things like this … Software Development c++ | |
Hello All, I am trying from a Fortran program, to call a subroutine that I wrote in C...I named the C code file as filename.c and the subroutine is: void filename() Now in a fortran program, I am calling this subroutine as: Call filename() I am getting the following error: … Software Development c | |
how can i get examples for interfaces and methods of a Table class Software Development java | |
Hi, I would like to identify the patterns in a picture which is in picture box, the patterns will be of simple shape like a square, traingle etc.. I think if I can access the pixel data of the picture then a basic for next loop will suffice, the memory … Software Development visual-basic | |
I need an if statement that will run if the value is not a number. I am unsure how to do this in python I have tried looking around and I can't seem to find what I need. If Input is not <a number> Also if you can help me … Software Development python | |
Hi, I have some question to ask because I don't understand why is it happening like that. I have 2 polygon created and displayed. I've make mouseDown, mouseUp, mouseMove event. (For some movement for the polygon) Now i wanted to implement keyUp(pressing delete button from keyboard, then delete the polygon) … Software Development | |
Hi, I am trying to make stroke and shape make a path like two sin curves. so a path from x,y to x2,y2 first is like ------------------------- will become /\/\/\/\/\/\/\/\ \/\/\/\/\/\/\/\/ if you understand what i mean. I am very confused am I suppose to be changing the shape or … Software Development java | |
I am trying to create a simple program that starts up steam from my computer. I have a shortcut on my desktop of steam and when you double click it, it runs the process "steam.exe" When my program executes the line of code "system("start steam.exe")" I get an error saying … Software Development c++ | |
hi i need some help in this program.. using only 1 for loop.. [code] #include<stdio.h> void main() { int n; clrscr(); for (n=1; n<=10; n--) { printf("\n %d",n); } getch(); } *the output of this program is" 1 2 3 4 5 6 7 8 9 10 but i need … Software Development c | |
Hi, I'm a new C++ programming student and we just learned about classes and objects. I completed the assignment but had a question about doing something extra with my code. The instructions given for the problem were: To use the formula for a straight line (i.e. Ax + By + … Software Development c++ | |
Hello, I have inherited an application written in VB6 that does not handle the number of print copies properly. Changing the number of copies to a number other than one(1) results in only (1) print. I am new at VB6, and would appreciate any tips on how to address this … Software Development visual-basic | |
Hi, I have encripted password column in my table. I use VB6 code below to check password but it doesn't work. I think i have to call a function to decrypt it. Where and which function do i use in my sql code below with text1.text. Thanks [code] .......WHERE psw=' … Software Development visual-basic | |
I wonder how it is possilbe to access the first listitem in the listView. I know that each item has an index like the listBox Control and that you could access them with the member ->SelectedIndices but when writing the code below, the compiler says: [I]'==' : no conversion from … |
The End.