43,549 Solved Topics
Remove Filter ![]() | |
Hi there I have a rookie question. I am trying to clean up a long list of if statements for a class in java, I know that in C# you can code #region-->#Endregion. Is there a simple way to do the same thing in Java? THANKS! Jameson' Software Development java | |
I want to read all files in a particular folder using C programming. HOw to do this. Thanks. Ex: I have some 5 files in folder named c:\temp. I want to read all files one after another and want to write output file for each input file. The output files … Software Development c | |
Can anybody say, how to minimize the window form on close button is clicked in C#? thanks in advance. Software Development | |
After the list, sum, average, max and min have been printed, ask the user to enter a value. [B]Then print the id of each salesperson who exceeded that amount, and the amount of their sales. Also print the total number of salespeople whose sales exceeded the value entered.[/B] The bold … Software Development java | |
Forgive me if this is already covered somewhere which I am sure it is but............ All I am trying to do is split a string that contains the \ char ie filename. Seen a few ideas and after much frustration I have settled with below code. Replace works fine. Split … Software Development | |
Hi guys Having a little problem here. Please help, Im trying to have a MessageBox appear when a user reaches the textbox.maxLength property tried if (textBox2.MaxLength < 10) { MessageBox.Show("Max characters reached"); } Software Development | |
I'm supposed to be inserting words from a text file into a BST and AVL tree. I've got the words to insert correctly, and it recognizes whenever the words are repeated. It just leaves the count at 2 instead of incrementing afterwards. Can't seem to figure out why it's not … Software Development java | |
Newbee needs help with program. If you would be so kind to tell me where I am going wrong. <?xml version = "1.0" encoding = "utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHMTL 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhmt1-strict.dtd"> <!-- Fig. 8.12: Product order.html --> <!-- Product script. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>Product … | |
my program is compiled.but on run that i have message "Exception in thread "main" java.lang.NullPointer Exception" 1. class Rev 2. { 3. char a[]; 4. char i=3; 5. void str() 6. { 7. for(i='A';i<'D';i++) 8. { 9. a[i]='i'; 10. } 11. } 12. void show() 13. { 14. for(int i='A';i<'D';i++) … Software Development java | |
Hey, I dont know where to start with this problem so I have a super class(Transaction) that has a constructor and I have 2 sub classes (rental and return )they both have the same constructor as the super but they have a toString method that is almost the same but … Software Development java | |
Hi, I've done a vb.net program. The program basically uses few reference for example system.io etc.. In order for my program to run on another computer, the computer need to have .net framework 2.0 installed.. Instead of installing the whole framework, can I just pack the references I used in … | |
Hey all, I'm trying to do some ray intersection detection but I'm having some problems. My app starts by loading a cube object into a .x file. I have a player class and a target class that both use the same model, but each has it's own world matrix. [CODE]D3DXMATRIX … Software Development c++ | |
Hi, I have been working on this program for quite some time but I can't figure out what's wrong with it. The program compiles and this is the the output I get: ?Invalid number of arguments Press any key to continue . . . Can somebody please take a look … Software Development c | |
The problem is that the program would not terminate if either the human or the computer reach 100 or above points. it is not displaying if the human wins that you won or if the computer wins then sorry you lost, try again. [CODE] #include <iostream> #include <ctime> using namespace … Software Development c++ | |
![]() | Hi, I need help with this program here. I want to print an isosceles triangle. But, I keep ending up with this here where they are being spaced: --------* -------* * ------* * * -----* * * * ----* * * * * ---* * * * * * --* … Software Development java ![]() |
Hi forum! I have to find the solution of this system of linear equations: 2x+3y=2 4x+5y=9 I know out to solve the system with paper and a pencil:cool: However I don´t know the way to do this in C# code! Could you give me some tips? Best regards Eduardo Software Development mathematics | |
i have created a classes on shapes such as triangle and circle. i am trying to create a array for the classes and call a constructor from the classes. i am able to display the elements in the array. i would like to know if im doing this correctly and … Software Development | |
Im just having a problem on my VB 5 update command.. [CODE]Adodc1.RecordSource = "UPDATE Tuition_Fee SET (Amount_Paid, Balance) VALUES(" & WHERE Tuition_Fee_ID_PK = " & Form2.Label16.Caption 'Adodc1.RecordSource = "UPDATE Tuition_Fee SET (Amount_Paid = " & & ", Balance = " & Val(Text1.Text) - Val(Text2.Text) & ") WHERE Tuition_Fee_ID_PK = " … Software Development visual-basic | |
Okay, here's what I am up to now. I am trying to figure out how to write sin waves to a .wav file, for playback. Here's the issue: I have no idea what I'm doing. I looked up the documentation for the wave module, and have been able to open … Software Development python | |
Arrival.o: In function `NodeItem': /home/jonyb/Desktop/A3-Q2/NodeItem.h:5: undefined reference to `vtable for NodeItem' Arrival.o: In function `~Event': /home/jonyb/Desktop/A3-Q2/Event.h:8: undefined reference to `NodeItem::~NodeItem()' Event.o:(.rodata._ZTI5Event[typeinfo for Event]+0x8): undefined reference to `typeinfo for NodeItem' These 3 errors repeat themselves for all my files accessing NodeItem.h and NodeItem.cpp Now I've looked around and all I could … | |
Hello, In this situation, my application can connect to the MSSQL server in one of two ways; via a direct TCP/IP connection (WAN) (IP's filtered using RRAS in 2003 Server) or via a VPN connection. The application will first try to open the connection using the WAN connection string and … | |
// close an account with a given number public void closeAccount(int id) { } this is a bank project... a customer account is created(array). i would like to know how to delete an array? let say: account number 185649 is found in array[15]. then i would like to delete this … Software Development java | |
Good evening Daniweb, I have another idiotic problem which comes from making an arrival subclass out of Event. I have a few other subclasses of Event and they aren't giving me any trouble. I have tried to copy/paste/rewrite to eliminate any stupid typos. Arrival.h:7: error: expected class-name before ‘{’ token … | |
I can't figure out how to set a radio button within a filemenu. I can use myRadioButton.SetValue( True ) outside of a filemenu. What I'm trying to do is to automatically set a particular radio button dependent upon the last value used. [code=php] import wx class MyFrame(wx.Frame): def __init__(self, *args, … Software Development python | |
Hello to all, Despite I added all necessary .jar files to project, I always take boring exception warnings that say "class not found". I added the code and exception output below. I'll be so happy if someone can help me. Thanx in advance.. With regards, T ----------------------------------------------------- [CODE]protected void doGet(HttpServletRequest … | |
Hello Folks: I had previously posted this problem and someone on this forum suggested that i used s[i] == 'a' || s[i] == 'A' .... but what I have here completely makes sense.. Can you please take a look at it ? [CODE] #include<iostream> #include<string> using namespace std; int main() … Software Development c++ | |
My program keeps crashing and I can't see why, if I remove the line [code=php] myfile << data_[i+ndim_*j] << " "; [/code] then it runs OK...but can't see anything wrong with this line? [code=php] void Matrix::WriteToFile(std::string fname) const { ofstream myfile; myfile.open ( (fname+".txt").c_str() ); for (int i = 0; … Software Development c++ | |
I am very interested in knowing how i might code a function using the DateTimePicker control to see if i can to check and see if and when any date and day of any given year falls on a sunday so that the function will force a radiobutton.checked from one … Software Development visual-basic | |
My function is: [code=php] void Matrix::WriteToFile(std::string fname) const { ofstream myfile; myfile.open ("std::string fname.txt"); for (int i = 0; i<data_.size(); i++) myfile << data_[i] << " "; myfile.close(); } [/code] and then in the main I have A.WriteToFile("hello"), but it's saving it as fname still? Can anyone please tell me … Software Development c++ | |
Hi everyone, I'm having a problem with understanding the workings of an enhanced For loop. This code is meant to iterate through an array of ints and print out the char value of that int. But it seems to start on the first number in the array, making the program … Software Development java | |
Hello, I would like to add a six-line header to a data file for many files in a loop. However, I need to add the header to a data properly first... My inclination (as a python novice) is to write the header and append the data to the header. However, … Software Development python | |
I finally figured out how to use the settings.settings file to create user settings that would persist when reopening my application. I have several text boxes that once completed by the user I would like to retain their data when the app is reopened. This part now works, unfortunately a … Software Development | |
Good afternoon Daniweb, I have a simple (and probably idiotic) problem today, I have a simplistic program that simulates a Train station, trains come in, they go into a stationDock and come out after a while. The stationDocks are an array of trains, either pointing to a train or being … | |
Hi, I'm using C#, Access 2007 and VS2008 to write a windows app. I have populated a datagridview from a query (taking data from 2 tables). When the user clicks "Save", I want to be able to save any changes made in the datagridview to the database. Only one column … Software Development | |
hello all; i'm having a problem with my output. the program that i'm writing is supposed to take a number input than display the output as asterisks. so if the input is 4 the output should be: * ** *** **** however, i'm just getting a single column of asterisks. … Software Development c++ | |
Hi all I'm having some trouble with EF and SQL 2008 default values. Firstly, I have a column called 'CreatedDate' and the default value in SQL Server is getdate(). If I add a field in SQL server this works fine. I also have a column called Guid and the default … Software Development sql | |
Hi guys, I have a problem with arranging my components in a GridBagLayout. The frame is 600x600. Inside it, there are two pairs of (Label,TextField). They are not where I want them to be. What I would like is to have them all at the top of the frame, one … Software Development java java-swing | |
I finished this last night and it almost works perfectly aside from one minor thing that I can't quite figure out. [CODE] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int playerscore, computerscore; int turnscore; int dice; char input = 0; bool turnover, gameover; srand((unsigned)time(0)); playerscore … Software Development c++ | |
Dear all, I am working on the code below: [CODE] int cookTime(int time) { int second, minute; for (minute = time; minute > -1; minute--) { for (second = 59; second > -1; second--) { sleep(1); printf ("%i", minute); printf (" : %i\n", second); } } } [/CODE] Now this … Software Development c | |
[CODE]import time import calendar # time tuple/list index YEAR = 0 MONTH = 1 DAY = 2 WEEKDAY = 6 # weekdays MON=0 TUE=1 WED=2 THU=3 FRI=4 SAT=5 SUN=6 # months JAN=1 FEB=2 MAR=3 APR=4 MAY=5 JUN=6 JUL=7 AUG=8 SEP=9 OCT=10 NOV=11 DEC=12 HAVE_30_DAYS = (APR,JUN,SEP,NOV) HAVE_31_DAYS = (JAN,MAR,MAY,JUL,AUG,OCT,DEC) HAVE_28_DAYS … Software Development python | |
Hi everyone.. Suppose i have a function : [B]void foo(int ind,float **ptr1,float **ptr2[/B]) that allocates memory using malloc .. - double pointers are much more in reality- I want to use this pointers in other functions too, but when i call them(functions) in main() .. memory leak message appears .. … Software Development c | |
Hi friendz, I completed a project in VB6 recently, its a database handling project, Problem is, I have created a SETUP with all its required files via PDW wizard, when I run that setup just before completing the setup there came a message that "System files are outdated" so I … Software Development visual-basic | |
How to make a combo box read only ? N wat is the code to deactivate it ? Software Development vb.net | |
[code] //this game is played with a six sided die, on each player's turn he may roll until he gets a 1 from the die, at which point, all points accumulated to that point are wiped, he may hold and add the accumulation to his score at any time. #include<fstream> … | |
I've been able to open text files, read them and write to them. However, I always have to specify the name of the file before I compile. IE: ofstream myfile ("example.txt"); I've tried to declare a string, and then use that where the name of the file would nomally be, … Software Development c++ file-system | |
the question is using pointer variable: a)write a program that receives a sorted array of integer.then it will read an integer value and insert that integer value in correct place (using pointer variable) -is it how im write the code right. b)improve the first program code by allowing the program … Software Development c | |
I am writing a simple program to take a user-supplied file, read the contents, and output email addresses found in the file. If the user supplied an invalid path/file name, I want to prompt the user to try again. Right now, everything works properly if the first file name the … Software Development c++ file-system | |
I have a datagridview thats bounded to a db and bindingNavigator that has Add/Delete/Save buttons. When I select a row and delete it, the row gets deleted from the datagridview, but when I restart the application, it doesn't get physically deleted from the database. Search suggests putting this code inside … Software Development vb.net | |
Ok. So in the following section from my XML document, I have two attributes in the Unit tag. The first, [I]type[/I], and the second [I]uname[/I]. I wish to click, say a button that says "Troop" on it, and the program will search through the XML file and find the entries … |
The End.